facebook / voprf

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

Revert to bounded `serde` de/serialization #57

Open daxpedda opened 2 years ago

daxpedda commented 2 years ago

In #56 we will re-introduce some customized serde de/serialization again. This is because currently the VOPRF spec still actually produces zero scalars and identity points and we can't actually use the appropriate types to represent the fact that de/serialization should fail with zero scalars and identity points.

When this is resolved in the VOPRF spec, https://github.com/cfrg/draft-irtf-cfrg-voprf/issues/307, we can use the appropriate types. For elliptic-curve that is PublicKey and SecretKey or NonIdentityPoint (something I was thinking of introducing) and NonZeroScalar, for curve25519-dalek we will have to introduce our own types.

kevinlewi commented 2 years ago

@daxpedda just checking in, is this issue still relevant?

daxpedda commented 2 years ago

Theoretically, it's really code quality improvement only, maybe it's a bit overkill to have a whole issue for something like this, so feel free to close. But yeah, eventually we should get back to it.

daxpedda commented 1 year ago

Cc https://github.com/RustCrypto/traits/issues/1170.