pub trait Algorithm: Send + Sync {
// Required methods
fn packet_key(&self, key: AeadKey, iv: Iv) -> Box<dyn PacketKey>;
fn header_protection_key(
&self,
key: AeadKey,
) -> Box<dyn HeaderProtectionKey>;
fn aead_key_len(&self) -> usize;
// Provided method
fn fips(&self) -> bool { ... }
}
Expand description
How a Tls13CipherSuite
generates PacketKey
s and HeaderProtectionKey
s.
Required Methods§
sourcefn packet_key(&self, key: AeadKey, iv: Iv) -> Box<dyn PacketKey>
fn packet_key(&self, key: AeadKey, iv: Iv) -> Box<dyn PacketKey>
Produce a PacketKey
encrypter/decrypter for this suite.
suite
is the entire suite this Algorithm
appeared in.
key
and iv
is the key material to use.
sourcefn header_protection_key(&self, key: AeadKey) -> Box<dyn HeaderProtectionKey>
fn header_protection_key(&self, key: AeadKey) -> Box<dyn HeaderProtectionKey>
Produce a HeaderProtectionKey
encrypter/decrypter for this suite.
key
is the key material, which is aead_key_len()
bytes in length.
sourcefn aead_key_len(&self) -> usize
fn aead_key_len(&self) -> usize
The length in bytes of keys for this Algorithm.
This controls the size of AeadKey
s presented to packet_key()
and header_protection_key()
.