In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to carry out RSA algorithm analysis and implementation, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
In the field of cryptography, encryption algorithms are mainly divided into symmetric encryption and asymmetric encryption. With the increasing security requirements in the information age, symmetric encryption is gradually abandoned because it is easy to be cracked. At present, RSA algorithm is a popular asymmetric encryption algorithm in the cryptography world, which is named after the abbreviations of the three names of its inventor Rives,Shamir,Adleman. When it comes to RSA, we have to mention the recent rumor that the Riemann conjecture is no longer safe after the RSA algorithm is fronted. With this question in mind, after describing the principle of RSA, we will talk about whether the Riemannian conjecture has an impact on some current blockchain projects based on the RSA algorithm.
# # * * what is asymmetric encryption? **
Encryption is a special operation on a plaintext message to produce an incomprehensible ciphertext, while decryption is an operation that takes a step forward. Asymmetric encryption requires two keys in the whole encryption process: the public key and the private key. The public key and the private key are a pair, and only the corresponding private key can be decrypted after encrypting a plaintext with a public key. The general process is as follows:
! [img] (https://camo.githubusercontent.com/27cd915d22044d45319ec77faacd2fa3137eb0a7/68747470733a2f2f6d6d62697a2e717069632e636e2f6d6d62697a5f706e672f366472436f6d32725a4834796d4170714b506442766961756658543733324a4a61786f72703856376a63427a516e4e4170354c6759576f5045474671735357574c3264766138397a377452344f7238654d5630763446772f3634303f777866726f6d3d352677785f6c617a793d312677785f636f3d31)
# # * * RSA encryption * *
The formula defined by the process of RSA encryption is as follows:
Plaintext = ciphertext * Dumbledication, encrypted, encrypted, encrypted N*
To put it simply, the result of taking the module N of the E power of the plaintext is the ciphertext. I believe the reader's question here is what on earth are E and N? In fact, E and N here are the public keys of RSA encryption. I have already introduced their usage, and what is usually exposed to other users is the combination of E and N.
# # * * RSA decryption * *
The process of RSA decryption is defined as follows:
Plaintext = ciphertext * Dumbledication, encrypted, encrypted, encrypted N*
If you take the D power of the ciphertext, the result obtained by taking the module N is the plaintext. The combination of D and N here is the secret key of the RSA algorithm, and the N in this step is the same number as the N used in encryption.
# # * * RSA production key pair * *
As can be seen from the above two formulas, it is easy to realize the process of RSA encryption and decryption as long as you know the value of EMagazine DJN. The process of generating these three numbers is described below:
\ 1. First of all, prepare two very large prime numbers p ~ Q. The selection of these two numbers is based on: if the pscore Q is very large, the security of the algorithm will be very high, but the corresponding computing time will increase. General programming languages have corresponding libraries to generate such data. The value N is obtained by calculating the product of p and Q.
\ 2. According to the Euler function, the number of integers not greater than N and coprime with N has (pMel 1) (Q Mel 1). φ (n) = (QMel 1) * (p Mel 1); randomly choose an integer e, requiring φ (n) > e > 1, and e and φ (n) are prime, generally choose 65537 (if the range allows).
\ 3. The public key is generated in the first two steps, and the D required to generate the private key is as follows:
D the conditions need to be met:
one
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.