Skip to main content

Overview

zkStorage provides encrypted file storage on IPFS with zero-knowledge proofs for password verification. Files are encrypted client-side before upload, ensuring only you can access your data.

How It Works

  1. Encrypt: Files are encrypted client-side using AES-256-GCM with a key derived from your password.
  2. Generate Proof: A Groth16 zkSNARK proof is generated proving you know the password without revealing it.
  3. Upload: Encrypted file is uploaded to IPFS via Pinata with the proof attached.
  4. Verify: Download requires verifying the ZK proof to decrypt the file.

Terminal Commands

Show Help

Shows all available zkStorage commands and security details.

Upload File

Opens a file picker for encrypted upload. After selecting a file, you’ll be prompted for a password. Example:

List Files

Shows all your uploaded files with CID, name, size, and date.

Download File

Downloads and decrypts a file. Requires password for decryption. Example:

Share File

Creates a shareable link with time-limited access.

File Info

Shows detailed information about a specific file.

Delete File

Unpins a file from IPFS (removes from Pinata).

API Reference

Upload File

Response:

List Files

Response:

Download File

Response: Binary encrypted file data
Response:

Delete File

Response:

Technical Details

Encryption

zkStorage uses AES-256-GCM for file encryption:

ZK Proof Generation

Groth16 proofs verify password knowledge using Poseidon hash commitments:

IPFS Storage

Files are stored on IPFS via Pinata:
  1. Gateway: gateway.pinata.cloud
  2. Persistence: Files remain pinned indefinitely
  3. Redundancy: Multiple IPFS nodes

File Limits

Security Features

  1. Client-Side Encryption: Files encrypted before leaving your device.
  2. Zero-Knowledge Proofs: Password verified without revealing it.
  3. AES-256-GCM: Military-grade authenticated encryption.
  4. SHA-256 Checksums: Verify file integrity on download.
  5. Time-Limited Sharing: Share links expire automatically.
Important: If you forget your password, your files cannot be recovered. There is no password reset.

Error Handling

Example: Full Flow