Module crypto

Source

Structs§

MerkleTree
A Merkle tree is a binary tree, with values of type T at the leafs, and where every internal node holds the hash of the concatenation of the hashes of its children nodes.
Message
A (hashed) message input to an ECDSA signature.
PublicKey
Public key - used to verify ECDSA signatures and to do Taproot tweaks.
SecretKey
Secret key - a 256-bit key used to create ECDSA and Taproot signatures.

Constants§

PARALLEL_HASH_BYTE_THRESHOLD

Statics§

SECP256K1
A global static context to avoid repeatedly creating contexts.

Functions§

generate_keypair_from_private_key
Create and return a keypair with the given hex u8 array as the private key
generate_keys
generate_random_bytes
hash
is_valid_public_key
sign
sign_blob
verify
verify_signature