Sovereign Website
Mistral, a European brain
Choose a designDesigns

An independent Sovereign Website demonstration. Not affiliated with or endorsed by Mistral AI.Independent demonstration, not affiliated with Mistral AI.

In your browser

Your browser's key pair

Give this browser its own key pair, then send your Mistral key to it sealed, from the device that holds the key. The sealed key is kept here as ciphertext, survives reloads and restarts, and is opened in memory only when a demo on this site asks and you press the button that says so.

1. This browser's key pair

Your browser makes it, with Web Crypto: RSA-OAEP, 3072 bits, SHA-256. The private half is made not extractable, so it can be used here but never copied out. Both halves are kept in this browser's own key store (IndexedDB), which is what lets them survive a reload.

Looking in this browser's key store...

2. The sealed Mistral key in this browser

A sealed key lives 2, 8 or 24 hours, as chosen when it was sealed; after that it is refused and deleted, and you seal the key again. To put one here: open Seal a key for a browser on the device that holds your Mistral key, with this browser's public key, and open the link it gives you back in this browser. Then, on Ask this site, Talk to a European brain and the other demos, press "Use the sealed key stored in this browser". Nothing uses it on its own.

Deletes the key pair and the sealed key from this browser. A key sealed to this browser can never be opened again after that.

What this protects, and what it does not

How it works

  1. Here, after your press, Web Crypto makes an RSA-OAEP 3072-bit key pair (SHA-256, public exponent 65537), the private key not extractable. Both halves are kept as CryptoKey objects in IndexedDB.
  2. This page shows the public key three ways: its fingerprint (SHA-256 of the SubjectPublicKeyInfo bytes, first 16 hex characters), the text {v:2, alg, spki, fp, origin, created} with the key in base64url, and a QR code of a link to the seal page with that text in the part after #, which browsers do not send to any server.
  3. On the other device, the seal page checks the fingerprint against the key, shows it to you, and seals your Mistral key in that tab: a fresh AES-256-GCM key (12-byte random nonce) encrypts it, and RSA-OAEP with SHA-256 wraps that AES key with this browser's public key. The site, the fingerprint, the time it was sealed and its expiry (2, 8 or 24 hours, 24 by default) go in the envelope and are bound to the ciphertext as AES-GCM additional data, so changing any of them makes it impossible to open. Out comes {v:2, origin, fp, created, expires, wrapped, iv, ct}. It sends nothing anywhere, and refuses a public key made on another site.
  4. Back here, the link's #sealed= part is read once and removed from the address bar before anything else. If it is version 2, for this site, for this browser's fingerprint and not expired, you can store it, exactly as it came: ciphertext. Anything else is refused.
  5. When you press "Use the sealed key stored in this browser" on a demo, the private key unwraps the AES key in memory, the AES key decrypts your Mistral key, and the demo holds it in its tab's memory like a pasted key, sends it only in the Authorization header to api.mistral.ai or api.eu.mistral.ai, and drops it when you press Forget, leave or reload the page, or when it expires. After its expiry the stored sealed key is refused and deleted.
  6. This page and the seal page make no request of any kind: their content security policy allows no connection to anywhere but this site, and they make none.

The key pair and sealing are adapted from AgentiCCells__Site__Evals, src/core/v0.1/vault.js (Apache-2.0); this site's copy is vault.js, and the demos reach it through vault-client.js. The QR codes are drawn by Kazuhiko Arase's qrcode-generator (MIT), already on this site at /team/qrcode.js.