Kalypso

Private data on Arkiv: encrypt on device, prove facts in zero knowledge, and delete for real.

Kalypso

Created At

ETHGlobal Mumbai

Project Description

Arkiv is a public DB-chain: every attribute, owner and byte of calldata is readable by anyone, and deleteEntity only clears current state. Old blocks keep the data forever in every archive node.Kalypso is a TypeScript SDK and web app that makes private data work on Arkiv without changing Arkiv:

  • Encrypt: records are encrypted in the browser (AES-256-GCM, size-bucket padding). Only ciphertext and a Poseidon2 commitment go on-chain. Each record key is split 2-of-3 between your device and two guardians, with shares sent over hybrid post-quantum key exchange (ML-KEM-768 + X25519).
  • Query: exact-match, range and COUNT search on encrypted fields, plus a relational layer (atomic multi-insert, 1:N and M:N blind foreign keys, batched JOIN, cascade). Everything compiles down to Arkiv's own indexed equality, OR and count, so Arkiv never sees a value.
  • Prove: Noir circuits (UltraHonk) prove claims like "age ≥ 18" about a committed record, right in the browser. The proof is published on Arkiv, and anyone can verify it on a public page with no wallet and no key.
  • Shred: the device and guardians destroy their key shares and sign attestations. One Arkiv transaction deletes the entities and publishes a public shred receipt. An archive node that kept the old calldata can try to decrypt it on the "Break it" page, and it gets only noise.

Everything runs live on Arkiv Rabdi (chain 7794095), with real transactions and no mocks.

How it's Made

Monorepo in TypeScript (pnpm workspaces):

  • packages/crypto: AES-256-GCM via @noble/ciphers, HKDF, HMAC blind-index and range-tree tags, Shamir 2-of-3 over GF(2^8), hybrid ML-KEM-768 + X25519 share wrapping (@noble/post-quantum).
  • packages/zk: Noir circuits for range and equality over Poseidon2 commitments, proved with Barretenberg UltraHonk (bb.js WASM in the browser). Verification keys are published on Arkiv, so verifiers fetch them from the chain.
  • packages/core, vault, shred, sdk: the ArkivZK client on @arkiv-network/sdk 1.0.1, with typed schemas, record, proof, VK and shred-receipt entities, absolute expiry tied to the retention you choose, and native batches so a cascade shred is one atomic transaction. It also includes a query planner with IN-batching via OR (at most 18 terms), keyset paging, projections and explain().
  • guardian/: two small Node services that hold key shares, destroy them on request and sign attestations.
  • archive/: an indexer that captures raw Kalypso calldata from Rabdi, plus an API that replays it and tries to decrypt, to show that shredding works against a real archive.
  • apps/web: a Next.js 16 app with a vault, query explorer, prove, a public verify page, shred, and the archive "Break it" page. Reads go through a server-side RPC proxy, so the Arkiv access key never reaches the browser. Writes are signed by the user's wallet, or by one-time signers funded by a relayer, so records can't be linked to a wallet.
  • Swarm: optional encrypted attachments uploaded to a Bee node. Only ciphertext goes to Swarm, and the reference is kept encrypted, never stored as-is on Arkiv.

The notable trick is that encrypted search, COUNT and JOIN all run on Arkiv's own index. We store HMAC tags (blind indexoreign keys) as indexed attributes and compile queries to equality and OR, so nothing is downloaded and decrypted just to

background image mobile

Join the mailing list

Get the latest news and updates

Kalypso | ETHGlobal