crypto: trait tweaks for HpkeSuite, HpkePublicKey

The `HpkeSuite` type is small enough to be a candidate for `Copy`. The
`HpkePublicKey` type should be `Debug` and `Clone` so we can easily use
it for GREASE ECH configurations.
This commit is contained in:
Daniel McCarney 2024-04-18 16:39:42 -04:00
parent 50aa4d4a1c
commit bd66ee4444
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,7 @@ pub trait HpkeProvider: Debug + Send + Sync + 'static {
}
/// An HPKE suite, specifying a key encapsulation mechanism and a symmetric cipher suite.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy)]
pub struct HpkeSuite {
/// The choice of HPKE key encapsulation mechanism.
pub kem: HpkeKem,
@ -110,6 +110,7 @@ pub trait HpkeOpener: Debug + Send + Sync + 'static {
}
/// An HPKE public key.
#[derive(Debug, Clone)]
pub struct HpkePublicKey(pub Vec<u8>);
/// An HPKE private key.