6.3 KiB
M0 feasibility: PQXDH, ML-KEM and WebRTC SFrame
Research snapshot: 2026-11-16
Status: feasibility findings recorded; M0 exit criteria are not yet met.
M0 requires a reviewed threat model and selected, audited crypto and SFrame integration candidates. This note narrows the choices and identifies the proof work needed before dependency selection. It does not introduce cryptographic code or claim a secure call path.
Findings
| Area | Finding | M0 decision |
|---|---|---|
| PQXDH | Signal's PQXDH specification defines a parameterized protocol, but the implementation suite and encodings must match exactly across clients. PQXDH authenticates classically in the current spec; its post-quantum property is for forward secrecy, not quantum-resistant peer authentication. | Keep PQXDH as the handshake design candidate. Require identity verification and an explicitly versioned, interoperable suite. |
| Signal libsignal | The upstream project provides Android artifacts for armeabi-v7a, arm64-v8a, x86, and x86_64. Its current PQXDH source labels the KDF suite X25519_SHA-256_CRYSTALS-KYBER-1024; that is not evidence of compatibility with standardized ML-KEM. The library is AGPL-3.0-only. |
Do not select it for the requested PQXDH + ML-KEM suite until upstream confirms an ML-KEM-compatible protocol/API and interoperability vectors. Resolve AGPL obligations before adoption. |
| ML-KEM | A standalone ML-KEM implementation is not a PQXDH implementation. Substituting it into the Signal suite or combining it with X25519 locally would create an unreviewed protocol variant. | Select only a maintained implementation that explicitly supports the exact agreed PQXDH profile, or wait for a compatible audited upstream implementation. Do not compose primitives in this project. |
| SFrame | RFC 9605 specifies the frame encryption format and delegates key management, sender authentication, and anti-replay behavior to the application. The WebRTC Encoded Transform API is a browser API and does not establish availability from the Android native Java API used by this app. WebRTC has native C++ frame-encryptor interfaces; Kotlin access and packaged-build compatibility still need proof. | Keep RFC 9605 as the format candidate. Prototype the Android encoded-audio path using a pinned WebRTC build and native/JNI integration before selecting a library or claiming SFrame support. |
| WebRTC packaging | Signal's RingRTC is a maintained Android/native WebRTC middleware reference, but it is AGPL-3.0-only and is not itself evidence that its media encryption behavior is RFC 9605 SFrame. | Use only as a technical reference unless licensing and exact SFrame behavior are established. |
Repo-specific implications
- The Go API, keyserver, signaling and push services are placeholders. No service should handle private keys, handshake secrets, or clear audio. The key directory should store and return versioned public bundles only, with atomic one-time-prekey consumption designed before implementation.
- Android currently has only a Compose shell and no WebRTC or Signal dependencies. The locally present Gradle changes (AGP 8.13.2, Java/Kotlin JVM 21 and wrapper files) are preserved. The app has
minSdk 29; candidate native artifacts must be checked against this baseline and all intended ABIs. - Docker Compose is development-only. It has PostgreSQL health checking and loopback-bound service ports, but no TLS termination, coturn relay publication, or production secrets setup. It is not part of the crypto feasibility proof.
- The threat model already names the right assets and adversaries, but needs explicit SFrame sender-authentication, nonce/counter, replay-window, key-rotation and downgrade requirements before M0 approval.
Required proof work before M0 can exit
- PQXDH/ML-KEM compatibility: identify an upstream-supported profile with exact KEM parameter set, protocol revision, encodings, signatures, Android API, license, release/commit and security review history. Obtain upstream confirmation where the docs/API are ambiguous.
- Two-client interoperability: produce a minimal Android initiator/responder proof using the selected library, published vectors or independently reviewed test vectors, failure cases, and confirmation that the profile is ML-KEM rather than the older Kyber variant.
- SFrame audio hook: pin a WebRTC build and show encoded Opus frames entering/leaving the Android native frame transform on supported ABIs. Check overhead, frame loss/reordering behavior, and RFC 9605 test vectors. Do not write an SFrame implementation from scratch as part of the app.
- Key management and identity: specify transcript binding, authenticated device identity, verified/unverified UX, per-sender directional media keys, key IDs/epochs, anti-replay state, rotation, teardown, and recovery after ICE restart. PQXDH output must feed a reviewed key schedule; signaling must not be trusted to authenticate peers.
- License and maintenance review: record exact dependency versions/commits, licenses, release cadence, supported Android API/ABIs, vulnerability reporting process and update strategy.
Recommendation
Proceed with a bounded M0 proof-of-feasibility, but keep the dependency selection gate open. Treat libsignal as the leading PQXDH reference, not as a confirmed ML-KEM solution. For SFrame, prove the Android native frame hook first; a browser transform or a generic “frame encryption” API is insufficient evidence of RFC 9605 compatibility. M0 is complete only after both proofs, the license review, and the missing threat-model decisions are recorded.
Sources
- Signal PQXDH specification
- libsignal source and Android artifact documentation and current PQXDH implementation
- libsignal issue documenting Kyber1024 versus final ML-KEM distinction
- RFC 9605: SFrame
- W3C WebRTC Encoded Transform
- WebRTC native frame-encryptor API history
- Signal RingRTC repository and license