SLATE: Secure, Log-structured, Authenticated, Tamper-Evident Key–Value Engine
SLATE is a single-device key-value engine for edge computing, from bare-metal microcontrollers like the ESP32 up to boards like the Raspberry Pi. It's built around four goals that usually fight each other: a tiny memory footprint, good performance, low energy use, and real at-rest security.
We don't claim to beat every engine on every axis at once — that's not possible. Instead SLATE composes well-understood primitives (log-structured storage, AEAD, cuckoo hashing, Reed-Solomon parity) into a design whose guarantees are proven rather than assumed, and picks concrete operating points on the resulting trade-off curve.
Key features
- Freshness-bound O(1) authenticated log — whole-store tamper-evidence plus epoch-granular rollback protection via a hardware monotonic counter. Chain updates and boot-time freshness checks are both O(1) (G1–G3 in the formal spec).
- Energy-optimal commit scheduling — an EOQ-style scheduler picks the commit batch size $B^\star$ that minimizes energy per operation, balancing flash wake-up cost against write latency.
- Ultra-light RAM index (
no_std) — a partial-key cuckoo hash index with zero heap allocation and a compile-time-bounded footprint (roughly 32–64 KB), giving worst-case O(1) lookups. - Proven prefix-durability — no acknowledged write is ever lost across arbitrary power failures, and recovery after a crash is bounded to a constant O(Θ) replay from the last checkpoint.
- Bad-block tolerance — Reed–Solomon RS(n,k) erasure coding over GF(2⁸) plus per-batch XOR parity protect both sealed segments and the open head segment, without adding overhead to the write hot path.
- Runs everywhere — a heapless
no_stdcore, astdwrapper for POSIX systems, a C ABI, and a bare-metalesp-halfirmware target for the ESP32.
Quickstart
1. Rust (std)
[]
= "0.3"
use Db;
2. C / C++ (slate-kv-ffi)
Include slate.h and link against libslate_kv_ffi:
int
3. Bare-metal ESP32 firmware
Formal spec & benchmarks
docs/SLATE_FORMAL_SPECIFICATION.mdhas the full formal model: proofs of prefix-durability, index reconstructibility, security reductions, and the cost models.docs/slate_qemu_benchmarks.mdhas empirical results from the QEMU harness — crash Monte-Carlo runs, write-amplification under skewed workloads, and energy sweeps.
If you're deploying to a high-throughput server where active tamper-resistance and a tight RAM budget aren't requirements, a general-purpose engine like RocksDB or SQLite will likely give you more raw I/O throughput. SLATE is built for edge environments where tamper-evidence, crash-safety, and tight RAM budgets actually matter.
Citation
If you use SLATE or reference its formal specification, correctness proofs, or energy models, please cite:
Contributing
Contributions are welcome — see CONTRIBUTING.md before opening a PR or issue.
License
Dual-licensed under either of:
- MIT License (
LICENSE-MIT) - Apache License, Version 2.0 (
LICENSE-APACHE)
at your option.