Differentiate no-std from alloc within tests/no-std

Fixes `no-std` builds for packages which intended to be `no-std` (without
`alloc`).

Updates a variety of MSRVs to 1.73 due to `flexible-transcript` no longer using
`std-shims` to achieve 1.66 (as `std-shims` requires `alloc`). A future
improvement would be for `std-shims` to have an `alloc` feature and only
provide MSRV shims without it.
This commit is contained in:
Luke Parker
2025-08-29 01:07:11 -04:00
parent 0c71b6fc4d
commit 12cfa6b2a5
17 changed files with 71 additions and 43 deletions

View File

@@ -94,9 +94,10 @@ impl ciphersuite::Ciphersuite for Embedwards25519 {
/// substrings of each other.
fn hash_to_F(dst: &[u8], data: &[u8]) -> Self::F {
use blake2::Digest;
<Scalar as FromUniformBytes<64>>::from_uniform_bytes(
&Self::H::digest([dst, data].concat()).into(),
)
let mut digest = Self::H::new();
digest.update(dst);
digest.update(data);
<Scalar as FromUniformBytes<64>>::from_uniform_bytes(&digest.finalize().into())
}
// We override the provided impl, which compares against the reserialization, because