Scaffold Rust workspace: warzone-protocol, server, client, mule

4 crates, all compile. 16/17 tests pass.

warzone-protocol (core crypto):
- Seed-based identity (Ed25519 + X25519 from 32-byte seed via HKDF)
- BIP39 mnemonic encode/decode (24 words)
- Fingerprint type (SHA-256 truncated, displayed as xxxx:xxxx:xxxx:xxxx)
- ChaCha20-Poly1305 AEAD encrypt/decrypt with random nonce
- HKDF-SHA256 key derivation
- Pre-key bundle generation with Ed25519 signatures
- X3DH key exchange (simplified, needs X25519 identity key in bundle)
- Double Ratchet: full implementation with DH ratchet, chain ratchet,
  out-of-order message handling via skipped keys cache
- Message format (WarzoneMessage envelope + RatchetHeader)
- Session type with ratchet state
- Storage trait definitions (PreKeyStore, SessionStore, MessageQueue)

warzone-server (axum):
- sled database (keys, messages, one-time pre-keys)
- Routes: /v1/health, /v1/keys/register, /v1/keys/{fp},
  /v1/messages/send, /v1/messages/poll/{fp}, /v1/messages/{id}/ack

warzone-client (CLI):
- `warzone init` — generate seed, show mnemonic, save to ~/.warzone/
- `warzone recover <words>` — restore from mnemonic
- `warzone info` — show fingerprint and keys
- Seed storage at ~/.warzone/identity.seed (600 perms)
- Stubs for send, recv, chat commands

warzone-mule: Phase 4 placeholder

Known issue: X3DH test fails (initiate/respond use different DH ops
due to missing X25519 identity key in bundle). Fix in next step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-26 21:27:48 +04:00
parent 1e2a83402d
commit 651396fa13
5075 changed files with 36186 additions and 0 deletions

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
2b64005920b44b63

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"getrandom\", \"rand_core\"]","declared_features":"[\"alloc\", \"arrayvec\", \"blobby\", \"bytes\", \"default\", \"dev\", \"getrandom\", \"heapless\", \"rand_core\", \"std\", \"stream\"]","target":6415113071054268027,"profile":8276155916380437441,"path":18434073550386094549,"deps":[[6039282458970808711,"crypto_common",false,5158716069762653590],[10520923840501062997,"generic_array",false,18046893680686087619]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aead-3ce3004f99d0cec9/dep-lib-aead","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
b4ada76d8d6ef624

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"getrandom\", \"rand_core\"]","declared_features":"[\"alloc\", \"arrayvec\", \"blobby\", \"bytes\", \"default\", \"dev\", \"getrandom\", \"heapless\", \"rand_core\", \"std\", \"stream\"]","target":6415113071054268027,"profile":5347358027863023418,"path":18434073550386094549,"deps":[[6039282458970808711,"crypto_common",false,9398706008583991340],[10520923840501062997,"generic_array",false,13561802365898736142]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aead-b4062926b3763b43/dep-lib-aead","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
bec2f5593f5a9721

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\"]","declared_features":"[\"alloc\", \"default\", \"fresh-rust\", \"nightly\", \"serde\", \"std\"]","target":5388200169723499962,"profile":2933120001108589360,"path":3231510735981476319,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/allocator-api2-3423c5bc099b6824/dep-lib-allocator_api2","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
141eb851f744372c

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\"]","declared_features":"[\"alloc\", \"default\", \"fresh-rust\", \"nightly\", \"serde\", \"std\"]","target":5388200169723499962,"profile":8526714817676984181,"path":3231510735981476319,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/allocator-api2-5e1a9299abf9b62d/dep-lib-allocator_api2","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
ccee3553d23ed669

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"auto\", \"default\", \"wincon\"]","declared_features":"[\"auto\", \"default\", \"test\", \"wincon\"]","target":11278316191512382530,"profile":790325420539221616,"path":14370895825831020329,"deps":[[2608044744973004659,"anstyle_parse",false,11712505123101762351],[5652275617566266604,"anstyle_query",false,8897906317211961934],[7098682853475662231,"anstyle",false,16171958515337791055],[7711617929439759244,"colorchoice",false,15895386476031056548],[7727459912076845739,"is_terminal_polyfill",false,9537000529501752912],[17716308468579268865,"utf8parse",false,3071475116018702076]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstream-843fdfa1fa484b75/dep-lib-anstream","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
629fb27862d5c552

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"auto\", \"default\", \"wincon\"]","declared_features":"[\"auto\", \"default\", \"test\", \"wincon\"]","target":11278316191512382530,"profile":8255941854203129366,"path":14370895825831020329,"deps":[[2608044744973004659,"anstyle_parse",false,483739466688059328],[5652275617566266604,"anstyle_query",false,4794682324865943107],[7098682853475662231,"anstyle",false,2754234408364111543],[7711617929439759244,"colorchoice",false,1743186141051787933],[7727459912076845739,"is_terminal_polyfill",false,11788193196813497614],[17716308468579268865,"utf8parse",false,13970514572916587527]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstream-9f443e065fccc02a/dep-lib-anstream","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
4f06104596566ee0

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":6165884447290141869,"profile":790325420539221616,"path":1776388941253198830,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstyle-59b7f3dce3c10724/dep-lib-anstyle","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
b776b3129a013926

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":6165884447290141869,"profile":8255941854203129366,"path":1776388941253198830,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstyle-72b89889b9762a69/dep-lib-anstyle","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
2f636c9c5a2d8ba2

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"utf8\"]","declared_features":"[\"core\", \"default\", \"utf8\"]","target":10225663410500332907,"profile":790325420539221616,"path":11752401407508539679,"deps":[[17716308468579268865,"utf8parse",false,3071475116018702076]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstyle-parse-18383d37523f6b22/dep-lib-anstyle_parse","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
c057c7637b96b606

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"utf8\"]","declared_features":"[\"core\", \"default\", \"utf8\"]","target":10225663410500332907,"profile":8255941854203129366,"path":11752401407508539679,"deps":[[17716308468579268865,"utf8parse",false,13970514572916587527]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstyle-parse-1de459a2ae57e150/dep-lib-anstyle_parse","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
43867ad02b228a42

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[]","target":10705714425685373190,"profile":14848920055892446256,"path":12988169648635213222,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstyle-query-f533f0c585a8a57b/dep-lib-anstyle_query","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
4e8a1f02a7b67b7b

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[]","target":10705714425685373190,"profile":3560010784079834850,"path":12988169648635213222,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anstyle-query-f9937d1b48061866/dep-lib-anstyle_query","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"std\"]","declared_features":"[\"backtrace\", \"default\", \"std\"]","target":5408242616063297496,"profile":3033921117576893,"path":11925432468796192744,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anyhow-0740600941488f42/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
b76e890310014b91

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"std\"]","declared_features":"[\"backtrace\", \"default\", \"std\"]","target":1563897884725121975,"profile":8276155916380437441,"path":15671268548132282421,"deps":[[12478428894219133322,"build_script_build",false,9783450043070233576]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anyhow-46b7d8f5484c3c1b/dep-lib-anyhow","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[12478428894219133322,"build_script_build",false,6324122007074917249]],"local":[{"RerunIfChanged":{"output":"debug/build/anyhow-8adc3490e5a95280/output","paths":["src/nightly.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
f4cfb3cdb896f3a4

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"std\"]","declared_features":"[\"backtrace\", \"default\", \"std\"]","target":1563897884725121975,"profile":5347358027863023418,"path":15671268548132282421,"deps":[[12478428894219133322,"build_script_build",false,9783450043070233576]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anyhow-cd30a99443a8e2f3/dep-lib-anyhow","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
8b506c17b63545ad

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"default\", \"password-hash\", \"rand\"]","declared_features":"[\"alloc\", \"default\", \"password-hash\", \"rand\", \"simple\", \"std\", \"zeroize\"]","target":5931530492013982456,"profile":8276155916380437441,"path":4124704712835021998,"deps":[[5799347126265914943,"base64ct",false,12043107555009270906],[6742268975477224606,"password_hash",false,10188344370032856087],[8700459469608572718,"blake2",false,2466533392479806210]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/argon2-0d079c3c232b5093/dep-lib-argon2","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
ecde66b1bd683218

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"default\", \"password-hash\", \"rand\"]","declared_features":"[\"alloc\", \"default\", \"password-hash\", \"rand\", \"simple\", \"std\", \"zeroize\"]","target":5931530492013982456,"profile":5347358027863023418,"path":4124704712835021998,"deps":[[5799347126265914943,"base64ct",false,9347088714488141406],[6742268975477224606,"password_hash",false,12390705461322227105],[8700459469608572718,"blake2",false,8301287336456095812]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/argon2-f6bcb777d022219d/dep-lib-argon2","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
fda0e1699f9a25f9

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"borsh\", \"default\", \"serde\", \"std\", \"zeroize\"]","target":12564975964323158710,"profile":5347358027863023418,"path":12437349775204528162,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/arrayvec-831ce1daf5f2099b/dep-lib-arrayvec","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
7c3886ebdf222708

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"borsh\", \"default\", \"serde\", \"std\", \"zeroize\"]","target":12564975964323158710,"profile":8276155916380437441,"path":12437349775204528162,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/arrayvec-d793d7e770c5bba7/dep-lib-arrayvec","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
7ac481f87aed9887

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[]","target":5116616278641129243,"profile":3033921117576893,"path":9718277999653974610,"deps":[[4289358735036141001,"proc_macro2",false,18362539423673856587],[10420560437213941093,"syn",false,5960018906410477822],[13111758008314797071,"quote",false,16255256810892878592]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-trait-44c2ef3c93a3fd60/dep-lib-async_trait","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
d600c0e7148aa346

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"portable-atomic\"]","target":14411119108718288063,"profile":8276155916380437441,"path":9089114409656946486,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/atomic-waker-6384e78b02bbc3f5/dep-lib-atomic_waker","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
df2f010d30cb3278

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"portable-atomic\"]","target":14411119108718288063,"profile":5347358027863023418,"path":9089114409656946486,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/atomic-waker-b395b970f41f3dd2/dep-lib-atomic_waker","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
30f13501f4ca4469

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[]","target":6962977057026645649,"profile":3033921117576893,"path":9551454632454795078,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/autocfg-7f3508593794ac7e/dep-lib-autocfg","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
f773262fe8a176c2

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"default\", \"form\", \"http1\", \"json\", \"matched-path\", \"original-uri\", \"query\", \"tokio\", \"tower-log\", \"tracing\"]","declared_features":"[\"__private_docs\", \"default\", \"form\", \"http1\", \"http2\", \"json\", \"macros\", \"matched-path\", \"multipart\", \"original-uri\", \"query\", \"tokio\", \"tower-log\", \"tracing\", \"ws\"]","target":13920321295547257648,"profile":5347358027863023418,"path":13956521466135168815,"deps":[[784494742817713399,"tower_service",false,3019084973514748586],[1363051979936526615,"memchr",false,15951390836031848807],[2251399859588827949,"pin_project_lite",false,1710285764948532043],[2517136641825875337,"sync_wrapper",false,6973133344161643346],[2620434475832828286,"http",false,9557957895952211277],[3632162862999675140,"tower",false,18200958034579102259],[3870702314125662939,"bytes",false,12232477752045689865],[4160778395972110362,"hyper",false,4082376565832946489],[4359148418957042248,"axum_core",false,5559211646106539779],[5532778797167691009,"itoa",false,15602916230989427042],[5898568623609459682,"futures_util",false,17037249209921472879],[6803352382179706244,"percent_encoding",false,3108438017369244926],[7712452662827335977,"tower_layer",false,5982355261359366888],[9678799920983747518,"matchit",false,5992267216555167745],[10229185211513642314,"mime",false,12636533556335580705],[11976082518617474977,"hyper_util",false,7346073458984175421],[13298363700532491723,"tokio",false,9760947767639926685],[13548984313718623784,"serde",false,5498482491300739891],[13795362694956882968,"serde_json",false,9082640696221796380],[14084095096285906100,"http_body",false,7315952028458849404],[14156967978702956262,"rustversion",false,14824336531496876392],[14757622794040968908,"tracing",false,18328409701036641880],[14814583949208169760,"serde_path_to_error",false,13235216568004159697],[16542808166767769916,"serde_urlencoded",false,340273352019405475],[16611674984963787466,"async_trait",false,9770820503991338106],[16900715236047033623,"http_body_util",false,16042883243053146654]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/axum-343d9ed696314f24/dep-lib-axum","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

Some files were not shown because too many files have changed in this diff Show More