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 @@
{"rustc":13850170861107434965,"features":"[]","declared_features":"[]","target":14167889597710055648,"profile":6675295047989516842,"path":15337597165737840028,"deps":[[65234016722529558,"bincode",false,14999499759258784101],[530211389790465181,"hex",false,16585819727532080844],[2448563160050429386,"thiserror",false,9123690996541108604],[3856126590694406759,"chrono",false,7460836471663304355],[5306016253860807931,"ed25519_dalek",false,11095469389643420323],[6804519996442711849,"uuid",false,3334201115412274781],[9857275760291862238,"sha2",false,12989309081987050474],[11068292541898289468,"x25519_dalek",false,16717439384156811571],[12221344297584609106,"hkdf",false,9463092805554885286],[12865141776541797048,"zeroize",false,248298559044779970],[13077212702700853852,"base64",false,6887838416156815759],[13208667028893622512,"rand",false,9247388474540244096],[13548984313718623784,"serde",false,8367025351747235062],[13595581133353633439,"curve25519_dalek",false,9791419129326004794],[13795362694956882968,"serde_json",false,8532010093985063806],[13910961125710613432,"bip39",false,2025469841894219876],[13994773804180158263,"chacha20poly1305",false,5051623341919080073]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/warzone-protocol-e2157a25d103eb51/dep-lib-warzone_protocol","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}