TectraTectra
Verification Guide

Understanding Verification

The verification system runs four independent checks and combines them into a confidence score. This guide explains what each result means and how to interpret them.

The Four Checks

Each check is independent. A result can be Authentic even if some checks fail.

1

Watermark Check

25% of score

Extracts the DWT+DCT invisible watermark from the image. The 16-byte payload is compared against all stored payloads using exact match first, then fuzzy Hamming distance ≤ 6 bits.

Passes when

Image contains a valid Tectra watermark payload that matches a signed record.

Fails when

No watermark found, watermark payload doesn't match any record, or image was significantly modified (heavy crop, extreme compression).

2

SHA-256 Check

25% of score

Computes the SHA-256 hash of the uploaded file and checks it against both the original hash and watermarked hash stored in the database.

Passes when

File bytes exactly match a signed record.

Fails when

File has been modified in any way since signing - even a single pixel change.

3

Perceptual Hash Check

25% of score

Computes a pHash and compares using Hamming distance. Candidates are pre-filtered using a 4-character hash prefix for performance, then full Hamming comparison.

Passes when

Image is visually identical to a signed record, within the Hamming distance threshold.

Fails when

Image is visually too different from any signed record (heavy cropping, extreme color changes).

4

Blockchain Check

25% of score

Queries the Polygon smart contract by content hash and perceptual hash. If found in a Merkle batch, re-verifies the stored Merkle proof against the on-chain root.

Passes when

Content hash found on Polygon blockchain, and Merkle proof validates correctly.

Fails when

Hash not found on-chain (record may be pending, or content was never signed with Tectra).

Confidence Score

The confidence score is passed_checks / total_checks. A result is marked Authentic if confidence ≥ 40% (at least 2 of 4 checks pass).

100%

4/4 pass

Strongly Authentic

All four checks verified. Highest certainty. The image is genuine and unmodified.

75%

3/4 pass

Authentic

Three checks pass. Very high confidence. Typically: blockchain pending, or minor modification (re-save).

50%

2/4 pass

Probably Authentic

Two checks pass. Authentic result returned. Image may have been cropped or heavily compressed.

25%

1/4 pass

Unverified

Only one check passes. Insufficient evidence. Could be partially manipulated or a coincidental hash match.

0%

0/4 pass

Unverified

No checks pass. Image was not signed with Tectra, or has been significantly modified.

Reading the API Response

json
{
  // Main result
  "authentic": true,          // confidence >= 40%
  "confidence": 0.75,         // 75% = 3/4 checks passed

  // Who signed it
  "origin": {
    "category": "ai",         // camera | ai | creative | medical
    "code": "ai_generated_image",
    "label": "AI Generated Image"
  },
  "signer": {
    "org_name": "Acme AI Inc.",
    "org_type": "ai_provider",
    "device_id": "model-v3",  // null if not set
    "public_key": "abc123...",
    "key_name": "production"
  },

  // Provenance timestamps
  "timestamp": "2025-01-15T12:34:56Z",   // signing time
  "blockchain_tx": "0x4a7f...",           // or "pending"

  // Individual check results
  "checks": {
    "watermark":       { "passed": true,  "details": "Payload matched record uuid" },
    "sha256":          { "passed": true,  "details": "Exact hash match: record uuid" },
    "perceptual_hash": { "passed": true,  "details": "Distance 2, record uuid" },
    "blockchain":      { "passed": false, "details": "Blockchain record pending" }
  }
}

Video Verification

Videos are verified using a segment-chained hash architecture. Instead of checking individual frames, the system divides the video into 5-second segments and verifies each segment against stored records.

Segment-by-Segment Comparison

The verifier re-extracts keyframes, groups them into the same segment boundaries, and recomputes the segment chain. Each segment is compared two ways:

Exact Hash Match

The segment hash matches exactly - pixels are identical. Chain integrity is preserved.

Perceptual Match

Segment aggregate pHash is similar (Hamming distance ≤ threshold). Video was re-encoded but visually unchanged.

Video Confidence Score

The confidence is verified_segments / total_segments. A video is authentic if ≥50% of segments verify. The response includes:

total_segments Total number of 5-second segments
verified_segments Segments matching (exact or perceptual)
chain_intact True if all segments matched exactly (no re-encoding)

Common Scenarios

Freshly signed image, blockchain pending

authentic: true, confidence: 75%

Watermark, SHA-256, and pHash pass. Blockchain check fails because the Celery batch hasn't flushed yet (~10 seconds). Re-verify after a minute for 100% confidence.

Screenshot of a signed image

authentic: true, confidence: 50–75%

SHA-256 fails (different bytes). Watermark usually survives screenshots. pHash passes if not heavily cropped. Blockchain fails (different hash). Still returns Authentic.

Unsigned image or never signed with Tectra

authentic: false, confidence: 0%

All four checks fail. No matching records in the database or on-chain. The image was not signed with Tectra.

Modified/tampered image

authentic: false, confidence: 0-25%

SHA-256 fails (modified bytes). Watermark may fail if modified. Blockchain fails. Only pHash might pass for minor edits. Insufficient for Authentic result.

Signed video, unmodified

authentic: true, confidence: 100%

All segments verify with exact hash match. Chain integrity intact. Blockchain proof verified via parent record. Full confidence.

Re-encoded video (same content)

authentic: true, confidence: 80-100%

Exact segment hashes differ (re-encoding changes bytes), but segment aggregate pHashes match perceptually. Most segments verify. Chain marked not-intact but content is authentic.

Video with tampered segment

authentic: true/false, varies

Tampered segments fail both hash and pHash checks. Untampered segments still verify individually. Confidence depends on how many segments were modified vs total.

Verification Best Practices

1

Wait 30–60 seconds after signing before verifying if you need blockchain confirmation.

2

For legal or compliance purposes, use 100% confidence (all 4 checks) as your threshold.

3

The blockchain_tx link lets you independently verify on Polygonscan - no Tectra servers needed.

4

Store the record_id returned from signing. You can cross-reference it with the verification checks.details field.

5

Perceptual hash false positives are extremely rare but possible for very similar images. Combine with watermark and blockchain for certainty.

You've reached the end of the docs.

Ready to start signing your content?

Get Started