preface

Short step without thousands of miles, not small streams into rivers and seas. Learning is like rowing upstream; not to advance is to drop back. I’m a hauler who drifts from platform to platform. Today, we simply sorted out some data security and encryption of the interview questions, I hope to be of little help to you. The good ones have already liked it.

What encryption methods are used in SSL encryption and why?

The process of SSL encryption has been done before and will not be described here.

SSL encryption actually uses a combination of symmetric and asymmetric encryption in the process.

The main consideration is to use asymmetric encryption to connect first, so as to avoid a man-in-the-middle attack and the key being hijacked, but asymmetric encryption

Is less efficient. So once a secure connection is established, lightweight symmetric encryption can be used.

RSA asymmetric encryption

Symmetric encryption uses the same secret key for encryption and decryption; Asymmetric encryption algorithms require two keys to encrypt and

Decryption, the two secret keys are the public key and the private key.

RSA encryption

Unlike symmetric encryption, asymmetric encryption requires two [keys] : a publickey and a private key

(privatekey). The public key and private key are a pair. If the public key is used to encrypt data, only the corresponding private key is used

To decrypt; If data is encrypted with a private key, it can only be decrypted with the corresponding public key. Because encryption and decryption are used

There are two different keys, so this algorithm is called an asymmetric encryption algorithm.

RSA Encryption Principle

RSA is a common encryption mode. The following examples briefly describe its encryption principle.

Take two prime numbers at random

conclusion

Learning is not about how much you learn at once, but about how much you keep learning. And I think circles are very important.

circle