Module crypto_utils

Source
Expand description

Cryptographic utilities

Functionsยง

bitcoin_vec_to_signature
Convert a Bitcoin signature bytes, with the specified EcdsaSighashType, to Signature
generate_seed
Generate a seed
hkdf_sha256
derive a secret from another secret using HKDF-SHA256
maybe_generate_seed
Use the provided seed, or generate a random one
schnorr_signature_to_bitcoin_vec
Convert a Signature to Bitcoin signature bytes, with SIGHASH_ALL
sighash_from_heartbeat
Hash the serialized heartbeat message for signing
signature_to_bitcoin_vec
Convert a Signature to Bitcoin signature bytes, with SIGHASH_ALL