HTTPS symmetric encryption and asymmetric encryption

Symmetric encryption

The client and server communications are encrypted with the same key.

Advantages: Good performance, simplicity quickly.

Cons: But for the first time how to communicate key is transmitted to the client without being intercepted.

Asymmetric encryption

Private key can only be decrypted with the public key, the public key can only be decrypted with the private key

The server has its own private key and a public key transmitted to the client, the client's information transmitted through public key encryption server, the server decrypts the reply.

Pros: the client's information can not be read by others.

Cons: Everyone server information can be intercepted, and can masquerade as the server.

Digital Certificates

Server with its private key to generate a public key and contains a public key and owner certification authority, certificate

After the client downloaded authorities can determine whether the owner of the public key and corresponds to the public key cryptography own public and private keys to the service end,

Server get client after public and private, through his private key public key encryption client to the client

In this way, the client and server have their own public and private key are encrypted with the public the other side of the communication, to ensure safety.

Disadvantages: performance is not as good symmetric encryption.

HTTPS mode of operation

Public and private symmetric encryption keys for transmission, since this is a symmetric key.

Guess you like

Origin www.cnblogs.com/jimmyhe/p/11263521.html