← Back to Blog

Enclave Vaults: Identity, Consent and Rules, the Three Questions Behind Every Key Approval

B Foing·

Whoever can approve changes to a key's rules controls the key. Enclave Vaults releases a key only to the enclave builds listed in its policy, and that policy keeps every cloud operator, Privasys included, away from your data. The operations that change the policy therefore matter as much as the key itself: approving a new build of your app, changing the key's rules, exporting the key, deleting it. Each of them should go ahead only when the owner approves, and the owner should see exactly what they are approving.

Our first designs treated ownership as one choice per key. A key belonged to Privasys ID, to a company's identity provider, or to the owner's own wallet keys, and each choice came with its own rules. Every new requirement then looked like an exception: a security officer who signs in with Entra but approves with a YubiKey, or a wallet owner who wants Privasys ID as well as their phone. We have rebuilt the approval model around three separate questions, each answered on its own:

Layer Question Answers
Identity Who is this approver? An accepted provider, named by issuer and audience (Privasys ID for production or for development, Microsoft Entra, Okta); a holder record, which pins your wallet; or a pinned credential
Consent How do they approve this exact operation? Always with a signature over the text of the operation. The vault verifies it itself (a pinned wallet key, a pinned security key), or a provider able to bind the operation relays it (Privasys ID today)
Rule How many, and who? A threshold over approvers, set per operation by the owner

Our production vaults run this model with two forms of consent: relayed by Privasys ID, and signed by your own phone. This post explains each layer, what it gives you, and how the layers apply when no single vault holds the whole key.

Existing approaches

Role-based approval in a key management console lets an administrator approve an operation with a click. The approval is a record in the console's database, and the key service trusts the console to have checked who clicked. Whoever runs the console can produce that record.

Multi-party approval workflows in cloud key management services ask a second person to confirm sensitive operations. They are a real improvement, though the provider still evaluates the workflow: the cryptographic boundary that holds the key takes the provider's word that the quorum was reached.

Hardware tokens that sign each operation give the strongest guarantee, because the signature reaches the device that holds the key. They also tie each approver to one kind of device, and the key service has to understand every approver's token.

Each of these products answers the three questions at once. Separating them lets one key's rules combine a company's sign-in, a person's phone and a security key, and lets the vault check every signature itself wherever it can.

Identity: who the approver is

A key's rules name each approver in one of three ways.

A provider, named by issuer and audience. Privasys ID for production and Privasys ID for development count as two providers, because their tokens carry different audiences. The vaults refuse a token issued for the other audience, so a sign-in that reaches a development tool can never act on a production key. Each key now lists its own providers, so a company's own Microsoft tenant or Okta can take the same slot: the vault checks that company's tokens against the provider listed in the key, and reads the person from the claim that provider uses. Providers per key run on our development vaults, and reach production with the next vault release.

A holder record, which pins your wallet. The record is a chain of signed statements: it starts from a root key that only your wallet can derive, lists the phones allowed to approve for you, and adds or removes phones over time. The key's rules point to the record rather than to a phone, so adding a new phone takes one statement for every key you hold.

A pinned credential: the public key of a hardware security key, such as a YubiKey, written into the key's rules. The vault checks its signatures directly. Pinned credentials run on our development vaults, as described below.

Consent: approving one operation

Whatever the approver, consent is a signature over a text that describes exactly one operation. The vault never takes this description from the caller: each vault rebuilds the text from the request and from its own state.

privasys-vault-approval/v2
<number of vaults>
<member id of each vault, sorted>
<operation>
<key handle>
<target>
<policy version>
<approver>
<holder record head>
<nonce>
<expiry>

The operation is one of create, promote, export, update_policy_from, delete, delete_after and reshare. The target describes the result of the operation: the digest of a build's measurement for a promote, the digests of the current and the new rules for a rules change, the successor key for a delete_after. Each vault has a member id, the hash of a signing key it generated itself, and clients read it only over an attested connection. A vault refuses an approval that does not name it, accepts each approval once, and refuses it once the key's rules have changed, because the text includes the policy version. An approval collected for development vaults therefore fails on production vaults, whatever produced it.

The signature reaches the vault in one of two ways.

Relayed by a provider able to bind the operation. Your phone makes a passkey assertion whose challenge is the hash of the text. Privasys ID verifies it and signs a short-lived token carrying that hash, and the vault checks the token, the hash and the freshness. In this route the vault relies on Privasys ID's signing key to report the passkey check truthfully.

Verified by the vault itself. Your phone signs the text with an approval key held in its secure hardware, or a pinned security key signs it on your own computer, and the vault checks the signature against the key pinned in the rules. Nothing in between can produce an approval: whoever carries the message can at most delay it or drop it.

Providers that cannot bind an operation still play a part. Entra and Okta can always say who someone is: for reading a key, for signing in to apps, or for vouching for a person when a credential is enrolled. With pinned credentials, a security officer signs in once with their company's Entra to enrol a YubiKey, the key's owner approves the addition, and from then on the vault verifies the YubiKey's signatures itself.

Rules: how many, and who

A key's rules list, for each operation, who may call it and which approvals it needs. The approval condition sets a threshold over approvers of any type:

Approvals {
    from: [Owner, Manager(1), Manager(2)],
    min_distinct: 2,
}

A rule with two such conditions needs both, so "the owner's wallet and one of two security officers" becomes two conditions on one rule. A person's sign-in alone suffices only where the owner's rules allow it.

The rule that governs rule changes sets the key's real security. If changing the rules needs only a Privasys ID approval, Privasys ID could in principle rewrite every other rule on that key. The vault enforces two protections here. The vault refuses a new key unless every rule a person could use to promote a build, change the rules, delete the key or export it requires a bound consent. And when a key names a pinned wallet, changing its rules always requires that wallet's consent, so the pin stays until the phone itself approves its removal.

Rules also say where a key may go. A key's TEE rules list the enclave builds allowed to receive it, and each build's entry can also list the servers allowed to fetch it, by the platform identity taken from the attestation report. The vault refuses a copy of the build running on any other machine. We explain why the machine matters in platform pinning in RA-TLS.

Every key also expires, and renews on a schedule without its owner's involvement. A renewal carries the key's rules byte for byte, onto the same vaults or onto new ones, so an automatic process can never change who governs a key. When we moved every production key of the platform onto a new set of four vaults, we read each key's rules back from all four and found them identical, byte for byte.

Wallet pinning

Wallet pinning combines the holder record with the vault's own verification, and it runs in our production vaults. Your wallet creates one record for your identity and enrols every phone you have, and the key's rules point to that record.

sequenceDiagram
    participant C as CLI or portal
    participant I as Privasys ID
    participant W as Your phone
    participant V as Each vault
    C->>V: read the key's rules and the vaults' identities
    C->>V: bring the holder record up to date
    C->>I: ask for approval of this operation
    I->>W: card with the operation, the key and the vaults
    W->>W: show it, build the text,<br/>Face ID, sign with the approval key
    W->>I: signature
    I->>C: the phone's proof
    C->>V: operation with the proof
    V->>V: rebuild the text, check the phone<br/>is in the record, spend the proof

Each phone has its own approval key, generated in its secure hardware (the Secure Enclave on iPhone, StrongBox or the TEE keystore on Android). The key never leaves the phone, and every signature needs Face ID, a fingerprint or the phone's passcode. It is separate from the passkey used to sign in, and it signs only texts the wallet builds itself from the fields it shows on screen, so a sign-in can never turn into an approval.

Every vault checks the record against the same rules:

  • Adding a phone requires an enrolled phone and its unlock, as adding a device to a banking app does. The new phone can then approve for every pinned key at once.
  • Removing a phone is final at each vault that has seen the removal: the removed phone can never present an older record that still lists it, and can never rejoin.
  • Recovery uses your recovery phrase on a new phone. The phrase opens your wallet's backup, from which the wallet derives the record's root key, and one statement removes the lost phones and enrols the new one immediately.
  • Each vault keeps the newest record it has seen and refuses any older one, so a phone cannot present the record as it stood before its removal.

Pinning a wallet takes one card: the owner approves adding the holder to the key, and from then on the operations named in the rules need the phone's signature, checked by the vault. A pinned wallet currently sits beside the owner's existing approval, so those operations take both, and Privasys ID alone can no longer perform them or change the key's rules.

Pinning has one consequence to weigh before you choose it. Privasys cannot recover a pinned wallet for you: if you lose every phone and your recovery phrase, the rules that need the wallet can never change again. App keys keep renewing under their existing rules, so apps keep running. Enrolling several phones and keeping the phrase safe avoids that situation.

Keys that no single vault holds

Our production vaults run as a constellation of four, on four machines in Paris, London, Roubaix and Montreal, and any two of them can serve a key. Shamir's Secret Sharing splits a secret across them, so each vault holds a share that reveals nothing on its own.

Signing keys go further, with multi-party computation. The vaults generate a threshold Ed25519 key together, using FROST: each vault ends up with a share of the private key, and the private key itself never exists anywhere, in a vault, a client or a server. Any two vaults produce a signature by computing it jointly from their shares, and the signature verifies against one ordinary Ed25519 public key. The vaults never call each other. The client carries the rounds between them, and each vault seals the parts meant for another vault to that vault's attested key, so the client relays them without being able to read them. Such a key can never be exported, since no copy of it exists.

The three layers apply at every vault separately. Before it takes part, each vault holding a share rebuilds the approval text, checks the consent signatures and applies the key's rules. A signature therefore requires the rules to be met at two vaults on two different machines, and an attacker who compromises one vault gains neither the key nor the ability to approve on the owner's behalf.

Renewing a threshold key reshares it: the vaults hand out fresh shares of the same secret, so the public key stays the same, along with every signature and verifier that depends on it. Because a reshare changes where the key lives, it needs the owner's consent like any other operation that governs the key, signed over the same approval text with the operation reshare.

Security keys, and what comes next

Pinned security keys are the newest type of approver, and they need neither a web page nor a party in between. A security key has no screen and signs whatever a page asks of it, so an approval made in a browser is only as trustworthy as the page that asked. Our design removes the page altogether. We register the key to privasys-vault:, a relying party outside the web's domains, as SSH registers keys to ssh:, so no website can ever ask it to sign. You approve with the Privasys CLI on your own computer: it reads the operation from the vaults over attested connections, rebuilds the exact text, shows it to you, and asks your key to sign it after your PIN and a touch. Whoever carries the request can delay it, but can never forge it or change what you see.

The CLI supports this on Windows, Linux and macOS (privasys vault credential register, privasys key-policy add-credential and privasys vault approve). On Windows it goes through the system's own WebAuthn interface. Linux has no such interface, and macOS offers one only to apps whose relying party is a web domain they are associated with, so on both the CLI speaks the key's own protocol, CTAP2, over USB, and reads the key's PIN from your terminal. On our development vaults we pinned a key to a credential held by Windows Hello, which the same interface reaches, saw the vaults refuse a delete that lacked that credential's signature, and deleted the key once the credential had signed that exact operation.

With providers on each key, a team that signs in with its own Entra or Okta can use a key, and approve changes to it with security keys pinned in the key's rules. Both features reach production with the next vault release. After that come attested issuers: identity providers running in an enclave, whose signing keys the vault accepts only after checking their attestation.

Summary

An approval answers three questions: who approves, how they consent to this exact operation, and how many must agree. Keeping the questions apart lets one key's rules combine a company's sign-in, your phone and a security key, and lets each vault check every signature it can by itself. With wallet pinning, the most important changes to a key travel straight from your phone's secure hardware to the vaults that hold it.

Enclave Vaults is open source under the AGPL-3.0 licence: the vault code and its wire formats are in enclave-os-mini, and the clients in enclave-vaults-client. The approval rules are documented at docs.privasys.org.