-
Yagiza
Daniel, are you here?
-
Daniel
Yagiza: yes
-
Yagiza
Daniel, I need to clarify something about OMEMO implementation. Can you help me?
-
Daniel
Yagiza: I don't know. But we can try
-
Yagiza
Daniel, ok, thanx!
-
Yagiza
Section 4.3 says, that I must publish my IdentityKey. But IdentityKey is a public/private key pair.
-
Yagiza
Do I need to publish both keys, or just public one?
-
Daniel
The public key
-
Yagiza
Daniel, ok. That's the way I did it.
-
Yagiza
Daniel, the only question is why tag name is so ambiguous.
-
Yagiza
<signedPreKeyPublic/>, <preKeyPublic/>, but <identityKey/>?
-
Yagiza
The next question is about section 4.5.
-
Yagiza
It says: "In order to send a chat message, its <body> first has to be encrypted. The client MUST use fresh, randomly generated key/IV pairs with AES-128 in Galois/Counter Mode (GCM). The 16 bytes key and the GCM authentication tag (The tag SHOULD have at least 128 bit) are concatenated and for each intended recipient device, i.e. both own devices as well as devices associated with the contact, the result of this concatenation is encrypted using the corresponding long-standing SignalProtocol session."
-
Yagiza
What does that mean? How to encrypt, "using the corresponding long-standing SignalProtocol session"?
-
Yagiza
Do I need to use one of pre keys, published by target devices to encrypt key I just generated?
-
Yagiza
Or do I need to use it just for a first message and mark it with preKey="true" attribute?
-
Yagiza
And one I received a key/IV pair from the device, I need to use that key instead?
-
flow
dwd, hmm?
-
dwd
flow, You referred to SCE as SEC in your mail to standards@. I'm disproportionately amused.
-
flow
Ahh, I see.
-
Daniel
Yagiza: you generate a random iv+key, encrypt the message with that key. And then you feed the key into all signal protocol session
-
Daniel
And if no session exists yet you create them
-
Daniel
With prekeys downloaded from pep
-
Yagiza
Daniel, well... What does it mean "to create a session"?
-
Daniel
That is defined by the signal spec
-
Yagiza
Ok
-
Ge0rG
I actually like SEC much more than SCE, with you-know-what as a close second. Can't we change the title to "Stanza Encrypted Content" at least? 😁
-
Yagiza
The next question is: which functions from libsignal-protocol-c do I need to use to generate key/IV pair? Those from sender_key.h?
-
Daniel
They are not provided by the library. It's just random bytes
-
Yagiza
Daniel, IC. And which function can I use to encrypt my message using that key/IV pair?
-
Daniel
Some aes gcm implementation
-
Yagiza
Daniel, ok
-
COM8
Yagiza: I also had quite a few problems understanding the OMEMO XEP. If you need a working example with documentation look at: https://github.com/UWPX/UWPX-Client/blob/master/XMPP_API/Classes/Network/XML/Messages/XEP-0384/OmemoMessageMessage.cs
-
Daniel
there is also https://wiki.xmpp.org/web/Tech_pages/OMEMO which can be interesting to people implementing omemo
-
Daniel
it doesn’t answer the specfic questions Yagiza had. but _other_ questions
-
Yagiza
COM8, Daniel, thanx!
-
Daniel
would be interesting to know what problems you COM8 ran into so we can mention it on the tech pages or elsewhere
-
vanitasvitae
Yagiza: for which client are you doing your implementation?
-
Yagiza
vanitasvitae, eyeCU.
-
COM8
It were some general problems with understanding What the XEP wants from me and which parts comes from libsignal and how it is used in combination with OMEMO. Quiet abstract without a concrete example - at least for me. I had planned to create a PR with changes to the wording and adding some more examples but on the Sprint in Berlin I was talking to people which mentioned there would be some planed changes to the XEP so I will wait until they have been merged before I start updating it.
-
Yagiza
COM8, ok
-
pep.
COM8, I don't think these changes are coming soon tbh, most of them might be breaking from what I understand. So if yours are cosmetic, do PR
-
COM8
pep: Ok thanks for the information - will start working on it.
-
COM8
Is it only me or is somebody else getting duplicate messages in here since ~3 days
-
Ge0rG
COM8: must be you
-
Ge0rG
COM8: must be you
-
COM8
Ok 🤔
-
jonas’
Ge0rG, you troll.
-
Ge0rG
SCNR
-
lovetox
You have to understand the signal protocol and librarys that implement it first
-
lovetox
then you read the XEP and learn how you can wrap that for xmll✎ -
lovetox
then you read the XEP and learn how you can wrap that for xmpp ✏
-
lovetox
RFCs for xmpp also dont describe how TLS works, you have to understand what TLS is, that there are librarys for it, how to use these librarys, and then you read the XMPP RFC, on how to use it in context of XMPP
-
lovetox
So yes if you have no idea what the signal protocol is and how to use the librarys and expect the XEP tells you all that, this will not work out
-
Yagiza
Daniel, so, I use Signal Protocol session to encrypt key/IV pair instead of messagea. And messages themself are encrypted with that key/IV pair, which a generate randomly right?
-
Daniel
Yes
-
Daniel
The IV isn't encrypted. But yes
-
Yagiza
Daniel, so, then.. what is GCM authentication tag, whih I need to concatenated with a key?
-
Daniel
Yagiza: your gcm library will either give that to you or append that to the cipher text
-
Yagiza
Daniel, IC.