Expand description
§aethel-vault
aethel-vault is the agent-held wallet: the crate is aethel-vault,
the repository is aethel-runtime. Not to be confused with
pqc-privacy’s unrelated AES-GCM + Reed-Solomon shard module
(historically also called “vault” there — that is a research
component; this crate owns the word “wallet”).
§Two assets, not one (V-7)
This crate holds and moves two entirely separate things, and never bridges between them:
- Confidential internal balance (
fhe-statefeature,vault/client) — anFheUint64ciphertext the vault never decrypts, homomorphically transferred between agent-chosen ledger entries. It exists only in the agent’s own storage (which may be a hostile host); privacy here is against that storage. It is not a token, not on any chain, and not USDC. Older docs in this crate described this as “on-chain” with “validator” processing — that language was wrong and has been corrected; there is no chain and no validator anywhere in this crate. - Settlement asset (
signerfeature, default,settlement) — USDC on Base, Ethereum, or Arbitrum One, moved by an EIP-3009transferWithAuthorizationsignature the agent’s external wallet produces. Public by nature; bounded bypolicy::SpendPolicy.
An FHE transfer never moves USDC, and an EIP-3009 authorization never
changes an FHE balance unless the agent explicitly records it — there
is no bridge in this crate. See vault’s module docs for more detail.
§Zero ECDSA / 100% PQC signer; secp256k1 lives in the agent’s wallet
This crate never implements, produces, or verifies a secp256k1 ECDSA
signature. The settlement::SettlementSigner trait is the injection
point: an agent’s existing wallet (hardware, MPC, browser, HSM) signs
the EIP-712 digest this crate builds. This crate’s own signatures —
spend intents, settlement receipts, wallet-bind attestations, HITL
approvals — are all ML-DSA-65 via aethel_core::signing::Identity,
under the purpose-separated contexts in aethel_core::signing::purpose.
A hybrid (PQC + classical) posture, if wanted, belongs at SAGP (the
gateway), not here. See settlement’s module docs for the full
rationale and the locked rules it encodes.
§Custody rule: the ServerKey — and the settlement signer — never leave the agent
- ServerKey (
fhe-statefeature): held only in a process-local, never-serialized runtime structure. It never appears in exported or persisted [vault::VaultState] bytes — seevault’s “Custody rule” docs (V-2). - Settlement signer (
signerfeature): thesettlement::SettlementSignertrait is injected by the caller; no implementation ships in this crate except a test-only mock. This crate never holds a secp256k1 private key. - There is no “hosted vault” mode. Naming a Cargo feature
hostedis a hard compile error (see below). Do not hostaethel-vaulton a third party’s infrastructure; the agent runtime, or a wallet process the principal already runs, holds every secret this crate touches.
§Feature Flags
signer(default) —settlement(EIP-3009/x402 export),policy(standing spend policy),receipt(optional signed receipts). Notfhe, no HelixDB gRPC stack. This is the Wave-1 “vault as signer of a normal USDC wallet” path.fhe-state— the confidential internal ledger (vault’sVaultState/homomorphic transfer state machine,client’sNativeVaultClient). Pullstfhe. Optional: a differentiator for agents storing state on a hostile host, not a Wave-1 gate.helixdb— the [storage::helixdb] gRPC adapter. Pullstokio,tonic,prost, and runsprost-buildinbuild.rs.std(default) — standard library support. Does not, by itself, pulltokio/tonic/prost(that ishelixdb’s job) ortfhe(that isfhe-state’s job).wasm—wasm-bindgenexports for the confidential-ledger state machine and client.hosted— does not exist as a real feature. Enabling it is a hardcompile_error!(see below). This is the custody rule enforced structurally, not just documented.
default = ["std", "signer"]: a plain cargo add aethel-vault builds
the thin signer path only — no tfhe, no tokio, no tonic, no
prost anywhere in the dependency graph (confirm with cargo tree -e normal).
§Modules
settlement— EIP-3009/x402 export (signer, default).Chaintable,TransferWithAuthorization,SettlementSignertrait,Wallet::authorize_eip3009.policy— standing spend policy (signer, default).SpendPolicy,PolicyState,Rail,HitlApproval.receipt— optional signed settlement receipts (signer, default).error—VaultError, the Rust-native error type for thesigner-mode surface.vault— the confidential-ledger state machine (fhe-state). Homomorphic balance management usingFheUint64ciphertexts viatfhe-rs.client— the confidential ledger’s client SDK (fhe-statenative, orwasmfor JS).- [
storage] — HelixDB storage adapter (helixdbfeature only). sdk— Client SDK module. TypeScript and Rust SDK utilities.
§Security Properties
- Zero Plaintext Leakage (confidential ledger):
fhe-statebalances exist solely asFheUint64ciphertexts in the agent’s own storage; this crate never decrypts them. - Post-Quantum Hardness: the confidential ledger’s security reduces to LWE hardness over the Torus; this crate’s own signatures (spend intent, receipt, wallet bind, HITL approval) are ML-DSA-65.
- Ephemeral Vault IDs: anonymous vault identifiers derived from Polymorphic Lattice Projections; no persistent on-chain footprint — and no on-chain footprint of any kind, since the confidential ledger is not on any chain.
- Policy before signature:
settlement::Wallet::authorize_eip3009checkspolicy::SpendPolicybefore it ever calls the injectedSettlementSigneror signs aSpendIntent. A denied or unsatisfied-HITL request produces no signature of any kind.
§The 0x307 crate family
aethel-vault is one of six open-source crates from 0x307, held to one
audit and stability standard.
| Crate | Tier | What it does |
|---|---|---|
| pqc-sig | Production | ML-DSA, SLH-DSA and FN-DSA signatures (FIPS 204/205/206) |
| pqc-kem | Production | ML-KEM (FIPS 203), the X25519 + ML-KEM-768 hybrid, X-Wing, and sealed boxes |
| aethel-core | Production | Post-quantum anonymous identity: a separate identifier per context, context-bound ML-DSA signing |
| aethel-sdk | Preview | The SDK over aethel-core, and the place to start |
| aethel-vault (this crate) | Preview | Agent-held wallet: policy-gated x402 / EIP-3009 signing with ML-DSA-65 spend records |
| pqc-privacy | Lab | Research bundle, kept off every identity and payment path |
Production crates are thin, standards-bound libraries meant to be depended on today. Preview crates work and are published, with APIs still settling. Lab crates are research, never on an identity or payment path.
Runnable examples: 0x307/examples, one program per crate, pinned to the published versions.
Audit status: None of these crates has been independently audited, and none holds a CMVP / FIPS 140-3 validation. “FIPS 203/204/205/206” means the algorithms follow those standards, not that the code is certified. Known issues for this crate are in SECURITY.md. Versioning and yanks: STABILITY.md.
Re-exports§
pub use vault::derive_vault_id;pub use vault::ERR_DESER;pub use vault::ERR_INSUFFICIENT_BALANCE;pub use vault::ERR_INVALID_KEY;pub use vault::ERR_NOT_FOUND;pub use vault::ERR_OK;pub use vault::ERR_UNAUTHORIZED;pub use vault::ERR_WIRE_VERIFY_FAILED;pub use client::LedgerPayload;pub use error::VaultError;pub use policy::Decision;pub use policy::HitlApproval;pub use policy::PolicyState;pub use policy::PolicyViolation;pub use policy::Rail;pub use policy::SpendPolicy;pub use policy::SpendRequest;pub use receipt::Receipt;pub use receipt::SignedReceipt;pub use settlement::Chain;pub use settlement::SettlementAuthorization;pub use settlement::SettlementError;pub use settlement::SettlementSigner;pub use settlement::SpendIntent;pub use settlement::TransferWithAuthorization;pub use settlement::Wallet;
Modules§
- client
- The confidential ledger’s client SDK — key generation, balance
encryption, payload construction.
client::LedgerPayloadis always available; [client::NativeVaultClient] requiresfhe-stateand [client::AethelVaultClient] requireswasm. - error
VaultError— the Rust-native error type for thesigner-mode surface. Error type for thesigner-mode surface (V-1/V-4/V-5).- policy
- Standing spend policy, enforced before any settlement intent is signed
(
signerfeature, default). Standing spend policy, enforced before any settlement intent is signed (SAGP-PG-001 V-4). - receipt
- Optional signed settlement receipts (
signerfeature, default). Emitted only on request — see the module’s own docs (V-5 / UX-001). Optional signed settlement receipt (SAGP-PG-001 V-5). - sdk
- SDK module — TypeScript and Rust utilities for HelixDB integration.
- settlement
- EIP-3009/x402 settlement export (
signerfeature, default). See the module’s own docs for the “Zero ECDSA / 100% PQC signer” statement. EIP-3009 / x402 settlement export (SAGP-PG-001 V-1). - vault
- The confidential-ledger state machine (
fhe-statefeature) — homomorphic balance management,FheUint64ciphertexts. See the module’s own docs for the “Two assets, not one” statement and the V-2 custody rule.vault::derive_vault_idand theERR_*constants are available regardless offhe-state.