deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Quipu pairs classical and post-quantum crypto in a pure-Rust library with a Python wheel

A dev.to post introduces Quipu, an open-source pure-Rust library that pairs X25519 with ML-KEM-1024 to protect data at rest from harvest-now-decrypt-later attacks.

Quipu pairs classical and post-quantum crypto in a pure-Rust library with a Python wheel

What Quipu is

A post on dev.to by the library's developer introduces Quipu, an open-source hybrid post-quantum encryption library aimed at data at rest. Its motivation is the harvest-now-decrypt-later problem: an adversary can record encrypted data today and decrypt it later, once quantum computers capable of breaking today's public-key cryptography exist. Quipu's answer is hybrid encryption — combining proven classical algorithms with new post-quantum ones — so that confidentiality fails only if both classes of cryptography fall at the same time.

From four bindings to pure Rust

The project originally had broader ambitions: a Rust core exposed through a C ABI, with bindings for Python, Node and Go. According to the dev.to post, that design worked, but maintaining a stable C interface plus four binding packages, each with its own packaging and interoperability tests, was complexity that worked against the real goal of protecting stored data, and it widened the attack surface with unsafe code the developer did not want.

The library is now pure Rust: memory safe, without a garbage collector, and with no first-party unsafe code. Non-Rust users are served through a native Python wheel built with PyO3, installable with pip install quipu-crypto, while Rust developers use cargo add quipu. The developer frames this as one codebase and one thing to audit, part of a broader philosophy of reusing good existing cryptography and treating simplicity as a security decision rather than a convenience.

What is underneath

Quipu composes standard, verified primitives rather than inventing its own cryptography:

  • Encryption: XChaCha20-Poly1305 authenticated AEAD.
  • Key derivation: Argon2id plus HKDF.
  • Key exchange: X25519 combined with ML-KEM-1024.
  • Signatures: Ed25519 combined with ML-DSA-87.

According to the post, this places the library at NIST security category 5, aligned with CNSA 2.0, and the ML-KEM-1024 and ML-DSA-87 implementations pass known-answer tests against NIST's official ACVP vectors.

The Python API shown in the post covers two modes. Symmetric encryption uses a passphrase through encrypt_stream and decrypt_stream. Recipient-based encryption calls generate_keypair to produce an X25519 plus ML-KEM-1024 key pair, then seals data to the recipient's public key with encode_to_recipient and recovers it with decode_as_recipient.

Open source, with an explicit caveat

Quipu is released under AGPL-3.0 and published on crates.io and PyPI. The file format is specified byte by byte, which the developer says makes the format auditable independently of the implementation. The code is hosted on GitHub under the developer's account.

The post is unusually direct about the project's status: the composition has not yet passed an independent cryptographic audit. Until that external review exists, the developer advises treating Quipu as software for review and experimentation, not for protecting genuinely high-value secrets.

Why it matters

Harvest-now-decrypt-later turns quantum risk into a present-day problem for any data that must stay confidential for years: archives, key material and backups protected only by classical algorithms are being exposed to future decryption now. Hybrid schemes that pair classical and post-quantum primitives are the practical mitigation, and Quipu packages that approach in a form developers can actually use — a two-call API, a memory-safe pure-Rust core, and a Python wheel for everyone else. Equally notable is the candour about the missing audit: it sets honest expectations for adopters and marks the project as one to watch as post-quantum migration picks up speed.

  • #post-quantum
  • #rust
  • #python
  • #cryptography
  • #encryption
  • #open-source

Related posts