Add test that y coordinate remains 1 in jacobian when G1/G2 are negated.

This commit is contained in:
Sean Bowe 2017-04-02 13:48:53 -06:00
parent 4e2096bedd
commit c85330e11c
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
1 changed files with 9 additions and 0 deletions

View File

@ -821,3 +821,12 @@ fn test_binlinearity() {
assert_eq!((a.pow(t)) * a, Fq12::one());
}
}
#[test]
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());
}