// 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 encrypted_share(
    csp_key: CspEncryptedSecretKey,
) -> Result<EncryptedShareBytes, dkg_errors::MalformedDataError> {
    if let CspEncryptedSecretKey::ThresBls12_381(key) = csp_key {
        Ok(key)
    } else {
        Err(dkg_errors::MalformedDataError {
            algorithm: AlgorithmId::ThresBls12_381,
            internal_error: format!("Incorrect type: {:?}", csp_key),
            data: None,
        })
    }
}
pub fn encrypted_share ( csp_key : CspEncryptedSecretKey , ) -> Result < EncryptedShareBytes , dkg_errors :: MalformedDataError > { if let CspEncryptedSecretKey :: ThresBls12_381 ( key ) = csp_key { Ok ( key ) } else { Err ( dkg_errors :: MalformedDataError { algorithm : AlgorithmId :: ThresBls12_381 , internal_error : format ! ( " " csp_key ) , data : None , } ) } }
There is currently only one version of DKG.
There is currently only one version of DKG .
csp_key
CspEncryptedSecretKey