cd /news/artificial-intelligence/adding-a-post-quantum-hybrid-handsha… · home topics artificial-intelligence article
[ARTICLE · art-33295] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Adding a post-quantum hybrid handshake to a Rust VPN

A developer added a hybrid post-quantum key exchange to the Rust-based VPN Qeli, combining X25519 and ML-KEM-768 to protect against 'harvest now, decrypt later' attacks. The handshake runs both algorithms and mixes their results in the KDF, ensuring security unless both are broken. The Rust implementation serves as the single source of truth, with other clients (C# for Windows/macOS, Kotlin for Android) calling it via FFI and JNI.

read1 min views2 publishedJun 18, 2026

I maintain Qeli, a self-hosted VPN whose core and server are written in Rust. For the 0.7.x line I added a hybrid post-quantum key exchange to the inner handshake, and wired the same primitive into the non-Rust clients. Here is how it is built and what bit me.

The threat is "harvest now, decrypt later": traffic captured today, decrypted once a large quantum computer exists. Classical X25519 does not survive that; pure ML-KEM is young, and I do not want one new primitive to be the only thing between you and plaintext. So the handshake runs both and mixes the results - you are safe unless both X25519 and ML-KEM-768 fall.

Mixing both secrets in the KDF (instead of picking one) is what makes it hybrid: an attacker has to break both to recover the key.

Qeli has native clients on Windows/macOS (C#) and Android (Kotlin). Rather than reimplement ML-KEM three times, the Rust implementation is the single source of truth, and the other clients call into a small native core over FFI (C#) and JNI (Android). Same wire format everywhere, and the PQ code gets reviewed once.

Code is open (AGPL-3.0 core, MPL-2.0 clients): https://github.com/litvinovtd/qeli - and there is a project site at https://qeli.ru. Feedback on the handshake and transport code is very welcome.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @qeli 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/adding-a-post-quantu…] indexed:0 read:1min 2026-06-18 ·