Files
fhe/examples/data-seal/README.md
T
Zach Kelling 961c42e204 feat: add FHE example apps for all Pars PIPs
- data-seal: Verifiable Data Integrity Seal (PIP-0010/LP-0535)
  FHE-encrypted tamper-proof sealing with Public/ZK/Private modes,
  batch sealing, homomorphic verification

- content-provenance: AI & Media Content Provenance (PIP-0011/LP-7110)
  Model manifests, output attestation via homomorphic comparison,
  media derivation DAGs

- encrypted-crdt: Encrypted CRDT (PIP-0013/LP-6500)
  LWW-Register with FHE values, OR-Set with tag-based add/remove,
  Lamport timestamp conflict resolution, deterministic merge

- shadow-governance: Shadow Government Protocol (PIP-7010)
  Anonymous ministries, encrypted voting with homomorphic tallying,
  nullifier-based anti-fraud, quorum enforcement

Each example includes Solidity contracts, Hardhat tests, CLI tasks,
and README linking to corresponding PIP and LP specifications.
2026-02-13 14:16:46 -08:00

1.5 KiB

Data Seal - Verifiable Data Integrity

FHE-encrypted tamper-proof document sealing with three seal modes.

Implements: PIP-0010 / LP-0535

Seal Modes

Mode Description Use Case
Public Transparent, anyone verifies Journalism, open records
ZK Content hidden, properties provable Trade secrets, proprietary models
Private FHE-encrypted, selective disclosure Whistleblower evidence, medical records

How It Works

  1. Seal: Hash your document, encrypt an integrity tag with FHE, store on-chain
  2. Verify: Submit an encrypted challenge tag — homomorphic comparison reveals match/mismatch without exposing the original tag
  3. Batch: Seal thousands of documents in one transaction

Quick Start

npm install
npx hardhat compile
npx hardhat test

# Deploy
npx hardhat task:deploy-seal

# Create a seal
npx hardhat task:seal --contract <address> --hash 0xabc...

# Verify a seal
npx hardhat task:verify-seal --contract <address> --id 0 --tag 42

# Batch seal
npx hardhat task:batch-seal --contract <address> --count 10
  • Go implementation: github.com/luxfi/fhe/cmd/seal — Boolean-circuit FHE seal using XNOR+AND chain
  • LP-0530: Z-Chain Receipt Registry (Poseidon2 Merkle accumulator)
  • LP-3658: Poseidon2 Precompile (ZK-friendly hashing)