fn validate_committee_signing_key(
    committee_signing_key: &Option<PublicKey>,
) -> Result<(), KeyValidationError> {
    let pubkey_proto = committee_signing_key
        .as_ref()
        .ok_or_else(|| invalid_committee_signing_key_error("key is missing"))?;

    let pubkey_bytes = MultiSigBls12381PublicKeyBytes::try_from(pubkey_proto)
        .map_err(|e| invalid_committee_signing_key_error(format!("{}", e)))?;
    let pop_bytes = MultiSigBls12381PopBytes::try_from(pubkey_proto)
        .map_err(|e| invalid_committee_signing_key_error(format!("{}", e)))?;

    // Note that `verify_pop` also ensures that the public key is a point on the
    // curve and in the right subgroup.
    ic_crypto_internal_multi_sig_bls12381::verify_pop(pop_bytes, pubkey_bytes)
        .map_err(|e| invalid_committee_signing_key_error(format!("{}", e)))
}
/// Validates a node's committee signing key.
///
/// See the crate documentation for the exact checks that are performed.
Validates a node's committee signing key.
See the crate documentation for the exact checks that are performed.
Validates a node ' s committee signing key . See the crate documentation for the exact checks that are performed .
fn validate_committee_signing_key(
    committee_signing_key: &Option<PublicKey>,
) -> Result<(), KeyValidationError> {
    let pubkey_proto = committee_signing_key
        .as_ref()
        .ok_or_else(|| invalid_committee_signing_key_error("key is missing"))?;
    let pubkey_bytes = MultiSigBls12381PublicKeyBytes::try_from(pubkey_proto)
        .map_err(|e| invalid_committee_signing_key_error(format!("{}", e)))?;
    let pop_bytes = MultiSigBls12381PopBytes::try_from(pubkey_proto)
        .map_err(|e| invalid_committee_signing_key_error(format!("{}", e)))?;
    // Note that `verify_pop` also ensures that the public key is a point on the
    // curve and in the right subgroup.
    ic_crypto_internal_multi_sig_bls12381::verify_pop(pop_bytes, pubkey_bytes)
        .map_err(|e| invalid_committee_signing_key_error(format!("{}", e)))
}
fn validate_committee_signing_key ( committee_signing_key : & Option < PublicKey > , ) -> Result < ( ) , KeyValidationError > { let pubkey_proto = committee_signing_key . as_ref ( ) . ok_or_else ( | | invalid_committee_signing_key_error ( " " ) ) ? ; let pubkey_bytes = MultiSigBls12381PublicKeyBytes :: try_from ( pubkey_proto ) . map_err ( | e | invalid_committee_signing_key_error ( format ! ( " " e ) ) ) ? ; let pop_bytes = MultiSigBls12381PopBytes :: try_from ( pubkey_proto ) . map_err ( | e | invalid_committee_signing_key_error ( format ! ( " " e ) ) ) ? ; // Note that `verify_pop` also ensures that the public key is a point on the // curve and in the right subgroup. ic_crypto_internal_multi_sig_bls12381 :: verify_pop ( pop_bytes , pubkey_bytes ) . map_err ( | e | invalid_committee_signing_key_error ( format ! ( " " e ) ) ) }
Validates a node's committee signing key.
Validates a node ' s committee signing key .
committee_signing_key
&Option<PublicKey>
committee_signing_key
&Option<PublicKey>