Skip to content

Add GROUP destination support with symmetric key encryption#4

Open
kageedwards wants to merge 1 commit into
liamcottle:masterfrom
kageedwards:feature/group-destination-support
Open

Add GROUP destination support with symmetric key encryption#4
kageedwards wants to merge 1 commit into
liamcottle:masterfrom
kageedwards:feature/group-destination-support

Conversation

@kageedwards
Copy link
Copy Markdown

Summary

This adds GROUP type destination support to enable symmetric-key-based group communication, matching the behavior of Python Reticulum's RNS.Destination.GROUP.

Changes

destination.js:

  • Uncomment Destination.GROUP constant and add Fernet import
  • Add createKeys(), loadPrivateKey(key), getPrivateKey() for symmetric key management on GROUP destinations
  • Add group destination branches to encrypt() and decrypt() using Fernet, with error handling returning null on decrypt failure
  • Add setPacketCallback(callback) for registering a receive handler, fired in onPacket() before the packet event

Testing

I've been building LXCF, an IRC-style semantic layer / protocol that runs seamlessly over LXMF, and needed group destinations for shared channel communication where multiple participants derive the same group destination hash and symmetric key from a shared passphrase.

I tested the group destination functionality with two LXCF Electron clients running on lxcf.js and rns.js, joining the same GROUP destination over TCP interfaces, exchanging messages bidirectionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant