chore: bump to v1.0.0-pre.1 and mostly cleanup stuff
Rust CI / cargo fmt (pull_request) Successful in 3s
Rust CI / cargo clippy (pull_request) Successful in 26s
Rust CI / test (1.87.0 / no backend / no frontend) (pull_request) Successful in 1m34s
Rust CI / test (stable / no backend / no frontend) (pull_request) Successful in 1m20s
Rust CI / test (1.87.0 / no backend / --features danger) (pull_request) Successful in 1m25s
Rust CI / test (stable / no backend / --features danger) (pull_request) Successful in 1m20s
Rust CI / test (1.87.0 / no backend / --features serde) (pull_request) Successful in 1m27s
Rust CI / test (stable / no backend / --features serde) (pull_request) Successful in 1m19s
Rust CI / test (1.87.0 / --features ristretto255-ciphersuite / no frontend) (pull_request) Successful in 1m34s
Rust CI / test (stable / --features ristretto255-ciphersuite / no frontend) (pull_request) Successful in 1m28s
Rust CI / test (1.87.0 / --features ristretto255-ciphersuite / --features danger) (pull_request) Successful in 1m35s
Rust CI / test (stable / --features ristretto255-ciphersuite / --features danger) (pull_request) Successful in 1m28s
Rust CI / test (1.87.0 / --features ristretto255-ciphersuite / --features serde) (pull_request) Successful in 1m36s
Rust CI / test (stable / --features ristretto255-ciphersuite / --features serde) (pull_request) Successful in 1m28s
Rust CI / cargo audit (pull_request) Successful in 4s
Rust CI / no-std (wasm32-unknown-unknown / no backend) (pull_request) Successful in 11s
Rust CI / no-std (thumbv6m-none-eabi / no backend) (pull_request) Successful in 14s
Rust CI / no-std (thumbv6m-none-eabi / --features ristretto255-ciphersuite) (pull_request) Successful in 15s
Rust CI / no-std (wasm32-unknown-unknown / --features ristretto255-ciphersuite) (pull_request) Successful in 14s
Rust CI / cargo fmt (pull_request) Successful in 3s
Rust CI / cargo clippy (pull_request) Successful in 26s
Rust CI / test (1.87.0 / no backend / no frontend) (pull_request) Successful in 1m34s
Rust CI / test (stable / no backend / no frontend) (pull_request) Successful in 1m20s
Rust CI / test (1.87.0 / no backend / --features danger) (pull_request) Successful in 1m25s
Rust CI / test (stable / no backend / --features danger) (pull_request) Successful in 1m20s
Rust CI / test (1.87.0 / no backend / --features serde) (pull_request) Successful in 1m27s
Rust CI / test (stable / no backend / --features serde) (pull_request) Successful in 1m19s
Rust CI / test (1.87.0 / --features ristretto255-ciphersuite / no frontend) (pull_request) Successful in 1m34s
Rust CI / test (stable / --features ristretto255-ciphersuite / no frontend) (pull_request) Successful in 1m28s
Rust CI / test (1.87.0 / --features ristretto255-ciphersuite / --features danger) (pull_request) Successful in 1m35s
Rust CI / test (stable / --features ristretto255-ciphersuite / --features danger) (pull_request) Successful in 1m28s
Rust CI / test (1.87.0 / --features ristretto255-ciphersuite / --features serde) (pull_request) Successful in 1m36s
Rust CI / test (stable / --features ristretto255-ciphersuite / --features serde) (pull_request) Successful in 1m28s
Rust CI / cargo audit (pull_request) Successful in 4s
Rust CI / no-std (wasm32-unknown-unknown / no backend) (pull_request) Successful in 11s
Rust CI / no-std (thumbv6m-none-eabi / no backend) (pull_request) Successful in 14s
Rust CI / no-std (thumbv6m-none-eabi / --features ristretto255-ciphersuite) (pull_request) Successful in 15s
Rust CI / no-std (wasm32-unknown-unknown / --features ristretto255-ciphersuite) (pull_request) Successful in 14s
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## 1.0.0-pre.1 (July 2, 2026)
|
||||
|
||||
* Simplified ciphersuite trait
|
||||
* Moved multiplication operator to SecurityLevel type in Group trait
|
||||
|
||||
## 1.0.0-pre.0 (June 29, 2026)
|
||||
|
||||
Forked from [facebook/voprf](https://github.com/facebook/voprf/) at `0.6.0-pre.1`.
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ name = "voprf-vx"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/vexahub/voprf-vx/"
|
||||
rust-version = "1.87"
|
||||
version = "1.0.0-pre.0"
|
||||
version = "1.0.0-pre.1"
|
||||
|
||||
[features]
|
||||
alloc = []
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
//! Defines the CipherSuite trait to specify the underlying primitives for VOPRF
|
||||
|
||||
use crate::Group;
|
||||
use core::ops::Mul;
|
||||
use digest::block_api::BlockSizeUser;
|
||||
use digest::typenum::{IsLess, IsLessOrEqual, U256};
|
||||
use digest::{FixedOutput, HashMarker, OutputSizeUser};
|
||||
@@ -20,7 +19,6 @@ use hybrid_array::typenum::{IsGreaterOrEqual, Prod, True, U2};
|
||||
/// Configures the underlying primitives used in VOPRF
|
||||
pub trait CipherSuite
|
||||
where
|
||||
<Self::Group as Group>::SecurityLevel: Mul<U2>,
|
||||
<Self::Hash as OutputSizeUser>::OutputSize: ArraySize
|
||||
+ IsLess<U256>
|
||||
+ IsLessOrEqual<<Self::Hash as BlockSizeUser>::BlockSize, Output = True>
|
||||
@@ -46,7 +44,6 @@ type OprfHash<T> =
|
||||
impl<T: OprfParameters> CipherSuite for T
|
||||
where
|
||||
T: Group,
|
||||
<T as Group>::SecurityLevel: Mul<U2>,
|
||||
OprfHash<T>: BlockSizeUser + Default + FixedOutput + HashMarker,
|
||||
<OprfHash<T> as OutputSizeUser>::OutputSize: ArraySize
|
||||
+ IsLess<U256>
|
||||
|
||||
@@ -67,9 +67,9 @@ where
|
||||
fn hash_to_scalar<H>(input: &[&[u8]], dst: &[&[u8]]) -> Result<Self::Scalar, InternalError>
|
||||
where
|
||||
H: BlockSizeUser + Default + FixedOutput + HashMarker,
|
||||
H::OutputSize: IsLess<U256> + IsLessOrEqual<H::BlockSize, Output = True>,
|
||||
C::SecurityLevel: Mul<U2>,
|
||||
H::OutputSize: IsGreaterOrEqual<Prod<C::SecurityLevel, U2>, Output = True>,
|
||||
H::OutputSize: IsLess<U256>
|
||||
+ IsLessOrEqual<H::BlockSize, Output = True>
|
||||
+ IsGreaterOrEqual<Prod<C::SecurityLevel, U2>, Output = True>,
|
||||
{
|
||||
hash_to_scalar::<C, ExpandMsgXmd<H>, <C as MapToCurve>::Length>(input, dst)
|
||||
.map_err(|_| InternalError::Input)
|
||||
|
||||
+7
-7
@@ -64,7 +64,7 @@ where
|
||||
/// Used to enforce `H::OutputSize >= 2 * SecurityLevel` in
|
||||
/// `hash_to_curve` and `hash_to_scalar`, which corresponds to the
|
||||
/// `expand_message` requirement `len_in_bytes = 2 * k / 8`.
|
||||
type SecurityLevel: ArraySize;
|
||||
type SecurityLevel: ArraySize + Mul<U2>;
|
||||
|
||||
/// Transforms a password and domain separation tag (DST) into a curve point
|
||||
///
|
||||
@@ -74,9 +74,9 @@ where
|
||||
fn hash_to_curve<H>(input: &[&[u8]], dst: &[&[u8]]) -> Result<Self::Elem, InternalError>
|
||||
where
|
||||
H: BlockSizeUser + Default + FixedOutput + HashMarker,
|
||||
H::OutputSize: IsLess<U256> + IsLessOrEqual<H::BlockSize, Output = True>,
|
||||
Self::SecurityLevel: Mul<U2>,
|
||||
H::OutputSize: IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>;
|
||||
H::OutputSize: IsLess<U256>
|
||||
+ IsLessOrEqual<H::BlockSize, Output = True>
|
||||
+ IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>;
|
||||
|
||||
/// Hashes a slice of pseudo-random bytes to a scalar
|
||||
///
|
||||
@@ -86,9 +86,9 @@ where
|
||||
fn hash_to_scalar<H>(input: &[&[u8]], dst: &[&[u8]]) -> Result<Self::Scalar, InternalError>
|
||||
where
|
||||
H: BlockSizeUser + Default + FixedOutput + HashMarker,
|
||||
H::OutputSize: IsLess<U256> + IsLessOrEqual<H::BlockSize, Output = True>,
|
||||
Self::SecurityLevel: Mul<U2>,
|
||||
H::OutputSize: IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>;
|
||||
H::OutputSize: IsLess<U256>
|
||||
+ IsLessOrEqual<H::BlockSize, Output = True>
|
||||
+ IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>;
|
||||
|
||||
/// Get the base point for the group
|
||||
fn base_elem() -> Self::Elem;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// licenses.
|
||||
|
||||
use core::num::NonZeroU16;
|
||||
use core::ops::Mul;
|
||||
|
||||
use curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT;
|
||||
use curve25519_dalek::ristretto::{CompressedRistretto, RistrettoPoint};
|
||||
use curve25519_dalek::scalar::Scalar;
|
||||
@@ -54,9 +54,9 @@ impl Group for Ristretto255 {
|
||||
fn hash_to_curve<H>(input: &[&[u8]], dst: &[&[u8]]) -> Result<Self::Elem, InternalError>
|
||||
where
|
||||
H: BlockSizeUser + Default + FixedOutput + HashMarker,
|
||||
H::OutputSize: IsLess<U256> + IsLessOrEqual<H::BlockSize, Output = True>,
|
||||
Self::SecurityLevel: Mul<U2>,
|
||||
H::OutputSize: IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>,
|
||||
H::OutputSize: IsLess<U256>
|
||||
+ IsLessOrEqual<H::BlockSize, Output = True>
|
||||
+ IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>,
|
||||
{
|
||||
let mut uniform_bytes = [0u8; 64];
|
||||
|
||||
@@ -77,9 +77,9 @@ impl Group for Ristretto255 {
|
||||
fn hash_to_scalar<H>(input: &[&[u8]], dst: &[&[u8]]) -> Result<Self::Scalar, InternalError>
|
||||
where
|
||||
H: BlockSizeUser + Default + FixedOutput + HashMarker,
|
||||
H::OutputSize: IsLess<U256> + IsLessOrEqual<H::BlockSize, Output = True>,
|
||||
Self::SecurityLevel: Mul<U2>,
|
||||
H::OutputSize: IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>,
|
||||
H::OutputSize: IsLess<U256>
|
||||
+ IsLessOrEqual<H::BlockSize, Output = True>
|
||||
+ IsGreaterOrEqual<Prod<Self::SecurityLevel, U2>, Output = True>,
|
||||
{
|
||||
let mut uniform_bytes = [0u8; 64];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user