fn derive_path_secrets(
        &mut self,
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        path_secrets: Vec<PathSecret>,
        path: &[NodeIndex],
    ) -> Vec<HpkePublicKey> {
        let hash_len = ciphersuite.hash_length();

        let mut path_secrets = path_secrets;

        for i in 1..path.len() {
            // FIXME: remove unwrap
            let path_secret = path_secrets[i - 1]
                .path_secret
                .kdf_expand_label(backend, "path", &[], hash_len)
                .unwrap();
            path_secrets.push(PathSecret { path_secret });
        }
        self.path_secrets = path_secrets;

        // Generate the Commit Secret
        self.generate_commit_secret(ciphersuite, backend);

        // Generate keypair and return public keys
        self.generate_path_keypairs(ciphersuite, backend, path)
    }
/// This function generates the path secrets internally and is only called
/// from either `generate_path_secrets` or `continue_path_secrets`.
This function generates the path secrets internally and is only called
from either `generate_path_secrets` or `continue_path_secrets`.
This function generates the path secrets internally and is only called from either ` generate_path_secrets ` or ` continue_path_secrets ` .
fn derive_path_secrets(
        &mut self,
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        path_secrets: Vec<PathSecret>,
        path: &[NodeIndex],
    ) -> Vec<HpkePublicKey> {
        let hash_len = ciphersuite.hash_length();
        let mut path_secrets = path_secrets;
        for i in 1..path.len() {
            // FIXME: remove unwrap
            let path_secret = path_secrets[i - 1]
                .path_secret
                .kdf_expand_label(backend, "path", &[], hash_len)
                .unwrap();
            path_secrets.push(PathSecret { path_secret });
        }
        self.path_secrets = path_secrets;
        // Generate the Commit Secret
        self.generate_commit_secret(ciphersuite, backend);
        // Generate keypair and return public keys
        self.generate_path_keypairs(ciphersuite, backend, path)
    }
fn derive_path_secrets ( & mut self , ciphersuite : & Ciphersuite , backend : & impl OpenMlsCryptoProvider , path_secrets : Vec < PathSecret > , path : & [ NodeIndex ] , ) -> Vec < HpkePublicKey > { let hash_len = ciphersuite . hash_length ( ) ; let mut path_secrets = path_secrets ; for i in 1 .. path . len ( ) { // FIXME: remove unwrap let path_secret = path_secrets [ i - 1 ] . path_secret . kdf_expand_label ( backend , " " , & [ ] , hash_len ) . unwrap ( ) ; path_secrets . push ( PathSecret { path_secret } ) ; } self . path_secrets = path_secrets ; // Generate the Commit Secret self . generate_commit_secret ( ciphersuite , backend ) ; // Generate keypair and return public keys self . generate_path_keypairs ( ciphersuite , backend , path ) }
This function generates the path secrets internally and is only called
from either `generate_path_secrets` or `continue_path_secrets`.
This function generates the path secrets internally and is only called from either ` generate_path_secrets ` or ` continue_path_secrets ` .
&mut self
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
path_secrets
Vec<PathSecret>
path
&[NodeIndex]
&mut self
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
path_secrets
Vec<PathSecret>
path
&[NodeIndex]