← All work

College project · College project, built alone · Dec 2025 – Jun 2026

BlockVault

A document vault that can prove a redacted copy hides only what was blacked out.

Role
Built alone as a college project: the web app, the API and its workers, the redaction service, the Rust encryption service, the contracts and the proof circuit.
Platforms
Web
Stack
TypeScript · React, Python · Flask · FastAPI, Rust, Solidity · Hardhat, Circom · snarkjs, MongoDB · Redis · MinIO · IPFS
Links
Original chunkRedacted copymask0000111000010000RR′rootroot
What the redaction proof checks, drawn small: 16 blocks stand in for a chunk's 256. An illustration, not a screenshot.

01The problem

Sharing a document often means blacking parts of it out first. Whoever gets the redacted copy has to trust that only the sensitive parts were removed and nothing else was changed.

BlockVault encrypts documents before they're stored, finds the personal details to black out, and produces a zero-knowledge proof that the redacted copy matches the original everywhere else, without revealing what was removed. Document fingerprints are recorded on Ethereum.

02My role

Built alone as a college project: the web app, the API and its workers, the redaction service, the Rust encryption service, the contracts and the proof circuit.

03Architecture

A React app in front of a Flask API, with background workers and two smaller services: one that finds and redacts personal details, and one in Rust for encryption.

  • Web appReact · encrypts files in a Web WorkerREST
  • Walletsigns in by signing a one-time noncesignature
API and workersFlask · Celery · MongoDB · Redis · files in MinIO
  • RedactorFastAPI · Presidio · spaCy · OCR
  • Crypto serviceRust · AES-256-GCM · Argon2id
  • Proofs and anchoringCircom · snarkjs · IPFS · Solidity registry
The API hands heavy or sensitive work to small services and background workers.
Encryption
Files are encrypted in the browser with AES-GCM, chunk by chunk in a Web Worker, under a key wrapped with a passphrase. The server's encryption runs in a Rust service with AES-256-GCM and Argon2id, which wipes keys from memory after use.
Redaction
A FastAPI service finds personal details with Presidio, spaCy and pattern rules, and redacts PDF and Word files, with OCR for scans.
Proof and anchoring
Celery workers generate the redaction proofs with snarkjs, pin files to IPFS, and record fingerprints in a Solidity registry in batches under a Merkle root. Users sign in with their wallet by signing a one-time nonce.

04Hard parts

  1. 01

    Proving a redaction without revealing it

    Each 4 KB chunk is split into 256 blocks of 16 bytes. A Circom circuit checks that every block not marked for redaction is the same in both versions, and that each version hashes to its public Merkle root, built with Poseidon. Whoever checks the proof sees which blocks were masked and the two roots, never the removed text.

  2. 02

    Personal details in Indian documents

    Generic detectors miss local identifiers. Aadhaar numbers are checked with the Verhoeff checksum and card numbers with Luhn, and PAN, IFSC, GSTIN and voter ID numbers are matched by their exact formats, so near-misses aren't flagged.

  3. 03

    Large files in the browser

    Encrypting a whole file at once can run a browser tab out of memory. Files are encrypted chunk by chunk in a Web Worker, so the page stays responsive.

05Decisions and trade-offs

  • Fingerprints on chain, documents off it

    Only hashes are recorded on Ethereum. The encrypted files live in object storage and IPFS.

    Trade-offNothing sensitive is public and recording stays cheap, but the chain can only vouch for a document's fingerprint, not keep the document itself.

  • One proof per chunk

    The circuit works on fixed 4 KB chunks rather than a whole document.

    Trade-offThe circuit stays small enough to prove on an ordinary machine, but a long document needs a proof for each chunk.

  • Encryption in its own service

    Server-side encryption runs in a separate Rust process that the API talks to over TCP.

    Trade-offKeys stay out of the Python process and the encryption code stays small and easy to review, but it's one more service to deploy and run.

06Lessons

  • Keep the claim narrow

    The redaction proof checks one precise statement: the blocks that weren't masked are unchanged. Keeping it that narrow kept the circuit small, and made the proof easy to explain to someone who has to trust it.

  • Test where mistakes are costly

    Merkle trees, key recovery, refresh tokens, rate limiting and the redaction proof have tests. CI runs them with a security scan, the frontend tests and the contract tests.

07Where it stands

  • Built alone as a college project, from December 2025 to June 2026.
  • Source on GitHub, with tests and CI across the frontend, the API, the redaction service and the contracts.