Skip to main content
Prove provenance facts without revealing all details. Built on @noble/ciphers (Cure53-audited), SD-JWT-like presentations, and Pedersen commitments.

Overview

@provenancekit/privacy provides five layers of privacy:

Installation

Selective Disclosure

Allow a contributor to prove specific provenance facts without revealing all fields.

Encrypted File Storage

Wrap any IFileStorage adapter to automatically encrypt files before upload and decrypt on retrieval:

Key Derivation

EncryptedFileStorage uses HKDF to derive per-file keys from the master key + file CID, so each file has a unique encryption key. Store only the master key in your secrets manager.

Pedersen Commitments

Commit to a value now, reveal it later — with homomorphic properties for aggregation.

Lit Protocol Access Control

Define token-gated access conditions for encrypted resources:

AI Training Opt-Out

The most immediately actionable privacy feature: signal that your content may not be used for AI model training.

Per-project (dashboard)

In the ProvenanceKit dashboard → Project → Privacy Settings, enable AI training opt-out. This automatically attaches ext:license@1.0.0 / hasAITrainingReservation: true to every resource uploaded via that project’s API key.

Per-resource (SDK/API)

Check opt-out status

GDPR Compliance Patterns

Data minimisation (GDPR Art. 5)

Use selective disclosure so only the fields necessary for a given verification are revealed. Store the full commitment on-chain; keep salted fields server-side.

Right to erasure (GDPR Art. 17)

ProvenanceKit gives you the tools; erasure workflows are your responsibility:
  1. Off-chain: Delete the entity record and all associated provenance records from your DB
  2. IPFS: Unpin the resource CID from your Pinata/IPFS node (note: other nodes may have copies)
  3. On-chain: Cannot be deleted — by design. To “erase” on-chain: encrypt the data before anchoring so the commitment is meaningless without the key, then destroy the key.

Pseudonymisation (GDPR Art. 4(5))

Replace real entity IDs with pseudonymous IDs before recording:

Gotchas

  • Master key rotation: Changing masterKey in EncryptedFileStorage means old CIDs can no longer be decrypted. Implement key rotation by re-encrypting all files under the new key.
  • SD-JWT salts: The saltedFields in a disclosure bundle must be stored securely by the creator. Losing them means you can’t create future presentations.
  • Lit Protocol network: Lit is a separate decentralised network. Test on cayenne (Lit’s testnet) before mainnet.
  • IPFS is not private: Unencrypted content uploaded to IPFS is publicly readable by CID. Always encrypt sensitive content before uploading.
  • Commitments are binding: A Pedersen commitment reveals the value when opened. Make sure the randomness is kept private and never reused.