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

Vrf Audit #156

Merged
merged 10 commits into from
Dec 8, 2022
Merged

Vrf Audit #156

merged 10 commits into from
Dec 8, 2022

Conversation

alxiong
Copy link
Contributor

@alxiong alxiong commented Dec 7, 2022

Description

This PR fix issues raised in our self-audit on BLS implementations.

Major changes include:

  • Add Zeroizing::new(ikm) internally
  • Add warning and rustdoc examples to remind users to provide good RNG
  • Add key_gen_v5 to allow generation of multiple keys using the same ikm
  • Update Ciphersuite ID to conform with standard
  • Add options to deserialize compressed, unchecked (skipping subgroup check) for Signature and PublicKey.

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (main)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

@alxiong alxiong requested a review from a team December 7, 2022 15:45
@alxiong alxiong self-assigned this Dec 7, 2022
@alxiong alxiong mentioned this pull request Dec 7, 2022
6 tasks
@alxiong alxiong requested a review from a team December 8, 2022 05:05
primitives/src/constants.rs Show resolved Hide resolved
primitives/src/constants.rs Show resolved Hide resolved
primitives/src/signatures/bls.rs Outdated Show resolved Hide resolved
primitives/src/signatures/bls.rs Outdated Show resolved Hide resolved
primitives/src/signatures/bls.rs Outdated Show resolved Hide resolved
primitives/src/signatures/bls.rs Outdated Show resolved Hide resolved
primitives/src/signatures/bls.rs Show resolved Hide resolved
test_canonical_serde_helper(sig);
}

// TODO: (alex) update this after upgrading to arkwork 0.4.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken this will need to be upgraded anyway, since e.g. the deserialize method will have a new signature in 0.4.0.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@alxiong alxiong Dec 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, that's exactly what I meant. CanonicalDeserialize have 4 combinations of (un)compressed + (un)check. which makes more sense.

tessico
tessico previously approved these changes Dec 8, 2022
Copy link
Contributor

@tessico tessico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO doesn't hurt though, it was just FYI.

@alxiong alxiong merged commit 1cbf864 into main Dec 8, 2022
@alxiong alxiong deleted the vrf-audit branch December 8, 2022 14:28
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.

None yet

3 participants