Restricting ciphersuite group to match hash output (#125)
This commit is contained in:
+2
-1
@@ -9,6 +9,7 @@ use crate::{
|
|||||||
hash::Hash, key_exchange::traits::KeyExchange, keypair::KeyPair,
|
hash::Hash, key_exchange::traits::KeyExchange, keypair::KeyPair,
|
||||||
map_to_curve::GroupWithMapToCurve, slow_hash::SlowHash,
|
map_to_curve::GroupWithMapToCurve, slow_hash::SlowHash,
|
||||||
};
|
};
|
||||||
|
use digest::Digest;
|
||||||
|
|
||||||
use rand_core::{CryptoRng, RngCore};
|
use rand_core::{CryptoRng, RngCore};
|
||||||
|
|
||||||
@@ -25,7 +26,7 @@ pub trait CipherSuite {
|
|||||||
/// an extension trait PasswordToCurve that allows some customization on
|
/// an extension trait PasswordToCurve that allows some customization on
|
||||||
/// how to hash a password to a curve point. See `group::Group` and
|
/// how to hash a password to a curve point. See `group::Group` and
|
||||||
/// `map_to_curve::GroupWithMapToCurve`.
|
/// `map_to_curve::GroupWithMapToCurve`.
|
||||||
type Group: GroupWithMapToCurve;
|
type Group: GroupWithMapToCurve<UniformBytesLen = <Self::Hash as Digest>::OutputSize>;
|
||||||
/// A key exchange protocol
|
/// A key exchange protocol
|
||||||
type KeyExchange: KeyExchange<Self::Hash, Self::Group>;
|
type KeyExchange: KeyExchange<Self::Hash, Self::Group>;
|
||||||
/// The main hash function use (for HKDF computations and hashing transcripts)
|
/// The main hash function use (for HKDF computations and hashing transcripts)
|
||||||
|
|||||||
Reference in New Issue
Block a user