Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an initial experiment on how to completely transition away from providing any specific implementation of
Group
in thevoprf
crate, but rely on traits fromelliptic-curve
exclusively.Which is impossible at the moment, but this is a first step into the right direction. Missing steps would be:
Voprf
trait toelliptic-curve
and implement it forNistP256
andNistP384
.RistrettoPoint
in curve25519, see curve25519: ed25519, x25519 and ristretto255 RustCrypto/elliptic-curves#497. Unlikely to happen soon, so we are just re-exporting a type to fill that gap, to avoid having to wait for Rust specialization.It introduces two types:
Voprf
trait, which extracts theSUITE_ID
fromGroup
. It also binds theSUITE_ID
to a corresponding hash, which wasn't done before.Ristretto255
, which implementsGroup
, as it is unlikely thatcurve25519-dalek
will implement the traits we need anytime soon.Other changes:
Group
.Group::zeroize()
and used trait bound instead.HashMarker
as a trait bound toH
.Voprf
as a trait bound toG
.SUITE_ID
tou16
because it can't be bigger anyway.See discussions in facebook/opaque-ke#254 and facebook/opaque-ke#250.
Builds on top of #48.