Sean Connolly asked in a comment yesterday about the density of safe primes. Safe primes are so named because Diffie-Hellman encryption systems based on such primes are safe from a particular kind of attack. More on that here.

If *q* and *p* = 2*q* + 1 are both prime, *q* is called a **Sophie Germain prime** and *p* is a **safe prime**. We could phrase Sean’s question in terms of Sophie Germain primes because every safe prime corresponds to a Sophie Germain prime.

It is unknown whether there are infinitely many Sophie Germain primes, so conceivably there are only a finite number of safe primes. But the number of Sophie Germain primes less than *N* is conjectured to be approximately

1.32 *N* / (log *N*)².

See details here.

Sean asks specifically about the density of safe primes with 19,000 digits. The density of Sophie Germain primes with 19,000 digits or less is conjectured to be about

1.32/(log 10^{19000})² = 1.32/(19000 log 10)² = 6.9 × 10^{−10}.

So the chances that a 19,000-digit number is a safe prime are on the order of one in a billion.