What cryptographic hash functions can Silverscript contracts use?

Silverscript contracts can call two built-in hash functions: blake2b(data), which returns a 32-byte Blake2b hash, and sha256(data), which returns a SHA-256 hash. A hash function is a one-way mathematical operation that turns any input into a fixed-length fingerprint — it is used in smart contracts to verify data integrity or commit to a value without revealing it. Both functions were added to Kaspa through KIP17 and activated by the Toccata hardfork, so they are available to any Silverscript contract running on Kaspa after that upgrade. Knowing which hash functions are available matters because it determines what cryptographic operations your contract can perform natively, without needing to implement them from scratch.

Learn more ›