VaultID

Portable, wallet-encrypted OAuth sessions. One identity across all devices.

ETHIndia 2025

🎓 Devfolio

📌 Whitefield, Bangalore

🚀 48 hours Hackathon Project

What it is

VaultID is a Chrome extension plus a Solidity smart contract. The extension saves the cookies from a website login, encrypts them with a key derived from an Ethereum wallet signature, and stores the ciphertext on IPFS (InterPlanetary File System). The same wallet can restore the session on another browser. A three-person team built it at ETHIndia 2025.

The problem

The README names two issues: session data is split across devices, and centralized stores can be breached. A login session lives in the browser that created it, so a new device means signing in again.

VaultID's answer is to avoid a central store. The wallet holds the only key that can decrypt the stored sessions.

How it works

The repository is a pnpm workspace with two packages.

PathRole
extension/src/content/Content script. Detects login and logout on a page and shows a prompt.
extension/src/background/Manifest V3 service worker. Reads, saves and restores cookies for a domain.
extension/src/components/Home.tsxPopup UI. Runs the sync and restore flows.
extension/src/lib/crypto.tsKey derivation, AES-GCM (Advanced Encryption Standard, Galois/Counter Mode) encryption and decryption.
extension/src/lib/ipfs.tsUploads and fetches archives through Pinata, a hosted IPFS pinning service.
extension/src/lib/vaultId.tsContract ABI (application binary interface), Sepolia address, commitment helpers.
blockchain/contracts/VaultID.solThe on-chain registry.

Saving a session follows these steps:

  1. The content script detects a login and tells the background worker, which stores the cookies for that domain locally.
  2. When the user selects Sync Now, the popup asks the wallet to sign a fixed message. The extension hashes the signature with keccak256 and uses the result as a 256-bit AES-GCM key.
  3. The extension encrypts the stored sessions with a random 12-byte IV (initialization vector).
  4. It wraps the ciphertext in an archive with the wallet address and a hash of the signature, then pins the archive to IPFS.

Restoring reverses the flow. The extension finds the newest pin whose name starts with vaultid-<wallet address>, fetches it, derives the key again, decrypts it, and writes the cookies back to the browser.

The contract

VaultID.sol stores one record per address: a family hash, a commitment, a sequence number and a revoked flag. The commitment is keccak256(cidHash, familyHash, sequence), where the CID (content identifier) names the archive on IPFS. The contract never sees cookies or keys.

FunctionBehavior
registerVaultCreates the caller's record. Reverts if one exists or an input is zero.
rotateVaultReplaces the commitment. The new sequence must be strictly higher.
rotateWithSigSame rotation, submitted by a relayer with an EIP-712 signature from the owner.
revokeVaultPermanently disables the record.

The Hardhat test suite in blockchain/test/VaultID.test.ts covers registration, rotation, revocation, view functions and the signed rotation path, including wrong signers and replayed nonces. A deployment to Sepolia is recorded in blockchain/ignition/deployments/chain-11155111.

What I built

I worked on the original ETHIndia 2025 version, which the team demoed at the hackathon. I designed the architecture, shaped the idea and wrote the smart contract. The repository linked from this page is a later rewrite of that project.

Design decisions

Derive the encryption key from a wallet signature. The user does not manage a separate encryption password. The trade-off is that decryption depends on the wallet producing the same signature for the same message. The code relies on this, and does not add a fallback. The code stores a hash of the key with each archive and checks it before decrypting, so a mismatch gives a clear error instead of a decryption failure.

Keep only commitments on-chain. The contract stores hashes and a counter, and the ciphertext lives on IPFS. This keeps secrets and large data off the chain. The cost is that availability of the ciphertext depends on the pinning service.

Use sequence numbers and nonces. Each rotation must raise the sequence, and each signed rotation consumes a nonce. A relayer cannot replay an old commitment over a newer one.

Support contract wallets. rotateWithSig validates signatures with OpenZeppelin's SignatureChecker. It accepts both ordinary account signatures and EIP-1271 signatures from smart-contract wallets.

Gate the popup with a local password. extension/src/lib/password.ts hashes a local password with PBKDF2 (100,000 iterations, salted with the wallet address) and expires the unlocked state after five minutes.

Run it locally

Requirements: Node.js 18 or later and pnpm 8 or later.

  1. Install dependencies from the repository root:

    pnpm install
    
  2. Run the contract tests:

    cd blockchain
    pnpm hardhat test
    
  3. Build the extension from the repository root:

    pnpm build
    
  4. In Chrome, open chrome://extensions, enable Developer mode, choose Load unpacked, and select extension/dist.

Uploads need a Pinata token. The code reads VITE_IPFS_API_TOKEN and optionally VITE_IPFS_UPLOAD_ENDPOINT and VITE_IPFS_GATEWAY.

To deploy the contract to Sepolia, set the key and run the Ignition module:

cd blockchain
pnpm hardhat keystore set SEPOLIA_PRIVATE_KEY
pnpm hardhat ignition deploy --network sepolia ignition/modules/VaultID.ts

Reference

AreaChoiceUsed for
ContractSolidity, compiled with 0.8.28The vault registry
Contract librariesOpenZeppelin (EIP712, ECDSA, SignatureChecker)Typed-data hashing and signature checks
ToolingHardhat 3 beta, Ignition, viemTests and deployment
ExtensionReact 18, Vite, TypeScriptPopup, content script, service worker
UITailwind CSS 4, shadcn/uiStyling and components
Walletwagmi, viem; MetaMask, WalletConnect and Coinbase Wallet connectorsConnecting and signing
StorageIPFS through PinataEncrypted session archives
CryptoWeb Crypto APIAES-GCM and PBKDF2

Outcome

VaultID was built at ETHIndia 2025 in Bangalore, a 48-hour event. The submission was a proof of concept with a video demo. The hackathon page records no placement.

The contract is deployed on the Sepolia test network at 0x50D8A0eC2bb0386ea75FD60B4C0066b777E65d21. The repository was created on 3 December 2025, and the last commit is from 5 December 2025.

In the current code, the extension saves and restores sessions through IPFS only. It contains the contract ABI and commitment helpers, but the repository has no call that registers or rotates a vault from the popup.

Liked VaultID? Here's my background.

Full-stack TypeScript, shipped to real users.