How to Use
Enter range:
- SG primes: p where 2p+1 is prime
- Safe primes: The 2p+1 values
- Count: In range
Cryptographic Use
In Diffie-Hellman, we need prime p where (p−1)/2 is also prime. This is exactly 2q+1 where q is Sophie Germain. Ensures the multiplicative group has a large prime-order subgroup, preventing Pohlig-Hellman attacks.
Cunningham Chains
A chain of primes where each is 2×previous+1: p, 2p+1, 4p+3, 8p+7, ... The longest known chains have 19 elements. SG primes start chains of length ≥2.
Step-by-Step Instructions
- 1Enter upper bound.
- 2Find SG primes.
- 3View safe primes.
- 4Explore chains.
- 5Count results.