Module merkle

Source
Expand description

Tagged hashes for use in signature calculation and verification.

Structs§

TaggedHash
A hash for use in a specific context by tweaking with a context-dependent tag as per BIP 340 and computed over the merkle root of a TLV stream to sign as defined in BOLT 12.

Enums§

SignError
Error when signing messages.

Traits§

SignFn
A function for signing a TaggedHash.

Functions§

sign_message
Signs a TaggedHash computed over the merkle root of message’s TLV stream, checking if it can be verified with the supplied pubkey.
verify_signature
Verifies the signature with a pubkey over the given message using a tagged hash as the message digest.