What Trust protects, and what it does not
This page is for two readers: someone building an app who wants to tell their users the truth, and a security reviewer who wants to know exactly what is claimed. Every guide points here.
Trust is a closed product. You receive built packages and programs, not source code. That adds one party you must trust in every mode: Geometer’s build of the kit. Section 6 says what you can still check without our code.
1. The short version
Section titled “1. The short version”| Vault | Sealed AI | Masked AI | |
|---|---|---|---|
| Who cannot read | your database, your server, your hosting company, Geometer, anyone who copies your database | your server, its hosting company, Geometer, the network, the AI provider’s staff and its systems outside the sealed machine | the AI company cannot read the items that were masked |
| Who can still read | the user’s device | the user’s device, and the sealed AI machine (it must read the chat to answer it) | the AI company reads everything that was not masked; your server route reads the masked chat |
| Who you still trust | Geometer’s build of the kit; your app’s own web code; the user’s device and browser | the same three, plus the chip makers (AMD, Intel, NVIDIA) and the code the provider publishes for its sealed machines | the same three, plus the AI company with whatever was not masked |
| What the receipt says | that this device created or changed the keys, with which unlock methods | that this device checked the server’s hardware evidence (chip maker’s signature, the code’s measurement, firmware level, key binding) and then encrypted the chat to that server only | which kinds of items were masked and how many, and that detection is pattern-based, with names only when you list them |
| What the receipt does not prove | that every field was encrypted; that the app’s code did not read the text; who controls the signing key | what the sealed server did with the chat; that the GPU was checked (it says “GPU: not checked by this device”); that the app’s code did not read the chat; who controls the signing key | that nothing sensitive was left unmasked; what the AI company did with the chat; that the app’s code did not read it; who controls the signing key |
2. Who you trust, in every mode
Section titled “2. Who you trust, in every mode”- Geometer’s build of the kit. The code that encrypts runs from our package. If we shipped a bad version, it could read what it encrypts. You choose when to take an update; enterprise customers can ask for a source review.
- Your app’s own web code. In a web app, the code that calls Trust runs inside your page. If you, or someone who takes over your deploy, or one of your JavaScript dependencies, ships changed code, that code can read text before it is encrypted. Trust protects your users against a copied database, a curious server and the AI host. It does not protect a user from an app that is built, or changed, to cheat them. The same goes for a browser extension the user installed that can read pages.
- The user’s device and browser. If the device is compromised, so is everything on it.
3. Vault
Section titled “3. Vault”What it stops:
- Nobody without the user’s key can read a saved field: not your database, your server, your host, Geometer or a thief with a copy.
- A saved value cannot be changed, or moved to another table, row, field, user or app, and still open.
- The locked key file cannot be changed without the user’s device noticing as soon as it is unlocked.
What it does not stop:
- Lost keys mean lost data. If a user loses every passkey and passphrase and their recovery code, nobody can open their Vault. Not you. Not Geometer. There is no back door.
- A weak passphrase can be guessed. The locked key file sits in your database. Whoever copies the database can try passphrases, slowly (each try costs real memory and time), but a short or common passphrase will fall. Trust asks for at least 15 characters and refuses well-known passwords and passphrases that contain your app’s name or the user’s id. Passkeys and the recovery code cannot be guessed.
- “Remember this device” trades a prompt for exposure (optional, off unless the app turns it on). While it is on, anyone who can use this browser profile on this device, and any script running on your app’s own page, can use the Vault without the passkey until the end date (at most 90 days): read and write the user’s values and make search keys. The device keeps only keys the browser can use but nobody can read out or copy (never the Vault key itself), so a script cannot copy them away. What it keeps is a “record root” that makes per-value keys, a search key and a key that can only check the key file, nothing more: from them a script cannot get the Vault key, the key that opens the old keys, the key that opens a recovery code, or a key that signs a key file, so it cannot open the recovery code, add its own unlock method, rotate or forge a key file, and nothing it obtains works for a key change. It can still ask the browser to derive the per-value keys of values it can reach while the entry exists, and those keys stay valid for those values after the entry ends (it has copied what it read); so treat the window as “this device can read and write the user’s values”. The window ends when the user or your sign-out forgets the device (
forgetDevice), at the end date, or when the entry is deleted on this device. A retire or rotation done on another device does not end it here until Vault runs here and sees the changed key file; a lost phone that is still unlocked stays exposed until the end date or until its user forgets the device from that device (there is no way to forget it from another device, so keep the days short). The end date is a clock check, not cryptography. A remembered Vault cannot change keys (no new passkey or passphrase, no new recovery code, no rotation or retire): that needs a real unlock. Search tags are the one exception that outlives the entry: tags a script computes from the stored search key for its own guesses (emails, names, statuses) keep matching the search keys of values written later, including new ones, until the key is rotated. So after a lost or shared device: forget it, rotate the key (rotateKey) and re-index the search columns. - Passkeys belong to a domain. If your app moves from a preview address (for example
*.lovable.app) to its own domain, passkeys made on the old address stop working there. Users unlock with their recovery code or passphrase and add a new passkey. - Only the fields you pass through the Vault are encrypted. Ids, dates, foreign keys and other columns stay readable.
- Sizes and changes show. A stored value is a fixed 70 bytes longer than its text. Anyone with the database sees how long each value is and when it changes.
- Search keys show which values are equal.
vault.searchKeylets you find exact matches. In exchange, anyone with the database can see which of a user’s rows share a value in that table and field, and how many. Do not use it on fields with only a few possible values (a status, yes/no, a country). Three rules for your code:- Decrypt each match and check it. Someone who can write to your database can copy a search key onto another row, so a lookup can return the wrong row.
- Prepare the value the same way every time (for example
value.normalize("NFC").toLowerCase()).toLowerCasedoes not treat every language’s letters alike (Germanß, Turkishi). - Never make search keys for values your server sends you. A server that sends a list of guesses and gets their search keys back learns which rows hold which guess.
- An older value can be put back. Someone who can write to your database can replace a value with an older value of the same row and field, and it will open. A version number helps only if your app knows the expected version from somewhere that person cannot change (the user’s device, a record signed elsewhere); a version column in the same database is rolled back with the value. The same person can also mix fields of one record from different times. When a record’s fields must stay together, save the whole record as one value with
encryptJSON. - An older key file can be put back. A device that has already seen the newer key file refuses the older one. A new device, or one that never saw the newer file, cannot tell, and nothing in Trust can, because there is no counter that the database’s owner cannot reset. A key rotation (
vault.rotateKey()) gives the user new secrets, and those do not open an older file. But secrets the user kept from before (an old passphrase they remember, an old written code) still open an older file on such a device. So after a rotation, tell users to destroy their old recovery code and never to type an old passphrase. On a device that has never seen this Vault before, Trust has one more, partial check: if it finds the user’s data written under a newer key than the key file knows, it refuses to write (vault/key-file-behind). - Your passkey sign-in must not ask the Vault passkey for its key. If your app also signs users in with passkeys, your sign-in code must remove
prffrom the options your server sends, and must not sendprfresults back to your server. UsesanitizePasskeyOptionsandsanitizePasskeyResponsefrom@geometer/trust/vault. Without that, your server could ask the user’s Vault passkey for its key during a normal sign-in.
4. Sealed AI
Section titled “4. Sealed AI”What it stops:
- Before anything is sent, the user’s device checks that the AI server is a sealed machine, signed by the chip maker, running code whose measurement matches a release the provider published. Then it encrypts the chat to a key that only that machine holds.
- Your server, its host, Geometer, the network and the provider’s staff and systems outside the sealed machine cannot read the chat or the answer.
- If the check fails, nothing is sent. It never falls back to Masked AI or to a plain call.
What it does not stop:
- The sealed machine reads the chat. It must, to answer. You trust the chip makers and the code the provider published for that machine.
- The GPU is not checked by the user’s device. With the first provider (Tinfoil), the provider checks the GPU when the machine starts; the device does not. Receipts say “GPU: not checked by this device”.
- The shape of the chat shows. Your server route, its host and the provider’s front door see when a chat happens, how big it is, how long the answer takes, and how long each streamed word is. With Tinfoil’s protocol they also see the request path and headers. They do not see the words.
- Static evidence can be replayed. Tinfoil serves the same hardware report to everyone, with no client nonce today. An old report stays acceptable for as long as its code measurement and firmware level are accepted. This matters only to someone who has also broken a sealed machine.
- Recorded traffic and the future. The encryption uses X25519. Someone who records the encrypted traffic today (for example your route’s logs, if you kept bodies) could read it if X25519 is ever broken, for example by a large quantum computer. No provider offers a post-quantum option for this yet. The protocol also has no forward secrecy: if a sealed machine’s private key ever leaked, recorded traffic to that key could be read.
- Closed models are not available. GPT, Claude and Gemini do not run in sealed machines you can check. Use Masked AI for those, and read its limits.
- Your route cannot cap the cost of sealed calls. It cannot see the model or the length inside a sealed request. Set a spending limit at the provider, and let only signed-in users through
authorize. - Which code counts as “known”. The user’s device checks the provider’s latest signed release itself: it verifies the release’s Sigstore signature and takes the expected measurement from it. While the provider is rolling out a new release, it also accepts the one release just before the latest, checked the same way. Neither may be older than a floor built into
@geometer/trust(MIN_RELEASE, v0.0.179 today); your app can raise the floor (minRelease), never lower it, and an old copy of the kit stops working once its floor falls behind. What remains: a signed older release at or above the floor still passes, so whoever controls what your route returns can pick that release instead of the newest (if a server of that release still answers); and there is no freshness nonce yet, so a genuine older report of an accepted release can be replayed for as long as its key lives.
5. Masked AI
Section titled “5. Masked AI”What it stops:
- The items Masked AI finds (emails, phone numbers, card numbers, Aadhaar and PAN formats, API keys and tokens, IBANs) and the names you list are replaced on the device before the chat leaves, and put back on the device when the answer arrives. The AI company never sees them.
What it does not stop:
- It is not encryption. The AI company reads everything that was not masked.
- It finds patterns, and names only when you list them. A customer’s name you did not list, an address, a story that identifies a person: these go to the AI company as written.
- Your server route reads the masked chat. It forwards plain (masked) text.
- A Masked AI receipt never says “sealed”.
6. Receipts and the badge
Section titled “6. Receipts and the badge”- A receipt is the user’s device speaking. It is signed by a key on that device, inside your app. It shows the file was not changed after that device signed it. It does not show who controls that key, and code running in your page could make the device sign a false receipt. So a receipt never proves anything against your own app’s code.
- A receipt holds no chat text and no sizes. It holds fingerprints (hashes) that are salted, so nobody can test guesses against them. The salts stay on the user’s device unless the user chooses to export them.
- The badge is not proof. Anyone can draw a badge. It shows the mode in fixed words and links to the receipt; the receipt, checked by a checker you run yourself, is the proof.
What you can check without Geometer’s code:
| Check | How |
|---|---|
| The receipt file was not changed after the device signed it | the free, open-source geo-verify (Apache-2.0), on the pack and anchor inside the receipt file (trust-verify unpack writes them out) |
| The hardware evidence is genuine | the receipt file carries the raw evidence and the chip maker’s certificates. Any independent SEV-SNP or TDX verifier can check them against AMD’s or Intel’s own roots |
| Trust uses its algorithms correctly | the published test vectors (RFC 5869, RFC 9106, NIST CAVP, RFC 9180, RFC 8032, RFC 4231) are published, together with Trust’s own byte-level vectors that anyone can recompute from the published formats |
What trust-verify checks beyond that |
trust-verify is closed today. |
7. Words used on this page
Section titled “7. Words used on this page”| Word | Meaning |
|---|---|
| sealed machine | a server whose memory the hardware encrypts and whose code the chip measures and signs, so that the cloud company and the provider’s staff cannot look inside |
| measurement | a fingerprint of the code a sealed machine started with |
| evidence | the chip-signed report a sealed machine gives about itself, including its measurement and its key |
| passkey | a sign-in key kept by the phone, the computer or a password manager, opened with a fingerprint, face or PIN |
| recovery code | 32 characters shown once at setup; the way back in when everything else is lost |
| key file | the locked copy of the user’s key that your app keeps in its own database; it opens only with the user’s passkey, passphrase or recovery code |
| receipt | a signed record of one Trust action, with what was checked and what was not |