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.