Project update: 13 November 2026. GitHub change #2: merged into the repository. The underlying protocol remains draft and unaudited.
Secure Net added a hybrid end-to-end messaging design combining X25519 and ML-KEM-768, with forward secrecy, devices and recovery after compromise.
Why we made this change
The purpose of hybrid cryptography is to avoid placing every confidentiality assumption on a single family of algorithms. This is a protocol implementation and specification, not a guarantee of real-world security. The design needs independent review, particularly around key handling, identity verification and recovery.
The engineering record
The original pull request records the following technical scope and evidence. Some forward-looking notes in the record reflect the state of the work when the request was opened, rather than its status today.
What this does
Adds a usable end-to-end messaging layer to Secure Net whose confidentiality rests on X25519 and ML-KEM-768 together, with forward secrecy and recovery after compromise. Spec: CVP-016. Proposal: SNIP-0003. Secure Net 0.4.0, feature cvp.sessions 1.
- Keys: account and device keys are Ed25519 + ML-DSA-65. The device list is signed by the account key and its
seqonly goes up, so a removed device can't be brought back. X25519 and ML-KEM-768 prekeys are signed (one-time and last-resort). - Handshake: a PQXDH-style handshake (three or four X25519 agreements plus ML-KEM-768), bound to a transcript of both parties' account and device keys.
- Ratchet: a double ratchet in which every DH step also mixes in a fresh ML-KEM-768 secret. A new chain that leaves it out is refused as a downgrade. A failed message leaves state unchanged.
- Devices, groups and new devices:
- fan-out to every device of the recipient and the sender's own other devices;
- sender-key groups, rekeyed when someone leaves;
- new devices linked by comparing a code, then given history end to end from an existing device. With no old device, the new device starts empty, as agreed.
- Evidence:
- test vectors (
spec/vectors/cvp-016-v1.json). The X25519, HKDF, HMAC, AES-GCM and handshake values are cross-checked against Node's built-in crypto; - 12 new conformance tests;
examples/two-party.mjs, which runs two people, three devices, a group and a new tablet through a relay that keeps everything, then finds no plaintext in what it kept.
- test vectors (
No new dependencies. Nothing existing changes. Commonveil's switch will be a separate PR with a migration plan.
Needs a qualified human reviewer before merging
This is security-critical cryptography written by an AI. Under GOVERNANCE.md it should not be merged on my say-so. The points that most need expert eyes are listed in SNIP-0003, section 4: the key schedule, the ML-KEM ratchet step and downgrade rule, skipped-key handling, the device-list trust model, and one-time prekey handling on servers.
Known limits (stated in the spec)
- Message size: about 3.1 KB extra per message and 13 KB for a first message, because of the ML-KEM fields. Reducing this is future work.
- Group authorship: signed with Ed25519 only, to save 3.3 KB per message. Group confidentiality is still post-quantum.
- Metadata: still visible to sites.
- First contact: relies on people comparing safety numbers.
- State storage: session state holds secrets, so apps must store it encrypted at rest.
- ML-KEM vector: not yet checked against a second implementation.
Tested
npm test: 43 pass.node scripts/vectors.mjs --check,node scripts/manifest.mjs --checkandnode examples/two-party.mjsall pass. CI now runs all three.- I removed the downgrade, replay and group-signature checks one at a time; each removal made a test fail.
The wider direction
The Comutability approach is open source with human accountability. AI can help research, design, write code and test it, but a merged change is not the same thing as an independently audited product. Secure Net is explicitly described as a draft in its public README. Its use in a sensitive situation should wait for qualified cryptographic review.
What happens next
Review CVP-016 with experienced cryptographers, verify interoperability across devices and sites, and publish limitations as well as test evidence.
