Why IPFS?
IPFS provides content-addressed, tamper-evident storage. Files are referenced by their hash (CID), so any change yields a different CID. That makes it ideal for certificates, badges, and proofs.
Recommended approach
- Pinning: Use a pinning provider (e.g., Pinata, NFT.Storage) or run your own node to keep content available.
- Gate public access: Store public assets on IPFS but keep private PII off-chain. If you must store sensitive data, encrypt before upload.
- Store metadata: Keep a JSON schema with fields like
recipient
, issuer
, issuedAt
, and the certificate file CID. - Anchor on-chain (optional): Record the root CID or a hash on-chain to timestamp and verify provenance.
Verifying a certificate
- Fetch the metadata and file via a trusted HTTP gateway or your own node.
- Hash the file locally and compare the CID or digest.
- If you anchored on-chain, compare the stored hash to the file's hash.
Common pitfalls
- Assuming permanence without pinning: Pin or pay for persistence.
- Storing secrets: Encrypt first; manage keys carefully.
- Broken gateways: Use multiple gateways or run your own.
Takeaway
Combine IPFS for integrity + optional on-chain anchoring for timestamped proofs. Users get verifiable docs without sacrificing privacy.