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 @@
{"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":8276155916380437441,"path":13956521466135168815,"deps":[[784494742817713399,"tower_service",false,8510158970010487276],[1363051979936526615,"memchr",false,9320648172652718139],[2251399859588827949,"pin_project_lite",false,1188568725061248759],[2517136641825875337,"sync_wrapper",false,4488299594438765926],[2620434475832828286,"http",false,10881460910397689437],[3632162862999675140,"tower",false,3614424181981772264],[3870702314125662939,"bytes",false,4696762725291962905],[4160778395972110362,"hyper",false,11720024341265954351],[4359148418957042248,"axum_core",false,5912807754955592567],[5532778797167691009,"itoa",false,6241964516047141528],[5898568623609459682,"futures_util",false,15409072163965039695],[6803352382179706244,"percent_encoding",false,398509632234206594],[7712452662827335977,"tower_layer",false,8249720946707681493],[9678799920983747518,"matchit",false,14935216643219228381],[10229185211513642314,"mime",false,13793488153083338064],[11976082518617474977,"hyper_util",false,13627700911059654302],[13298363700532491723,"tokio",false,14699752842008257147],[13548984313718623784,"serde",false,13370104226237848235],[13795362694956882968,"serde_json",false,2355216187356245444],[14084095096285906100,"http_body",false,2036947769858085993],[14156967978702956262,"rustversion",false,14824336531496876392],[14757622794040968908,"tracing",false,5653037812791084930],[14814583949208169760,"serde_path_to_error",false,13792456844335455135],[16542808166767769916,"serde_urlencoded",false,1931840422487481577],[16611674984963787466,"async_trait",false,9770820503991338106],[16900715236047033623,"http_body_util",false,7746633921453758944]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/axum-8746f591ba435ae2/dep-lib-axum","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}