Namespace definitions
Cryptographic functions.
Since
0.10.6
Functions
Calculates an Ethereum public key from a signature and hash.
Derives a 20-byte Ethereum address from a 32-byte private key.
Derives a 20-byte Ethereum address from a public key (33, 64, or 65 bytes).
Calculates an Ethereum signature. Takes a hash and a private key and returns values r
, s
, and rec_id
that are accepted by eth_ecrecover
.
Calculates a ECDSA (secp256k1) signature. The returned value can be verified with the verify_signature()
function.
Calculates a Keccak256 hash of a byte array and returns a byte array.
Converts a privkey to a pubkey
Converts a public key between compressed (33-byte) and uncompressed (65-byte) formats.
Extracts the EC point coordinates (x, y) from a public key.
Calculates an SHA-256 hash of a byte array and returns a byte array.
Verifies a signature against a message and public key.
Constructs a public key (compressed or uncompressed) from EC point coordinates.