pub(crate) fn derive_aead_key(
        &self,
        backend: &impl OpenMlsCryptoProvider,
        ciphertext: &[u8],
    ) -> AeadKey {
        let ciphertext_sample = ciphertext_sample(self.secret.ciphersuite(), ciphertext);
        log::debug!(
            "SenderDataSecret::derive_aead_key ciphertext sample: {:x?}",
            ciphertext_sample
        );
        // FIXME: remove unwrap
        let secret = self
            .secret
            .kdf_expand_label(
                backend,
                "key",
                ciphertext_sample,
                self.secret.ciphersuite().aead_key_length(),
            )
            .unwrap();
        AeadKey::from_secret(secret)
    }
/// Derive a new AEAD key from a `SenderDataSecret`.
Derive a new AEAD key from a `SenderDataSecret`.
Derive a new AEAD key from a ` SenderDataSecret ` .
pub(crate) fn derive_aead_key(
        &self,
        backend: &impl OpenMlsCryptoProvider,
        ciphertext: &[u8],
    ) -> AeadKey {
        let ciphertext_sample = ciphertext_sample(self.secret.ciphersuite(), ciphertext);
        log::debug!(
            "SenderDataSecret::derive_aead_key ciphertext sample: {:x?}",
            ciphertext_sample
        );
        // FIXME: remove unwrap
        let secret = self
            .secret
            .kdf_expand_label(
                backend,
                "key",
                ciphertext_sample,
                self.secret.ciphersuite().aead_key_length(),
            )
            .unwrap();
        AeadKey::from_secret(secret)
    }
pub ( crate ) fn derive_aead_key ( & self , backend : & impl OpenMlsCryptoProvider , ciphertext : & [ u8 ] , ) -> AeadKey { let ciphertext_sample = ciphertext_sample ( self . secret . ciphersuite ( ) , ciphertext ) ; log :: debug ! ( " " ciphertext_sample ) ; // FIXME: remove unwrap let secret = self . secret . kdf_expand_label ( backend , " " , ciphertext_sample , self . secret . ciphersuite ( ) . aead_key_length ( ) , ) . unwrap ( ) ; AeadKey :: from_secret ( secret ) }
Derive a new AEAD key from a `SenderDataSecret`.
Derive a new AEAD key from a ` SenderDataSecret ` .
&self
backend
&impl OpenMlsCryptoProvider
ciphertext
&[u8]
&self
backend
&impl OpenMlsCryptoProvider
ciphertext
&[u8]