1
$\begingroup$

How is the server's public key used to encrypt the symmetric key in a way so that only the sever's private key can decrypt the cipher?

The client uses the server’s public key to encrypt the symmetric key and send it securely to the server, and the server uses its private key to decrypt it. Anyone can encrypt using the public key, but only the server can decrypt using the private key.

$\endgroup$
  • 1
    $\begingroup$ What do you exactly want to know? How the asymetric cipher works or how the TLS works? (SSL) $\endgroup$ – gusto2 Nov 24 '17 at 12:56
1
$\begingroup$

That depends on the cipher suite. If the master key is encrypted at all then it is usually encrypted using RSA, which can be identified by ciphersuites starting with RSA_. This requires that the certificate that contains the public key allows encryption.

An other way to establish the master secret is by using Diffie Hellman key agreement. This usually is ephemeral-ephemeral key agreement; DHE_ or ECDHE_ ciphersuites. The ephemeral-static key agreements (DH_ and ECDH_) require certificates containing a Diffie-Hellman public key and these are rare.

Nowadays many certificates only allow authentication, not encryption. They are used together with the aforementioned DHE_ and ECDHE_ ciphersuites. In TLS 1.3 the RSA_ ciphersuites are discontinued as they do not provide forward security: if the private key is ever obtained by an adversary then all the data of all the TLS sessions becomes available to that adversary.

Note that there are even other ways of authentication possible. The method of using RSA encryption is mainly used for older versions of SSL and TLS. So that description you have is 1. completely over simplified and 2. outdated. Read the TLS 1.2 specification if you want to know more.

$\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.