pub fn generate_idkg_dealing_encryption_keys(crypto_root: &Path) -> PublicKeyProto {
    let mut csp = csp_at_root(crypto_root);
    let pubkey = csp
        .idkg_create_mega_key_pair(AlgorithmId::ThresholdEcdsaSecp256k1)
        .expect("Failed to generate IDkg dealing encryption keys");

    PublicKeyProto {
        version: 0,
        algorithm: AlgorithmIdProto::MegaSecp256k1 as i32,
        key_value: pubkey.serialize(),
        proof_data: None,
    }
}
/// Generates (MEGa) I-DKG dealing encryption key material.
///
/// Stores the secret key in the key store at `crypto_root` and returns the
/// corresponding public key.
///
/// If the `crypto_root` directory does not exist, it is created with the
/// required permissions. If there exists no key store in `crypto_root`, a new
/// one is created.
Generates (MEGa) I-DKG dealing encryption key material.
Stores the secret key in the key store at `crypto_root` and returns the
corresponding public key.

If the `crypto_root` directory does not exist, it is created with the
required permissions. If there exists no key store in `crypto_root`, a new
one is created.
Generates ( MEGa ) I - DKG dealing encryption key material . Stores the secret key in the key store at ` crypto_root ` and returns the corresponding public key . If the ` crypto_root ` directory does not exist it is created with the required permissions . If there exists no key store in ` crypto_root ` a new one is created .
pub fn generate_idkg_dealing_encryption_keys(crypto_root: &Path) -> PublicKeyProto {
    let mut csp = csp_at_root(crypto_root);
    let pubkey = csp
        .idkg_create_mega_key_pair(AlgorithmId::ThresholdEcdsaSecp256k1)
        .expect("Failed to generate IDkg dealing encryption keys");
    PublicKeyProto {
        version: 0,
        algorithm: AlgorithmIdProto::MegaSecp256k1 as i32,
        key_value: pubkey.serialize(),
        proof_data: None,
    }
}
pub fn generate_idkg_dealing_encryption_keys ( crypto_root : & Path ) -> PublicKeyProto { let mut csp = csp_at_root ( crypto_root ) ; let pubkey = csp . idkg_create_mega_key_pair ( AlgorithmId :: ThresholdEcdsaSecp256k1 ) . expect ( " " ) ; PublicKeyProto { version : 0 , algorithm : AlgorithmIdProto :: MegaSecp256k1 as i32 , key_value : pubkey . serialize ( ) , proof_data : None , } }
Generates (MEGa) I-DKG dealing encryption key material.
Generates ( MEGa ) I - DKG dealing encryption key material .
crypto_root
&Path
crypto_root
&Path