cloudflare / circl

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library
http://blog.cloudflare.com/introducing-circl
Other
1.3k stars 144 forks source link

Deserialization test failing for BLS12-381 #499

Closed matteosz closed 5 months ago

matteosz commented 5 months ago

Hello,

I was working on Kyber library, a crypto library in Go, and we were using your implementation of BLS12-381. We also leverage another implementation of BLS12-381 from Kilic.

We were then adding some deserialization tests (from this commit) and noticed that one in particular fails on the Circl implementation, while it succeeds on the Kilic one. Here's the deserialization test:

Filename: deserialization_fails_with_b_flag_and_a_flag_true.yaml

input: {signature: e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}
output: null

Here's the test code for reproducibility (TestZKCryptoVectorsG1Compressed and TestZKCryptoVectorsG2Compressed tests).

armfazh commented 5 months ago

Thanks @matteosz for reporting.