Optimizations to field and curve arithmetic

This commit is contained in:
Pratyush Mishra
2022-09-12 22:03:00 -07:00
parent 363426c1d4
commit 68f500da01
13 changed files with 82 additions and 39 deletions

View File

@@ -12,9 +12,9 @@ test_field!(fq6; Fq6);
#[test]
fn test_fq3_more() {
let mut rng = test_rng();
let a: Fq3 = rng.gen();
let mut a: Fq3 = rng.gen();
assert_eq!(
a * Fq6Config::NONRESIDUE,
<Fp6ConfigWrapper<Fq6Config>>::mul_base_field_by_nonresidue(&a)
*<Fp6ConfigWrapper<Fq6Config>>::mul_base_field_by_nonresidue_in_place(&mut a)
);
}