Skip to content
Generate a random prime number of bit length n
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit May 3, 2016
README.md
prime.py

README.md

generate-primes

Python implementation of Fermat's primality test to generate prime numbers of any bit length.

Use

generate_big_prime(n)
# Generates a random prime number of length n bits

Warning

The primes generated by this algorithm are not safe for cryptographic use.

You can’t perform that action at this time.