feat(firmware): MeshCore message RX — decrypt DMs addressed to us

- vendor orlp/ed25519 (lib/ed25519, MIT — the exact lib MeshCore uses) for
  Curve25519 ECDH key exchange; switch identity/advert signing to it (same
  seed -> same pubkey, so peers still recognise us; sigs are byte-identical)
- store pubkeys from heard MeshCore adverts (contacts table) so a DM's
  1-byte src_hash can be resolved to a full sender key
- decode PAYLOAD_TYPE_TXT_MSG: ECDH shared secret, HMAC-SHA256 MAC check,
  AES-128-ECB decrypt, parse timestamp+text, drive the message modal
- verified end-to-end: real MeshCore node -> "hello from HP Pro Desk" decoded

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-07-01 18:30:20 +01:00
co-authored by Claude Opus 4.8
parent 8e5b4c97d7
commit 38c146c477
19 changed files with 5112 additions and 8 deletions
+1
View File
@@ -14,6 +14,7 @@ monitor_speed = 115200
monitor_filters = time, default
build_flags =
-D ARCHY_MESSH_FW
-D ED25519_NO_SEED ; vendored orlp/ed25519 without host-only seed.c
lib_deps =
jgromes/RadioLib@7.7.1
olikraus/U8g2@2.36.18