iNPUTmice / xeps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PreKey bundles are unclear to me

xnyhps opened this issue · comments

I'm quite confused about the data that is pushed to the 'urn:xmpp:omemo:0:bundles:1234' node.

  • Why is there one <signedPreKeyPublic> element? What is this key for? Are the other 100 <preKeyPublic> PreKeys not signed?
  • What key is used to sign that PreKey? So far, only a Curve25519 key has been created, which is a ECDH curve.

As each PreKey can only be used once, the party that sends their initial PreKeyWhisperMessage later loses this race condition.

  • Why can a PreKey only be used once? As far as I understand, it only weakens the forward-secrecy to reuse a PreKey (compromising the private key of that PreKey could allow decrypting two sessions instead of one). But if the damage has already been done and it has been used by two contacts, why not use the key? Of course it should be erased as soon as possible, but I think it would be fine to delay that until MAM has caught up.

@xnyhps did you answer your own question? Or is there anything left unclear?

My third question is still unanswered. The text in §4.7 and §5 of the current draft seems to only deal with a situation where the receiving device is currently online, not on what to do when synchronizing the messages from MAM. In that situation the receiver can't immediately update the PreKeyBundle, so there's a large risk of many senders using the same PreKey. I think it should recommend to only delete the PreKey private key once the MAM history has fully synchronized.