.facti File Format

Open standard cryptographic media container format

Overview

The .facti format is a cryptographic container that stores authenticated media with blockchain verification. It combines encrypted metadata, blockchain references, and the original media in a single file.

Binary Structure

OffsetSizeFieldDescription
0x004 bytesMagic Number0xFA 0x49 0x01 0x00
0x044 bytesMetadata LengthLength of encrypted metadata
0x08N bytesEncrypted MetadataAES-256-GCM encrypted JSON
0x08+NM bytesOriginal MediaJPEG, PNG, or video data

Metadata Structure

The encrypted metadata contains all verification information:

{
  "version": "1.0",
  "contentHash": "0x1234...abcd",
  "blockchain": {
    "network": "starknet-mainnet",
    "txHash": "0x5678...ef01",
    "blockNumber": 123456,
    "timestamp": 1709512800
  },
  "creator": {
    "wallet": "0xabc...def",
    "verified": true,
    "attestation": {
      "type": "journalist",
      "issuer": "Reuters",
      "credential_hash": "0x789...abc",
      "issued_at": 1709512800,
      "expires_at": 1741048800
    }
  },
  "capture": {
    "timestamp": "2026-03-03T21:00:00Z",
    "device": "iPhone 15 Pro",
    "location": {
      "latitude": 40.7128,
      "longitude": -74.0060
    }
  },
  "mime": "image/jpeg"
}

Key Features

1. Tamper-Evident

Any modification to the file breaks the cryptographic verification. The content hash is stored on the blockchain, making tampering immediately detectable.

2. Privacy-Preserving

Metadata is encrypted. Only the content hash and blockchain reference are public. Sensitive information (location, device details) remains private.

3. Blockchain-Verified

The transaction hash links to an immutable blockchain record. Anyone can verify authenticity by checking the blockchain without needing the decryption key.

4. Open Standard

The format specification is open-source. Anyone can build tools to create, read, or verify .facti files.

Verification Process

  1. Read magic number to confirm .facti format
  2. Extract metadata length and encrypted metadata
  3. Parse blockchain transaction hash from metadata
  4. Query blockchain for content hash
  5. Hash the original media data
  6. Compare hashes - match = authentic, mismatch = tampered

Example: Reading a .facti File

import { parseFacTi } from '@blockfact/react-facti';

const { imageUrl, metadata } = await parseFacTi('https://ipfs.io/ipfs/bafybei...');

console.log('Transaction:', metadata.blockchain.txHash);
console.log('Creator:', metadata.creator.wallet);
console.log('Timestamp:', metadata.capture.timestamp);

// Display image
<img src={imageUrl} alt="Verified content" />

Comparison with Other Formats

Feature.factiC2PATruepic
Open Standard
Blockchain
Encrypted MetadataPartial
DecentralizedPartial
Cost per File$0.01Free*$15-50

📦 Open Source

The .facti format specification is open-source and available on GitHub. Build your own tools!