mirror of
https://github.com/pezkuwichain/bizinikiwi-bn.git
synced 2026-07-21 06:55:44 +00:00
Add test that y coordinate remains 1 in jacobian when G1/G2 are negated.
This commit is contained in:
+9
-1
@@ -947,4 +947,12 @@ fn affine_fail() {
|
||||
fn affine_ok() {
|
||||
let res = AffineG1::new(Fq::one(), G1Params::coeff_b());
|
||||
assert!(res.is_err(), "Affine initialization should be ok because the point is on the curve");
|
||||
}
|
||||
}
|
||||
|
||||
fn test_y_at_point_at_infinity() {
|
||||
assert!(G1::zero().y == Fq::one());
|
||||
assert!((-G1::zero()).y == Fq::one());
|
||||
|
||||
assert!(G2::zero().y == Fq2::one());
|
||||
assert!((-G2::zero()).y == Fq2::one());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user