Fix X3DH + add web client served by warzone-server

X3DH fix:
- Added identity_encryption_key (X25519) to PreKeyBundle
- initiate() and respond() now use correct DH operations per Signal spec:
  DH1=IK_a*SPK_b, DH2=EK_a*IK_b, DH3=EK_a*SPK_b, DH4=EK_a*OPK_b
- All 17 tests pass including x3dh_shared_secret_matches

Web client (served at /):
- Identity generation with seed (stored in localStorage)
- Recovery from hex-encoded seed
- Auto-load saved identity on page load
- Fingerprint display (same format as CLI: xxxx:xxxx:xxxx:xxxx)
- Key registration with server via /v1/keys/register
- Chat UI with message polling (5s interval)
- Commands: /help, /info, /seed
- Dark theme matching warzone aesthetic

Both clients (CLI + Web) now exist:
- CLI: warzone init, warzone info, warzone recover
- Web: http://localhost:7700/ (served by warzone-server)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-26 21:32:46 +04:00
parent 651396fa13
commit 7451ad69bc
2421 changed files with 1183 additions and 25 deletions

View File

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

View File

@@ -0,0 +1 @@
8e28fe93a2ca867e

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,5172108462737061712],[10520923840501062997,"generic_array",false,13561802365898736142]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aead-8d31af3a45343c01/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 @@
65512d6f8fed28d0

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"i128\"]","target":9517688912158169860,"profile":5347358027863023418,"path":13970850734025693423,"deps":[[13548984313718623784,"serde",false,8367025351747235062]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bincode-be45075ca07e9baf/dep-lib-bincode","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 @@
64205ffd16ea1b1c

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"default\", \"serde\", \"std\", \"unicode-normalization\"]","declared_features":"[\"all-languages\", \"alloc\", \"chinese-simplified\", \"chinese-traditional\", \"crate_rand\", \"czech\", \"default\", \"french\", \"italian\", \"japanese\", \"korean\", \"portuguese\", \"rand\", \"rand_core\", \"serde\", \"spanish\", \"std\", \"unicode-normalization\", \"zeroize\"]","target":12173490326672380777,"profile":5347358027863023418,"path":12723980575334432238,"deps":[[7477499173016652821,"unicode_normalization",false,17668585167662496203],[9560807072829382518,"bitcoin_hashes",false,8103984115383200507],[13548984313718623784,"serde",false,8367025351747235062]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bip39-90348a55f9d2d963/dep-lib-bip39","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 @@
f7b4df53c45c8165

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"zeroize\"]","declared_features":"[\"std\", \"zeroize\"]","target":16494743429315233327,"profile":5347358027863023418,"path":13168473005462166381,"deps":[[7667230146095136825,"cfg_if",false,442776345318176589],[7916416211798676886,"cipher",false,12705040680522176484]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/chacha20-5447e416d047f59c/dep-lib-chacha20","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 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"default\", \"getrandom\", \"rand_core\"]","declared_features":"[\"alloc\", \"default\", \"getrandom\", \"heapless\", \"rand_core\", \"reduced-round\", \"std\", \"stream\"]","target":2570101318813280072,"profile":5347358027863023418,"path":5317624892339363080,"deps":[[6192938164125971281,"poly1305",false,9143502308472071639],[7916416211798676886,"cipher",false,12705040680522176484],[11163181423074495534,"chacha20",false,7314229268116911351],[12865141776541797048,"zeroize",false,248298559044779970],[17797166225172937111,"aead",false,9117197295274567822]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/chacha20poly1305-164db92f0257a983/dep-lib-chacha20poly1305","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 @@
a31ec5e43d378a67

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"clock\", \"default\", \"iana-time-zone\", \"js-sys\", \"now\", \"oldtime\", \"serde\", \"std\", \"wasm-bindgen\", \"wasmbind\", \"winapi\", \"windows-link\"]","declared_features":"[\"__internal_bench\", \"alloc\", \"arbitrary\", \"clock\", \"core-error\", \"default\", \"defmt\", \"iana-time-zone\", \"js-sys\", \"libc\", \"now\", \"oldtime\", \"pure-rust-locales\", \"rkyv\", \"rkyv-16\", \"rkyv-32\", \"rkyv-64\", \"rkyv-validation\", \"serde\", \"std\", \"unstable-locales\", \"wasm-bindgen\", \"wasmbind\", \"winapi\", \"windows-link\"]","target":15315924755136109342,"profile":5347358027863023418,"path":14214239872992545449,"deps":[[5157631553186200874,"num_traits",false,15947804138005965357],[13548984313718623784,"serde",false,8367025351747235062],[16619627449254928351,"iana_time_zone",false,14955757029511246363]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/chrono-b6d664855acbbb35/dep-lib-chrono","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 @@
e457694b2f5f51b0

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"zeroize\"]","declared_features":"[\"alloc\", \"blobby\", \"block-padding\", \"dev\", \"rand_core\", \"std\", \"zeroize\"]","target":9724871538835674250,"profile":5347358027863023418,"path":8554097998223306163,"deps":[[6039282458970808711,"crypto_common",false,5172108462737061712],[6580247197892008482,"inout",false,15097357777526837538],[12865141776541797048,"zeroize",false,248298559044779970]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cipher-40ac7f54be250a9b/dep-lib-cipher","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 @@
f20cb5b1c0612503

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[]","target":2330704043955282025,"profile":5347358027863023418,"path":8553874297690093820,"deps":[[17159683253194042242,"libc",false,14009605733401548118]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cpufeatures-9e65a507bab0b205/dep-lib-cpufeatures","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 @@
50f73b6d3e05c747

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"getrandom\", \"rand_core\", \"std\"]","declared_features":"[\"getrandom\", \"rand_core\", \"std\"]","target":12082577455412410174,"profile":5347358027863023418,"path":7558390025248118369,"deps":[[857979250431893282,"typenum",false,12901019876651498157],[10520923840501062997,"generic_array",false,13561802365898736142],[18130209639506977569,"rand_core",false,14392578981742011186]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/crypto-common-3e8e88ad89c0785e/dep-lib-crypto_common","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 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"default\", \"digest\", \"precomputed-tables\", \"serde\", \"zeroize\"]","declared_features":"[\"alloc\", \"default\", \"digest\", \"ff\", \"group\", \"group-bits\", \"legacy_compatibility\", \"precomputed-tables\", \"rand_core\", \"serde\", \"zeroize\"]","target":115635582535548150,"profile":5347358027863023418,"path":6449140769066251312,"deps":[[7667230146095136825,"cfg_if",false,442776345318176589],[12865141776541797048,"zeroize",false,248298559044779970],[13548984313718623784,"serde",false,8367025351747235062],[13595581133353633439,"build_script_build",false,13686814823733748901],[17003143334332120809,"subtle",false,15897404018854376665],[17475753849556516473,"digest",false,8075083745434701549]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/curve25519-dalek-d472de6bdb7ced94/dep-lib-curve25519_dalek","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 @@
ed8e2a02e2751070

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"block-buffer\", \"core-api\", \"default\", \"mac\", \"std\", \"subtle\"]","declared_features":"[\"alloc\", \"blobby\", \"block-buffer\", \"const-oid\", \"core-api\", \"default\", \"dev\", \"mac\", \"oid\", \"rand_core\", \"std\", \"subtle\"]","target":7510122432137863311,"profile":5347358027863023418,"path":3574287158493815784,"deps":[[6039282458970808711,"crypto_common",false,5172108462737061712],[10626340395483396037,"block_buffer",false,16552305723168491981],[17003143334332120809,"subtle",false,15897404018854376665]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/digest-209de893c333c832/dep-lib-digest","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 @@
a068469407bea0b1

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"serde\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"pem\", \"pkcs8\", \"serde\", \"serde_bytes\", \"std\", \"zeroize\"]","target":108444017173925020,"profile":5347358027863023418,"path":8346972714448647870,"deps":[[13548984313718623784,"serde",false,8367025351747235062],[13895928991373641935,"signature",false,3521295346193609708]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ed25519-4e350a8008923e6e/dep-lib-ed25519","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 @@
a392eaa19f06fb99

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"default\", \"fast\", \"rand_core\", \"serde\", \"std\", \"zeroize\"]","declared_features":"[\"alloc\", \"asm\", \"batch\", \"default\", \"digest\", \"fast\", \"hazmat\", \"legacy_compatibility\", \"merlin\", \"pem\", \"pkcs8\", \"rand_core\", \"serde\", \"signature\", \"std\", \"zeroize\"]","target":14975934594160758548,"profile":5347358027863023418,"path":4575084279225020293,"deps":[[9857275760291862238,"sha2",false,12989309081987050474],[12865141776541797048,"zeroize",false,248298559044779970],[13548984313718623784,"serde",false,8367025351747235062],[13595581133353633439,"curve25519_dalek",false,9791419129326004794],[14313198213031843936,"ed25519",false,12799439080748640416],[17003143334332120809,"subtle",false,15897404018854376665],[18130209639506977569,"rand_core",false,14392578981742011186]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ed25519-dalek-7237997fd56ddda1/dep-lib-ed25519_dalek","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 @@
596d7a2c6575a1c4

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"std\", \"sys_rng\", \"wasm_js\"]","target":5479159445871601843,"profile":54956885565002870,"path":18270089540685884420,"deps":[[6509165896255665847,"build_script_build",false,4434018327659529566],[7667230146095136825,"cfg_if",false,442776345318176589],[17159683253194042242,"libc",false,14009605733401548118]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-a3eef173e9e9e309/dep-lib-getrandom","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 @@
afef39ea412e74bb

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"std\"]","declared_features":"[\"compiler_builtins\", \"core\", \"custom\", \"js\", \"js-sys\", \"linux_disable_fallback\", \"rdrand\", \"rustc-dep-of-std\", \"std\", \"test-in-browser\", \"wasm-bindgen\"]","target":16244099637825074703,"profile":5347358027863023418,"path":15750744916722146493,"deps":[[7667230146095136825,"cfg_if",false,442776345318176589],[17159683253194042242,"libc",false,14009605733401548118]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-c0433451004d2c2c/dep-lib-getrandom","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 @@
a652a7dfc4a85383

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"std\"]","target":14142612836732549229,"profile":5347358027863023418,"path":3643438026878424841,"deps":[[9209347893430674936,"hmac",false,15056724900006755381]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/hkdf-dbd8e2953a268e67/dep-lib-hkdf","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 @@
357caec9853bf4d0

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"reset\", \"std\"]","target":12991177224612424488,"profile":5347358027863023418,"path":14315084428906688422,"deps":[[17475753849556516473,"digest",false,8075083745434701549]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/hmac-e834f9a067c062e6/dep-lib-hmac","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":[[17159683253194042242,"build_script_build",false,7646265257035636966]],"local":[{"RerunIfChanged":{"output":"debug/build/libc-26e3aa07cdcb9961/output","paths":["build.rs"]}},{"RerunIfEnvChanged":{"var":"RUST_LIBC_UNSTABLE_FREEBSD_VERSION","val":null}},{"RerunIfEnvChanged":{"var":"RUST_LIBC_UNSTABLE_MUSL_V1_2_3","val":null}},{"RerunIfEnvChanged":{"var":"RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64","val":null}},{"RerunIfEnvChanged":{"var":"RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS","val":null}},{"RerunIfEnvChanged":{"var":"RUST_LIBC_UNSTABLE_GNU_TIME_BITS","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 @@
56d5ac3e301e6cc2

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":17682796336736096309,"profile":13030054270579460295,"path":12641219095888691745,"deps":[[17159683253194042242,"build_script_build",false,5400064846257238772]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-b725d2caefe40793/dep-lib-libc","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}

View File

@@ -0,0 +1 @@
e6200558bdfd1c6a

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":5408242616063297496,"profile":3039969951022573740,"path":11376171647098841191,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-bd20624258d00a03/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 @@
888351d3bec3e461

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"std\"]","declared_features":"[\"alloc\", \"core\", \"default\", \"libc\", \"logging\", \"rustc-dep-of-std\", \"std\", \"use_std\"]","target":11745930252914242013,"profile":5347358027863023418,"path":18417601736858941376,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/memchr-30f8187d5c15687f/dep-lib-memchr","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 @@
d72571bbe73ee47e

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[\"std\", \"zeroize\"]","target":7678087393715460382,"profile":5347358027863023418,"path":13615177797371762843,"deps":[[4659636926478363681,"universal_hash",false,8961708749427807028],[13927846409374511869,"opaque_debug",false,18212133800030650729]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/poly1305-411360e9a8b4ffba/dep-lib-poly1305","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 @@
803c03a5d2525580

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"default\", \"getrandom\", \"libc\", \"rand_chacha\", \"std\", \"std_rng\"]","declared_features":"[\"alloc\", \"default\", \"getrandom\", \"libc\", \"log\", \"min_const_gen\", \"nightly\", \"packed_simd\", \"rand_chacha\", \"serde\", \"serde1\", \"simd_support\", \"small_rng\", \"std\", \"std_rng\"]","target":8827111241893198906,"profile":5347358027863023418,"path":1813820779774838373,"deps":[[1573238666360410412,"rand_chacha",false,3006117951223475330],[17159683253194042242,"libc",false,14009605733401548118],[18130209639506977569,"rand_core",false,14392578981742011186]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rand-31829ace3f1968d7/dep-lib-rand","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 @@
82ac997b59e0b729

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"std\"]","declared_features":"[\"default\", \"serde\", \"serde1\", \"simd\", \"std\"]","target":15766068575093147603,"profile":5347358027863023418,"path":12916168183201262489,"deps":[[12919011715531272606,"ppv_lite86",false,3196748534240690378],[18130209639506977569,"rand_core",false,14392578981742011186]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rand_chacha-9523eb647dbe939b/dep-lib-rand_chacha","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 @@
32637c2854b6bcc7

View File

@@ -0,0 +1 @@
{"rustc":13850170861107434965,"features":"[\"alloc\", \"getrandom\", \"std\"]","declared_features":"[\"alloc\", \"getrandom\", \"serde\", \"serde1\", \"std\"]","target":13770603672348587087,"profile":5347358027863023418,"path":10194650014901464860,"deps":[[11023519408959114924,"getrandom",false,13507472043028377519]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rand_core-52bbaa03010db8ab/dep-lib-rand_core","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