pub fn create_ephemeral_public_key<R: Rng + CryptoRng>(
    mut rng: &mut R,
    dkg_id: IDkgId,
    secret_key_bytes: &EphemeralSecretKeyBytes,
    sender: &[u8],
) -> Result<(EphemeralPublicKeyBytes, EphemeralPopBytes), DkgCreateEphemeralError> {
    let secret_key = EphemeralSecretKey::try_from(secret_key_bytes)
        .map_err(DkgCreateEphemeralError::MalformedSecretKeyError)?;
    let PopData {
        public_key_bytes,
        pop,
        ..
    } = create_pop_data(&mut rng, dkg_id, &secret_key, sender);
    Ok((public_key_bytes, EphemeralPopBytes::from(pop)))
}
/// Creates a public key and PoP for a given secret key
Creates a public key and PoP for a given secret key
Creates a public key and PoP for a given secret key
pub fn create_ephemeral_public_key<R: Rng + CryptoRng>(
    mut rng: &mut R,
    dkg_id: IDkgId,
    secret_key_bytes: &EphemeralSecretKeyBytes,
    sender: &[u8],
) -> Result<(EphemeralPublicKeyBytes, EphemeralPopBytes), DkgCreateEphemeralError> {
    let secret_key = EphemeralSecretKey::try_from(secret_key_bytes)
        .map_err(DkgCreateEphemeralError::MalformedSecretKeyError)?;
    let PopData {
        public_key_bytes,
        pop,
        ..
    } = create_pop_data(&mut rng, dkg_id, &secret_key, sender);
    Ok((public_key_bytes, EphemeralPopBytes::from(pop)))
}
pub fn create_ephemeral_public_key < R : Rng + CryptoRng > ( mut rng : & mut R , dkg_id : IDkgId , secret_key_bytes : & EphemeralSecretKeyBytes , sender : & [ u8 ] , ) -> Result < ( EphemeralPublicKeyBytes , EphemeralPopBytes ) , DkgCreateEphemeralError > { let secret_key = EphemeralSecretKey :: try_from ( secret_key_bytes ) . map_err ( DkgCreateEphemeralError :: MalformedSecretKeyError ) ? ; let PopData { public_key_bytes , pop , .. } = create_pop_data ( & mut rng , dkg_id , & secret_key , sender ) ; Ok ( ( public_key_bytes , EphemeralPopBytes :: from ( pop ) ) ) }
Creates a public key and PoP for a given secret key
Creates a public key and PoP for a given secret key
rng
&mut R
dkg_id
IDkgId
secret_key_bytes
&EphemeralSecretKeyBytes
sender
&[u8]
rng
&mut R
dkg_id
IDkgId
secret_key_bytes
&EphemeralSecretKeyBytes
sender
&[u8]