tauri-plugin-webrtc WebRTC for Tauri on Linux GitHub

Post-quantum key agreement

Calls from a Tauri app agree their keys with hybrid X25519MLKEM768 whenever the other side supports it. A page chooses per connection how strict to be.

The postQuantum option

new RTCPeerConnection({ iceServers, postQuantum: 'prefer' }); // 'off' | 'prefer' | 'require'

The member is not W3C. Browsers ignore it, so the same page code runs everywhere.

PolicyMedia and data channels (DTLS)TURN over TLS
offDTLS 1.2, classical groupsClassical groups
prefer (default)DTLS 1.3 with X25519MLKEM768 when the peer supports it, DTLS 1.2 otherwiseX25519MLKEM768 first, classical groups after
requireDTLS 1.3 with post-quantum groups only; other peers fail to connectTLS 1.3 with post-quantum groups only

The default is prefer when the plugin is built with pq-moduletto or pq-hybrid, which is the default build. Without either, a policy other than off makes the connection's methods reject with NotSupportedError.

What the other side needs

Other sideUnder prefer
Another app with this plugin, or any qrtc peerX25519MLKEM768 over DTLS 1.3
Chromium 141 with the WebRTC-ForceDtls13 and WebRTC-EnableDtlsPqc field trialsX25519MLKEM768 over DTLS 1.3
Browsers with default settings, and SFUs such as LiveKitDTLS 1.2, classical
A TURN server on OpenSSL 3.5 or later (coturn built against it, for example)X25519MLKEM768 for the TLS connection to the server

With an SFU, each leg is negotiated separately: the app to the SFU, and the SFU to every other participant. A post-quantum leg protects only its own hop. LiveKit's end-to-end encryption still protects the media across the SFU, with keys that Matrix distributes.

Checking what was agreed

const stats = await pc.getStats();
for (const s of stats.values()) if (s.type === 'transport') console.log(s.tlsGroup); // "X25519MLKEM768"

tlsGroup is absent after a classical DTLS 1.2 handshake.

Choosing a policy

Only the key exchange is post-quantum. Peers still authenticate with ECDSA certificates whose fingerprints travel in the signalling. The qrtc post-quantum page covers the groups and the DTLS changes behind them.