High-performance encrypted key-value store written in Rust.
Current release: v0.1.0 β Encrypted Session Foundation
skvdb is an experimental Linux-focused key-value database designed around
high-performance asynchronous I/O, a custom binary wire protocol, and
cryptographically protected network communication.
The current release establishes the network and cryptographic foundation.
The KV protocol, encrypted application frames, WAL, and io_uring storage
engine are under active development.
Status: Early development / experimental
GET operationsSET operationsDELETE operationsio_uring-based storage I/OThe current network architecture is:
TCP
β
βΌ
Custom Framing
β
βΌ
X25519 Handshake
β
βΌ
Shared Secret
β
βΌ
HKDF-SHA256
/ \
/ \
βΌ βΌ
C2S Key S2C Key
β β
βββββββ¬ββββββ
βΌ
ChaCha20-Poly1305
β
βΌ
Encrypted Transport
β
βΌ
KV Protocol
β
βΌ
Storage Engine
β
βΌ
WAL
β
βΌ
io_uring
The storage and encrypted application-layer transport are still under development.
The initial handshake uses ephemeral X25519 keys.
After the Diffie-Hellman exchange, the resulting shared secret is expanded using HKDF-SHA256 into two independent 256-bit symmetric keys:
X25519 shared secret
β
βΌ
HKDF-SHA256
/ \
βΌ βΌ
C2S S2C
β β
βΌ βΌ
ChaCha20 ChaCha20
Poly1305 Poly1305
Separate directional keys prevent the same key from being used for both directions of a connection.
Nonces are generated from monotonically increasing per-direction counters.
Important: The current cryptographic layer is a transport foundation, not a complete authenticated identity or production security protocol. Authentication, key confirmation, protocol version negotiation, replay semantics, and other security properties are still being designed.
The base frame header is currently:
ββββββββββββ¬βββββββββββββββββββββ
β Opcode β Payload Length β
β 1 byte β 4 bytes, BE β
ββββββββββββ΄βββββββββββββββββββββ
Current opcodes:
| Opcode | Operation |
|---|---|
0x01 |
HandshakeInit |
0x02 |
HandshakeResp |
0x10 |
KV Get |
0x11 |
KV Set |
0x12 |
KV Delete |
0xFF |
Error |
The KV operations are reserved in the protocol but are not implemented yet.
Clone the repository:
git clone https://github.com/foxhackerzdevs/skvdb.git
cd skvdb
Build:
cargo build --release
Run:
./target/release/skvdb
The development server currently listens on:
127.0.0.1:8080
Check the project:
cargo check
Format:
cargo fmt
Build tests:
cargo test
Release build:
cargo build --release
GETSETDELETEio_uring integrationskvdb is experimental software.
The cryptographic primitives are based on established algorithms and are
implemented using the Rust ring library, but the overall protocol has not
yet undergone a security audit.
Do not use the current development version for sensitive or production data.
Security issues should be reported privately to the maintainers whenever possible.
Performance is a primary design goal, but benchmarks will only be published once the storage engine and encrypted request/response path are implemented.
The project aims to explore:
io_uringPerformance claims will be based on reproducible benchmarks rather than assumptions.
Licensed under the Apache License, Version 2.0.
See LICENSE for the full license text.
Abhrankan Chakrabarti
Part of the Fox Hackerz project ecosystem.
Build. Break. Secure.