A software developer has demonstrated a way to place a readable message inside the public key of a functioning RSA certificate, turning a normally opaque cryptographic value into a form of technical protest art. The experiment produces a certificate that can still be used by a website, although its author cautions that the generator does not test every possible weakness in the resulting key.
RSA public keys contain a modulus formed by multiplying two large prime numbers. Certificate authorities commonly accept 2,048-bit or 4,096-bit moduli while requiring the usual public exponent, 65,537. The developer behind the BadCert project used the much larger modulus as the space for a message, targeting characters that become visible when the key is displayed in Base64.
The process begins with two randomly selected primes and their product. The software changes bytes in the upper portion of that product so its Base64 representation contains chosen text. Because the altered number is no longer necessarily the product of the original primes, the program keeps one prime, calculates an approximate replacement for the other and searches nearby for a prime value. Small changes to that second factor mainly affect the lower portion of the modulus, allowing the message in the upper portion to survive.
The resulting prime pair can then be used to construct a conventional RSA private key. A certificate-signing request containing its corresponding public key can pass through an ordinary certificate-authority process. Renewal still requires the normal certificate challenge, but the author says the request can be submitted again through automation.
The technique does trade away some randomness by fixing a substantial part of the modulus. The project argues that related methods have been studied for key compression and that retaining enough unknown key material should preserve practical strength. That assessment is the developer's, not an independent security audit. The generator also does not check whether its primes are unusually close or whether the private exponent is dangerously small, two conditions the author identifies as potential problems.
Modern TLS generally uses ephemeral key exchange, which provides forward secrecy for recorded traffic even if a certificate's private key is later compromised. A stolen key can still enable active impersonation in relevant circumstances, however, so an experimental generator should not be treated as a substitute for reviewed production tooling.
The demonstration is ultimately about the flexibility hidden inside a standardized credential. Certificate viewers usually present RSA parameters as meaningless encoded data. By carefully choosing the factors behind the modulus, BadCert shows that the same field can carry a human-readable message and remain mathematically usable.



