Commitments
Draft. How content is committed with salted hashes, and how to check a reveal.
Receipts never carry content in clear. Each content field becomes a commitment: a salted SHA-256 hash.
The scheme
Each device holds a 32-byte commitment key K in its OS keychain. K never leaves the machine.
salt = HMAC-SHA256(K, "euthyne/v1" || receipt_id || field)
commitment = SHA-256(salt || value)||is byte concatenation.receipt_idis the receipt'sid.fieldis the committed field name, the same as thenamein the Statement'ssubject.
The receipt's salt_key field names the commitment key ID and epoch, so a verifier knows which key a reveal must come from.
Draft
The exact byte encoding of the HMAC input and of each value is not final.
Properties
- Hiding. Without the salt, a commitment says nothing about the value, even a short or guessable one.
- Binding. Given a salt and a value, anyone can recompute the commitment and compare.
- One field at a time. Each salt comes from its own HMAC input. Revealing one salt tells nothing about any other.
- Nothing stored per receipt. Salts are derived from
Kwhen needed.
Revealing a value
euthyne reveal <receipt> <field>This prints the salt and the value for one field of one receipt. To check a reveal:
- Verify the receipt itself. See the four checks.
- Compute
SHA-256(salt || value). - Compare it with the digest of the matching
subjectentry.
Losing the key
If a device is lost, its K is lost too. Old commitments can no longer be opened, but the receipts stay valid and verifiable. An organization may keep a copy of K in its own vault. Euthyne never holds it.
What a commitment does not prove
A commitment binds the device to a value at signing time. It does not show that the hook received the true value from the harness. A revealed value is the value that was committed, nothing more.