Skip to main content

Module crypto

Module crypto 

Source
Expand description

Shared cryptographic primitives used across all chain modules.

Centralizes tagged hashing, double-SHA256, HASH160, and SHA256 so that chain modules don’t duplicate these building blocks.

Functions§

double_sha256
Double SHA-256: SHA256(SHA256(data)).
hash160
HASH160: RIPEMD160(SHA256(data)).
sha256
SHA-256: SHA256(data).
tagged_hash
BIP-340 tagged hash: SHA256(SHA256(tag) ‖ SHA256(tag) ‖ data).