/// Generates an ephemeral key pair, with pop.
///
/// # Arguments
/// * `rng` - a cryptographically secure random number generator.
/// * `dkg_id` - the DKG this ephemeral key is to be used for.
/// * `sender` - a name to identify the current node.
/// # Returns
/// * `EphemeralSecretKeyBytes` -  a key that needs to be kept secret by the
///   current node and used for the DKG protocol.  It is not needed once the
///   threshold keys have been derived.
/// * `EphemeralPublicKeyBytes and EphemeralPopBytes` - the corresponding public
///   key and proof of possession.
/// # Panics
/// This method is not expected to panic.
Generates an ephemeral key pair, with pop.
Generates an ephemeral key pair with pop .
pub fn create_ephemeral<R: Rng + CryptoRng>(
    mut rng: &mut R,
    dkg_id: IDkgId,
    sender: &[u8],
) -> (
    EphemeralSecretKeyBytes,
    EphemeralPublicKeyBytes,
    EphemeralPopBytes,
) {
    let secret_key = EphemeralSecretKey::random(rng);
    let PopData {
        public_key_bytes,
        pop,
        ..
    } = create_pop_data(&mut rng, dkg_id, &secret_key, sender);
    (
        EphemeralSecretKeyBytes::from(secret_key),
        public_key_bytes,
        EphemeralPopBytes::from(pop),
    )
}
pub fn create_ephemeral < R : Rng + CryptoRng > ( mut rng : & mut R , dkg_id : IDkgId , sender : & [ u8 ] , ) -> ( EphemeralSecretKeyBytes , EphemeralPublicKeyBytes , EphemeralPopBytes , ) { let secret_key = EphemeralSecretKey :: random ( rng ) ; let PopData { public_key_bytes , pop , .. } = create_pop_data ( & mut rng , dkg_id , & secret_key , sender ) ; ( EphemeralSecretKeyBytes :: from ( secret_key ) , public_key_bytes , EphemeralPopBytes :: from ( pop ) , ) }
Generates an ephemeral key pair, with pop.
Generates an ephemeral key pair with pop .
`EphemeralSecretKeyBytes` -  a key that needs to be kept secret by the
current node and used for the DKG protocol.  It is not needed once the
threshold keys have been derived.
`EphemeralPublicKeyBytes and EphemeralPopBytes` - the corresponding public
key and proof of possession.
` EphemeralSecretKeyBytes ` - a key that needs to be kept secret by the current node and used for the DKG protocol . It is not needed once the threshold keys have been derived . ` EphemeralPublicKeyBytes and EphemeralPopBytes ` - the corresponding public key and proof of possession .
rng
&mut R
dkg_id
IDkgId
sender
&[u8]
panics
This method is not expected to panic.
This method is not expected to panic .