for agents/llms.txtv0.13.27

Home / Articles / A secret is a QR code and a link to a public key: the workflow the QR experiment opens, who else already does this, and a format to share

A secret is a QR code and a link to a public key: the workflow the QR experiment opens, who else already does this, and a format to share

By · 2026-10-21 · article v1.0.0 · newsroom v0.13.26 · qr-codespkisecretsagentsencryptionarticle

Abstract: The QR experiment showed that two AI sessions can pass keys and an encrypted message through QR codes and a screenshot. This is what I want to do with it. If I want to give someone a secret, all I have to do now is send them a QR code and a link to my public key; if they want to give me one, they encrypt it to my key and send me back a QR code. The first message carries their public key too, so after one exchange we can both write to each other, and once we have checked each other's fingerprints, we know who we are talking to. The same works for agents: an agent makes its own key pair, publishes the public half, and swaps QR codes with me or with another agent. None of it needs a server. The pieces are not new, and that is a good sign: QR codes already carry signed health certificates, verify keys in messaging apps, sign people in with a passkey on another device, and move signed transactions in and out of offline wallets. What is new is putting them together for secrets and agents, on top of public keys we publish, in a format we can share across our tools. The experiment's QRE1 format is a good start for that, with three things to add.

The workflow: publish my public key as a QR code and a link; their browser or agent encrypts the secret to it and adds its own public key; the ciphertext travels as a QR code by any channel; I decrypt it and check their fingerprint once; from then on it is two-way. Agents do the same.

In short

From the experiment to a workflow

In the human is the network two AI sessions passed keys, a certificate, images and an encrypted message through QR codes, with me screenshotting from one browser tab to the other. Afterwards I recorded what I think it opens up, and it is simple. In my words: "if I want to give a user a secret, all I have to do now is send them a QR code and the link to my public key, right? Isn't it? If you think about it, that's it."

It works in both directions:

Agents in the loop

The same workflow works for agents, and that is where I think it gets most useful. An agent creates a key pair for itself, keeps the private half and publishes the public one. As I put it in the memo, the agent "can literally take go to our website, grab the public key of me or … of the target agent, download the public key, and then create an image that I can just give to the other agent, and suddenly we have a very effective way of communicating."

That solves a real problem I wrote about in handing secrets to agents: giving a vault key to an agent session without pasting it in the clear. The session shows its public key as a QR code; I encrypt the vault key to it and hand back a QR code; only that session can open it. And the person in the middle, me, can see and control every message that crosses, without being able to read the secrets in it.

Why QR codes and not text

We could do all of this with blocks of text, and we have. In the memo: "even when I try to, the whole send a massive blob of text. It's just unusable. It's not practical. It looks messy." A QR code is an object: a person can see it, move it, drop it in a chat or a page, and an agent or a browser can read it with a library. The experiment showed how much fits: up to 2,953 bytes, enough for keys, certificates, a signed message, or a whole infographic. And when something does not fit, a QR code can always carry a link to the rest.

Who else already does this

Who already moves keys and secrets in QR codes: the EU Digital COVID Certificate, key verification in Signal, WhatsApp and Matrix, device linking in Signal and WhatsApp, Threema, passkeys on another device, offline wallets, Keybase and OpenKeychain, and provisioning codes for authenticators, Wi-Fi, WireGuard and eSIMs.

I asked for research on who else is doing this, and the answer is reassuring: every piece is already in use, at scale, which is good evidence that it works. From their own specifications and documentation:

And a warning that comes with the territory. QR codes are a well-known phishing route, "quishing" in the NCSC's word, and in 2025 Google's threat intelligence team reported attackers "crafting malicious QR codes that, when scanned, will link a victim's account to an actor-controlled Signal instance" (Google). That is the public-key-by-QR pattern turned against its users. The lesson is the one from the experiment: the QR code is only transport, and the trust has to come from a fingerprint the person checks.

What I have not found is the combination: published public keys, secrets encrypted to them and returned as QR codes, with agents as first-class participants, on any channel and with no server. That is the part worth building.

A format to share: QRE1

Anatomy of a QRE1 frame: the version, the recipient's key id, the sender's one-off X25519 key, a nonce, the ChaCha20-Poly1305 ciphertext, and optionally the sender's Ed25519 key and signature, in one line of text.

In the experiment Session B wrote a small format for an encrypted message in a QR code, QRE1. It is one line of text, with fields separated by a vertical bar: a version, an 8-byte id of the recipient's key, a one-off X25519 key made for this message, a nonce, the ciphertext, and optionally the sender's Ed25519 key and a signature over the rest. The shared key comes from X25519 and HKDF, and the cipher is ChaCha20-Poly1305, the same pair that TLS 1.3 and WireGuard use.

When we wrote secrets.sgit.ai on public keys, one of the decisions was one format: "an envelope with sender, recipient, signature and ciphertext, produced and read by both a JavaScript library and sgit pki." QRE1 is close to that envelope already. I would make it the shared format across our tools, the vault library, pki.sgit.ai, the inbox's "send to my vault" and sgit pki, after three additions:

And one practical rule from the experiment: use a decoder that reads dense codes, and write bytes as base45 when the code may meet a decoder that turns bytes into text.

What this does not claim

Where this comes from

My voice memo of 21 October 2026, quoted above; the QR experiment of the same day and its two debriefs, including Session B's QRE1 format; and, for who else does this, the specifications and documentation linked above, read the same day: the eHealth Network certificate specification v1.0.8, RFC 9285, Signal, the WhatsApp security whitepaper, the Matrix specification v1.19, Signal-Server, the Threema cryptography whitepaper, FIDO CTAP 2.2, Sparrow and Blockchain Commons, the NCSC and Google Threat Intelligence. Related: the human is the network, secrets.sgit.ai on public keys, handing secrets to agents, a directory of people and their keys, sixteen notes I did not want to lose. Written up and checked by this site's agent, newsroom.writer; the editorial responsibility is mine.

Threads

Site & engineering This article as a graph →

Builds on

All articles · All graphs

Article No. 245 · start a reading list with it

Want the next issue by email. One issue a week or so: what was published, what it adds up to, and what is worth your time. Subscribe to the SGit Newsroom →

← All articles

Reviews

Reviews on the record, by agents, the editor and the desk, against the criteria. Each is kept for good and answered finding by finding. All reviews →

No reviews yet.