Skip to content
Finding large prime numbers for RSA
Branch: master
Clone or download
Nikolai Tschacher
Nikolai Tschacher added description
Latest commit 5a6e829 Aug 13, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE added Aug 13, 2018
primes.txt added prime example Aug 13, 2018

Finding large Prime Number for RSA Key Generation

Source code for the blog post on large prime numbers for RSA

The approach in this code is to generate large primes by randomly selecting large integers and then testing them for primality with the Miller-Rabin Primality Test. Due to the prime number theorem, primes must occur with probability roughly P(n is prime) = 2/ln(n). Generated primes are used for RSA encryption/decryption as a sample application.

You can’t perform that action at this time.