Arija A.'s Webshrine for Safe & Sophie Germain Prime Numbers

Safe and Sophie Germain primes form the set Kn, numbers where p is prime, 2p+1 is prime, and (p-1)/2 is prime. These numbers captivate me because they combine rarity, structure, and aesthetic symmetry. Each of these primes tickle my brain due to their interesting mathematical and aesthetic properties.

# Origin of My Obsession

The obsession began in early 2024 when I was going down the quantum computing rabbit hole and ended up on the Wikipedia page for Safe & Sophie Germain prime numbers. These special primes caught my eye because they have properties that make them resistant to some classes of attack, even some quantum-level ones. That felt interesting. I asked myself: Maybe RSA isn't entirely doomed in the quantum future after all? Which further deepened my curiosity, and has turned into a hyperfixation since.

# Aesthetic Fascination

The numbers alone weren't "aesthetic" enough for me on their own per se, doesn't mean that the numbers aren't beautiful - they are - but I mean bit level aesthetics and properties. I started adding my own extra rules to make them both interesting and cryptographically secure...er?

Every member of Kn has n bits exactly, n/2 transitions from 0 to 1 or 1 to 0, and exactly half its bits set. It's neat, it's symmetric, and it feels good. These constraints give a nice balance of entropy and structure, make the primes ridiculously hard to find, and make them really satisfying and beautiful. Modern CPUs struggle to stumble on one by chance.

# Cryptographic Implications

These primes make me wonder: would a quantum computer actually do any better?

If yes, that might mean RSA still has a pulse, but also that these primes could be useful for something else entirely. Maybe they could form the core of a new cryptosystem - one that uses the encoding feature of primes: p, (p−1)/2, and 2p+1. It's an elegant idea, using structure itself as security. True that ECC exists for security purposes, but I am not here for pure pragmatic implications, but to find something stranger, more symmetric, unique, maybe even more powerful? Who knows.

And honestly, they just make me happy. There's no proof that infinitely many exist. Nobody knows how the bit rules affect their density. The maths around them is like a fog - you can see shapes moving but can't tell what they are yet.

# Generation Program

Back when my obsession started I wrote my own generator program - genprime.c, efficiently compiled with compile.sh - and I've been refining it for a while now. It started slow, painfully slow, and now it can find a 512-bit Kn with all my bit restrictions in just a few seconds, and a 1024-bit one in about 20-30 minutes. Every new optimisation feels like another little victory.

But, generally, idk, these primes tickle my autism like nothing else. I could yap about them all day long.

# Properties of These Primes

  1. Primality Conditions

    1. p is prime
    2. 2p+1 is prime
    3. (p-1)/2 is prime
  2. Bitwise Structure

    1. p is exactly n bits long
    2. Half of the bits in p are set
    3. Transitions between 0 & 1 occur n/2 times
  3. Modular Constraints

    1. p mod 12 is 11
    2. 3 and 12 are quadratic residues
    3. p - {3, 4, 9, 12} are quadratic nonresidues

These are pretty much the most useful ones in using digital computing to find these primes. There are other properties though!

# Favourite Primes

  1. 17533046421132021796857791897465644968146809455990366530806058132585600975387877385336523206676920015718305188725329192003004993041300670314023014496494840976678389134279418320723672504341559751583943820720539525712415674995661058364889113572816923710290486193828400489264649823632451000198262233036831252236697374384459598432496470857631908780255908198112850704155412223902608362354071760685437900931592268455834367713836033752301914405407348247605499717144203311890210226114365986163693547802287263571221263413494899357422611992140773589324261186988084912417571492940984972166315100103805599927901264432241618044359
  2. TBD :D

<- Back to shrines list