Developer SDK

Citadel Protocol: a post-quantum networking SDK for Rust

The Citadel Protocol is a post-quantum secure networking protocol and Rust SDK (citadel_sdk) for building client-server and peer-to-peer applications, with built-in NAT traversal, multi-layered ratcheting and a remote encrypted virtual filesystem.

Citadel Protocol SDK at a glance

What it is
An open-source Rust SDK for post-quantum, end-to-end encrypted client-server and peer-to-peer networking, with NAT traversal built in.
Made by
Avarok Cybersecurity, founded by Thomas Braun, founder of Avarok (thomaspbraun.com)
Licence
MIT OR Apache-2.0
Runs on
Linux, macOS, Windows, iOS, Android
Website
GitHub
Source
github.com/Avarok-Cybersecurity/Citadel-Protocol

What is the Citadel Protocol?

The Citadel Protocol is a post-quantum secure networking protocol, published as the Rust crate citadel_sdk, for building client-server and peer-to-peer applications. It is written in 100% safe Rust on the Tokio runtime, includes NAT traversal, and keeps a low memory footprint. It is dual-licensed MIT or Apache-2.0, and its core design is covered by US patent 12224993 while remaining free and open source.

Which post-quantum algorithms does it use?

  • Key encapsulation: Kyber (the default, NIST-standardised) and NTRU (sntrup761).
  • Ratcheting: a multi-layered key exchange and a 3D matrix ratchet, with per-message re-keying.
  • Encryption: AES-256-GCM, ChaCha20-Poly1305, Ascon-80pq, and Kyber "scramcryption", layered and configurable per session.
  • Security modes: a true perfect-forward-secrecy mode, and a best-effort mode for high throughput.
  • Primitives: drawn from the Open Quantum Safe and PQClean projects; TLS or QUIC can run underneath as a hybrid base layer.

What networking does the SDK provide?

  • Client-server and peer-to-peer sessions, with built-in NAT traversal (STUN and TURN), so no port forwarding is needed.
  • TCP, TLS (the default) and QUIC transports.
  • A remote encrypted virtual filesystem (RE-VFS) for secret remote file storage, and scrambled file transfer.
  • Device-dependent and credential-based authentication.
  • Single- or multi-threaded event loops, chosen at compile time.
  • Back ends on the local filesystem, Redis, MySQL, PostgreSQL or SQLite.

How do I install citadel_sdk?

Add the crate to a Rust project (it needs OpenSSL and Clang to build):

cargo add citadel_sdk

Then read the Citadel Protocol documentation, the citadel_sdk API reference on docs.rs, and the Citadel Protocol example applications. Releases are published on crates.io as citadel_sdk.

What is built on it?

Citadel Workspace carries its messages, files and calls over Citadel peer channels; the Citadel Agent hosts the SDK for local apps; and synchronized.work uses the Citadel protocol as its transport and Sign in with Citadel for accounts.

Citadel Protocol SDK: An open-source Rust SDK for post-quantum, end-to-end encrypted client-server and peer-to-peer networking, with NAT traversal built in.

Read the Citadel Protocol source

More from Avarok