Skip to content
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

Update BBS to match new draft specs #7

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

jeddenlea
Copy link
Contributor

Both https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bbs-signatures-06 and https://datatracker.ietf.org/doc/html/draft-kalos-bbs-blind-signatures-01 have been recently released. They mostly change the hashing ordering of things. Though, the blind spec also now includes a fully fledged BlindProofVerify and dropped get_disclosed_data, and blinded messages are hashed using a new sequence of generators.

While updating the test fixtures I've ensured that they're all being used, some were not included. There were a couple that were #[ignore]'d, but actually worked just fine, so I've enabled them. The tests using the fixtures were all very formulaic, so I've tried to condense them using macros.

Cargo.toml Outdated Show resolved Hide resolved
@AlbertoSvg
Copy link
Member

@jeddenlea LGTM! Thank you very much for your contribution. Regarding the MSRV, I'd prefer to maintain it at 1.65 for now

Both
https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bbs-signatures-06
and
https://datatracker.ietf.org/doc/html/draft-kalos-bbs-blind-signatures-01
have been recently released.  They mostly change the hashing ordering of
things. Though, the blind spec also now includes a fully fledged
`BlindProofVerify` and dropped `get_disclosed_data`, and blinded
messages are hashed using a new sequence of generators.

While updating the test fixtures I've ensured that they're all being
used, some were not included. There were a couple that were
`#[ignore]`'d, but actually worked just fine, so I've enabled them.
The tests using the fixtures were all very formulaic, so I've tried to
condense them using macros.
In the vast majority of cases, we essentially want i2osp to act like
`to_be_bytes`. But, it does help to actually express things in a manner
consistent with the specs.  So, this makes i2osp a function with a const
generic parameter to control the size of the returned array.  It remains
as flexible as it was, but in the vast majority of cases where a usize
is turned into an 8-byte array, this compiles down to just a byte swap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants