Verify a seal yourself
A seal is only useful if someone who does not trust us can check it. Everything needed is public.
What is signed
The record is a JSON object with the file's SHA-256 and size, the capture context (times, device, network), the location and the ID of the signing key. It is serialised canonically: keys sorted at every level, no whitespace, UTF-8, slashes and non-ASCII characters not escaped. record_text in GET /v1/captures/{id}/record is that exact text. Verify against it, not against a re-serialised copy.
The four checks
- File: SHA-256 of the file you hold equals
record.file.sha256. - Key:
record.key_idequals thekey_idreturned with the signature, and that key is listed at /.well-known/authintix-seal-key. Retired keys stay listed so old records keep verifying. - Signature: the base64 signature is a valid Ed25519 signature of
record_textunder that public key. - Time: the RFC 3161 token's message imprint is SHA-256 of
record_text, and the token is signed by the authority named in it.
The SDKs do the first three offline:
$rec = $ax->captures->record($id);
$file = $ax->captures->original($id);
$v = Authintix\Seal::verify($rec['record_text'], $rec['signature'], $rec['key_id'], $ax->sealKeys(), $file);
var_dump($v['valid']);const rec = await ax.captures.record(id);
const file = await ax.captures.original(id);
const v = Authintix.seal.verify({ recordText: rec.record_text, signature: rec.signature, keyId: rec.key_id, keys: await ax.sealKeys(), file });
console.log(v.valid);rec = ax.captures.record(cid)
v = authintix.seal.verify(rec['record_text'], rec['signature'], rec['key_id'], ax.seal_keys(), ax.captures.original(cid))
print(v['valid'])# token.tsr = base64-decoded timestamp_token; record.json = record_text exactly
openssl ts -verify -data record.json -in token.tsr -token_in \
-CAfile authority-roots.pemWhat a seal does not prove
It proves the file has not changed since it was sealed, when it existed, that it came through a live camera session and where the phone said it was. It does not prove the scene was genuine, that location was not spoofed on a modified phone, or who held the phone. Your process should treat those as separate questions.