I am interested in the following question regarding the RSA algorithm: when the client connects to the server, how and where does the key generation and subsequent key exchange take place?
1 answer
If you mean RSA encryption (not to be confused with the RSA signature), then the one who will do the decryption will generate the keys. This can be either a client or a server, it depends already on a specific protocol.
The first party that generates the keys sends the public key to the second party, the second party encrypts something with this key and sends the ciphertext back, and the first party decrypts with the private key.
- let's say the server and client communicate in both directions, it turns out that everyone should have public and private keys, right? and where are these keys generated? everyone on their side? and then there is an exchange of your public keys? - UserLevel0
- It is not necessary for both parties to have their keys. And in general, you can not use only RSA encryption. Anyone who can listen and change traffic can read everything you have encrypted, even in both directions. - Zergatul
- @ UserLevel0 just use https, everything you need is implemented there - Zergatul
- @ UserLevel0 ask new specific questions that are not clear, or look at existing ones, I answered many TLS questions here - Zergatul
- well, I will raise your reputation :) - UserLevel0
|