Various feature tweaks and updates

This commit is contained in:
Luke Parker
2025-08-29 06:14:25 -04:00
parent 90bc364f9f
commit e2dc5db7aa
25 changed files with 126 additions and 462 deletions

View File

@@ -31,7 +31,7 @@ ciphersuite = { path = "../../ciphersuite", version = "^0.4.1", default-features
multiexp = { path = "../../multiexp", version = "0.4", default-features = false }
generic-array = { version = "1", default-features = false, features = ["alloc"] }
blake2 = { version = "0.10", default-features = false }
blake2 = { version = "0.11.0-rc.0", default-features = false }
rand_chacha = { version = "0.3", default-features = false }
generalized-bulletproofs = { git = "https://github.com/monero-oxide/monero-oxide", rev = "a6f8797007e768488568b821435cf5006517a962", default-features = false }
@@ -70,7 +70,6 @@ std = [
"multiexp/std",
"multiexp/batch",
"blake2/std",
"rand_chacha/std",
"generalized-bulletproofs/std",

View File

@@ -7,7 +7,7 @@ use rand_chacha::ChaCha20Rng;
use blake2::{
digest::{
generic_array::{typenum::U32, GenericArray},
array::{typenum::U32, Array},
crypto_common::KeySizeUser,
KeyInit, Mac,
},
@@ -48,7 +48,7 @@ impl<C: Curves> Generators<C> {
/// This is deterministic to the towering curve's (possibly truncated) ID and generator.
pub fn new(max_threshold: u16, max_participants: u16) -> Generators<C> {
let entropy = <Blake2s256Keyed as KeyInit>::new(&{
let mut key = GenericArray::<u8, <Blake2s256Keyed as KeySizeUser>::KeySize>::default();
let mut key = Array::<u8, <Blake2s256Keyed as KeySizeUser>::KeySize>::default();
let key_len = key.len().min(<C::ToweringCurve as Ciphersuite>::ID.len());
{
let key: &mut [u8] = key.as_mut();