13 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. The current spec's example KEM is pre-standardization CRYSTALS-Kyber-1024. 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; this is not standardized FIPS 203 ML-KEM. Signal's separate ML-KEM Braid is a post-handshake sparse continuous key agreement/ratchet, not a replacement PQXDH handshake. libsignal is AGPL-3.0-only. |
Do not select it as an exact PQXDH + FIPS 203 ML-KEM handshake. Evaluate separately whether its Kyber PQXDH plus ML-KEM Braid meets the product's desired call-session properties, and resolve AGPL obligations before adoption. |
| ML-KEM | A standalone ML-KEM implementation is not a PQXDH implementation. Signal publishes an ML-KEM Braid specification that can take a PQXDH shared secret as its initial secret, but it is a separate, stateful SCKA protocol with significant message/chunk and integration requirements. | Keep ML-KEM Braid as a possible post-handshake ratchet research path. Do not substitute KEMs in PQXDH or combine primitives locally. First decide whether a brief call requires a continuous PQ ratchet. |
| Upstream WebRTC SFrame | WebRTC has now imported Cisco's SFrame library and added internal native SframeEncryptor / SframeDecryptor classes. Recent changes are still wiring the media path: upstream change notes say audio SFrame is not yet fully handled, and the receive path is also being connected. I found no SFrame-specific public Android Java API in the upstream Android API/source listings. |
Strong upstream direction, but not yet a ready Android integration. Recheck once audio send/receive, Java/JNI exposure, and release packaging are complete. |
| SFrame legacy frame hooks | RFC 9605 specifies frame encryption and delegates key management, sender authentication, and anti-replay behavior to the application. Android RtpSender.setFrameEncryptor(...) / JNI and RtpReceiver.setFrameDecryptor(...) can accept native FrameEncryptorInterface / FrameDecryptorInterface; upstream labels these interfaces “not ready for production use.” These generic hooks do not themselves implement SFrame. |
Keep RFC 9605 as the format candidate. An integration must be shown byte-compatible with RFC 9605 and tested against its vectors; do not treat successful use of the legacy hook as proof of SFrame. |
| Android WebRTC prototype artifact | Inspected Maven Central AAR io.github.webrtc-sdk:android:150.7871.04 locally (2026-11-16), SHA-256 1872dda4e3bf7d6ea6f7c6e11861332081c57081a1e62fc82fab72415c69c84c. Its classes.jar contains legacy FrameEncryptor / FrameDecryptor hooks, setters on RtpSender / RtpReceiver, and custom FrameCryptor types; its .so files contain both legacy JNI setters for armeabi-v7a, arm64-v8a, x86, and x86_64. No SframeEncryptor / SframeDecryptor Java class or native symbol was found in the AAR. It contains only a manifest, classes jar and four native libraries, with no license/notice files. The GitHub repository declares MIT, while the Maven POM declares BSD 3-Clause; this discrepancy and the lack of an independently checked Maven checksum/signature-to-release mapping remain unresolved. |
Passes legacy API/ABI existence check only. Do not select for production or treat its FrameCryptor as RFC 9605 SFrame without a wire-format/vector proof. Resolve license metadata, complete third-party notices and artifact provenance before adoption. |
| WebRTC alternatives | Google upstream documents building a WebRTC AAR, but its Android development guide requires a large source/toolchain checkout (about 16 GB including Android components). Signal's RingRTC is an Android/native WebRTC middleware reference, but AGPL-3.0-only and not evidence by itself of RFC 9605 behavior. | Prefer the pinned prebuilt artifact for an initial API/linkage spike; use a source build only if native implementation or artifact provenance requires it. Keep RingRTC as a technical reference unless licensing and exact SFrame behavior are established. |
PQXDH + ML-KEM candidate screen
Result: no acceptable Android library selected. The PQXDH specification is parameterized, so an ML-KEM-1024 profile is possible in principle; the library still needs to implement the full authenticated prekey protocol and a reviewed, interoperable profile. A primitive library or an X25519 + ML-KEM combiner is not sufficient.
| Candidate | What public sources show | Decision |
|---|---|---|
Signal libsignal |
Android artifacts and a mature Signal protocol implementation are available, but its PQXDH KEM suite is round-3 CRYSTALS-Kyber-1024 (0x08), not FIPS 203 ML-KEM-1024. It is AGPL-3.0-only. |
Not suitable for the stated FIPS 203 handshake requirement unless upstream publishes a compatible profile/API; separately resolve AGPL terms. |
pqxdh-zoa Rust crate 0.1.1 |
Docs show a generic PQXDH construction with ML-KEM-1024, but the example uses ed25519-dalek signatures and several pre-release Rust dependencies. It is not an Android library, and I found no independent audit or interop evidence for the required XEdDSA/Signal profile. |
Research reference only; not a dependency candidate. |
@open-e2ee/signal-protocol-sdk |
Its security document describes FIPS 203 ML-KEM-1024, but also states it is not canonical Signal Messenger compatibility and does not implement XEdDSA. It is JavaScript, not the Kotlin/native Android integration required here. | Not suitable for this Android client or Signal profile. |
| PQXDH.NET 0.1.0 | The NuGet page claims X25519 + ML-KEM-1024 and .NET Standard support, but labels it an experimental AI-assisted project and tells users to conduct their own security review. It does not provide a Kotlin/JNI Android API or independent interoperability evidence. | Reject for this security-critical dependency gate. |
| Kodium | Public project docs describe X3DH/Double Ratchet plus a separate ML-KEM hybrid feature, and explicitly state it has not been audited. Its PQ feature is not the required PQXDH implementation. | Not suitable. |
This screen is not proof that no implementation exists anywhere. It records that no candidate found in this review meets the repository's stated protocol, platform, maintenance and security-review requirements. Do not relax those requirements by composing a local variant.
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.
- THREAT-MODEL.md now states the MVP trust boundary and fail-closed media invariants, including directional key separation, downgrade rejection, counter continuity, replay handling, rotation and teardown. It remains an M0 draft for project-owner review; exact suite/KDF/window parameters and UX remain open until candidate selection.
Required proof work before M0 can exit
- PQXDH/ML-KEM compatibility: no candidate currently passes the screen above. Identify an upstream-supported Android profile with exact KEM parameter set, protocol revision, encodings, signatures, 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: the candidate AAR proves legacy encryptor/decryptor hook classes and JNI setters for all four packaged ABIs, but not SFrame compliance. Current upstream has an RFC 9605 crypto core and native encryptor/decryptor, while media-pipeline integration and Android exposure remain incomplete. The next proof is a pinned build that can create/configure SFrame sender and receiver contexts for encoded Opus, then pass RFC 9605 vectors and two-device media tests. Before using the prebuilt candidate, reconcile its license metadata and collect complete third-party notices. Do not write SFrame cryptography 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 M0 research, but keep both dependency gates open. No reviewed Android PQXDH + FIPS 203 ML-KEM implementation has passed selection. Treat libsignal as a protocol reference, not a compliant dependency. Evaluate ML-KEM Braid separately as a possible post-handshake ratchet, not as interchangeable with PQXDH. Upstream WebRTC is adding an RFC 9605 core, but its Android audio path is incomplete. The candidate AAR passes only a legacy hook presence check; its cryptor's SFrame conformance, license metadata and artifact provenance remain unverified. M0 is complete only after both a compatible PQXDH/ML-KEM implementation and a pinned Android SFrame audio path pass interoperability/vector checks, license review and threat-model review.
Sources
- Signal PQXDH specification
- libsignal source and Android artifact documentation and current PQXDH implementation
- libsignal issue documenting Kyber1024 versus final ML-KEM distinction
pqxdh-zoacrate documentationopen-e2ee/signal-protocol-jssecurity model- PQXDH.NET package and its own security-review notice
- Kodium project overview and audit disclaimer
- Signal ML-KEM Braid specification
- RFC 9605: SFrame
- Upstream Android FrameEncryptor interface and production-readiness caveat
- Upstream Android RtpSender JNI setter
- Upstream native RtpSender frame-encryptor binding
- WebRTC change importing the SFrame library
- WebRTC native SFrame encryptor implementation
- WebRTC change noting incomplete audio SFrame integration
- WebRTC upstream branch and recent receive-path integration work
- webrtc-sdk Android Maven artifact instructions and MIT repository license
- webrtc-sdk Android v150.7871.04 release
- Maven Central POM metadata for the inspected artifact
- webrtc-sdk maintained upstream fork description
- Official WebRTC Android AAR build guide
- Signal RingRTC repository and license