Preimages and Hash160
Terms used in this lesson
- Preimage
- The original secret data whose hash equals a previously committed value.
- Hash160
- SHA-256 followed by RIPEMD-160, producing the 20-byte hash used by several Bitcoin spending conditions.
- Vault
- A set of Bitcoin outputs and spending rules that holds collateral and represents the current loan state.
- HMAC
- Hash-based message authentication code: a keyed hash construction used to authenticate data or derive deterministic secret material.
- HMAC-SHA256
- HMAC using SHA-256 as its underlying hash function.
- SHA-256
- A cryptographic hash function used throughout Bitcoin to produce fixed-size 256-bit digests.
- Oracle
- A system that reports outside information, such as a market price, for use by a protocol.
- Hashlock
- A spending condition that requires revealing data matching a committed hash.
- UTF-8
- A standard variable-length byte encoding for Unicode text.
- RIPEMD-160
- A 160-bit cryptographic hash function used in Bitcoin’s HASH160 construction.
A breached threshold reveals secret material whose Hash160 matches the value committed into the vault's liquidation Script leaf.
Loading lesson visuals...
Learn the idea
A preimage is secret data whose hash matches a committed value. Ducat derives a threshold key with HMAC-SHA256 from the oracle secret and commitment hash, then stores only Hash160 of that key in the price contract until breach.
Derive the hidden key
The oracle computes HMAC-SHA256 using its private key material and the commitment hash.
Inspect every idea above to open it.
The captured evaluator processes requested threshold hashes and reveals those requests found below their own thresholds; it does not automatically scan every vault selection.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.