Skip to main content
Back to Blog
SecurityOctober 19, 20265 min read

Defeating Pre-Recorded Camera Fraud with Two-Phase Visual Proof & SHA-256 Sealing

Why raw photo uploads fail forensic scrutiny, and how binding presigned cloud objects to a 10-second capture gate creates an immutable chain of custody.

setsig Security Engineering•Cryptographic Verification

Phase 1: Presigned Intent & Live Capture Enforcement

In vehicle inspections, roadside claims, and high-trust field audits, coordinates alone do not prove visual state. Standard multipart uploads allow modified gallery images to masquerade as live captures.

With POST /v1/sessions/verify-intent, the client receives a short-lived presigned storage target immediately prior to shutter capture. When POST /v1/sessions/verify arrives, any capture timestamp older than 10 seconds is deterministically rejected with 400 ERR_STALE_VISUAL_PROOF.

visual-proof-flow.ts
// Phase 1: Acquire short-lived presigned upload target
const intent = await setsig.sessions.verifyIntent({
venueId: "ven_workshop_ist_01",
clientToken: "clm_workshop_4409",
contentType: "image/webp",
});
 
// Phase 2: Seal live snapshot digest (< 10s window) into presence session
const verified = await setsig.sessions.verify({
qrPayload: scannedQrPayload,
clientBinding: { clientToken: "clm_workshop_4409", userRef: "inspector_18" },
telemetry: { latitude: 41.00824, longitude: 28.97836, accuracyMeters: 3.4 },
visualProof: {
storageKey: intent.storageKey,
imageHashSha256: computedSha256Hex,
capturedAt: new Date().toISOString(),
livenessScore: 0.98,
},
});

Phase 2: Storage Hash Verification & Session HMAC Binding

Before sealing the session, the backend verifies the uploaded cloud object directly against the 64-character SHA-256 hex digest submitted by the client, rejecting tampered uploads with ERR_INVALID_IMAGE_HASH.

Finally, the verified image_hash_sha256 is concatenated directly into the canonical session message alongside coordinates, NTP nanosecond timestamp, and hardware enclave verdict before signing with HMAC-SHA256.

session-seal.go
proofMessage := fmt.Sprintf("%s:%s:%s:%f:%f:%s:%s:%s",
sessionID.String(),
tenant.ID.String(),
req.ClientBinding.ClientToken,
deviceCoord.Latitude,
deviceCoord.Longitude,
visualProofHash,
nowUTC.Format(time.RFC3339Nano),
attestVerdict,
)
proofSignature := engine.SignHMACSHA256(proofMessage, h.secretKey)

Further Engineering Dispatches

Deploy non-repudiable physical presence today

Start with free sandbox credits and integrate any of our 8 official SDKs in minutes.

Control which cookie categories are active during your visit. You can update your choices at any time from the footer.

Strictly NecessaryAlways Active

Required for language selection, security headers, and storing your consent preferences. Cannot be disabled.

Analytics & Performance

Helps us understand page visits, latency, and navigation patterns through Google Analytics and Tag Manager.

Campaign Measurement

Measures referral attribution and campaign effectiveness across external marketing channels.