Crypto/BLS: add more unit tests
This MR adds more tests for BLS signatures:
- checks signature or proof verification against test vectors
- checks if
pippengerandaffine_add_bulkuse complete formulas (they handle repeated points and a point at infinity correctly) - checks if
pop_prove/pop_verifyworks correctly with an override public key - checks if
pop_verifydoes not acceptproofwith Pop signature ciphersuite - checks if
verifydoes not acceptsignaturewith Aug signature ciphersuite
Manually testing the MR
dune exec src/lib_bls12_381_signature/test/main.exe -- --file test_signature.ml
dune exec src/lib_bls12_381/test/main.exe -- --file test_g1.ml
dune exec src/lib_bls12_381/test/main.exe -- --file test_g2.ml
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR