/// Create a key identifier from the public coefficients
// TODO (CRP-821): Tests - take the existing ones from classic DKG.
Create a key identifier from the public coefficients
TODO (CRP-821): Tests - take the existing ones from classic DKG.
Create a key identifier from the public coefficients TODO ( CRP - 821 ) : Tests - take the existing ones from classic DKG .
pub fn key_id_from_csp_pub_coeffs(csp_public_coefficients: &CspPublicCoefficients) -> KeyId {
    let mut hash = Sha256::new();
    hash.update(
        DomainSeparationContext::new("KeyId from threshold public coefficients").as_bytes(),
    );
    hash.update(
        &serde_cbor::to_vec(&csp_public_coefficients)
            .expect("Failed to serialize public coefficients"),
    );
    KeyId::from(hash.finish())
}
pub fn key_id_from_csp_pub_coeffs ( csp_public_coefficients : & CspPublicCoefficients ) -> KeyId { let mut hash = Sha256 :: new ( ) ; hash . update ( DomainSeparationContext :: new ( " " ) . as_bytes ( ) , ) ; hash . update ( & serde_cbor :: to_vec ( & csp_public_coefficients ) . expect ( " " ) , ) ; KeyId :: from ( hash . finish ( ) ) }
Create a key identifier from the public coefficients
TODO (CRP-821): Tests - take the existing ones from classic DKG.
Create a key identifier from the public coefficients TODO ( CRP - 821 ) : Tests - take the existing ones from classic DKG .
csp_public_coefficients
&CspPublicCoefficients