0
$\begingroup$

Can someone which is not authorized be able to listen between the conversation of 2 clients and catch the key? Because if I understood correctly one client needs to send the key through a channel so the another client could decrypt the data... So yeah that's my question; Can someone not authorized in that time frame catch the key and then start decrypting any data that passes through that channel?

$\endgroup$
0
$\begingroup$

No. If you use an appropriate key exchange protocol, eavesdropping cannot allow an adversary to retrieve the key. For example, see the Diffie-Hellman key exchange.

$\endgroup$
  • 2
    $\begingroup$ That's not restricting to symmetric encryption, which is mentioned in the queston's title. Further, DH is only immune from the passive king of eavesdropping, and fails to MitM. $\endgroup$ – fgrieu May 10 '18 at 11:32
  • $\begingroup$ DH is used to bootstrap symmetric encryption protocols in practice, including protocols where a man-in-the-middle is included in the threat model. Furthermore, I assume the author means eavesdropping through the use of the term "listen between the conversation", although my answer works in any case becaue Diffie-Hellman can be authenticated. $\endgroup$ – dionyziz May 10 '18 at 11:35
  • $\begingroup$ Hmmm Interesting... Yeah I was like more centered on the MitM attack, So you are saying that if you use the DH exchange protocol it will give you a secure channel? Then why people uses Asymmetric encryption instead of SE? Symmetric is more faster and has the same security level... with Same security level I mean that nobody can catch the key if using that protocol. If nobody can catch the key then the data will be never decrypted... then it's better to use symmetric rather than asymmetric encryption? $\endgroup$ – VladiC4T May 10 '18 at 11:48
  • $\begingroup$ In practice, both symmetric and asymmetric are used together. The asymmetric part, like the DH protocol, is used for bootstrapping the symmetric key. Subsequently, the symmetric protocol is used for data exchange. $\endgroup$ – dionyziz May 10 '18 at 11:53
  • 1
    $\begingroup$ @fgrieu There are means to exchange a key even if the parties haven't communicated it in an authenticated manner at all. For example, the Socialist Millionaire Protocol can be used to establish a key based on the fact that both of them share the same secret answer to a question (which, however, may not have high enough entropy to form a key itself). OTR uses it to establish keys for the first time. $\endgroup$ – dionyziz May 11 '18 at 6:41
2
$\begingroup$

In this answer I shall assume that the two relevant parties already share a strong symmetric key (ie not a password), which may have been established by e.g. using appropriate key agreement techniques (such as those used by TLS which may use asymmetric cryptography) or by e.g. physical, secure courier transport.


No, an attacker cannot learn the key or anything about the messages except their lengths if an appropriate (set of) encryption mechanism is used. In these protocols, the symmetric key is usually used to derive encryption and authentication keys and these are used to encrypt and authenticate messages between the parties. Man-in-the-middle attacks are then thwarted by the security of the symmetric-key encryption schemes as well as by the fact that the other party is authenticated by knowledge of the relevant symmetric key.

Additionally, sometimes the symmetric key is combined with the result of a run of the Diffie-Hellman protocol to gain extra security properties such as that when the symmetric key is leaked in the future, no past sessions can be decrypted.

One example set of protocols, that achieves these security properties given a shared symmetric key is the PSK ciphersuites from TLS.

$\endgroup$
1
$\begingroup$

The key needs to be established. When a key agreement protocol such as Diffie-Hellman (DH) is used then the same key (seed) is calculated on both sides, but the key is not send, not even encrypted.

If the key can be caught depends on the protocol.


With non-authenticated DH you might be tricked in establishing a key with an adversary. This is considered an active attack (so the attacker needs to be able to do more than just listen / eavesdrop). But it is an attack that doesn't even require an attacker to compromise the connection between the two parties.

In the end you cannot reliably send encrypted information to somebody that you cannot trust in some way or another.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.