.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
| Offset | Size | Field | Description |
|---|---|---|---|
| 0x00 | 4 bytes | Magic Number | 0xFA 0x49 0x01 0x00 |
| 0x04 | 4 bytes | Metadata Length | Length of encrypted metadata |
| 0x08 | N bytes | Encrypted Metadata | AES-256-GCM encrypted JSON |
| 0x08+N | M bytes | Original Media | JPEG, 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
- Read magic number to confirm .facti format
- Extract metadata length and encrypted metadata
- Parse blockchain transaction hash from metadata
- Query blockchain for content hash
- Hash the original media data
- 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 | .facti | C2PA | Truepic |
|---|---|---|---|
| Open Standard | ✓ | ✓ | ✗ |
| Blockchain | ✓ | ✗ | ✗ |
| Encrypted Metadata | ✓ | ✗ | Partial |
| Decentralized | ✓ | Partial | ✗ |
| Cost per File | $0.01 | Free* | $15-50 |
📦 Open Source
The .facti format specification is open-source and available on GitHub. Build your own tools!