mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-08 23:11:29 +01:00
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>
This commit is contained in:
@@ -10,7 +10,7 @@ keywords = ["cryptography", "finite-fields", "elliptic-curves" ]
|
||||
categories = ["cryptography"]
|
||||
include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
|
||||
license = "MIT/Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
ark-ff = { version="^0.3.0", default-features = false }
|
||||
|
||||
1
bw6_761/LICENSE-APACHE
Symbolic link
1
bw6_761/LICENSE-APACHE
Symbolic link
@@ -0,0 +1 @@
|
||||
../LICENSE-APACHE
|
||||
1
bw6_761/LICENSE-MIT
Symbolic link
1
bw6_761/LICENSE-MIT
Symbolic link
@@ -0,0 +1 @@
|
||||
../LICENSE-MIT
|
||||
@@ -43,7 +43,7 @@ impl SWCurveConfig for Parameters {
|
||||
/// AFFINE_GENERATOR_COEFFS = (G1_GENERATOR_X, G1_GENERATOR_Y)
|
||||
const GENERATOR: G1Affine = G1Affine::new_unchecked(G1_GENERATOR_X, G1_GENERATOR_Y);
|
||||
#[inline(always)]
|
||||
fn mul_by_a(_elem: &Self::BaseField) -> Self::BaseField {
|
||||
fn mul_by_a(_elem: Self::BaseField) -> Self::BaseField {
|
||||
use ark_ff::Zero;
|
||||
Self::BaseField::zero()
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ impl SWCurveConfig for Parameters {
|
||||
const GENERATOR: G2Affine = G2Affine::new_unchecked(G2_GENERATOR_X, G2_GENERATOR_Y);
|
||||
|
||||
#[inline(always)]
|
||||
fn mul_by_a(_elem: &Self::BaseField) -> Self::BaseField {
|
||||
fn mul_by_a(_elem: Self::BaseField) -> Self::BaseField {
|
||||
use ark_ff::Zero;
|
||||
Self::BaseField::zero()
|
||||
}
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
use ark_algebra_test_templates::{
|
||||
curves::*, generate_bilinearity_test, generate_g1_test, generate_g2_test, msm::*,
|
||||
};
|
||||
use ark_ec::{AffineCurve, PairingEngine};
|
||||
use ark_ff::{Field, One, PrimeField};
|
||||
use ark_std::{rand::Rng, test_rng};
|
||||
use core::ops::MulAssign;
|
||||
|
||||
use crate::*;
|
||||
use ark_algebra_test_templates::*;
|
||||
use ark_ff::Field;
|
||||
|
||||
generate_g1_test!(bw6_761; curve_tests; sw_tests;);
|
||||
generate_g2_test!(bw6_761; curve_tests; sw_tests;);
|
||||
generate_bilinearity_test!(BW6_761, Fq6);
|
||||
test_group!(g1; G1Projective; sw);
|
||||
test_group!(g2; G2Projective; sw);
|
||||
test_group!(pairing_output; ark_ec::pairing::PairingOutput<BW6_761>; msm);
|
||||
test_pairing!(pairing; crate::BW6_761);
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
use ark_algebra_test_templates::{
|
||||
fields::*, generate_field_serialization_test, generate_field_test,
|
||||
};
|
||||
use ark_ff::{Field, One, PrimeField, UniformRand, Zero};
|
||||
use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize};
|
||||
use ark_std::{rand::Rng, test_rng};
|
||||
use core::ops::{AddAssign, MulAssign, SubAssign};
|
||||
|
||||
use crate::*;
|
||||
use ark_algebra_test_templates::*;
|
||||
|
||||
generate_field_test!(bw6_761; fq3; fq6_2_on_3; false; mont(12, 6); );
|
||||
generate_field_serialization_test!(bw6_761;);
|
||||
test_field!(fr; Fr; mont_prime_field);
|
||||
test_field!(fq; Fq; mont_prime_field);
|
||||
test_field!(fq3; Fq3);
|
||||
test_field!(fq6; Fq6);
|
||||
|
||||
Reference in New Issue
Block a user