You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
3.7 KiB

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>
1 year ago
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>
1 year ago
Implement WB hash2curve for BLS12-377 and BLS12-381 (#138) * include the coefficients of bls12-377 G1 and G2 isogenies for wb hash2curve * replacing the ark-ec dependency to w3f/arkworks-algebra * added parameters for isogenous curve to bls12-377 g1 curve for swu map * fix dependency inconsistency problem * implement WBParams and its isogenous curve for BLS12-377 G1 * implement the SWUParameters for isogenous curve to BLS12-377 g2 curve. * implement WBParams for BLS12-377 G2 curve * replacing const generic arrays with const slice in g1 and g2 iso coefficients * - Implement WB hash to curve for BLS12-381 G1 - Improvement to WB hash to curve code for BLS12-377 - Update sage code for generating isogeny coefficients for arkworks. * Implement WB hash to curve for BLS12-381 G2 * - fix the bug with base order for field_new for Fq2 - fix the polynomial coeffcient order for bls12-381 g1 and g2 isogenies. - fix the polynomial coeffcient order for bls12-377 g1. 377-g2 needs to be fixed still. * fix bls12-377 wb hash to curve isogeny coeffcients * fixed sage code for generating the isogeny coefficients * use patch.crates-io hack to resolve dependancy issues on w3f fork * Rename `Parameters` to `Config` for all fields * Rename `field_new` to `MontFp` * Rename `field_new` to `QuadExt` and `CubicExt` * Refactor bls12_381 crate based on update-ff branch. Close #9 * adapt bls12 wb hashing to new changes in algebra * update bls12-381 dependancies and g1, g2 definition to pass tests * adapt bls12-377 hash to curve to algebar updates * depend on upstream for pull request * cargo fmt * - move the isogeny finder script from sage to script folder - delete auxiliary isogeny coeff file * add unit tests for wb hashing to bls12-377 g1 and g2 * - Use IsogenyMap struct to specify WB Isogeny for bls12-381 and bls12-377 - Do not use auxiliary constants to define generators of g2_swu_iso curve. - Update change log * Bump the Algebra dependencies of bls12_381 and bls12_377 to 0.4.0-alpha.4 so they could use the IsogenyMap struct. * Add h2c tests for BLS12-381 curve * Drop alpha sub-version in dependancies because it takes the lastest sub version * Parameters → Config for bls12-377/381 curves * do cargo fmt * do SwuIsoParameters → SwuIsoConfig for bls12-377/381 * Adapt to new macro * Fix macro invocation should be semicolon not comma * curves master should use algebra/r1cs default branch * Add h2c test invocation for bls12-377 curve no actual test vectors yet * add faster cofactor clearing and tests for g1 * add faster cofactor clearing and tests for g2 parameters of endomorphisms are wrong for now * add test vectors for bls12-377 * add h_eff to g2 tests for correctness test * improve cofactor tests g2 * add a test for psi(psi(P)) == psi2(P) * fix bls12-377 psi & psi2 computation parameters * rename const to DOUBLE_P_POWER_ENDOMORPHISM_COEFF_0 and make private * fix clippy warnings in changed code * use the same zeta as test suites * update code comments, make methods private * update changelog Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu> Co-authored-by: mmagician <marcin.gorny.94@protonmail.com>
1 year ago
  1. # CHANGELOG
  2. ## Pending
  3. ### Breaking changes
  4. ### Features
  5. - [\#156](https://github.com/arkworks-rs/curves/pull/156) Add the bw6-767 curve.
  6. ### Improvements
  7. - [\#156](https://github.com/arkworks-rs/curves/pull/156) The hard part of the final exponentiation for bw6-761 relocated from arkworks/algebra.
  8. ### Bugfixes
  9. - [\#176](https://github.com/arkworks-rs/curves/pull/176) Non-canonical infinity point and bad flags in BLS12-381 serialization should fail.
  10. ## v0.4.0
  11. - [\#76](https://github.com/arkworks-rs/curves/pull/76) twisted Edwards parameters for bls12-377
  12. - Fixed curve benches
  13. ### Breaking changes
  14. - [\#104](https://github.com/arkworks-rs/curves/pull/104) Remove `QUADRATIC_NONRESIDUE` parameter from implementors of `Fp2Config`.
  15. - [\#129](https://github.com/arkworks-rs/curves/pull/129) Implement custom serialization for BLS12-381 for compatibility with the [Zcash lib](https://github.com/zkcrypto/bls12_381).
  16. ### Features
  17. - [\#121](https://github.com/arkworks-rs/curves/pull/121) Add the ed25519 curve.
  18. - [\#122](https://github.com/arkworks-rs/curves/pull/122) Add the secp256k1 and secq256k1 curves.
  19. - [\#124](https://github.com/arkworks-rs/curves/pull/124) Add the curve25519 curve.
  20. ### Improvements
  21. - [\#70](https://github.com/arkworks-rs/curves/pull/70) Add prepared G2 pairing consistency test.
  22. - [\#74](https://github.com/arkworks-rs/curves/pull/74) Use Scott's subgroup membership tests for `G1` and `G2` of BLS12-381.
  23. - [\#103](https://github.com/arkworks-rs/curves/pull/103) Faster cofactor clearing for BLS12-381.
  24. - [\#107](https://github.com/arkworks-rs/curves/pull/107/) Use 2-NAF of `ATE_LOOP_COUNT` to speed up the Miller loop in MNT curves.
  25. - [\#141](https://github.com/arkworks-rs/curves/pull/103) Faster cofactor clearing for BLS12-377.
  26. - [\#138](https://github.com/arkworks-rs/curves/pull/138) Implement WB Hash-to-Curve for bls12-381 and bls12-377
  27. ### Bug fixes
  28. ## v0.3.0
  29. ### Breaking changes
  30. - [\#60](https://github.com/arkworks-rs/curves/pull/60) Change the scalar group generator of `Fr` of `bls12_377` Fr from `11` to `22`.
  31. - [\#61](https://github.com/arkworks-rs/curves/pull/61) Remove `ATE_LOOP_COUNT_IS_NEGATIVE` from BN254 curve parameter.
  32. ### Features
  33. - [\#64](https://github.com/arkworks-rs/curves/pull/64) Implement the Bandersnatch curve, another twisted Edwards curve for BLS12-381.
  34. ### Improvements
  35. ### Bug fixes
  36. ## v0.2.0
  37. ### Breaking changes
  38. - Requires all crates from `arkworks-rs/algebra` to have version `v0.2.0` or greater.
  39. ### Features
  40. - [\#3](https://github.com/arkworks-rs/curves/pull/3) Add constraints for
  41. `ark-bls12-377`,
  42. `ark-ed-on-bls12-377`,
  43. `ark-ed-on-bls12-381`,
  44. `ark-ed-on-bn254`,
  45. `ark-ed-on-cp6-782`,
  46. `ark-ed-on-bw6-761`,
  47. `ark-ed-on-mnt4-298`,
  48. `ark-ed-on-mnt4-753`,
  49. `ark-mnt4-298`,
  50. `ark-mnt6-298`,
  51. `ark-mnt4-753`,
  52. `ark-mnt6-753`.
  53. - [\#7](https://github.com/arkworks-rs/curves/pull/7) Add benchmarks for Edwards curves.
  54. - [\#19](https://github.com/arkworks-rs/curves/pull/19) Change field constants to be provided as normal strings, instead of in Montgomery form.
  55. - [\#53](https://github.com/arkworks-rs/curves/pull/53) Add benchmarks for Pallas and Vesta curves.
  56. ### Improvements
  57. - [\#42](https://github.com/arkworks-rs/curves/pull/42) Remove the dependency of `rand_xorshift`.
  58. ### Bug fixes
  59. - [\#28](https://github.com/arkworks-rs/curves/pull/28), [\#49](https://github.com/arkworks-rs/curves/pull/49) Fix broken documentation links.
  60. - [\#38](https://github.com/arkworks-rs/curves/pull/38) Compile with `panic='abort'` in release mode, for safety of the library across FFI boundaries.
  61. - [\#45](https://github.com/arkworks-rs/curves/pull/45) Fix `ark-ed-on-mnt4-753`.
  62. ## v0.1.0
  63. Initial Release