Skip to main content

Module ecdsa

Module ecdsa 

Source
Expand description

ECDSA secp256k1 verification as every released Platform does it: a signature whose S is in the upper half of the curve order is refused. dashcore verifies such a signature like its low-S twin, the same signature with S negated, so Platform checks S itself, at every protocol version. Accepting it would fork from nodes that refuse it and change the replay of chain history.

A signature checked by recovering its public key (verify_hash_signature) is the exception: every released Platform accepts a high-S one there, and one whose header names an uncompressed key, so refusing them is a rule of protocol version 15, selected by verify_hash_signature.

Functions§

verify_data_signature
[signer::verify_data_signature], refusing a high-S signature with the error of a signature that does not verify. Every other input gets the result and the error dashcore gives.
verify_digest
[EcdsaPublicKey::verify], refusing a high-S signature with [EcdsaError::VerifyFailed].
verify_hash_signature
Checks that signature, a 65-byte compact recoverable ECDSA signature over data_hash, was made by the key whose HASH160 is public_key_hash, by recovering the key: an ECDSA_HASH160 identity key, a P2PKH address witness, an asset lock’s one-time key.