Attest · Concept
Video attestation
Video attestation is the video form of an attestation bundle, that hashes the recording chunk by chunk into a chain so a change to any chunk is caught at that chunk.
When to use it
Use it for walk-around inspections, damage videos and any recording that must be shown unchanged. Use a live capture session when it also matters that the video was recorded now, not uploaded from earlier.
How it works
- Chunks. The recording is cut into chunks of about 2 seconds.
- Chain. Each chunk's hash covers the previous one:
chunk_hash_i = SHA256(prev_chunk_hash || SHA256(chunk_bytes)). Changing, dropping or reordering any chunk breaks every later hash, which verification reports asframe_hash_mismatchat that chunk. - Seed. For a live session, chunk 0 is seeded with a
session_noncethe server issues when the session opens, so a video hashed in advance can't produce a valid chain. A recorded upload is seeded with"".
- Open sessionserver issues session_nonce
- Stream chunkshash chain, server timestamps
- Finalizesigned bundle + manifest
The final chain hash is the bundle's sensor_hash, and the bundle travels beside the video as a sidecar manifest.
Key fields
| Field | Type | Description |
|---|---|---|
session_ | string | null | The server-issued seed for a live session; null for a recorded upload. |
video_ | integer | The target chunk length, usually 2000. |
video_ | number | The recording's length. |
video_ | string | The container and codec, such as video/. |
video_ | object[] | Each chunk's index, byte_, chunk_ and captured_. |
Open a live session
POST / opens a session and returns its nonce:
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s $PROVENANCE_API/v1/attest/capture_sessions \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "device_id": "dev_00000000000000000000000000000001", "claim_id": "CLM-DOCS-VIDEO", "chunk_duration_ms": 2000 }' | tee session.json
import { Provenance } from "@provenanceauth/sdk";
const prov = new Provenance({ apiKey: process.env.PROVENANCE_KEY!, baseUrl: process.env.PROVENANCE_API });
const session = await prov.attest.captureSessions.create({ deviceId: "dev_00000000000000000000000000000001", claimId: "CLM-DOCS-VIDEO", chunkDurationMs: 2000 });
import os
import httpx
api, headers = os.environ["PROVENANCE_API"], {"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}
session = httpx.post(f"{api}/v1/attest/capture_sessions", headers=headers, json={
"device_id": "dev_00000000000000000000000000000001", "claim_id": "CLM-DOCS-VIDEO", "chunk_duration_ms": 2000,
}).json()
{
"id": "cses_7XX5ES93YC9TEBG9ADWE958XQS",
"object": "capture_session",
"status": "open",
"session_nonce": "23adc0fd19002088bc9c590fefa854868149fddb784eed8bd27b97a21ff82913",
"expires_at": "2026-10-24T13:39:08.922Z"
}
The capture app then sends each chunk's hash as it is cut, with POST /. The server timestamps each arrival:
export SESSION_ID=$(jq -r .id session.json)
curl $PROVENANCE_API/v1/attest/capture_sessions/$SESSION_ID/chunks \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "index": 0, "chunk_hash": "2110a233677a28c9cd6d66ac954ce831e70587e1940cf53e1a66f36683efad68", "captured_at": "2026-10-24T13:30:00.000Z" }'
await prov.attest.captureSessions.appendChunk(session.id, { index: 0, chunkHash: "2110a233677a28c9cd6d66ac954ce831e70587e1940cf53e1a66f36683efad68", capturedAt: "2026-10-24T13:30:00.000Z" });
httpx.post(f"{api}/v1/attest/capture_sessions/{session['id']}/chunks", headers=headers, json={
"index": 0, "chunk_hash": "2110a233677a28c9cd6d66ac954ce831e70587e1940cf53e1a66f36683efad68", "captured_at": "2026-10-24T13:30:00.000Z",
})
{ "object": "capture_chunk", "session_id": "cses_7XX5ES93YC9TEBG9ADWE958XQS", "index": 0, "chunk_count": 1 }
When recording stops, the app finalizes with the device-signed bundle at POST /, which verifies the nonce, the chain and the timing, and returns the verification result with liveness_checked: true. A recorded upload skips the session and goes to POST / with its manifest.
What the checks mean
| Factor | Points | Meaning |
|---|---|---|
frame_ | 50 | A chunk's bytes don't match the chain; the factor names the first bad chunk. |
session_ | 70 | The chain isn't seeded with the session's nonce: the main sign of a replayed recording. |
liveness_ | 40 | The chunk timing was inconsistent: gaps far outside the cadence, timestamps out of order, or chunks after finalize. |
video_ | 40 | Chunks are missing or out of sequence in the manifest. |
liveness_check_failed is a timing check on the chunks. It doesn't check that a person was present.
Limitations: the manifest travels beside the video file; it isn't embedded in the MP4 or WebM container.