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 @@
{"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}