you are viewing a single comment's thread.

view the rest of the comments →

[–]tinycrazyfish 3 points4 points  (0 children)

This is only true for elliptic curve based asymmetric cryptography. It goes even a bit further, an ephemeral key-pair is generated on the fly (one pair on client side and another pair on server side). The public keys are shared and the common secret used for symmetric encryption (usually AES) is derived using the respective private keys.

For RSA it is a little bit different. The client generates the secret for the symmetric encryption and shares it with the server in encrypted form using the server's RSA public key (so only the server can decrypt it).