Closed chenyan-dfinity closed 3 years ago
Format issue. The standard miracl serialisation is 48+1 and 96+1 bytes for signature and pk. The hex above is 48 and 96 bytes long, so is the wrong length for the miracl serialisation methods. Perhaps we can add .to_<standard name here>
and .from_<standard name here>
for the 48 and 96 byte serialisations used in the emerging standard for bls signatures.
Bad bug! Around line 474 of ecp.rs - was 20, should have been 0x20 !! :( Now fixed
Thanks for the quick fix! It works!
I am trying to verify the following signature with
BLS12381
and domain separatorBLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_NUL_
, without the multi-pairing mechanism and enablingALLOW_ALT_COMPRESS
.The same test passed in C, but I get
BLS_FAIL
in Rust.Here is how I generate the library: https://github.com/dfinity/agent-rs/blob/6831121ce0963348346059a98d39c57786a8e9ca/ic-agent/src/bls/README.md
I think I'm patching the right code (see my last item in the README.md above), but the test still fails. Maybe something wrong in the Rust implementation of ALLOW_ALT_COMPRESS?