facebook / voprf

An implementation of a verifiable oblivious pseudorandom function (RFC 9497)
Apache License 2.0
56 stars 15 forks source link

Update to draft 19 #101

Closed daxpedda closed 1 year ago

daxpedda commented 1 year ago

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 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 (https://github.com/RustCrypto/traits/pull/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 https://github.com/facebook/voprf/pull/102.

raphaelrobert commented 1 year ago

There also was a change in the test in the test vectors between draft-16 and draft-17:

https://www.google.com/url?sa=j&url=https%3A%2F%2Fauthor-tools.ietf.org%2Fiddiff%3Furl1%3Ddraft-irtf-cfrg-voprf-16%26url2%3Ddraft-irtf-cfrg-voprf-17%26difftype%3D--html&uct=1528330230&usg=tqYv9g34xelr7XxjhiOAi96Docs.&source=meet

daxpedda commented 1 year ago

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 :smile:.

daxpedda commented 1 year ago

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

daxpedda commented 1 year ago

Now builds on top of https://github.com/facebook/voprf/pull/102.

daxpedda commented 1 year ago

This is ready to be merged now!