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,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/anyhow-0740600941488f42/build_script_build-0740600941488f42.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/anyhow-0740600941488f42/build_script_build-0740600941488f42: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/build.rs:

View File

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

View File

@@ -0,0 +1,7 @@
cargo:rerun-if-changed=src/nightly.rs
cargo:rerun-if-env-changed=RUSTC_BOOTSTRAP
cargo:rustc-check-cfg=cfg(anyhow_build_probe)
cargo:rustc-check-cfg=cfg(anyhow_nightly_testing)
cargo:rustc-check-cfg=cfg(anyhow_no_clippy_format_args)
cargo:rustc-check-cfg=cfg(anyhow_no_core_error)
cargo:rustc-check-cfg=cfg(error_generic_member_access)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/anyhow-8adc3490e5a95280/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/crc32fast-84a1e02f839e5080/build_script_build-84a1e02f839e5080.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crc32fast-1.5.0/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/crc32fast-84a1e02f839e5080/build_script_build-84a1e02f839e5080: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crc32fast-1.5.0/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crc32fast-1.5.0/build.rs:

View File

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

View File

@@ -0,0 +1,2 @@
cargo:rustc-cfg=stable_arm_crc32_intrinsics
cargo:rustc-check-cfg=cfg(stable_arm_crc32_intrinsics)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/crc32fast-d6ff8845d2a70df5/out

View File

@@ -0,0 +1,9 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/crossbeam-utils-15fb92f4b095d975/build_script_build-15fb92f4b095d975.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/build.rs /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/no_atomic.rs /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/build-common.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/crossbeam-utils-15fb92f4b095d975/build_script_build-15fb92f4b095d975: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/build.rs /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/no_atomic.rs /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/build-common.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/build.rs:
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/no_atomic.rs:
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-utils-0.8.21/build-common.rs:
# env-dep:CARGO_PKG_NAME=crossbeam-utils

View File

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

View File

@@ -0,0 +1,2 @@
cargo:rerun-if-changed=no_atomic.rs
cargo:rustc-check-cfg=cfg(crossbeam_no_atomic,crossbeam_sanitize_thread)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/crossbeam-utils-2fd281c38154188b/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/curve25519-dalek-727e79a1d2fc0d88/build_script_build-727e79a1d2fc0d88.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/curve25519-dalek-4.1.3/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/curve25519-dalek-727e79a1d2fc0d88/build_script_build-727e79a1d2fc0d88: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/curve25519-dalek-4.1.3/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/curve25519-dalek-4.1.3/build.rs:

View File

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

View File

@@ -0,0 +1,2 @@
cargo:rustc-cfg=curve25519_dalek_bits="64"
cargo:rustc-cfg=curve25519_dalek_backend="serial"

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/curve25519-dalek-ee11995a891c75a8/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/generic-array-a8b3e5bebafcb485/build_script_build-a8b3e5bebafcb485.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/generic-array-a8b3e5bebafcb485/build_script_build-a8b3e5bebafcb485: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs:

View File

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

View File

@@ -0,0 +1 @@
cargo:rustc-cfg=relaxed_coherence

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/generic-array-e2e7defe9492ce99/out

View File

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

View File

@@ -0,0 +1 @@
cargo:rerun-if-changed=build.rs

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/getrandom-2f1fe98b993da8ff/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/getrandom-df15648aa4cb8255/build_script_build-df15648aa4cb8255.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.4.2/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/getrandom-df15648aa4cb8255/build_script_build-df15648aa4cb8255: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.4.2/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.4.2/build.rs:

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/httparse-03930055b1ed33c4/build_script_build-03930055b1ed33c4.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/httparse-1.10.1/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/httparse-03930055b1ed33c4/build_script_build-03930055b1ed33c4: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/httparse-1.10.1/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/httparse-1.10.1/build.rs:

View File

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

View File

@@ -0,0 +1,2 @@
cargo:rustc-cfg=httparse_simd_neon_intrinsics
cargo:rustc-cfg=httparse_simd

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/httparse-2913b8c78dde7ddf/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/icu_normalizer_data-8f2c5fcdd034312d/build_script_build-8f2c5fcdd034312d.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_normalizer_data-2.1.1/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/icu_normalizer_data-8f2c5fcdd034312d/build_script_build-8f2c5fcdd034312d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_normalizer_data-2.1.1/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_normalizer_data-2.1.1/build.rs:

View File

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

View File

@@ -0,0 +1,2 @@
cargo:rerun-if-env-changed=ICU4X_DATA_DIR
cargo:rustc-check-cfg=cfg(icu4c_enable_renaming)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/icu_normalizer_data-edadb8883a6e328b/out

View File

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

View File

@@ -0,0 +1,2 @@
cargo:rerun-if-env-changed=ICU4X_DATA_DIR
cargo:rustc-check-cfg=cfg(icu4c_enable_renaming)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/icu_properties_data-72fa0477e2028fef/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/icu_properties_data-de96436fa684bcf7/build_script_build-de96436fa684bcf7.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_properties_data-2.1.2/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/icu_properties_data-de96436fa684bcf7/build_script_build-de96436fa684bcf7: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_properties_data-2.1.2/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_properties_data-2.1.2/build.rs:

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/instability-3732adc16372397a/build_script_build-3732adc16372397a.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/instability-0.3.12/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/instability-3732adc16372397a/build_script_build-3732adc16372397a: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/instability-0.3.12/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/instability-0.3.12/build.rs:

View File

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

View File

@@ -0,0 +1 @@
cargo:rustc-check-cfg=cfg(instability_disable_unstable_docs)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/instability-a5e10539f5a73221/out

View File

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

View File

@@ -0,0 +1,25 @@
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_FREEBSD_VERSION
cargo:rustc-cfg=freebsd12
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_MUSL_V1_2_3
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_GNU_TIME_BITS
cargo:rustc-check-cfg=cfg(emscripten_old_stat_abi)
cargo:rustc-check-cfg=cfg(espidf_time32)
cargo:rustc-check-cfg=cfg(freebsd10)
cargo:rustc-check-cfg=cfg(freebsd11)
cargo:rustc-check-cfg=cfg(freebsd12)
cargo:rustc-check-cfg=cfg(freebsd13)
cargo:rustc-check-cfg=cfg(freebsd14)
cargo:rustc-check-cfg=cfg(freebsd15)
cargo:rustc-check-cfg=cfg(gnu_file_offset_bits64)
cargo:rustc-check-cfg=cfg(gnu_time_bits64)
cargo:rustc-check-cfg=cfg(libc_deny_warnings)
cargo:rustc-check-cfg=cfg(linux_time_bits64)
cargo:rustc-check-cfg=cfg(musl_v1_2_3)
cargo:rustc-check-cfg=cfg(musl32_time64)
cargo:rustc-check-cfg=cfg(vxworks_lt_25_09)
cargo:rustc-check-cfg=cfg(target_os,values("switch","aix","ohos","hurd","rtems","visionos","nuttx","cygwin","qurt"))
cargo:rustc-check-cfg=cfg(target_env,values("illumos","wasi","aix","ohos","nto71_iosock","nto80"))
cargo:rustc-check-cfg=cfg(target_arch,values("loongarch64","mips32r6","mips64r6","csky"))

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/libc-ba7a3cd5fc3a3c1e/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/libc-c06f4484fb00e7af/build_script_build-c06f4484fb00e7af.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.183/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/libc-c06f4484fb00e7af/build_script_build-c06f4484fb00e7af: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.183/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.183/build.rs:

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/native-tls-1a907b4f2c241b48/build_script_build-1a907b4f2c241b48.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/native-tls-0.2.18/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/native-tls-1a907b4f2c241b48/build_script_build-1a907b4f2c241b48: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/native-tls-0.2.18/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/native-tls-0.2.18/build.rs:

View File

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

View File

@@ -0,0 +1 @@
cargo::rustc-check-cfg=cfg(have_min_max_version)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/native-tls-6b1aa2c57a15f297/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/num-traits-879c32a4024cf6f0/build_script_build-879c32a4024cf6f0.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/num-traits-879c32a4024cf6f0/build_script_build-879c32a4024cf6f0: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs:

View File

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

View File

@@ -0,0 +1,3 @@
cargo:rustc-check-cfg=cfg(has_total_cmp)
cargo:rustc-cfg=has_total_cmp
cargo:rerun-if-changed=build.rs

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/num-traits-a5722642a0fa6e83/out

View File

@@ -0,0 +1,5 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/parking_lot_core-64e6311ca6b7d450/build_script_build-64e6311ca6b7d450.d: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.8.6/build.rs
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/parking_lot_core-64e6311ca6b7d450/build_script_build-64e6311ca6b7d450: /Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.8.6/build.rs
/Users/manwe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.8.6/build.rs:

View File

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

View File

@@ -0,0 +1,2 @@
cargo:rerun-if-changed=build.rs
cargo:rustc-check-cfg=cfg(tsan_enabled)

View File

@@ -0,0 +1 @@
/Users/manwe/CascadeProjects/arvan/warzone/target/debug/build/parking_lot_core-89c790f2581c6ad6/out

View File

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

View File

@@ -0,0 +1 @@
cargo:rerun-if-changed=build.rs

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