Implement Clone for every message type

This commit is contained in:
Valentin Tolmer
2021-06-15 10:06:32 -07:00
committed by Kevin Lewi
parent 30e27a11e2
commit 2c7fe4e382
5 changed files with 194 additions and 7 deletions
+5 -5
View File
@@ -14,11 +14,11 @@ use rand::{CryptoRng, RngCore};
use zeroize::Zeroize;
pub trait KeyExchange<D: Hash, G: Group> {
type KE1State: FromBytes + ToBytesWithPointers + Zeroize;
type KE2State: FromBytes + ToBytesWithPointers + Zeroize;
type KE1Message: FromBytes + ToBytes;
type KE2Message: FromBytes + ToBytes;
type KE3Message: FromBytes + ToBytes;
type KE1State: FromBytes + ToBytesWithPointers + Zeroize + Clone;
type KE2State: FromBytes + ToBytesWithPointers + Zeroize + Clone;
type KE1Message: FromBytes + ToBytes + Clone;
type KE2Message: FromBytes + ToBytes + Clone;
type KE3Message: FromBytes + ToBytes + Clone;
fn generate_ke1<R: RngCore + CryptoRng>(
info: Vec<u8>,