1
$\begingroup$

In TLS 1.2 and TLS 1.3, does the EC curve used to generate the ephemeral keys at the client side, does it need to be the same as that on the and server sides?

For example can I use secp521r1 at the client side and secp256r1 at the server side, and visa-versa?

I am asking this question, since in TLS 1.2 you can use finite state DHE ciphers to generate the ephemeral keys on the client side and DHE_Export ciphers to generate the ephemeral keys on the server side, thus the Logjam attack.

$\endgroup$
3
  • 1
    $\begingroup$ Um, no. If the curve's different, you can't make the maths agree. $\endgroup$
    – DannyNiu
    Sep 1 at 11:12
  • $\begingroup$ Thank you Danny. This also answers my questions perfectly. $\endgroup$
    – warren
    Sep 1 at 13:36
  • $\begingroup$ Even in Logjam the server and client use the same group, one that may not provide the intended security. For the DHE_EXPORT case (which officially is allowed only in 1.0, but many 1.1 and 1.2 implementations don't correctly deny it) the client wanted to allow a large group but the server is tricked into choosing a small one; the client can either use that group or abort the handshake, but it can't use a different (better) group. The same is true for ECDHE curves. In 1.3 the client can offer any share(s) it wants, but a share is actually used only if the server agrees. $\endgroup$ Sep 2 at 6:23

1 Answer 1

1
$\begingroup$

In TLS 1.3, having a successful handshake with clients using different curves is impossible, besides only with negligible collision(s) in the key schedule/key derivation(page 93).

The reason is that the entire handshake which includes the ciphersuites is hashed and used in the key derivation. If the client and the server use different groups, this results in different keys. Furthermore, the server signs the handshake hash, so the CertificateVerify message(s) will likely not be accepted. Even if that was accepted for some reason, the Finished messages are overwhelmingly likely to fail. This is because the keys used to perform these steps are also derived from the handshake hash.

Therefore, because of all the steps that authenticate the handshake, it's nearly impossible to perform a Logjam type attack on TLS1.3. TLS1.2 is different but, it is very unlikely that two curves may successfully interoperate in the key exchange, besides for implementation issues.

$\endgroup$
2
  • 1
    $\begingroup$ Thank you Marc. That's the answer I was looking for. $\endgroup$
    – warren
    Sep 1 at 13:35
  • 1
    $\begingroup$ nice answer. @warren, you should accept it if it's satisfactory $\endgroup$
    – kodlu
    Sep 1 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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