pub fn public_key(
    public_key: CspEncryptionPublicKey,
) -> Result<EphemeralPublicKeyBytes, dkg_errors::MalformedPublicKeyError> {
    if let InternalCspEncryptionPublicKey::Secp256k1(variant) = public_key.internal {
        Ok(variant)
    } else {
        Err(dkg_errors::MalformedPublicKeyError {
            algorithm: AlgorithmId::Secp256k1,
            internal_error: format!("Incorrect public key type: {:?}", public_key),
            key_bytes: None,
        })
    }
}
// There is currently only one version of DKG.
There is currently only one version of DKG.
There is currently only one version of DKG .
pub fn public_key(
    public_key: CspEncryptionPublicKey,
) -> Result<EphemeralPublicKeyBytes, dkg_errors::MalformedPublicKeyError> {
    if let InternalCspEncryptionPublicKey::Secp256k1(variant) = public_key.internal {
        Ok(variant)
    } else {
        Err(dkg_errors::MalformedPublicKeyError {
            algorithm: AlgorithmId::Secp256k1,
            internal_error: format!("Incorrect public key type: {:?}", public_key),
            key_bytes: None,
        })
    }
}
pub fn public_key ( public_key : CspEncryptionPublicKey , ) -> Result < EphemeralPublicKeyBytes , dkg_errors :: MalformedPublicKeyError > { if let InternalCspEncryptionPublicKey :: Secp256k1 ( variant ) = public_key . internal { Ok ( variant ) } else { Err ( dkg_errors :: MalformedPublicKeyError { algorithm : AlgorithmId :: Secp256k1 , internal_error : format ! ( " " public_key ) , key_bytes : None , } ) } }
There is currently only one version of DKG.
There is currently only one version of DKG .
public_key
CspEncryptionPublicKey
public_key
CspEncryptionPublicKey