30 Commits

Author SHA1 Message Date
mmagician
72a18b6ecf GLV implementation for BLS12_377, BLS12_381 and BN254 (#158) 2023-09-11 17:29:38 -04:00
mmagician
1ce1fcf70f Bw6-761 optimized Miller loop (#155) 2023-09-03 09:38:44 -04:00
mmagician
379f23070c Use BigInt macro for defining curve config parameters (#170) 2023-09-01 09:43:12 -07:00
swasilyev
7e58260618 Add BW6-767 curve and update BW6-761 to use the new bw6 model (#156)
* Rework bw6-761 to bw6-767

use bls12-381 instead of 377 for test imports

fix the inline comments with correct name and params


Set the right base field


Equation for base curve is y2 = x3 + 1


fill in pairing params


adapt sage scripts with correct moduli


calculate the correct cubic non residue


correct the parameter B in the curve equation


remove the specialized method for mult by nonresidue

nonresidue is two, so default will be doubling

calculate more correct parameters for fq3

`TRACE_MINUS_ONE_DIV_TWO` and `QUADRATIC_NONRESIDUE_TO_T`

compute the right fq3 & fp6 frobenious coefficients


calculate the cofactor for g1


use the g1 generator from gnark's fork


use the right g2 equation


g2 cofactor is slightly smaller than g1 cofactor


get the g2 generators from gnark's fork


update g1 and g2 curve info in the comments


fill in `COFACTOR_INV` value for g1


fill in `COFACTOR_INV` value for g2

* update module description

author information
2-adicity of the scalar field

* update changelog

* remove trailing comma

* remove todo

* 2nd loop count is x^3 - x^2 - x

* Revert "2nd loop count is x^3 - x^2 - x"

This reverts commit 2b323db3baff06a6077fd7505ff489fa31be7282.

* fix comment regarding non-residue

* first loop count should be X

* 1. Generic BW6 params added to BW6-761
2. Curve specific hard part of the final exp moved from algebra

* 1. Generic BW6 params added to BW6-767
2. Miller loop params changed to the "unoptimized" version

* cargo fmt

* changelog updated

* X_MINUS_1_DIV_3 added to BW6Config

* imports fixed

---------

Co-authored-by: mmagician <marcin.gorny.94@protonmail.com>
2023-09-01 10:06:45 +02:00
Hossein Moghaddas
32b487e7fd Adding AdditiveGroup and PrimeGroup (#159)
Co-authored-by: Michele Orrù <michele.orru@berkeley.edu>
Co-authored-by: Weikeng Chen <w.k@berkeley.edu>
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
2023-08-19 12:09:04 -07:00
mmagician
3668338023 Merge releases into master, keeping the patch.crates-io section 2023-01-19 16:36:44 -08:00
Pratyush Mishra
febd7635fb Rename all *Parameters to *Config (#136)
* Rename all `*Parameters` to `*Config`

* Tweak
2022-12-16 19:35:32 -08:00
mmagician
cdf4d182a6 Prepare release 0.4 (#133) 2022-11-29 08:22:09 -08:00
Pratyush Mishra
efefa209d6 Fix mul-by-non-residue for bw6::fq3 2022-10-02 09:15:25 -07:00
Pratyush Mishra
68f500da01 Optimizations to field and curve arithmetic 2022-10-02 09:15:25 -07:00
Pratyush Mishra
363426c1d4 Update to new benchmarking framework (#126) 2022-09-09 19:24:33 -07:00
Weikeng Chen
3c4c67f114 Sync with the recent changes in ark-algebra on pairing and testing (#116)
* Fix another typo in the Jubjub curve comment

* fix

* progress

* get_point_from_x_unchecked

* fix

* soft link

* Fix Bandersnatch

* Fix Edwards form of Bandersnatch

* Actually fix ed_on_bls12_381_bandersnatch/src/curves/mod.rs

* fix

* fix

* curve-benches

* fix the last mul_by_a; fmt

Co-authored-by: onewayfunc <onewayfunc@gmail.com>
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
2022-09-02 16:31:58 -07:00
Marcin
93e64df895 Catch up with algebra (#106)
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
2022-07-29 12:16:16 -07:00
Pratyush Mishra
1551d6d76c Upgrade to work with latest ark-ff (#95)
Co-authored-by: Sun <huachuang20@gmail.com>
2022-03-07 13:12:03 -08:00
Marcin
6a5cf1d84a BigInt fixes corresponding to algebra#372
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
2022-01-10 11:03:40 -08:00
Pratyush Mishra
d1ced15cc2 Upgrade for algebra/365 (#92)
* Upgrade for algebra/365

* Merge fix

* Fix
2021-12-29 17:07:52 +01:00
Yuncong Hu
677b4ae751 Simplify the field and curve tests using macros (#90)
* Simplify the field and curve tests using macros

* minor

* remove redundant code

Co-authored-by: weikeng <w.k@berkeley.edu>
2021-12-06 00:03:29 -08:00
George Gkitsas
a9cb9bfcb2 Fix incorrect repository links in Cargo.toml files (#63)
* fixes repository in cargo files

* lint fixes
2021-06-23 08:58:50 -07:00
Weikeng Chen
d2c998736e Release v0.3.0 (#62)
* release

* update CHANGELOG.md
2021-06-06 13:47:19 -07:00
Dev Ojha
269fe97519 Release v0.2 (#51) 2021-03-24 20:18:59 -05:00
Pratyush Mishra
5c0dcd5ca1 Fix links in curve documentation (#49) 2021-03-24 09:25:56 -07:00
Weikeng Chen
74f6efb821 Replace rand with ark_std::rand (#42)
* replace rand

* update CHANGELOG

* fmt

* fix

* fix
2021-02-04 20:12:47 -08:00
Pratyush Mishra
487f0043d8 Upgrade to test-templates from algebra (#40)
* Upgrade to test-templates from algebra

* Fix Cargo.toml

* Fix search and replace

* Update

* Fix cargo tomls
2021-01-31 11:47:41 -08:00
Pratyush Mishra
621355df14 Fix links in Cargo.tomls (#29)
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
2020-12-16 11:12:01 -08:00
ValarDragon
febd2048ee fix lint 2020-12-15 20:49:55 -08:00
ValarDragon
530d618cca Change test_rng import to ark-std 2020-12-15 20:49:55 -08:00
Pratyush Mishra
0486c30b3b Format 2020-12-10 12:47:25 -08:00
Pratyush Mishra
4e45f92ca9 Fixes 2020-12-10 12:47:25 -08:00
Pratyush Mishra
6a6b3711c6 Update BW6-761 2020-12-10 12:47:25 -08:00
Pratyush Mishra
43ca2132fd Initial commit 2020-10-11 19:50:41 -07:00