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

@@ -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();