chore: bump to 0.6.0-rc.0, migrate to elliptic-curve 0.14, hash2curve 0.14, rand_core 0.10 #1

Merged
breakingbread merged 6 commits from chore/migrate-elliptic-curve-0.14 into master 2026-06-27 17:04:59 +02:00
8 changed files with 24 additions and 24 deletions
Showing only changes of commit 672698e2e6 - Show all commits
+1 -1
View File
@@ -13,8 +13,8 @@ use core::ops::Mul;
use digest::block_api::BlockSizeUser;
use digest::typenum::{IsLess, IsLessOrEqual, U256};
use digest::{Digest, FixedOutput, HashMarker, OutputSizeUser};
use hybrid_array::typenum::{IsGreaterOrEqual, Prod, True, U2};
use hybrid_array::ArraySize;
use hybrid_array::typenum::{IsGreaterOrEqual, Prod, True, U2};
/// Configures the underlying primitives used in VOPRF
pub trait CipherSuite
+1 -1
View File
@@ -13,7 +13,7 @@ use core::ops::Add;
use derive_where::derive_where;
use digest::{Digest, Output, OutputSizeUser};
use hybrid_array::typenum::{IsLess, Unsigned, U2, U256, U9};
use hybrid_array::typenum::{IsLess, U2, U9, U256, Unsigned};
use hybrid_array::{Array, ArrayN, ArraySize};
use rand_core::{TryCryptoRng, TryRng};
use subtle::ConstantTimeEq;
+1 -1
View File
@@ -16,7 +16,7 @@ use elliptic_curve::{
AffinePoint, Field, FieldBytes, FieldBytesSize, Group as _, ProjectivePoint, PublicKey, Scalar,
SecretKey,
};
use hash2curve::{hash_to_scalar, ExpandMsgXmd, GroupDigest};
use hash2curve::{ExpandMsgXmd, GroupDigest, hash_to_scalar};
use hybrid_array::typenum::{IsGreaterOrEqual, Prod, Sum, True, U2};
use hybrid_array::{Array, ArraySize};
use rand_core::TryCryptoRng;
+3 -3
View File
@@ -15,10 +15,10 @@ use curve25519_dalek::traits::Identity;
use digest::block_api::BlockSizeUser;
use digest::{FixedOutput, HashMarker};
use hash2curve::{ExpandMsg, ExpandMsgXmd, Expander};
use hybrid_array::typenum::{
IsGreaterOrEqual, IsLess, IsLessOrEqual, Prod, True, U16, U2, U256, U32, U64,
};
use hybrid_array::Array;
use hybrid_array::typenum::{
IsGreaterOrEqual, IsLess, IsLessOrEqual, Prod, True, U2, U16, U32, U64, U256,
};
use rand_core::{TryCryptoRng, TryRng};
use subtle::ConstantTimeEq;
+5 -5
View File
@@ -12,13 +12,13 @@ use core::iter::{self, Map};
use derive_where::derive_where;
use digest::{Digest, Output};
use hybrid_array::typenum::Unsigned;
use hybrid_array::Array;
use hybrid_array::typenum::Unsigned;
use rand_core::{TryCryptoRng, TryRng};
use crate::common::{
derive_key_internal, deterministic_blind_unchecked, hash_to_group, i2osp_2,
server_evaluate_hash_input, BlindedElement, EvaluationElement, Mode, STR_FINALIZE,
BlindedElement, EvaluationElement, Mode, STR_FINALIZE, derive_key_internal,
deterministic_blind_unchecked, hash_to_group, i2osp_2, server_evaluate_hash_input,
};
#[cfg(feature = "serde")]
use crate::serialization::serde::Scalar;
@@ -267,12 +267,12 @@ fn finalize_after_unblind<
mod tests {
use core::ptr;
use rand::rngs::SysRng;
use rand::TryRng;
use rand::rngs::SysRng;
use super::*;
use crate::common::{Dst, STR_HASH_TO_GROUP};
use crate::Group;
use crate::common::{Dst, STR_HASH_TO_GROUP};
fn prf<CS: CipherSuite>(
input: &[u8],
+6 -6
View File
@@ -19,9 +19,9 @@ use hybrid_array::{Array, ArraySize};
use rand_core::{TryCryptoRng, TryRng};
use crate::common::{
derive_keypair, deterministic_blind_unchecked, generate_proof, hash_to_group, i2osp_2,
server_evaluate_hash_input, verify_proof, BlindedElement, Dst, EvaluationElement, Mode,
PreparedEvaluationElement, Proof, STR_FINALIZE, STR_HASH_TO_SCALAR, STR_INFO,
BlindedElement, Dst, EvaluationElement, Mode, PreparedEvaluationElement, Proof, STR_FINALIZE,
STR_HASH_TO_SCALAR, STR_INFO, derive_keypair, deterministic_blind_unchecked, generate_proof,
hash_to_group, i2osp_2, server_evaluate_hash_input, verify_proof,
};
#[cfg(feature = "serde")]
use crate::serialization::serde::{Element, Scalar};
@@ -371,7 +371,7 @@ impl<CS: CipherSuite> PoprfServer<CS> {
tweaked_key,
prepared_evaluation_elements
.into_iter()
.map(|element| element.0 .0),
.map(|element| element.0.0),
blinded_elements.map(|element| element.0),
Mode::Poprf,
)?;
@@ -379,7 +379,7 @@ impl<CS: CipherSuite> PoprfServer<CS> {
let messages = prepared_evaluation_elements.into_iter().map(<fn(
&PreparedEvaluationElement<CS>,
) -> _>::from(
|element| EvaluationElement(element.0 .0),
|element| EvaluationElement(element.0.0),
));
Ok(PoprfServerBatchEvaluateFinishResult { messages, proof })
@@ -736,8 +736,8 @@ mod tests {
use rand::rngs::SysRng;
use super::*;
use crate::common::STR_HASH_TO_GROUP;
use crate::Group;
use crate::common::STR_HASH_TO_GROUP;
fn prf<CS: CipherSuite>(
input: &[u8],
+1 -1
View File
@@ -9,8 +9,8 @@
//! Handles the serialization of each of the components used in the VOPRF
//! protocol
use hybrid_array::typenum::{Sum, Unsigned};
use hybrid_array::Array;
use hybrid_array::typenum::{Sum, Unsigned};
use crate::{
BlindedElement, CipherSuite, Error, EvaluationElement, Group, OprfClient, OprfServer,
+6 -6
View File
@@ -14,14 +14,14 @@ use core::iter::{self, Map, Repeat, Zip};
use derive_where::derive_where;
use digest::{Digest, Output};
use hybrid_array::typenum::Unsigned;
use hybrid_array::Array;
use hybrid_array::typenum::Unsigned;
use rand_core::{TryCryptoRng, TryRng};
use crate::common::{
BlindedElement, EvaluationElement, Mode, PreparedEvaluationElement, Proof, STR_FINALIZE,
derive_keypair, deterministic_blind_unchecked, generate_proof, hash_to_group, i2osp_2,
server_evaluate_hash_input, verify_proof, BlindedElement, EvaluationElement, Mode,
PreparedEvaluationElement, Proof, STR_FINALIZE,
server_evaluate_hash_input, verify_proof,
};
#[cfg(feature = "serde")]
use crate::serialization::serde::{Element, Scalar};
@@ -343,14 +343,14 @@ impl<CS: CipherSuite> VoprfServer<CS> {
g,
self.pk,
blinded_elements.map(|element| element.0),
evaluation_elements.into_iter().map(|element| element.0 .0),
evaluation_elements.into_iter().map(|element| element.0.0),
Mode::Voprf,
)?;
let messages = evaluation_elements.into_iter().map(<fn(
&PreparedEvaluationElement<CS>,
) -> EvaluationElement<CS>>::from(
|element| EvaluationElement(element.0 .0),
|element| EvaluationElement(element.0.0),
));
Ok(VoprfServerBatchEvaluateFinishResult { messages, proof })
@@ -553,8 +553,8 @@ mod tests {
use rand::rngs::SysRng;
use super::*;
use crate::common::{Dst, STR_HASH_TO_GROUP};
use crate::Group;
use crate::common::{Dst, STR_HASH_TO_GROUP};
fn prf<CS: CipherSuite>(
input: &[u8],