Security model · C2S

Sovereign by design.
Private over a public pipe.

Agora encryption is C2S — client-to-server — with a pre-shared AES-256-GCM key. It does not depend on a public-key exchange, a certificate authority, or an HTTPS connection. The key sits above the transport, so every intermediary — including a public bore relay — carries ciphertext, not plaintext. Your room is reachable from anywhere without ever becoming readable from anywhere.

← back to The Agora
01 — The model

A shared secret, applied per frame.

Agora uses AES-256-GCM — authenticated encryption with a 256-bit key. The key is a 64-hex-character string that you paste into the client once. There is no exchange protocol, no Diffie–Hellman, no certificate chain, no server-issued token. Both sides simply know the same secret.

The client (clientC2S.html) imports the key locally via the browser's WebCrypto API. When you send a frame that must be protected, the client generates a fresh 96-bit random IV, encrypts the JSON payload, appends the 128-bit authentication tag, and sends the envelope:

{
  "enc": "aes-256-gcm",
  "iv":  "base64…",   // 12 random bytes, fresh per frame
  "ct":  "base64…",   // ciphertext
  "tag": "base64…"    // 16-byte auth tag
}

The router decrypts with the same key. If the authentication tag doesn't verify, the frame is dropped and a security_block entry is written to router.log. There is no fallback — a frame with a bad tag is treated as noise. The authentication tag means an attacker cannot flip a recipient, alter a message, or splice an old ciphertext into a new stream without invalidating the whole frame.

02 — The concrete case

Bore is why a fixed key is the right design.

The client tries bore → local → wss and uses whichever opens first. The bore leg is a public tunnel: the client dials ws://bore.pub:PORT, an unauthenticated, plain-text pipe that anyone who knows the port can reach. This is a deliberate, and often desirable, property — it lets a router behind a home firewall be reachable from anywhere without opening a port or acquiring a certificate.

The fixed key is what makes that public pipe safe. The tunnel sees ciphertext — a stream of {"enc":"aes-256-gcm", "iv":…, "ct":…, "tag":…} envelopes — because the encryption sits above the transport, not in it. The relay cannot read what it forwards, and neither can any other intermediary on the path: Nginx, a reverse proxy, a CDN.

The property, stated precisely. The fixed key makes a public pipe private. It is not a claim about a hypothetical adversary — it is a property you can verify: run bore, capture the WebSocket bytes on the relay side, and observe ciphertext. Bore is not a compromise in this design. Bore is the reason the design is a good fit for self-hosted routers that need to be reachable from anywhere.

For deployments that prefer not to use a public relay, the same property holds end-to-end through a corporate reverse proxy: Nginx terminates TLS, forwards to the loopback router over plain ws://, and the AES frames pass through untouched. The corporate router sees ciphertext until it decrypts at the last hop, exactly as the bore relay does.

03 — Deployment

This router — and other ways to reach a router.

Agora is not tied to one internet access pattern. The design supports at least four distinct deployments, from a publicly reachable corporate gateway to an air-gapped room. Each is a deliberate choice about what the router exposes and to whom. This section first describes the current visinode.net deployment, then sets it beside the other patterns a security-conscious organisation might choose instead.

Current · visinode.net

Static IP · dual-port forward · certificates

A static IP with a hardware router that forwards only ports 443 and 80. The actual Agora router lives behind those ports, reached over HTTPS/TLS via a certificate. This is the standard public-facing corporate pattern: minimal surface, standard ports, standard certificates.

exposed: 443, 80 only
TLS: valid certificate
backend: loopback, plain ws
frames: AES-256-GCM, C2S
Alternative · bore-only

No inbound port · public relay

The router runs on a home or branch server with no inbound port open. It dials out to bore.pub and the public relay forwards traffic back. Zero attack surface on the firewall; the price is dependence on the relay being reachable. The AES layer keeps every frame opaque to the relay.

exposed: none inbound
TLS: not required
backend: loopback, plain ws
frames: AES-256-GCM, C2S
Alternative · VPN-only

No public exposure · private overlay

The router listens only on a WireGuard, Tailscale, or ZeroTier interface. Clients join the overlay before reaching the Agora. The public internet never sees a WebSocket. The AES layer is a second line of defence inside the private network.

exposed: overlay only
TLS: provided by overlay
backend: private network ws
frames: AES-256-GCM, C2S
Alternative · air-gapped

No internet · LAN only

The router and clients sit on an isolated LAN. Reachable only from inside. The AES layer still applies — because "air-gapped" and "trusted" are different claims, and a compromised laptop on the LAN is still a compromised laptop.

exposed: LAN only
TLS: optional
backend: LAN ws
frames: AES-256-GCM, C2S

The four patterns share the same encryption model. Only the transport changes. This is what makes the fixed-key design portable: the router's protection is independent of how the router is reached. Switch from bore to a certificate-fronted 443, or from 443 to a VPN overlay, and the frames remain opaque at every intermediate hop.

How this router is protected

On the current deployment, the router's internet posture is deliberately minimal:

Certificate plus key is not redundant. The certificate protects the browser-to-Nginx leg. The AES key protects the client-to-router frame through every leg, including the loopback hop between Nginx and the router, and any hop beyond it. They cover different segments of the same path.
04 — Evaluation

The sovereignty case for a fixed key.

Most "AI-powered" corporate workflows today route every prompt and every attachment through a SaaS provider over HTTPS. That is not a conspiracy — it is the standard architecture. But it has a consequence worth stating plainly: the plaintext of that work exists in the provider's jurisdiction, on servers the provider controls, subject to legal process in that jurisdiction. The company using the tool does not hold the plaintext; the provider does. Every intermediary that terminates TLS on the path also sees it.

A fixed-key Agora router, run on infrastructure the organisation controls, changes that boundary. The plaintext exists only where the key-holders and the router live. The bore relay sees ciphertext. The public internet sees ciphertext. Any jurisdiction that does not hold the router or a key-holder sees ciphertext. That is a real, demonstrable sovereignty gain — not a promise, a verifiable property of the architecture.

🌍

Plaintext leaves the foreign jurisdiction

No SaaS provider holds the plaintext. No cloud AI endpoint holds it. The only plaintext is on the router and on the machines of people the organisation has chosen. The legal reach of any foreign jurisdiction does not extend to bytes it never receives.

🧱

Trust is anchored in people, not infrastructure

TLS asks you to trust a CA you've never met, a registrar, a cloud provider. A shared key asks you to trust the colleagues you've handed it to. The trust chain has no third party in it — which is both the strength (no foreign decryptor on the path) and the responsibility (the people you hand it to matter).

⚖️

The gate is enforced, not advisory

Without a key, "sensitive operations require encryption" is a recommendation. With a key, it is a check the router performs and records. A misconfigured client cannot silently leak a prompt to a model — the frame is dropped, the rejection is logged, and the operator can audit it.

👁️

Trust is visible to humans in the room

Green sender name: this frame was genuinely encrypted. Red: it wasn't. Every participant sees that in real time. A CA-backed padlock says "some domain was verified"; a green name says "this specific frame was decrypted with the key we share." The second is a stronger, more local signal.

🔒

Local-first deployments become safe

A router on a home server, reached over bore, has no certificate and no inbound port. The AES layer is what makes that setup trustworthy — the tunnel can be public, the pipe can be plain, and the frames are still private because the only parties who can read them are the ones holding the key.

🕊️

No certificate renewal, no warning fatigue

Certificates expire. CAs go out of business. Self-signed certs train users to click through warnings. A shared key has no expiry and no dialog. It works the day it is generated and stops working the day you rotate it — no third party involved, no periodic maintenance on the key itself.

What the gain is — and what it is not

The gain is sovereignty: the plaintext lives where you chose to put it, and no foreign jurisdiction or intermediary is a decryption party by default. That is a substantial, concrete improvement over the HTTPS-to-a-foreign-SaaS default, and it is verifiable — you can demonstrate it with a packet capture on the bore relay or on any intermediary hop.

The gain is not immunity to legal process. A search warrant or seizure of the router's premises yields the plaintext the router holds — because the router is a plaintext store by design. A search warrant or theft of a key-holder's machine yields what that holder held. The key raises the cost of a network interception to near-zero yield; it does not raise the cost of a physical seizure of the router. That is the honest boundary of what any shared-key system can offer.

The precise sovereignty claim. The fixed key moves the plaintext boundary from "the SaaS provider's jurisdiction and any TLS terminator on the path" to "the infrastructure the organisation controls and the machines of the key-holders." That is the gain. It is narrower than "warrant-proof" and much stronger, because it is true.

For a corporate deployment, the practical mitigations for the router-as-plaintext-store risk, in order of value: host the router on premises you control; encrypt the router's disk at rest; rotate and archive logs deliberately rather than storing forever; and, where the stakes justify it, run more than one router across more than one jurisdiction so that no single seizure holds the whole record.

05 — Beyond the baseline

Corporate security on top of the baseline.

The current deployment — static IP, dual-port forward, certificate, AES frames — is already a defensible baseline. A security-conscious organisation that wants to go further can layer additional controls without changing the Agora design. Each layer below is additive; none of them requires rewriting the router or the client.

Perimeter

Host

Key handling

Identity

What stays the same

None of the layers above require changing the Agora model. The AES-256-GCM frames, the C2S envelope, the server-side gate, and the fixed-key design are the same whether the router sits on a home server behind bore or inside a corporate data centre behind a WAF and an encrypted disk. The system is designed so that the encryption property does not depend on the transport posture — the organisation adds controls where it needs them, and the frames remain opaque through every addition.

A note for security teams. The correct description of the Agora encryption model is "C2S authenticated encryption with a pre-shared key, with server-side enforcement of the sensitive-operation gate." It is not E2E, and it does not claim to be. The router is a trusted decrypting party by design — it must decrypt to route, log, and enforce. The mitigations above (host, disk, key handling, identity) are the ones that matter for that design, and each of them is standard practice.