跳到主要内容

Algorithm

特性 Algorithm 

Source
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 { ... }
}
展开描述

How 一个 Tls13CipherSuite generates PacketKeys 并 HeaderProtectionKeys.

必需方法§

Source

fn packet_key(&self, key: AeadKey, iv: Iv) -> Box<dyn PacketKey>

Produce 一个 PacketKey encrypter/decrypter 用于 this 套件)。

suite 是 entire suite this 算法 appeared in. keyiv 是 密钥材料 到 use.

Source

fn header_protection_key(&self, key: AeadKey) -> Box<dyn HeaderProtectionKey>

Produce 一个 HeaderProtectionKey encrypter/decrypter 用于 this 套件)。

key 是 密钥材料, which is aead_key_len() bytes in length.

Source

fn aead_key_len(&self) -> usize

此 length in bytes of keys 用于 this 算法.

This controls the size of AeadKeys presented 到 packet_key()header_protection_key()

提供方法§

Source

fn fips(&self) -> bool

此算法是否 FIPS 批准

实现者§