libomemo icon indicating copy to clipboard operation
libomemo copied to clipboard

Handle KeyTransport message correctly

Open root-hardenedvault opened this issue 4 years ago • 4 comments

Handle KeyTransport message correctly

omemo_message_export_encrypted() should not return early if only its payload is absent.

omemo_message_prepare_encryption() should be able to accept an outgoing_message without body, which would become a template of a KeyTransport message.

root-hardenedvault avatar Feb 10 '21 15:02 root-hardenedvault

hi @root-hardenedvault, thank you for your contribution!

  • you're probably right, the shortcut in omemo_message_export_encrypted() is wrong and it should not exit on an empty payload, as this should result in a key transport message.
  • i don't think this is true for omemo_message_prepare_encryption() however, as it is intended to be used on existing, intercepted messages. it is simply a different entry point. for creating a fresh, empty message, which will ever only be done by the application code, omemo_message_create() is to be used.
  • the last commit is not related to the rest of the PR, i think, its contents seem to refer to the newest version of the standard, which uses a different namespace. this library so far only tries to work with the old version outlined in versoin 0.3.0 of the standard: https://xmpp.org/extensions/attic/xep-0384-0.3.0.html

gkdr avatar Mar 03 '21 21:03 gkdr

But how to compose a valid KeyTransport message from omemo_message_create()? as stated in:

https://github.com/gkdr/lurch/pull/162

root-hardenedvault avatar Mar 04 '21 08:03 root-hardenedvault

@gkdr: Any news on it?

Neustradamus avatar Dec 24 '23 21:12 Neustradamus