Chapter 04 · the stopwatch
Primus attestations let you choose, field by field, what leaves the session. Reveal it, or commit to it with a hash. The attestation below is real, produced by the official zkTLS Playground, and one of its fields is committed rather than revealed. This page recovers it in front of you. The lesson is not that the hash is broken. It is that a hash hides exactly as much as the value had to begin with.
Three fields were resolved out of that response. Two were revealed as strings. The third was put
through SHA256, which is how the attestation conditions describe it.
Two ways to search. Blindly, as if you knew nothing but the shape of the number. Or using the two prices that were published beside it in the clear.
A commitment is only as private as the number of things the value could have been. The times below use the rate your own browser just measured, single threaded, in a tab.
| the committed value | candidates | time to recover |
|---|
A price is public anyway, so committing it costs nothing. A balance, a score, a date of birth or a salary are the same shape of number and the same afternoon of work. The operation does not know the difference, and neither does the field name.
Hash the value together with a random salt, keep the salt, and publish it only when you reveal. The verifier can still check the commitment afterwards. The search space stops being the price and starts being the salt.
salt: —
One boundary worth stating plainly. I have not checked whether any Primus documentation promises confidentiality for this operation, and this page does not claim it does. What is shown here is mechanical: a hash from a real attestation, its preimage, and the time it took on an ordinary machine. Draw your own conclusion about which fields you would put through it.
The pattern is old and it is not specific to zkTLS. It is worth restating here because selective disclosure is exactly the feature that invites you to hide a number, and a number with a narrow range does not become secret by being hashed. If the value matters, salt it. If you cannot salt it, reveal it and accept that you did.