RiddlerChat v2.2 — Technical Slick Sheet

Oblivion Edge Vulnerability Research LLC — San Antonio, Texas
October 2026 — Beta Release (Linux Desktop + Android)


System at a Glance

RiddlerChat v2.2 is a post-quantum, end-to-end encrypted messenger delivered as a dedicated private server per customer. Each customer gets an isolated Google Cloud Run instance plus a Linux desktop binary and an Android APK with that instance's address and access secret baked in. All encryption happens on the user's device using a hybrid ML-KEM-1024 + X25519 double ratchet; the server is a zero-knowledge relay that only ever stores and forwards ciphertext.

Status: Feature-complete for beta on Linux desktop (PyQt6) and Android (Flutter APK). The Shreddar secure-destruction module is the remaining roadmap item.

ComponentTechnologyPurpose
Relay ServerPython 3.12, FastAPI, uvicornCiphertext-only WebSocket relay, port 7576
Desktop ClientPyQt6 + _pq_native C extension + liboqs 0.16.0Linux single-file binary (PyInstaller)
Android ClientFlutter/Dart + dart:ffi + cross-compiled liboqsAPK for arm64-v8a and x86_64
Legacy ClientElectron 31, Web Crypto APIClassical-only dev client (not in beta)
ContainerDocker, python:3.12-slimOne image, many customer instances
CloudGCP Cloud Run + Artifact RegistryOne isolated service per customer

Post-Quantum Native Library: Cross-Compiled liboqs

Real post-quantum cryptography runs as native code in both clients. We build liboqs 0.16.0 from source — the Open Quantum Safe project's C implementation of the NIST FIPS 203 / FIPS 204 algorithms — and bundle it into every customer build.

TargetShared ObjectsToolchainBridge to App
Linux x86-64 desktop liboqs.so.0.16.0 + _pq_native.cpython-312-x86_64-linux-gnu.so Host GCC/CMake, OQS_USE_OPENSSL=ON CPython C extension
Android arm64-v8a liboqs.so + libpq_bridge.so (AArch64 ELF) Android NDK cross-compile, OQS_USE_OPENSSL=OFF Plain-C FFI bridge → dart:ffi
Android x86_64 liboqs.so + libpq_bridge.so (x86-64 ELF) Android NDK cross-compile (emulators, Chromebooks) Same FFI bridge

Exposed operations: ML-KEM-1024 keygen, encapsulate, and decapsulate; ML-DSA-87 keygen, sign, and verify.

Compliance note: liboqs implements the algorithms standardized in FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA) at NIST Security Level 5. It is not a CMVP-validated FIPS 140-3 cryptographic module.

Cryptographic Protocol Stack

AlgorithmStandardPurposeSecurity LevelKey Sizes
ML-KEM-1024FIPS 203Ratchet key encapsulationLevel 5PK: 1568 B, SK: 3168 B, CT: 1568 B
ML-DSA-87FIPS 204Per-message signaturesLevel 5PK: 2592 B, SK: 4896 B, Sig: 4627 B
X25519RFC 7748Classical half of hybrid ratchet~128-bitPK: 32 B
AES-256-GCMSP 800-38DMessage encryption (header as AAD)256-bitKey: 32 B, Nonce: 12 B, Tag: 16 B
HKDF-SHA256 / HMAC-SHA256RFC 5869 / 2104Root and chain KDFs256-bit32 B outputs
Schnorr ZKA + Argon2Schnorr 1989 / PHC 2015User loginDLP / memory-hardCommitment only stored

PQ Hybrid Double Ratchet (Implemented)

The double ratchet is shipping in both the desktop and Android clients, byte-for-byte compatible across Python and Dart.

  1. Session bootstrap: Each client generates ML-KEM-1024, X25519, and ML-DSA-87 identity keys on device and publishes only the public halves. The initial root key is HKDF(X25519(id_a, id_b), info="riddlerchat-e2e-init-v2").
  2. Hybrid ratchet step (on every change of speaking direction): the receiver decapsulates the ML-KEM ciphertext and computes a fresh X25519 DH. Then HKDF(pq_ss || x_ss, "riddlerchat-pq-ratchet-hybrid") feeds KDF_RK, producing a new root key and chain key.
  3. Symmetric ratchet (every message): mk = HMAC(ck, 0x01), ck' = HMAC(ck, 0x02). Each message key is used once and discarded.
  4. Encryption: AES-256-GCM with the full ratchet header as associated data. The ciphertext is signed with ML-DSA-87 and verified before decryption.
  5. Out-of-order delivery: skipped message keys are cached, bounded by MAX_SKIP.

Security outcome: an attacker must break both ML-KEM-1024 and X25519 to recover a ratchet secret. You get forward secrecy and post-compromise recovery.

Zero-Knowledge Relay Server


Per-Customer Server Deployment

Every customer gets their own isolated stack, created with one command:

./scripts/deploy_instance.sh <customer-name> [image-tag]
# e.g. ./scripts/deploy_instance.sh wayne-enterprises v2.2.0
PhaseWhat Happens
1. ImageReuses riddlerchat-backend:<tag> from Artifact Registry, or builds and pushes it
2. SecretGenerates a 256-bit deployment knock unique to this customer
3. Servicegcloud run deploy (512 MiB, 1 vCPU, scale-to-zero) with instance and knock env vars
4. ConfigWrites instance.json into client directories
5. DesktopPyInstaller builds a single-file binary (~80 MB) with liboqs and config baked in
6. AndroidFlutter builds APK with baked-in server URL and knock

Isolation: each customer has a separate Cloud Run service, URL, in-memory user database, contact graph, and message store. No state is shared between customers.


Testing

174 passed, 10 skipped in about 1 second.

ModuleTestsCoverage
PQ Double Ratchet46PQ provider, hybrid ratchet, headers, E2ESession sign/verify/decrypt
Double Ratchet (classical)31X25519/Ed25519 ratchet, KDF chains, signatures, initial key exchange
Strategy Pattern26Interface compliance, auto-detection, runtime switching
Security & Tamper24Ciphertext/nonce/AAD/signature tampering, isolation, entropy
E2E Relay23No plaintext in model/threads, key publication, no server-side private keys
Functional Roundtrip17KEM, hybrid KEX, signing, AES-GCM
OQS Provider Integration10Real ML-KEM-1024 / ML-DSA-87 via OpenSSL provider
Python ↔ Dart Interop7 (+5 Dart)HKDF, HMAC, AES-GCM, X25519 vectors match across languages

Roadmap Status

ItemStatus
Zero-knowledge ciphertext relayDone
PQ hybrid double ratchet (ML-KEM-1024 + X25519)Done
ML-DSA-87 per-message signaturesDone
Native liboqs: desktop C extension + Android NDK cross-compileDone
Linux desktop client (PyQt6, single binary)Done (beta)
Android client (Flutter APK, arm64-v8a / x86_64)Done (beta)
Per-customer isolated Cloud Run instancesDone
Per-customer client builds with baked-in server and secretDone
Deployment port-knock access gateDone
Contact request / accept handshakeDone
Instance lifecycle managementDone
Shreddar secure-destruction kernel objectRemaining
Self-service web portal and Stripe billingFuture

Defense-in-Depth Summary

LayerMechanismProtects Against
AccessPer-customer 256-bit deployment knockStrangers and scanners reaching the instance
TransportTLS 1.3 (Cloud Run managed)Network eavesdropping
LoginSchnorr ZKA + Argon2Password database theft
End-to-EndPQ hybrid double ratchet, on deviceServer compromise, harvest-now-decrypt-later
EncryptionAES-256-GCM, header bound as AADConfidentiality and tampering
AuthenticityML-DSA-87 signaturesForgery and impersonation
VerificationSHA-256 key fingerprintsMan-in-the-middle key substitution
IsolationOne Cloud Run service per customerCross-tenant data exposure
Data DestructionShreddar (remaining)Forensic recovery after teardown