Curve point
Curve point
ecPoint to initialize this point with
value of this private key (a number)
flags which specifies if the associated public key will be compressed or uncompressed.
serialized value of this public key (a point)
indicates whether or not we check that this is a valid public key; this should be used carefully for optimization purposes
A scalar is a 256 bit number
A scalar is a 256 bit number
value to initialize this scalar with
An ECDSA signature is a (r, s) pair.
An ECDSA signature is a (r, s) pair. Bitcoin uses DER encoded signatures
sigbyte data
the decoded (r, s) signature
Computes ecdh using secp256k1's variant: sha256(priv * pub serialized in compressed format)
Computes ecdh using secp256k1's variant: sha256(priv * pub serialized in compressed format)
private value
public value
ecdh(priv, pub) as computed by libsecp256k1
An ECDSA signature is a (r, s) pair.
An ECDSA signature is a (r, s) pair. Bitcoin uses DER encoded signatures
first value
second value
(r, s) in DER format
160 bits bitcoin hash, used mostly for address encoding hash160(input) = RIPEMD160(SHA256(input))
160 bits bitcoin hash, used mostly for address encoding hash160(input) = RIPEMD160(SHA256(input))
array of byte
the 160 bits BTC hash of input
256 bits bitcoin hash hash256(input) = SHA256(SHA256(input))
256 bits bitcoin hash hash256(input) = SHA256(SHA256(input))
array of byte
the 256 bits BTC hash of input
serialized public key
true if the key is valid. Please not that this performs very basic tests and does not check that the point represented by this key is actually valid.
private key
the corresponding public key
x coordinate
a tuple (p1, p2) where p1 and p2 are points on the curve and p1.x = p2.x = x p1.y is even, p2.y is odd
Recover public keys from a signature and the message that was signed.
Recover public keys from a signature and the message that was signed. This method will return 2 public keys, and the signature can be verified with both, but only one of them matches that private key that was used to generate the signature.
signature
message that was signed
a (pub1, pub2) tuple where pub1 and pub2 are candidates public keys. If you have the recovery id then use pub1 if the recovery id is even and pub2 if it is odd
Sign data with a private key, using RCF6979 deterministic signatures
Sign data with a private key, using RCF6979 deterministic signatures
data to sign
private key. If you are using bitcoin "compressed" private keys make sure to only use the first 32 bytes of the key (there is an extra "1" appended to the key)
a (r, s) ECDSA signature pair
data
signature
public key
true is signature is valid for this data with this public key