Documentation / Checks
GET /v1/checks/{id}/anchor.tsr
The day's token, as raw DER, Content-Type: application/timestamp-reply. Same semantics as the JSON route while the day is not anchored — 202 Accepted with {"status":"pending"}, as JSON.
Verifying the anchor yourself #
Four steps, none of which need us.
- Compute the leaf:
leaf = SHA-256(0x00 ‖ response_hash), whereresponse_hashis the SHA-256 of the exact JSON bytes returned byGET /v1/checks/{id}. It must equal theleaffield. - Walk the path: for each sibling in order,
h = SHA-256(0x01 ‖ left ‖ right), where the sibling takes the side itssidefield names and the running value takes the other. - Compare the result to
root. If it matches, this check was part of that day's tree. - Verify the signature over the root, with the command below.
curl -H "Authorization: Bearer ak_live_XXX" \
https://api.akwito.eu/v1/checks/chk_01J9X0000000000000000000/anchor.tsr > day.tsr
openssl ts -verify -digest <root> -token_in -in day.tsr -CAfile tsa-chain.pem
<root> is the root field above, and tsa-chain.pem the same file as in GET /v1/checks/{id}/timestamp.tsr: the root certificate of the authority named in authority, which it publishes itself. The same root — and the same token — is published for everyone at /anchors/{day}.json, so anyone can confirm that the root you were given is the root the day was anchored with.