How Public Key Cryptography Works

What I understand in RSA is that Alice can create a public and private key combination and then send the public key to Bob. And then Bob can encrypt something with the public key, and Alice will use the public and private key to decrypt it.

However, how can Alice encrypt something that needs to be sent to Bob? How did Bob decipher it? I ask because I am curious how, when entering my banking site, my bank sends me data such as my online applications. How does my browser decrypt this information? I do not have a private key.

+6
cryptography rsa public-key
source share
8 answers

Simple, you need a key.

SSL / TLS solves this problem by creating a symmetric session key during connection setup. Public key cryptography is used to set up this session key, which is then used for bi-directional data transfer. More on TLS

+3
source share

Basically the procedure:

  • The client connects to the server and requests a server certificate. The certificate contains the public key and server identifier information.
  • Assuming the client is satisfied with the server identifier, it generates a random number P and encrypts it using the server’s public key.
  • Only the server can decrypt P (with its private key, and not with anyone), so when the client sends an encrypted random number to the server, the server decrypts it.
  • The client and server use P to create a symmetric key for use in the symmetric encryption algorithm, in safety, knowing that only the client and server know the P value used to generate the key.
+7
source share

Alice will use the public and private key combo to decrypt it

Alice will simply decrypt it with her private key.

However, how can Alice encrypt something to be sent over to Bob? How would Bob decrypt it?

Alice will need Bob’s public key to send something to him. As a rule, public key encryption is used for authentication, rejection (for example, signing) and distribution of symmetric keys (which are faster to encrypt / decrypt long messages).

+4
source share

I did not create this, but someone shared this video with me, and this helped the theory make much more sense. As always, the devil is in the details (implementation).

http://www.youtube.com/watch?v=YEBfamv-_do

+2
source share

In a general note, I have been trying for a long time to understand public key cryptography, as well as other PKI elements, such as digital signatures and certificates, in preparation for Microsoft C # certification.

I came across an explanation in the form of a short and detailed PDF document on cgi.com. I know this before the good old Alice and Bob! but it really cleared me up for me with my charts and notes, and also raises some thoughts that provoke questions in the end. Would definitely recommend it.

Visit http://www.cgi.com/files/white-papers/cgi_whpr_35_pki_e.pdf

+2
source share

In this situation, Alice will use Bob's public key to encrypt the data, and Bob will then decrypt it with his private key.

Essentially, the public key encrypts the data, and the private key decrypts the data. Since each user has both a public and a private key, you can safely send data to any other user.

0
source share

However, how can Alice encrypt something that needs to be sent to Bob? How did Bob decipher it? I ask because I am curious how, when entering my banking site, my bank sends me data such as my online applications. How does my browser decrypt this information? I do not have a private key.

Here you are mistaken; you have a private key. As part of the communication process, each side generates two keys: a public key and a private key. The client sends its public key to the server, which will use it to encrypt all the data sent to the client. Similarly, the server generates both keys and sends its public key to the client, which will use it to encrypt all data sent to the server.

In many scenarios, the asymmetric key algorithm is used only to exchange another key, which is designed for the symmetric algorithm.

0
source share

If you connect to the site of your bank, it works a lot of cryptographic things. Most importantly, you use the bank’s public key to send part of the information to the bank, because on each SSL (https) connection server, send the client its public key, packed as a certificate.

The use of certificate and worldwide PKI is important. You want to be sure that if you give the bank your bank pin, then on the other side is really your bank, not the other person. This will be solved because each computer has a small number of public keys of well-known organizations (for example, VeriSign), and the bank sends you not only its server public key, but also a certificate. certificate is a message signed by VeriSign, for example: "this public key is valid from XYZ bank". Therefore, since you have the VeriSign public key, you can first verify that the server’s server certificate is correct. Therefore, you can be sure that you are really communicating with your bank .

0
source share

All Articles