First of all, let’s briefly introduce what asymmetric encryption is composed of.
- information:Information that needs to be encrypted
- Public key: an encrypted password that everyone can know
- Private key: an absolute password that only the party who needs to decrypt knows
- Encryption algorithm: how these passwords interact with the information that needs to be transmitted
- Ciphertext:Secret information after the interaction of information and password
A more detailed explanation can be obtained from here
Asymmetric Encryption Vs. Symmetric Encryption!Below I will explain the working mechanism of RSA
(1) Data sent: Input
(2) Encryption method F1:Input
e/N——Remainder C;
(3) Data transmitted: C
(4) Encryption password: e
(5) Decryption method F2: C
d/N——Remainder output
(6) Decryption password: d
(7) Obtain information: output
(
The key core: Obviously the most important thing above is how e, d and N come from:
1) Choose two prime numbers (prime numbers), P and Q, P*Q=N
2) y=(P-1)*(Q-1)
3) Choose a number e, e∈(1,y), e ⊥ y
4) Calculate a number d; d = (y*k+1)/e; where k is any integer,
the purpose is to make d an integer (obviously as long as there is a lot of k,
also You can get a lot of d that meet the conditions, we only need to take one of them!)
The above is the whole content of RSA. In fact, it is relatively uncomplicated and easy to understand.
Almost all of our current banking systems, radio frequency card encryption systems are based on this principle.
The security of RAS lies in how a large enough number can decompose prime factors. As above, even if you crack C, you also know N. However, if you can’t figure out which two numbers (P and Q) N is calculated from, , y also cannot be known, and d cannot be solved naturally.
Sorry I am not a native English speaker, if I use any words wrong, please correct me, thank you.
The topic data comes from this article:
Principles and examples of RSA and DSA algorithms