Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bwesterb/germain
Counts safe primes
https://github.com/bwesterb/germain
cryptography estimate germain safe-prime
Last synced: 24 days ago
JSON representation
Counts safe primes
- Host: GitHub
- URL: https://github.com/bwesterb/germain
- Owner: bwesterb
- License: gpl-3.0
- Created: 2013-03-17T15:34:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-08T07:52:37.000Z (over 11 years ago)
- Last Synced: 2023-03-11T03:27:27.313Z (over 1 year ago)
- Topics: cryptography, estimate, germain, safe-prime
- Language: Python
- Size: 156 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
germain
=======These are a few small Python scripts to estimate the relative density
of the safe primes in the normal primes. `p` is called a safe prime
if `(p - 1)/2` and `p` itself are prime.
Conversely, if both `p` and `2p+1` are prime, then `p` is called
a Sophie Germain prime.
For quite a few of cryptographic algorithms it is advised to
use safe primes.
Finding a b-bit safe prime is simple: simply generate a b-bit random prime and
then check whether it is safe. It is simple, but it takes some time.
To estimate how long, we are interested in the relative density:
the fraction of b-bit primes that are safe.To help out, clone this repository and run:
apt-get install python-crypto python-gmpy
python germain.py my-name