decentralized-identity / bbs-signature

The BBS Signature Scheme
https://identity.foundation/bbs-signature/draft-irtf-cfrg-bbs-signatures.html
Apache License 2.0
78 stars 26 forks source link

New API update #183

Closed BasileiosKal closed 2 years ago

BasileiosKal commented 2 years ago

Substitutes previous PR #138 on API update since it had more conflicts than text at this point.

Updates:

This PR introduces the following main changes:

  1. Removes the generators from the input of the operations. Now the generators are computed as part of the operation procedure, using create_generators and a ciphersuite defined seed.
  2. Makes all arguments “structured” (this is to be more explicit when for example we need a specific subarray of an inputted array in the correct order, i.e., revealed messages from messages using the indexes etc.). This closes #163.
  3. Introduces an additional section for the core operations called Precomputations. The reason is that, as the result of the above updates, a lot of steps are needed to de-structure the inputs or get sub-arrays of the inputted arrays etc. I find that those steps “fill” the main procedure, making it harder to read (especially ProofGen/ ProofVerify). So, I moved them to the “Precomputation” section to try and make things more readable.

Pros and Cons:

Pros:

Cons:

Note:

Regarding the Precomputations section if the WG finds it to be more confusing than helpful I’m fine with removing it. Personally, I like it, but it was an “experiment” to see how it looks.

Also addresses #159, #117, #113, #168, #139

BasileiosKal commented 2 years ago

Also made the revealed -> disclosed update here. Closes #178.

BasileiosKal commented 2 years ago

@alessandroguggino

I would specify why R and U are called that.

Done! Thank you!

Also, why not add in the precomputations the MapMessageToScalarAsHash operation?

The MapMessageToScalarAsHash is an optional operation acting as a suggestion for applications that want to hash the messages before signing them. If we added as a precomputation would be like enforcing it. However, I think we want the flexibility so we can combine bbs+ with range proofs etc.

tplooker commented 2 years ago

Multiple reviews and approvals, merging, thanks @BasileiosKal!