This question is similar to this one, so let me elaborate what I'm struggling with.
I want to get the length/strength of the key used by the server during the key exchange and authentication, i.e. public key size for RSA, prime field size for DHE and so on.
So the way I understand it, the
subject's public key and
KeyUsage bits in the TLS certificate should be the values I'm looking at.
Now suppose the server has a TLS certificate with a RSA public key. Additionally the following KeyUsage bits are set:
Furthermore let's assume the server only supports the cipher suites
In the case of the first cipher suite the key provided in the certificate can be used to exchange the bulk encryption key and authenticate the server.
My questions are:
What happens in the case of the second cipher suite?
- Can the server return a different certificate chain, where the leaf certificate contains a different key?
- Is the RSA key used to only sign the key exchange parameters?
What happens if the keyEncipherment (and/or digitalSignature) bit is not set?
- Can I assume that it is always set in leaf certificates?
Is there a rule of thumb how to handle all the different combinations of key exchange and authentication algorithms?