Security & Boot

eDB ships AES-XTS at-rest encryption — even on 64 KB devices

eDB's new storage layer adds page-level AES-XTS encryption with hardware-key offload on supported MCUs. The catch: it had to fit in 6 KB of code on the smallest target. Here's how.

The constraint

eDB targets every EoS device, and the smallest one in scope ships with 64 KB of flash and 16 KB of RAM. There was room for exactly 6 KB of code for the encryption layer — including the AES core, key schedule, page format, and the integration shim with the existing storage manager.

Why AES-XTS

AES-XTS is the modern standard for storage encryption: deterministic per-block, no IV management, no nonce reuse risk, and well-suited to fixed-size pages. The downside — two AES keys per tweak — is irrelevant on devices where the hardware accelerator handles round operations in parallel.

Hardware key offload

On supported MCUs (STM32 with PKA, NXP CAAM, RP2040 PIO+PIO-AES), the page key never enters CPU-accessible memory. It's loaded into a key slot at boot and referenced by handle thereafter. The fallback software path (constant-time AES-NI-style on Cortex-M) costs roughly 8 cycles/byte on M7.

// eDB page write (simplified)
status = aes_xts_encrypt(
    page_key_handle,    // hardware key slot
    page->lba,          // tweak = logical block address
    plaintext, page_size,
    ciphertext);
flash_write(page->phys_addr, ciphertext, page_size);

What we cut

Authenticated encryption (XTS is not). The threat model assumes the storage medium is honest-but-curious: an attacker can read pages but cannot inject. Devices needing AEAD should use the larger eDB-S build, which adds GCM at the cost of an additional 11 KB of code.

Read next

Cryptographic chip — secure boot
Security & Boot

eBootloader secure boot: a measured-launch walkthrough

An end-to-end tour of eBoot's chain of trust — root-of-trust keys, immutable stage 0, signed manifests, anti-rollback counters, and the runtime attestation hooks EAI consumes during model load.

Embedded systems engineering — platform
Apps & Platforms

eos-platform 1.0 lands: one toolchain, every EoS profile

After eighteen months of incremental releases, the eos-platform meta-distribution reaches 1.0 with stable APIs, a unified package manifest, and reproducible builds across all 14 EoS components.

AI / LLM data visualisation
Embedded AI

EAI 0.9 ships INT4 LLM runtime — 11 tok/s on a Cortex-M85

EAI's new quantized inference path squeezes a 1.3B-parameter model into 312 MB of flash and runs at interactive speed on a 480 MHz microcontroller. We dig into the kernel scheduler that made it possible.