I'm reading about Signal Protocol and X3DH Protocol. In the X3DH Protocol, Alice sends a initial message to Bob encrypted with a Shared Key(SK). This SK is calculated using (this section):
DH1 = DH(IKa, SPKb)
DH2 = DH(EKa, IKb)
DH3 = DH(EKa, SPKb)
DH4 = DH(EKA, OPKB)
SK = KDF(DH1 || DH2 || DH3 || DH4)
Where IKa is the Alice's identity key, IKb is Bob's Identity key, SPKb is Bob's signed prekey, EKa is Alice's ephemeral key and OPKb is Bob's one-time prekey. All these keys are public.
In the next section they describe how Bob receives this message. Bob loads his private identity key and private one-time pre key and does the same steps as Alice does before to derive the SK. I couldn't understand how this SK calculated by Bob can decrypt the message sent by Alice. Alice uses only public keys and Bob uses his private keys. So my question is: How can the SK generated by Bob decrypt the message sent by Alice?
EKA
the same asEKa
? IsOPKB
readable asOPKb
for consistency? How areSPKb
andEPKn
computed in the protocol? The equations in the question show what Alice performs, but what does Bob perform? If that's similar witha
andb
exchanged, isn't the order for the concatenation in the input ofKDF
different? $\endgroup$