3 comments

[ 3.0 ms ] story [ 16.6 ms ] thread
I did something similar some time ago, targeting base64 representation instead of cpu instructions:

https://ondergetekende.nl/vanity-rsa-public-key.html

There's quite a bit of room in an RSA key for arbitrary contents, especially if you don't care about the security of said key.

The first post from my blog that made the #1 slot on hackernews was this one:

https://rya.nc/cert-tricks.html

and I actually have had a vanity ssh key generator online for years:

https://rya.nc/ssh-vanity.html

I looked at your code - I was not aware of the rsa_crt_* functions, those are handy!

Your routine for picking nearby primes is interesting - are you aware of any attacks that are possible if that debiasing isn't done?

I'm not aware of any attacks based on the primes that roll out of the inverse base64 algo, I just added that as a precaution.