-
Notifications
You must be signed in to change notification settings - Fork 45
Add BLS signature scheme to DSIGN interface
#587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
51c3bbb to
8797dba
Compare
de454e7 to
301705c
Compare
10c9712 to
529c0f9
Compare
2c1e9ed to
03e6c3e
Compare
301705c to
0e45e1f
Compare
5299ffc to
1921b7f
Compare
638cbee to
a8b303e
Compare
DSIGN interfaceDSIGN interface
63783e4 to
5abd42b
Compare
|
@perturbing Could you please rebase it on master and drop all of the commits that have already landed on |
|
PR description has some very nice repl examples. |
ce8b425 to
6bd5c25
Compare
e2acec9 to
421f40f
Compare
…, `CompressedPointSize` and add `FinalVerifyOrder` class. Co-authored-by: Hamza Jeljeli <hamza.jeljeli@iohk.io>
… interface. Co-authored-by: Hamza Jeljeli <hamza.jeljeli@iohk.io>
…)`, add tests for bls sigs
421f40f to
430fdfa
Compare
|
Dear @perturbing and @curiecrypt I added in the description a section about the integrator-facing documentation that I think it is worth to add. I proposed a structure of what we can include in such documentation. Please feel free to modify/add things to it. |
Description
This extends and refactors the work done in #567 by @hjeljeli32.
This PR adds the two variants of the BLS12-381 signature scheme,
BLS12381MinVerKeyDSIGNandBLS12381MinSigDSIGNto the already existingDSIGNclass. Besides that, it also extends the class module to allow for aggregatable signature schemes, which both BLS variants are. It also includes tests and benchmark additions.Though both BLS signature schemes work similarly, the difference is that the former signature scheme (
MinVerKey) encodes the verification key in the smallest BLS group (G1), while having its signatures encoded in the bigger BLS group (G2). The latter (MinSig) does the reverse. Besides the size impact of the serialized objects, there is also a computational impact for signing/verification operations by this choice.To play around with it, in a repl
Note that this signature scheme introduces five things that a "normal"
DSIGNinterface does not have.DSIGNclass is extended to optionally generate keys with extra key info (KeyGenContext v). This is to comply with the key generation as per this IETF draft. This change is backwards compatible with the other existingDSIGNsignature schemes.(). More explicitly, for the domain separation tag and augmentation tag, we have thatrawSerialise{SigDSIGN, VerKeyDSIGN}functions also compress their objects (as per the ZCash standard). That is, e.g.,rawDeserialise{SigDSIGN, SignKeyDSIGN VerKeyDSIGN}also performs a check on whether the curve points (for aVerKeyDSIGNandSigDSIGN) and the raw scalar input (for theSignKeyDSIGN) are non-zero and reduces it to the field (for the safety of the other FFI calls that might follow on it). E.g.,DSIGNAlgorithm vinterface withDSIGNAggregatable v, which allows for the utility functions that relate to aggregatable signature schemes like aggregated signature verification and the creation and verification of Proof of Possessions (PoP) of verification keys.For others interested in this work and that want to run the benchmarks
Integrator-facing documentation (proposal)
I couldn’t find a concise integrator-facing documentation for DSIGN + BLS. BLS has a few “extra moving parts” compared to other DSIGN schemes: two variants (min-sig vs min-verkey) with different artifact sizes/perf tradeoffs, PoP + aggregation workflows, and a signing context via (DST, AUG).
Proposal: add a short “BLS DSIGN Integrator Guide” section under cardano-crypto-class/README.md (or a more appropriate location), covering:
Checklist
CHANGELOG.mdfor the affected packages.New section is never added with the code changes. (See RELEASING.md)
.cabalandCHANGELOG.mdfiles according to theversioning process.
.cabalfiles for all affected packages are updated.If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)