The program Scallion can generate vanity PGP keys and .onion addresses using the following method:
- Generate RSA key using OpenSSL on the CPU
- Send the key to the GPU
- Increase the key's public exponent
- Hash the key
- If the hashed key is not a partial collision go to step 3
- If the key does not pass the sanity checks recommended by PKCS #1 v2.1 (checked on the CPU) go to step 3
- Brand new key with partial collision!
As RSA is susceptible to various attacks when its parameters are not properly selected, e.g. small difference of prime factors, does this method of iteratively increasing the public exponent yield any weaknesses in the generated keys?
Of course, it is possible to generate a key with a fingerprint you desire using gpg
itself but it is much slower.