BIP340 commitment hash
Terms used in this lesson
- BIP340
- The Bitcoin Improvement Proposal specifying Schnorr signatures for the secp256k1 curve.
- Oracle
- A system that reports outside information, such as a market price, for use by a protocol.
- UTF-8
- A standard variable-length byte encoding for Unicode text.
- SHA-256
- A cryptographic hash function used throughout Bitcoin to produce fixed-size 256-bit digests.
- Collateral
- An asset pledged against a debt; it can be used to cover the debt if agreed conditions are breached.
Wallet and oracle compute a tagged commitment over oracle key, network, base price, timestamp, and threshold price.
Loading lesson visuals...
Learn the idea
A commitment fixes exact data before later use. Ducat uses BIP340-style tagged hashing for domain separation, meaning the same bytes cannot be confused with an unrelated hash context.
Build the domain tag
Hash the UTF-8 tag ducat/price_contract_commit, then prefix the message with that tag hash twice.
Inspect every idea above to open it.
The commitment fixes the fields and resists substitution. Public low-entropy values may be guessed; secrecy comes from the separately derived threshold key.
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.