The Analysis of Key Generating in RSA
Qian Li · Modern Computer · 2006
In cryptography, RSA is an algorithm for public key encryption. RSA is widely used in electronic commerce protocols, and is believed to be secure given sufficiently long keys. It was proved that the longer the length of the key, the harder it is to be factored. In the text, we will discuss the realization of the key generation, when the user need a key length of more than 1024 bits. In this procedure, we need two large prime numbers. So we must first generate two odd integers and then test the primality of these two odd integers. As an example, one of the more efficient and popular algorithm, the Miller-Rabin algorithm, is described in this text. After generating two prime integers successfully, we can use Euclid algorithm to calculate the public-key and the private-key easily. In the end, the user can use the public key to encrypt and the private-key to decrypt.