Skip to main content

bitcoin_verify

Function bitcoin_verify 

Source
pub fn bitcoin_verify(
    b: &CircuitBuilder,
    pk: Secp256k1Affine,
    z: &BigUint,
    r: &BigUint,
    s: &BigUint,
) -> Wire
Expand description

“Bitcoin style” verification of ECDSA signatures over secp256k1

§Arguments

  • pk - public key, a curve point in affine representation, asserted to be a valid curve point
  • z - hash of signed message as an integer
  • r - R part of the signature, the x coordinate of the nonce point
  • s - S part of the signature

§Assertions

The public key pk is asserted to be a valid curve point

§Outputs

A boolean wire equal to all-1 if the signature is valid, all-0 otherwise.