Skip to main content

Key Vault

The PersistentKeyVault stores encryption keys and other persistent data in the Open Protocol Merkle tree. Keys can be accessed repeatedly using access proofs without being consumed.

PersistentKeyVault (v2): 0x683B3ff7795D508Ff1e088a08981580e19af7496
AccessProofVerifier (v2): 0x4C2cA5FFCE417A3914b6531C79b4946117B4aA21

How it works

  1. Store a key — commit an encryption key (or any data) to the Open Protocol tree
  2. Access the key — generate an access proof (non-destructive ZK proof) to prove you own the key
  3. Retrieve the data — the verifier confirms your proof, and you can decrypt/use the key

Unlike standard reveals, access proofs don't consume the commitment. The same key can be accessed unlimited times.

Access proof vs redemption proof

PropertyRedemption ProofAccess Proof
Consumes commitmentYes (nullifier spent)No (reusable)
Circuitredemption.circomaccessProof.circom
Public inputs84
Use caseToken revealsKey access, data retrieval

Usage

# Check the access proof verifier
cast call 0x4C2cA5FFCE417A3914b6531C79b4946117B4aA21 \
"verifyProof(uint256[8],uint256[4])(bool)" \
$PROOF $PUBLIC_INPUTS \
--rpc-url https://testnet.specterchain.com

See Access Proof Circuit for the circuit specification.