What shipped in Swarm SDK v0.4: the Situational Awareness API for shared position and sensor fusion, the EW Coordination protocol for spectrum interference, Adversarial Resilience features including traffic morphing and store-and-forward, and the RF Fingerprinting subsystem for passive emitter tracking. 463 total tests.
Writing · topic · 18 articles
Drones and cryptography
The Swarm SDK: post-quantum encrypted mesh networking for drone swarms, from key exchange to MAVLink integration.
How the swarm coordination layer maintains a shared operational picture across 128 nodes without a central server: Ed25519-signed 124-byte position broadcast frames, an Extended Kalman Filter fusing GPS/IMU/barometric altitude into a 6-DOF state estimate, dead-reckoning fallback with quadratic uncertainty growth for up to 90 seconds without GPS, and a probabilistic gossip protocol achieving 94.2% frame delivery across a 2km × 2km field deployment.
How we ported the Swarm SDK cryptographic core to no_std Rust targeting the STM32H7 Cortex-M7: feature-gated std/embedded builds, 96KB static heap with cortex-m-alloc, pre-allocated VecDeque deduplication ring, in-place AES-GCM to avoid heap allocation, hardware AES accelerator integration (0.14ms vs. 0.61ms software), and binary size optimization from 1.2MB to 284KB with opt-level="z" and LTO.
How the Swarm SDK rotates cryptographic material without grounding the fleet — scheduled signed pre-key rotation on a 7-day timer, OTP replenishment when bundle drops below 20 keys, emergency revocation via gossip-flooded KeyRevocationAnnouncement, BKPSRAM zeroization with 0xFF pattern verification, and staggered rotation coordination across the mesh.
How the Swarm SDK manages cryptographic identity for drone fleets: on-device ML-KEM-768 + X25519 keypair generation at provisioning, three-tier fleet CA hierarchy (Root → Fleet CA → device certificate), pre-provisioned mission cert bundles for offline authentication, signed prekey rotation every 7 days over the gossip mesh, in-flight device revocation via poison-pill RevocationMessage, and emergency wipe on tamper detection.
How a Swarm SDK drone goes from factory state to trusted mesh participant: factory-provisioned ML-KEM-768 + X25519 keypairs, CSR generation and Fleet CA signing, USB and RF enrollment paths, gossip mesh announcement with SignedPreKeyBundle, pioneer bootstrap for the first device, and re-enrollment at certificate expiry.
How we designed the Swarm SDK: ML-KEM-768 + X25519 hybrid post-quantum key exchange, Double Ratchet forward secrecy, gossip mesh routing with bounded fanout, and the path to CNSA 2.0 compliance.
How the Swarm SDK protects drone mesh communications against traffic analysis — six fixed message size bins, ±15% transmission timing jitter, store-and-forward ring buffer for burst smoothing, degraded-channel operational mode, and RF fingerprint resistance on STM32H7.
How the Swarm SDK wraps post-quantum encrypted mesh traffic in MAVLink v2 SWARM_MESH_FRAME messages — 18-byte fragment header design, per-message reassembly buffer with 5-second TTL, PX4 and ArduPilot integration, MAVSDK passthrough, and why ML-KEM-768 Sealed Sender envelopes always require 6 frames.
How the Swarm SDK serializes, fragments, and packs Double Ratchet encrypted messages into MAVLink v2 TUNNEL frames: the SwarmFrame binary header, 237-byte payload limit, fragmentation algorithm, reassembly state machine, CONTROL frame authentication, and STM32H7 performance.
How the Swarm SDK implements the Double Ratchet algorithm for drone-to-drone messaging: adapting Signal Protocol's KDF chains for ML-KEM-768 post-quantum initial key exchange, header encryption, out-of-order message handling with a sliding key cache, MAVLink v2 framing, and performance benchmarks on embedded ARM.
How the Swarm SDK implements Sealed Sender to hide drone identity from relay infrastructure: recipient-issued SenderCertificate, ephemeral X25519 + HKDF-SHA256 per-message encryption into SealedSenderEnvelope, AES-256-GCM with zero relay-visible sender field, 48-hour certificate TTL, four decryption failure modes (DecryptionError, CertificateExpired, CertificateSignatureInvalid, SenderKeyMismatch), and integration with Sender Keys for group mesh communications.
What shipped in Swarm SDK v0.3: O(1) group encryption with Sender Keys (0.7ms on STM32H7), Sealed Sender hiding drone identity via ML-KEM-768 encapsulation, deniable HMAC authentication, and PKCS7 padding normalization across all AES-GCM operations. 127 new tests (302 total).
How the Swarm SDK uses Extended Triple Diffie-Hellman (X3DH) with ML-KEM-768 adaptation for async drone-to-drone session establishment — prekey bundle construction, one-time prekey consumption, Fleet CA bundle verification, and the transition from shared secret to Double Ratchet forward secrecy.
How the Swarm SDK generates, distributes, and tracks OneTimePreKeys for X3DH session establishment — including OTP exhaustion handling, SignedPreKey rotation, and the gossip-mesh key bundle protocol.
How the Swarm SDK MeshTransport layer achieves reliable frame delivery over lossy drone radio links: sliding window ARQ with selective ACK, EWMA RTT estimation, transparent fragmentation and reassembly for Sealed Sender envelopes, multi-channel bonding across 2.4GHz and 5.8GHz radios, and performance benchmarks on STM32H7 and Jetson Nano.
Swarm SDK gossip mesh: bounded fanout routing, message deduplication, and network partition handling
How the Swarm SDK implements a gossip mesh for drone swarms: epidemic broadcast with k=3 fanout, UUIDv4 sliding-window deduplication across a 1000-ID VecDeque, Lamport clock causal ordering for key management messages, TTL hop limiting with 3-hop lossy-channel headroom, and anti-entropy reconciliation for post-partition recovery — with STM32H7 and Jetson Nano benchmarks.
An architectural overview of the Swarm SDK: the three-layer design covering gossip mesh epidemic broadcast, ML-KEM-768 + X25519 hybrid post-quantum cryptography with Double Ratchet and Sender Keys, MAVLink v2 framing, and no_std embedded operation on STM32H7.
All topics: the writing index.