Updated

Architecture, privacy and security

When you sit across from someone and type, they can see your words before you finish. The app gives Deaf, hard-of-hearing, and nonspeaking people a free way to have an in-person conversation using text on their own devices. Here’s how the devices connect, who can read the conversation, and what happens to the text when you leave.

Who can read what you type?

You and the person you’re talking with each open Face-to-Face Text. One of you creates an invitation and shares it with the other. The app runs from a single HTML file in each browser. You can use it without an account, installation, payment method, microphone, or access to your camera. Keynell runs the service and pays for the relay.

Your conversation stays readable on the participating devices.

With the reviewed app running on trusted devices and the invitation shared privately, the servers that connect you cannot read your text in transit. Keynell keeps no server-side transcript. The hosting provider can still see connection information, such as IP addresses and timing.

The person across from you can save or copy what they see, including an unfinished draft. Choosing End cannot erase a file they downloaded or text they copied to their clipboard.

How the connection works on restricted Wi-Fi

Even when you’re on the same Wi-Fi, both devices need internet access to start a room. The browsers use Keynell’s server to find each other and exchange connection details. After that, they test possible routes using ICE, the connection checks built into WebRTC.

Signaling and the two text pathsBoth browsers contact the Worker and the room to pair. Text travels on a separate WebRTC connection, directly between devices or via the TURN relay.Browser AHost deviceBrowser BGuest deviceKeynell Worker + objectsHTTPS / WSS · pairing and signalingDirect WebRTC data channelCloudflare Realtime TURNForwards encrypted packets
Pairing and signaling
Both browsers contact the Keynell Worker and room objects over HTTPS and secure WebSocket.
Direct text path
The two browsers exchange encrypted text directly over WebRTC.
Relayed text path
Cloudflare TURN forwards encrypted WebRTC packets between the two browsers.
Figure 1. Two routes for the same text. The browsers fetch the app over HTTPS and pair over a secure WebSocket. They then exchange encrypted WebRTC packets directly or through Cloudflare’s TURN relay. Both routes keep the text encrypted between the browsers. [1, 2]

Some Wi-Fi networks prevent devices from connecting directly to one another. If the direct route fails, the browsers can select TURN automatically. If the network blocks UDP, they can also try reaching the relay over TLS on TCP port 443. A network can block that traffic too. Opening the page confirms that HTTPS works. Exchanging a message tests whether the conversation works.

How your browser recognizes the other device

The invitation is what connects you to the person in front of you. One person shows it on their screen. The other can type a room number and three words, scan a QR code, or enter a longer code. All three methods let the browsers prove they have the same invitation before they share any typing.

From invitation to conversationThe host creates the room and shares an invitation. The browsers use word pairing or a QR or long code. Each browser then authenticates its seat. The room forwards encrypted negotiation, then both browsers prove possession of invitation-derived keys on their WebRTC connection before exchanging text.Host browserWorker + objectsGuest browserCreate room with guest verifierShare number and words, QR or original long codeWords only · OPAQUE and sealed invitation via brokerClaim guest seat and bind instanceEncrypted negotiationEncrypted negotiationProve invitation possession over WebRTCExchange drafts, finished messages and acknowledgments
  1. The host browser creates a room with the Keynell Worker.
  2. The host shares the number and words, QR code, or original long code.
  3. For word pairing, the browsers run OPAQUE through the broker and the host sends the encrypted invitation.
  4. The guest browser claims its seat. The Worker forwards encrypted connection setup messages between the browsers.
  5. The browsers prove they hold keys from the same invitation over WebRTC.
  6. The browsers exchange drafts, finished messages, and acknowledgments.
Figure 2. From invitation to first message. The server reserves a place for each browser and forwards the encrypted setup messages. The browsers make the final check themselves, on the connection they’ll use for the conversation.

What the number and words do

Your browser generates a random 160-bit invitation. To spare you typing it, the app shows a public four-digit number and three secret words. The number identifies the waiting room. Each word is chosen independently from a list of 256.

The browsers use a password protocol called OPAQUE to check that the guest has the words shown on the host’s screen, without sending the words to the pairing server. Each exchange is tied to that lobby’s random identifier and to one particular attempt. Once the host browser verifies the guest’s proof, it encrypts the full invitation for that guest. The server forwards it without seeing the invitation in plain text, the words, or the OPAQUE registration record used to check them.

The QR code and long code carry the full invitation directly. In a QR link, the secret is in the part after the #. The browser handles that part locally and the app removes it from the address bar. A camera app, copied link, or photo can still keep a copy. The service issues a separate token to the host. For each place in the room, the first authenticated WebSocket connection binds that place to that browser instance. [3]

How the browsers protect setup and conversation text

During setup, the browsers exchange WebRTC offers, answers, and possible network routes. They derive separate keys from the invitation with HKDF-SHA-256, one for each direction of setup traffic and others for confirming the peer. AES-256-GCM lets the receiving browser detect changes to the encrypted setup messages. The room server forwards those messages.

Once the WebRTC data channel opens, each browser must answer a fresh HMAC challenge for its role. This proves it holds the keys derived from the invitation. The browsers then send names or roles, live drafts, finished messages, and receipts over SCTP, protected end to end by DTLS. A receipt means the other browser processed your message. It can arrive before the person reads it. [1, 2]

What changes when a third person joins?

You start a separate three-person conversation. The newcomer can see what you share in that group. Your earlier two-person messages and drafts stay on the original two devices.

Before anyone shares group text, compare the verification code on all three screens and approve the same list of people. The code is 128 bits, displayed as four blocks of eight characters. Each browser checks that the group’s encryption keys belong to the approved members. All three then exchange encrypted confirmations that they’re ready. Membership is fixed for that group. The protocol that protects its messages is called Messaging Layer Security (MLS). [6]

Three-person encrypted text pathThree approved browsers each connect to the relay by secure WebSocket. The browsers encrypt group text with MLS. The original pair’s transcript remains in the first two browsers. Browser 1Browser 2Browser 3Keynell group relay Forwards MLS ciphertext
  1. Each of the three browsers encrypts its group text with MLS.
  2. Each browser connects to the Keynell group relay over a secure WebSocket.
  3. The relay forwards encrypted text to the other browsers.
Figure 3. One encrypted group, three connections. Each browser connects to the group relay over its own secure WebSocket. The relay forwards MLS-encrypted drafts and finished messages to the other two browsers.

If a browser wakes from sleep or detects a lost connection, it pauses outgoing group text. It resumes sharing only after both other devices answer a fresh challenge authenticated with MLS. Each receiving browser delivers one person’s finished messages in the order they wrote them and sends a receipt for each delivery.

The relay can see which connections belong together, public signing keys, signed updates to the room deadline, IP addresses, timing, and message sizes. It can delay or interrupt delivery. Extending the session or reconnecting keeps the same members and keys. If you suspect a device has been compromised, secure it and form a new group.

Once the group has opened, both original participants must choose to return before their private conversation resumes. The app also asks both people when a connection failed during setup and it cannot establish whether the group opened. That way, each person knows who can see their next words.

What stays on your device and what the service keeps

ComponentWhat it handlesWhat it keeps
The two browsers Drafts as they are typed, finished messages, optional names or roles, the invitation and its keys, and temporary room and relay credentials. Both people can read the drafts in progress. Conversation data stays in the page’s memory. Selecting End clears the local conversation. Save downloads a plain-text file, and Copy all copies the conversation to the clipboard. Both include the timestamped finished messages and any current drafts available in that browser. Saved files, clipboard contents, screenshots, keyboard history and accessibility software can retain text separately.
Signaling Worker and room storage Cloudflare’s HTTPS edge sees client IP addresses and request times. The Worker checks the room ID and tokens for each seat and browser instance. The room tracks deadlines and connection state. It forwards encrypted WebRTC setup messages to the connected peer without queuing or storing them. The room stores hashes used to verify the tokens, seat bindings, deadlines and cached relay credentials. Socket attachments track presence and message counts. A successful End removes authorization data and cached credentials from active room storage. An ended marker remains until the expiry alarm deletes it.
Word-pairing broker The public four-digit lobby number, a random 128-bit value for the lobby, a deadline, access token hashes and opaque protocol messages for up to three attempts. The secret words and OPAQUE registration record stay in the browsers. Once the broker accepts the encrypted invitation for the successful guest, it drops the other attempts and retains the host and guest authorization hashes, exchange context, deadline and encrypted invitation. The host can delete the lobby. Otherwise access expires within two minutes of lobby creation and an alarm deletes expired records from active storage.
STUN and TURN STUN helps a browser discover a reachable network address. The TURN relay sees temporary credentials, endpoint addresses, packet sizes, timing and encrypted traffic. A browser can contact those services during setup even when the conversation ultimately uses a direct connection. Issued TURN credentials expire on the schedule set when the provider issues them. They can remain valid after End or an extension. An extension can trigger new credentials for each seat. Provider records, backups and billing metadata follow provider policies.
Quota and hosting A separate storage object counts attempts to issue new relay credentials each UTC day. The hosted HTML bundles the client, styles and QR encoder. The quota stores a day and count. The first issuance attempt counted on a later day replaces both. The long-lived TURN API token is a Worker secret. Keynell has turned off the Worker’s built-in observability setting. Cloudflare can still process operational and billing data.

Room deadlines

The guest has two minutes to claim the invitation. The room’s 30-minute lifetime begins at creation. If both browsers support extensions, either participant can continue during the last five minutes. The service sets a new deadline 30 minutes from that choice, keeps the same seat bindings and join deadline, and updates both connected browsers. The pair can extend again in each new window.

After the deadline, the service rejects further room use and a scheduled alarm deletes the remaining active room data. Cloudflare offers point-in-time recovery for SQLite-backed Durable Objects, so data removed from active storage may still be recoverable. This review did not verify the account’s provider log or backup retention. [4, 5]

Relay credentials after an extension

A confirmed direct connection can carry on without renegotiation. If the connection uses the relay or the browsers have yet to determine the route, the host starts an authenticated ICE restart on the existing WebRTC connection. The browsers request new relay credentials for the new deadline. New credentials count against the issuance limit, and the client limits retries. If renewal fails, the relayed connection can stop working when its earlier credentials expire.

Display settings on this device

The app uses browser local storage for text size and layout. The conversation, names or roles, invitation data and room access credentials stay in the page’s memory. Clearing the site’s browser data also clears the saved display settings.

Security boundaries and failure cases

What can happenWhat protects the sessionWhat remains possible
Someone observes network traffic HTTPS and secure WebSockets encrypt setup traffic on the network. WebRTC uses DTLS to encrypt two-person text whether the browsers connect directly or through TURN. Network operators can see endpoints, timing and traffic volume. They can also block the service. Direct connection setup can reveal each device’s network addresses to the other device.
Someone sees or guesses the invitation The QR code and long code carry the same random 160-bit invitation. Manual pairing uses three independently drawn words and OPAQUE. Both the broker and host browser enforce a three-attempt limit per lobby. The first successful WebSocket connection binds the guest seat to that browser instance. Someone with the full invitation can claim the guest seat first. Someone who guesses the public lobby number can use up the manual attempts. QR and long-code pairing remain available while the invitation can still be claimed.
A signaling intermediary alters or replays a setup message The browsers use separate AES-256-GCM keys for each direction. The receiver checks the authentication tag and the room and direction context, and rejects duplicate sequence numbers within the current browser session. A fresh HMAC challenge exchange confirms that both peers have the invitation secret. An intermediary can drop or delay messages. A compromised origin can serve altered JavaScript. A compromised device can read plaintext and keys.
An outsider uses the relay Both seats must be claimed before either browser can request temporary relay credentials using its seat and instance tokens. The Worker applies per-IP limits to pairing and room requests, including limits scoped to a room. The production configuration allows 1,000 new credential issuance attempts per UTC day across the service. The code defaults to 100 if that setting is absent. Anyone can start a room. Copied relay credentials can work until expiry. The issuance limit controls credential requests, so bandwidth and charges can still grow. People sharing a public IP address can hit the same rate limit. Keynell bears overage charges.
A participant expects End to erase the conversation everywhere Selecting End clears the local conversation and asks the service to invalidate the room. A reachable peer receives an end message or notices that the room has closed. A disconnected peer can still have text on screen. Downloads and clipboard copies can survive End. A timed-out session can also leave its history visible. Select End on both devices before returning a shared device.

Who you’re trusting

Participants rely on their devices and browsers, on sharing the invitation with the intended person, and on Keynell’s origin serving the reviewed client. Cloudflare hosts the origin and the relay. Anyone who can alter the delivered HTML can change the client to capture text before encryption. The app verifies possession of the invitation. Names and roles are self-declared, and the app does not verify anyone’s identity or affiliation.

The page bundles its JavaScript without loading third-party runtime scripts. The content security policy allows the bundled script by hash. Response headers prevent framing and disable camera, microphone and geolocation access. An administrator who can replace the delivered HTML can also replace its policy.

What testing showed

Browser tests outside the intended deployment network delivered live drafts and acknowledged messages over direct WebRTC and over TURN, including TLS on port 443. That direct result came from earlier releases. The three-person release passed a browser test on a separate network in which two browsers paired over TURN/TLS, invited a third person, exchanged group messages, and returned to their private conversation. In a separate direct-only test, the browsers timed out before they could establish a connection.

What we still need to check. Pairing and room extension still need testing on the network where people will use the app. Test the browsers, devices, and assistive technology those users rely on. Three-person mode is available in the hosted app. Independent cryptographic review of this mode and institutional compliance review are still outstanding.

How to test on your network and with assistive technology

  1. Connect two personal devices to the Wi-Fi network you want to test and disable cellular fallback. Pair from the public page. Send a live draft and a finished message each way, then open Connection details on both devices. Record the network, browser versions, route (direct or relay), and outcome using synthetic text. Each session exercises the route the browsers selected.
  2. Keep the room open until the five-minute warning. Extend on one device, exchange acknowledged messages after the original deadline, and end the session.
  3. Repeat with the mix of personal and managed devices your users rely on. Try number-and-word entry, QR pairing, the original long code, keyboard navigation, zoom, and a screen reader. Check the on-demand draft readout and finished-message announcements.
Release-by-release test results

Direct and relayed transport

All 23 automated tests passed. Cloudflare reported Worker ad20c8ac-ba9c-4d39-8e0b-e37438eeccbc at 100% of deployment traffic. This QR and long-code release used the room and quota objects, a server-side TURN secret, Cloudflare TURN, and Keynell’s overage approval.

Two independent WebRTC peers in one browser used synthetic text. The harness checked the selected ICE pair and increasing byte counts on both peers and verified drafts, finished messages, and acknowledgments in both directions.

  • Both peers selected a direct UDP path in the direct test.
  • Both selected relay candidates over UDP in the forced-relay test.
  • With only the TLS/TCP 443 relay address available, both reported TLS to the relay and exchanged text.
  • When the harness withheld direct candidates, the normal ICE policy selected TURN.

Word pairing

All 39 automated tests passed, covering OPAQUE, wrong words, lobby context and attempt binding, delivery to the winning guest, and the host browser’s independent three-attempt cap.

Two browser peers ran the staged client against the live service. The client rejected a wrong phrase, accepted the corrected phrase, and exchanged drafts and acknowledged messages over forced TURN. After three unsuccessful starts, it refused the fourth and accepted a decoded QR invitation. One run timed out waiting for the host phrase. The repeat passed. Worker 0b6530d8-b3c5-4e9e-a100-7469df6877f3 then served the single-file client.

Participant labels and local transcripts

All 56 automated checks passed for Worker 595b997f-f92a-4700-9520-facc1fd3fa58. Two browser sessions on one computer paired by words with two distinct participant labels, exchanged acknowledged finished messages and both unfinished drafts, and exercised text-size adjustment and the stacked layout. The .txt download and clipboard copy included both labels, finished-message timestamps, and unfinished drafts. Cancel preserved the conversation. Confirming End cleared both views. The public overview and privacy pages were checked after deployment.

Room extension and display preferences

Rebuilding the archive for Worker a4663753-a7fd-4dcb-94fb-f04dacdca9e8 reproduced the published single-file HTML byte for byte. All 70 automated checks passed, including simultaneous extension requests, a backgrounded tab missing a deadline update, fresh relay credential issuance, and retry after a failed renewal. Two browsers on one computer exercised the live service with synthetic text.

An unused invitation timed out after two minutes, and the service rejected a late join with the original code. One participant moved from Combined to Two panes and set 30 px text while the other kept Combined at 26 px. A fresh session restored the saved preferences. At 1,100 px the panes sat side by side. At 375 px they stacked without horizontal overflow. The downloaded transcript included both labels, the finished message, and the unfinished draft.

Two native browser peers forced onto TURN over TLS/TCP 443 saw the five-minute warning, accepted one extension, obtained fresh credentials, and selected fresh relay candidates while keeping their original data channels. More than a minute after the original 30-minute deadline, both authenticated to the service and exchanged new drafts and acknowledged messages.

In a separate direct Safari session, both views kept the transcript and showed the new deadline. One peer exhausted its reconnection attempts before a post-deadline message arrived. The trigger for the disconnect is unknown.

Direct connection recovery

Worker ac23baad-a8ce-432d-b841-1b832925f489 added recovery for a previously authenticated browser whose signaling connection had gone stale. It reuses the browser’s room credentials and keeps the other browser in the conversation. All 74 automated checks passed, including simultaneous interruption of signaling and WebRTC in an extended room.

In an isolated deployment with a three-minute room and a 90-second warning, two Safari tabs used direct WebRTC. One extended the room while the other was backgrounded. After the original deadline, both kept the existing message and draft, and the returning tab acknowledged a new message without pairing again. The full-length relay test predates this recovery fix.

Three-person groups

Production Worker 3a1ee93a-0b82-4c08-9c85-e8555b8e14bb served protocol version 5. All 169 automated checks passed from the release archive. Live browser checks exchanged pair text over TURN/TLS on port 443. Three browser sessions joined a group by words, approved the roster, exchanged drafts and finished messages from each seat, and closed the group. Both original participants agreed to return to their private pair. The direct-only v5 check timed out before selecting an ICE route.

Implementation and references

Where to find each behavior in the Keynell release
  • Invitation and key derivation in src/pair.js
  • Word pairing in src/word-pair.js and src/word-crypto.js, with the broker in service/word-lobby.mjs
  • WebRTC negotiation, peer proof, and message delivery in src/rtc.js
  • What participants see and what End clears in src/ui.js
  • Admission, storage, and limits in service/worker.mjs, with credential issuance in service/turn.mjs and service settings in the deployment configuration
  • Three-person admission and encrypted delivery in src/group.js, src/mls-engine.js and src/group-transport.js, with the relay in service/group-room.mjs
  1. IETF RFC 8831 · WebRTC Data Channels
  2. IETF RFC 8827 · WebRTC Security Architecture
  3. MDN · URI fragment handling
  4. Cloudflare Realtime · Expiring TURN credentials
  5. Cloudflare Durable Objects · SQLite storage and point-in-time recovery
  6. IETF RFC 9420 · Messaging Layer Security