referrerpolicy=no-referrer-when-downgrade

secp256k1_ecdsa_recover_compressed

Function secp256k1_ecdsa_recover_compressed 

Source
pub fn secp256k1_ecdsa_recover_compressed(
    sig: <PassPointerAndRead<&[u8; 65], 65> as RIType>::Inner,
    msg: <PassPointerAndRead<&[u8; 32], 32> as RIType>::Inner,
) -> <AllocateAndReturnByCodec<Result<[u8; 33], EcdsaVerifyError>> as RIType>::Inner
Expand description

Verify and recover a SECP256k1 ECDSA signature.

  • sig is passed in RSV format. V should be either 0/1 or 27/28.
  • msg is the blake2-256 hash of the message.

Returns Err if the signature is bad, otherwise the 33-byte compressed pubkey.

Note: This function does not enforce low-S signature normalization. Callers that require canonical (BIP-62 / EIP-2) signatures should check [sp_core::ecdsa::is_signature_normalized] before calling this function.