What is asymmetric encryption

problem background

What is symmetric encryption_RealPanda_'s Blog-CSDN Blog

Xiaohong told Xiaolu in advance: "Any word I write to you in the future will push back one letter. For example, I will become J, and L will become M. In this way, after you receive the letter I wrote, Push all the letters forward one, and you know what I want to say." This method is the most basic encryption algorithm in cryptography, symmetric encryption.

However, the symmetric encryption method will face many problems. For example, although Xiaohei does not know what Xiaohong's encryption method is, he can use various methods to try out the key again and again. For example, in English, the frequencies of 26 English letters are different, and he can guess the key by the frequency method.

Xiao Hei who guesses the key can unscrupulously unlock any information between Xiao Hong and Xiao Hei in the future. This is the problem that asymmetric encryption can solve.

Introduction

Unlike symmetric encryption algorithms , asymmetric encryption algorithms require two keys : a public key (publickey) and a private key (privatekey). The public key and the private key are a pair. If the data is encrypted with the public key, only the corresponding private key can be used to decrypt it; if the data is encrypted with the private key, only the corresponding public key can be used to decrypt the data. decrypt. Because encryption and decryption use two different keys , this algorithm is called an asymmetric encryption algorithm .

example

Symmetric encryption is that Xiaohong locks the file with a lock and sends it to Xiaolu, and then Xiaohong sends the key to Xiaolu (the key is easy to be stolen during this process), and Xiaolu gets the lock and key to unlock the file.

Asymmetric encryption means that Xiaohong wants to send a file to Xiaolu. Xiaolu sends her own lock to Xiaohong. After Xiaohong locks it, she gives it to Xiaolu. ) to unlock its own lock (public key), so that there is no need to worry about the key being stolen during the transfer process.

References

1.Asymmetric Encryption - Simply explained

Guess you like

Origin blog.csdn.net/LDDlove_java/article/details/126980606