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 to draft 19 #101

Merged
merged 1 commit into from
Feb 8, 2023
Merged

Update to draft 19 #101

merged 1 commit into from
Feb 8, 2023

Conversation

daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Feb 1, 2023

This updates VOPRF to be in sync with draft 19.

There are no changes compared to draft 11, which is what we were on until now, except:

  • The Ciphersuite ID is now a string and not two bytes anymore.
  • The static draft identifier in the context string is now OPRFV1-.

The change to the Ciphersuite ID requires us to update to elliptic-curve v0.13.0-pre.5, which I've done here. This also requires an upgrade to Rust 1.61.

This small change posed some difficulties because of the non-fixed-size nature of this ID. To avoid allocation I had to change the API in elliptic-curve (RustCrypto/traits#1238) and introduce a new internal helper type: Dst.

This also changed some of hash traits we used, namely instead of Digest we no require Default + FixedOutput + HashMarker, which should pose no downstream issues.

This build on top of:

We should probably wait for the release of elliptic-curve v0.13.0-pre.4 before merging this.
Was released!

Builds on top of #102.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 1, 2023
@daxpedda daxpedda force-pushed the draft-19 branch 2 times, most recently from 64b746e to 738d0e2 Compare February 1, 2023 14:43
@daxpedda
Copy link
Contributor Author

daxpedda commented Feb 2, 2023

The tests didn't change, just the output, because of the change to the context string.
For a moment I was thinking: how the hell did CI pass if I forgot to update the test vectors 😄.

@daxpedda daxpedda marked this pull request as ready for review February 3, 2023 12:47
@daxpedda
Copy link
Contributor Author

daxpedda commented Feb 3, 2023

This is now ready to be merged, but if possible I would like to get a new pre-release for voprf in beforehand.

@daxpedda
Copy link
Contributor Author

daxpedda commented Feb 3, 2023

Now builds on top of #102.

@daxpedda daxpedda marked this pull request as draft February 3, 2023 13:09
@daxpedda daxpedda marked this pull request as ready for review February 3, 2023 22:52
@daxpedda
Copy link
Contributor Author

daxpedda commented Feb 3, 2023

This is ready to be merged now!

Copy link
Contributor

@kevinlewi kevinlewi left a comment

Choose a reason for hiding this comment

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

Thanks once again for your contributions!

Comment on lines +500 to +503
pub(crate) struct Dst<L: ArrayLength<u8>> {
dst_1: GenericArray<u8, L>,
dst_2: &'static str,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Thanks for this.

@kevinlewi kevinlewi merged commit 5badeff into facebook:main Feb 8, 2023
@daxpedda daxpedda mentioned this pull request Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants