Crate atlas_transparency_log

Crate atlas_transparency_log 

Source
Expand description

§Atlas Transparency Log

A transparency log implementation with Merkle tree support for C2PA manifests.

§Overview

This library provides:

  • Merkle tree implementation with inclusion and consistency proofs
  • Content format detection (JSON, CBOR, Binary)
  • Cryptographic signing and verification
  • Manifest storage and retrieval

§Example

use atlas_transparency_log::merkle_tree::{MerkleTree, LogLeaf};
use chrono::Utc;

let mut tree = MerkleTree::new();
let leaf = LogLeaf::new(
    "content_hash".to_string(),
    "manifest_id".to_string(),
    1,
    Utc::now(),
);
tree.add_leaf(leaf);

// Generate inclusion proof
let proof = tree.generate_inclusion_proof("manifest_id").unwrap();
assert!(tree.verify_inclusion_proof(&proof));

Modules§

merkle_tree

Enums§

ContentFormat
Content format enumeration for manifests

Functions§

calculate_hash
Calculate hash using the default algorithm (SHA-384)
detect_content_type
Detect content type from HTTP request headers
hash_binary
Hash binary data using the default algorithm (SHA384)
is_valid_manifest_id
Validate manifest ID format
sign_data
Sign binary data with Ed25519
validate_manifest_id
Validate manifest ID format