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
cyyynthia added a commit to cyyynthia/voprf that referenced this pull request Sep 22, 2024
kevinlewi added a commit that referenced this pull request Sep 24, 2024
* Fix Clippy (#85)

* Update `curve25519-dalek` to 4.0.0-pre.5 (#86)

* Update `curve25519-dalek`

* Improve documentation

* Adding all-features CI test (#87)

* Upgrade `p256` to v0.12 (#90)

* Upgrade `p256` to v0.12

* Upgrade MSRV to 1.60

(cherry picked from commit daa8dc0)

* Replace `json` with `serde_json` (#92)

(cherry picked from commit c8de516)

* Fix Clippy (#96)

(cherry picked from commit 74eaebe)

* Depend on `ProjectivePoint: ToEncodedPoint` (#95)

(cherry picked from commit 0409db6)

* Update `curve25519-dalek` (#94)

(cherry picked from commit 2787151)

* Use explicit crate features (#100)

(cherry picked from commit 5bce3e3)

* Bump `curve25519-dalek` to v4.0.0-rc.1 (#102)

(cherry picked from commit 8363d26)

* Test P-384 (#84)

(cherry picked from commit 83eb78b)

* Update RustCrypto dependencies to v0.13 (#106)

(cherry picked from commit 8b895cc)

* Update curve25519-dalek requirement from =4.0.0-rc.1 to =4.0.0-rc.2 (#108)

Updates the requirements on [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) to permit the latest version.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/main/CHANGELOG.md)
- [Commits](dalek-cryptography/curve25519-dalek@4.0.0-rc.1...4.0.0-rc.2)

---
updated-dependencies:
- dependency-name: curve25519-dalek
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 4bd2cf4)

* Updating dual-license language (#110)

(cherry picked from commit f79ebf9)

* Bump `curve25519-dalek` to v4.0.0-rc.3 (#113)

(cherry picked from commit 209b957)

* Bump `curve25519-dalek` to v4 (#116)

(cherry picked from commit 0fdfdfd)

* Fixing clippy IntoIterator warnings (#123)

(cherry picked from commit c0162ec)

* Bump actions/checkout from 3 to 4 (#120)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 8da5684)

* Updating setup-rust-action (#125)

(cherry picked from commit 59e3fed)

* Test P-521 (#127)

(cherry picked from commit 68cc7d3)

* Fix ambiguous lifetime elision (#131)

(cherry picked from commit 40769f7)

* Bump actions/cache from 3 to 4 (#132)

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit c93884a)

* Fixups + cherry-picking changes from #101

* Fix Clippy warnings

* More fixups, tests passing

* Ensure CI runs on branch v0.4

---------

Co-authored-by: daxpedda <daxpedda@gmail.com>
Co-authored-by: Kevin Lewi <klewi@fb.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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