Bump voprf to v0.5.0-pre.2 (#304)

This commit is contained in:
daxpedda
2023-02-03 16:45:52 -08:00
committed by GitHub
parent 8901b74030
commit 1fbe25507e
10 changed files with 70 additions and 89 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ impl KeGroup for Curve25519 {
}
fn public_key(sk: Self::Sk) -> Self::Pk {
(&ED25519_BASEPOINT_TABLE * &sk).to_montgomery()
(ED25519_BASEPOINT_TABLE * &sk).to_montgomery()
}
fn diffie_hellman(pk: Self::Pk, sk: Self::Sk) -> GenericArray<u8, Self::PkLen> {
+1 -4
View File
@@ -38,11 +38,8 @@ impl KeGroup for Ristretto255 {
}
fn deserialize_pk(bytes: &[u8]) -> Result<Self::Pk, InternalError> {
if bytes.len() != 32 {
return Err(InternalError::PointError);
}
CompressedRistretto::from_slice(bytes)
.map_err(|_| InternalError::PointError)?
.decompress()
.filter(|point| point != &RistrettoPoint::identity())
.ok_or(InternalError::PointError)