keep-starknet-strange / garaga

State-of-the-art Elliptic Curve operations and SNARKS verification for Cairo & Starknet 🐺.
https://felt.gitbook.io/garaga
MIT License
181 stars 39 forks source link

bug: fq_eq_zero and fq_eq_one needs to be fixed in BLS12-381 fq.cairo #74

Closed onurinanc closed 1 year ago

onurinanc commented 1 year ago

The checks are done for the BigInt3 not for the BigInt4, x.d3 == 0 needs to be added to both functions

onurinanc commented 1 year ago

https://github.com/keep-starknet-strange/garaga/blob/main/src/bls12_381/fq.cairo#L28

feltroidprime commented 1 year ago

Thank you for noticing that point. Will fix soon.