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