Zero Persistent Storage
All runtime state lives strictly in Redis RAM with 30s–300s TTLs and disk persistence disabled (--appendonly no --save "").
Peers authenticate with EC P-256 signatures over replay-proof Redis nonces and introduce themselves with single-use 8-character Crockford codes. When firewalls block direct hole-punching, an opaque 64 KiB relay bridges end-to-end mutual TLS 1.3 ciphertext without ever inspecting filenames, sizes, or keys.
Every handshake, invite code, NAT reflection probe, and fallback tunnel is stateless on disk and bound by automatic Redis TTLs.
The peer submits its PEM/DER public key in HELLO. Only secp256r1 keys pass curve validation to derive the lowercase SHA-256 fingerprint, then the server stores a 32-byte nonce in Redis consumed once via GETDEL.
Peers exchange a short 8-character Crockford Base32 code (excluding ambiguous I, L, O, U characters). Claiming atomically deletes the invite via GETDEL, blocks self-pairing, and delivers mutual PEER_MATCHED messages containing only client-declared endpoints.
Instead of unsigned STUN packets, a 20-byte "BVST" probe returns a 99-byte (IPv4) or 111-byte (IPv6) packet signed by the server's Ed25519 key (published via GET /api/v1/info), preventing address spoofing before SIGNAL_OFFER, SIGNAL_ANSWER, and HOLE_PUNCH_SYNC.
When symmetric NAT blocks direct connectivity, CREATE_RELAY mints a 30s single-use Bearer token bound strictly to (initiator, responder) and invites the peer over RELAY_INVITE. Same-replica peers bridge in-memory; split replicas bridge over Redis Pub/Sub.
No databases, no file inspection, no weak elliptic curves—enforced in code, Redis Lua scripts, and hermetic CI tests.
All runtime state lives strictly in Redis RAM with 30s–300s TTLs and disk persistence disabled (--appendonly no --save "").
ip_scrubbing_processor automatically rewrites IPv4 and IPv6 addresses across structured structlog JSON events.
parse_ec_p256_public_key verifies the curve is strictly SECP256R1—immediately rejecting RSA, secp256k1, and secp384r1.
TOKEN_BUCKET_LUA enforces burst-proof sliding refill budgets in a single atomic Redis evaluation with zero race conditions.
Load-balanced instances route control envelopes on bv:peer:{fingerprint} and bridge binary relay chunks over bv:relay:* Pub/Sub.
Deterministic coverage via fakeredis[lua], strict mypy src/, and ruff check . spanning crypto, auth, pairing, Ed25519 UDP, and 10 MiB relay streams.
Filter WebSocket control messages or inspect exact UDP BVST byte offsets matching schemas.py and udp_reflector.py.
All figures come directly from benchmarks/bench_control.py executed on an 8-core CPU workload with zero bytes corrupted.
| Benchmark Metric | Workload / Scenario | Measured Result |
|---|---|---|
| ECDSA Challenge-Response Handshakes | 500 handshakes (25 concurrent workers) | 185 – 312 handshakes/s |
| Handshake Latency (p50) | 25 concurrent workers | 73.8 ms – 131.8 ms |
| Handshake Latency (p95) | 25 concurrent workers | 108.8 ms – 190.4 ms |
| Handshake Latency (p99) | 25 concurrent workers | 109.3 ms – 191.4 ms |
| Concurrent Authenticated WS Sessions | Zero-knowledge idle peers | 500 concurrent peers (100% success) |
| Heartbeat Fan-out Ping Latency (p50) | 500 connected peers | 135.2 ms |
| Heartbeat Fan-out Ping Latency (p95) | 500 connected peers | 150.1 ms |
| Encrypted Fallback Relay Throughput | 100 MiB stream (64 KiB chunks) | 8.31 – 9.60 MiB/s (~70 – 80.5 Mbps) |
| Relay End-to-End Data Integrity | SHA-256 verification | 100% match (zero corrupt bytes) |
Actual terminal captures of pytest -v passing all 41 integration tests over fakeredis[lua] alongside strict mypy, ruff check, and formatting verification.
Includes an ephemeral RAM-only Redis 7 container, FastAPI control/relay ports (:8000 TCP), and UDP endpoint reflection (:3478 UDP).
# 1. Clone and boot Redis 7 (RAM-only: --appendonly no --save "") + blindvault-control
git clone https://github.com/OmarAhmedTHE25th/blindvault-control.git
cd blindvault-control
docker compose up --build
# 2. Verify liveness, readiness, and Ed25519 UDP public key discovery
curl -s http://localhost:8000/health | jq
curl -s http://localhost:8000/ready | jq
curl -s http://localhost:8000/api/v1/info | jq
# Exposed Services:
# - Control & Relay WebSockets: ws://localhost:8000/ws/control & /ws/relay/{session_id}
# - Signed UDP Reflector: udp://localhost:3478 (Magic: BVST / 0x42565354)
# 1. Create virtual env and install runtime + dev dependencies (Python 3.12+)
pip install -e ".[dev]"
# 2. Run 41/41 hermetic tests (fakeredis[lua]) + strict typing + linting
pytest -v
mypy src/
ruff check .
ruff format --check .
# 3. Start FastAPI + UDP reflector locally & run performance benchmarks
blindvault-control
python benchmarks/bench_control.py
# Core Bindings & Production Signing Key
BLINDVAULT_ENVIRONMENT=production
BLINDVAULT_HOST=0.0.0.0
BLINDVAULT_PORT=8000
BLINDVAULT_UDP_PORT=3478
BLINDVAULT_UDP_SIGNING_PRIVATE_KEY=<PEM_OR_64_HEX_SEED_OR_BASE64_32B>
# Redis Ephemeral Store & Privacy Logging
BLINDVAULT_REDIS_URL=redis://localhost:6379/0
BLINDVAULT_ALLOWED_ORIGINS=["*"]
BLINDVAULT_SCRUB_IPS_IN_LOGS=true
# Atomic Lua Rate Limits (per minute) & Frame / TTL Bounds
BLINDVAULT_RATE_LIMIT_HANDSHAKE_PER_MIN=10
BLINDVAULT_RATE_LIMIT_INVITE_PER_MIN=10
BLINDVAULT_RATE_LIMIT_CLAIM_PER_MIN=10
BLINDVAULT_RATE_LIMIT_RELAY_PER_MIN=5
BLINDVAULT_RELAY_MAX_FRAME_BYTES=65536
BLINDVAULT_RELAY_MAX_SESSION_SECONDS=900
BLINDVAULT_RELAY_IDLE_TIMEOUT_SECONDS=30
BLINDVAULT_INVITE_TTL_SECONDS=300