View as Markdown

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

  1. Chunks. The recording is cut into chunks of about 2 seconds.
  2. 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 as frame_hash_mismatch at that chunk.
  3. Seed. For a live session, chunk 0 is seeded with a session_nonce the server issues when the session opens, so a video hashed in advance can't produce a valid chain. A recorded upload is seeded with "".
  1. Open session
    server issues session_nonce
  2. Stream chunks
    hash chain, server timestamps
  3. Finalize
    signed 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

FieldTypeDescription
session_noncestring | nullThe server-issued seed for a live session; null for a recorded upload.
video_manifest.chunk_duration_msintegerThe target chunk length, usually 2000.
video_manifest.duration_secondsnumberThe recording's length.
video_manifest.codecstringThe container and codec, such as video/webm;codecs=vp9.
video_manifest.chunksobject[]Each chunk's index, byte_length, chunk_hash and captured_at.

Open a live session

POST /v1/attest/capture_sessions 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
{
  "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 /v1/attest/capture_sessions/{id}/chunks. 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" }'
{ "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 /v1/attest/capture_sessions/{id}/finalize, 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 /v1/attest/attestations with its manifest.

What the checks mean

FactorPointsMeaning
frame_hash_mismatch50A chunk's bytes don't match the chain; the factor names the first bad chunk.
session_nonce_mismatch70The chain isn't seeded with the session's nonce: the main sign of a replayed recording.
liveness_check_failed40The chunk timing was inconsistent: gaps far outside the cadence, timestamps out of order, or chunks after finalize.
video_manifest_incomplete40Chunks 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.