Currently OMEMO only supports encryption of the body of a message. However, XEP-0373 (OpenPGP for XMPP), which I recently implemented for Smack does support encrypting arbitrary ExtensionElements and I made very positive experience with it. Technically extension encryption is done more or less as you described and I recommend giving XEP-0373+XEP-0374 a read :)
For the future I think it would be best to extract the payload formatting from XEP-0373 and reuse it in OMEMO as well. I think Link Mauve wanted to write a XEP for that at some point? I'd welcome that :) Offtopic: While we're at OMEMO, I'm a little sad, that the development on the XEP has come to a halt this year. There are some developments on clients and libraries, which are very promising (for example syndaces OMEMO lib in python, which could have been licensed under a permissive license, if it wasn't for OMEMOs dependency on the libsignal wire format). I'd like to see OMEMO XEP development gaining some more traction again, possibly replacing the libsignal wire format with our own (see Andreas Straubs PR in the XEPs repo), so syndaces library can go non-GPL (correct me if I'm remembering the situation wrong). That would also solve the "there is no permissive OMEMO lib"-argument. Paul Am 06.09.18 um 19:10 schrieb Daniele Ricci: > Hi, > I noticed that the OMEMO XEP, at section 4.7, states: > > "If the OMEMO element contains a <payload>, it is an OMEMO message > element. [...] If it succeeds, the decrypted contents are treated as > the <body> of the received message." > > Unless I missed something, the XEP allows only for encrypted text from > the <body>. > What if I want to encrypt a whole stanza, e.g. for including other > information such as delivery receipt requests, out-of-band data, or > anything else that might be worthy of encryption. > > I could just feed the XML string to the OMEMO library and then parse > the XML on the other side, but - besides probably being not compatible > with the implementations currently out there - I'd like to know how > this could be addressed in XEP compliance terms. > > Thank you _______________________________________________ Standards mailing list Info: https://mail.jabber.org/mailman/listinfo/standards Unsubscribe: [email protected] _______________________________________________
