From 6cf21a019963468cb853e5c763ef0097115efa46 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 10 Sep 2026 17:30:22 +0200 Subject: refactor(common): delete the sender-key implementation nothing uses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `senderkeys.py` and its 13 tests implemented Signal-style sender keys, and production has never called them: chat is a key per group, per epoch, per device, derived by name. The reasoning that ruled the ratchet out stays where it belongs — in `chatbox.py`, at the top of the module that replaced it — because the argument is the useful part, and it now stands on its own instead of pointing at a file to compare against. Kept code that nothing calls is worse than absent code: it reads as an alternative somebody may reach for, and it has to be maintained past every refactor to stay compiling, which is maintenance spent on a decision already made. The three comments naming `GroupSenderKeyStore` are rewritten to say the thing they were illustrating. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01AsoWC3GmhNdwVFomW3QjH3 --- packages/meshbay-node/tests/test_chat_encryption.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packages/meshbay-node/tests/test_chat_encryption.py') diff --git a/packages/meshbay-node/tests/test_chat_encryption.py b/packages/meshbay-node/tests/test_chat_encryption.py index ea4de2f..0401d27 100644 --- a/packages/meshbay-node/tests/test_chat_encryption.py +++ b/packages/meshbay-node/tests/test_chat_encryption.py @@ -269,10 +269,9 @@ async def test_a_member_cannot_send_as_another_members_device(node): The hole that would have made encrypted chat *worse* than plaintext chat. Receivers verify a signature against the `device` field, so a member free - to name somebody else's key could be that member to everyone — which is - exactly what `GroupSenderKeyStore.add_sender` allowed, one design earlier - (`docs/chat-sender-keys.md` F1). The connection has proved which device it - is, and the claim must match it. + to name somebody else's key could be that member to everyone — and the + signature would check out. The connection has proved which device it is, + and the claim must match it. """ await ops.ensure_chat_epoch(node["state"], GROUP) _sk_alice, raw_alice, b64_alice = _device() -- cgit v1.2.3