oxen-io / libsession-util

Session utilities library
GNU General Public License v3.0
15 stars 16 forks source link

Add sender/signature/content encoding/decoding/verification #58

Open jagerman opened 1 year ago

jagerman commented 1 year ago

For group messages we need encrypted messages to decrypt to something (probably a new protobuf type?) that contains sender, signature, and content, where content is encoded Content protobuf, sender is a Session ID, and signature is an XEd25519 signature*.

(* sort of -- official XEd25519 has a reliance on a random value to make the signature, but since we have full ed keys we can make that EdDSA-style deterministic and do a negation, if necessary, so that we can always verify with the positive of the two possible X->Ed pubkeys).

jagerman commented 1 year ago

This should probably be done directly in the encrypt_message/decrypt_message interface. Might depend on #51 if we go with a protobuf wrapper.