Horible public key tricks
A developer demonstrates how to manipulate RSA public key moduli to hide custom text messages inside a valid Let's Encrypt TLS certificate.
summary is enough A quick, entertaining read on embedding text into RSA moduli, though the core trick is mostly a humorous novelty.
summary
The author explores ways to bypass or mock the bureaucratic hurdles of modern TLS certificates by embedding custom text messages directly into RSA public key moduli. By slightly tweaking prime numbers during key generation, the resulting base64-encoded modulus contains readable ASCII text while remaining mathematically valid enough for a Certificate Authority to sign. The resulting certificate functions normally for web traffic while displaying hidden jokes or messages in its public key data. Although it lowers key entropy, forward secrecy in modern TLS makes it safe enough for a personal website.
key points
- RSA moduli can be manipulated during key generation to embed custom ASCII text when base64 encoded.
- The modified modulus requires adjusting the second prime and rounding to the next prime number to maintain a functional private key.
- Certificate authorities like Let's Encrypt will successfully sign these modified keys as long as standard requirements are met.
who should read it
Software engineers and crypto enthusiasts interested in whimsical abuses of the Web PKI.
discussion positive
consensus
Commenters enjoy the quirky demonstration and note prior art from 2014, while debating whether certificate authorities should perform sanity checks on private keys.
pushback
Some point out that minor key manipulation or bad entropy choices could weaken encryption, though modern TLS forward secrecy mitigates passive eavesdropping risks.
All serious attackers are man-in-the-middle attackers (usually by tricking victims into diverting their own traffic, not literally by inserting themselves into the network path). Passive-only attackers went extinct along with the backbone-connected Sun servers that were used to launch those attacks.
I don't so much care about the rest of this analysis, but you can't call an unauthenticated TLS session "secure".
It points out that all serious modern attackers use man-in-the-middle methods rather than passive eavesdropping, making unauthenticated sessions inherently insecure.
Generated by an LLM from the article and thread. Check the sources before relying on it.