Urgent.News

What's breaking now, across hundreds of outlets.

Tech

End-to-end encrypted relays for OCapN

Connecting two computers directly over the internet is challenging, as many home networks are behind NATs which prevent new inbound connections. Sometimes these NATs are carrier-grade NATs which cannot be bypassed using port forwarding or UPnP. To ensure connections can be made in general cases, relays are needed. Relays are servers that act as a proxy between computers that cannot connect directly.

In Goblins 0.12, a federated relay called prelay was introduced. Although OCapN traffic is encrypted in transit, prelay lacks end-to-end encryption (E2EE). E2EE secures messages so they can only be read by the intended recipient, preventing intermediaries from tampering or reading them. Due to the lack of E2EE, the relay was named prelay (pre-relay) to discourage its use.

Thanks to an NLnet grant, the next release of Goblins will include a federated, E2EE relay implementation. Having a recommended relay is crucial as OCapN is developed with Hoot, a Scheme to WebAssembly compiler. Relays are essential in hostile environments like the web, where most APIs are designed around client-server architectures and centralized certificate authorities.

The grant also involves writing a specification for OCapN so the relay can be broadly supported by other OCapN implementations. The desired qualities for OCapN relays include ease of use, E2EE, and support across various implementations. To achieve E2EE, the Noise Protocol was chosen as it is well-established and widely used in applications like WireGuard and WhatsApp.

Noise allows applications to select the most suitable pattern and cipher suite for their needs. However, implementing Noise with OCapN required addressing peer authentication to ensure only one connection exists between any two peers at a time. The designator, a public key, allows peers to prove their identity using their private key.

Noise supports various key generation algorithms, cipher suites, and hashes, which are available in GnuTLS and SubtleCrypto API for both Guile VM and web implementations. A custom Noise library was written for Guile as it is not supported natively. The Noise specification is approachable and consists of three conceptual objects: The handshake, which is turn-based, and the CipherState, which encrypts and decrypts messages.

The XK pattern, consisting of three messages, is used for peer authentication in OCAPN, ensuring only one session exists between any two peers and preventing impersonation attacks.

Rewritten by urgent.news; may contain errors — check the original.

Source: spritely.institute

Read the original at spritely.institute →

Report a problem with this story

More in Tech

More from Thursday, 15 October 2026 →