-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Message Agreement #55
Comments
Thank you, this is very valuable input. As discussed, I think this attack is a demonstration of the underlying problem of the missing message agreement. I like more variant 1, because in avoiding signature we both avoid to introduce another cryptographic primitive, and keep DH related message repudiation (deniability). While thinking about variant 1, I am wondering if the more common way to achieve the same is by doing the partial DH shares, and then using them to derive a key, as X3DH does. In trying to understand that, I have taken a stab at demoing the protocol using PQXDH (which has the side benefit of introducing PQ resistance for message secrecy). Due to the asymmetry in the protocol, there are some limitations as we will see, and I am uncertain if we would inherit the same properties due to this changes.
It has been implemented manually directly from the official specification. As we can see in Similarly, when when a journalist is sending to a source, such as in When doing journalist to journalist, Both A returning source could potentially do a full PQXDH too, since now the source is known Furthermore, this makes decryption more complex I am quite sure the journalist will have to do more decryption attempts (such as, all the ephemeral keys for every know source already known). |
In better readable format with the requirements to run it here. Memo: for simplicity now I am using a single long term PQ key, which would not provide forward secrecy in the PQ domain. Let's think about this after :), Signal uses them interchangeably, as they are used only for encryption and not for authentication The consideration here, is that we already have 3 set of key (plus the PQ one) for every participant, and the one time (or ephemeral keys) for the journalist. This actually matches 1:1 PQXDH, if we use all of them including the fetching key. Then way I applied it is by is by considering:
This is how a run of the protocol should work with this set of keys. Now with these matching, let's picture the 3 different types of exchanges. Source to JournalistThis is a first contact message between a secret party and a public party. Source shared key computation
Journalist shared key computation (trial decryption with the set of (JE, ...))
The journalist can compute the shared secret by knowing only the ME public key, and the PQ CT. Questions
Journalist to source
Journalist to JournalistWhat a joy:
There is a subtlety here, that of course the journalist does not know from whom the message is coming, thus they have to try. So they have to try as if the sender was a source, all n JE, and then all n JE * the number of journalists. If we assume that replying sources, can also add their DH1, because now their identity is known, then the jourenalist would also have to try the total number of sources * n JE.
If we want to use ephemeral or semi-ephemeral PQ keys, we have to pair them in couple with the classical journalist ephemeral keys, otherwise we'd get another quadratic increase in trial decryption complexity. Note: noticed that what I called a clue in the code is not consistent with the README and even the blog post nomenclature, but the message fetching part is demoed just to show everything can work together, and it is not really the point. But we should really start fixing the docs. Also doing this would finally close #48 (partially), #31, #30. |
We came up with another variant to get message agreement. From a high level perspective: the sender encrypts its public DH share The KeyGeneration algorithm works as follows: Source:
Journalist:
Note that
For example, The encryption from source to journalist would look as follows: (assuming it has access to the newsrooms keys and verified journalist's keys
Since this version relies on the source's longterm key for encryption, we would lose secrecy in case of the sender's (in this case the source's) longterm key being revealed. We can extend the scheme by incorporating an ephemeral key
Note that you have to include the intended recipient For messages from journalists to sources, it works very similar:
We can discuss whether We were able to prove message agreement in the symbolic model (Tamarin) under this scheme. |
We've done a toy implementation of this DHETM-based encryption scheme in https://gist.github.com/cfm/dab18074b9cecb06cbd006e1ab7ede7f and will be happy to proceed this way, @lumaier. Thank you for the proposal! |
Problem: The current protocol draft has no message agreement. In general, message agreement is concerned whether the sender and receiver have a shared understanding of the messages exchanged. Non-injective agreement guarantees that if$B$ receives a message $msg$ from $A$ , then $A$ has sent $msg$ to $B$ .
The attack works as follows: Source$S$ wants to send a message $m$ to journalist $J_1$ of newsroom $NR_1$ . If the longterm signing key $sk_1$ of $J_1$ was leaked, $sk$ can be used by an adversary to sign an ephemeral encryption key $ek$ of a different journalist $J_2$ (enrolled at a different newsroom $NR_2$ ). This key $ek$ - which the source believes belongs to $J_1$ is used to encrypt the message $msg$ . The ciphertext is then relayed to $J_2$ by an active network adversary. Hence $J_2$ of $NR_2$ receives and decrypts the message, even tough $S$ intended to send the message to $J_1$ of $NR_1$ .
We propose two possible approaches: Both work with the assumption that from the POV of the source, a particular newsroom$NR$ is the intended receiver (not a journalist - journalists only act on behalf of the newsroom).
Here how the protocol encrypts a message$msg$ using an ephemeral key $m$ :
Variant 1: Incorporate the newsroom identity in the message and use the source's long-term key$s$ as part of the encryption key. (In red our changes)
The encryption key incorporates the source's long-term secret$s$ but masks it using the ephemeral key $m$ (identity of source is not leaked with $\hat{m}$ ). The journalist checks whether $g^s$ and $m$ were used to encrypt the message (gives origin authentication) and by including the intended newsroom $NR$ (since no adversary can tamper with the message without knowing $k$ ), the journalist can verify the source's intention. Without including $NR$ , the ciphertext can still be relayed to a different journalist.
Variant 2: Incorporate the newsroom identity in the message and let the source sign the message using its longterm-secret$s$ .
The journalist first decrypts the message and then checks whether the source with knowledge of$s$ has sent the message.
Security: We were able to prove that both variants guarantee non-injective and injective agreement between sources and newsrooms on messages in the symbolic model.
The text was updated successfully, but these errors were encountered: