Creating Unique Fingerprint
kirelagin at gmail.com
Mon Jun 19 08:30:08 CEST 2017
The easiest strategy, of course, is to simply use gpg to generate a key and
check its fingerprint until you get the one you need (see batch mode).
Generation of an RSA 2048 key is taking around a second, so e.g. for your
example #1 (four bytes fixed) we are talking tens of hours or ones of days.
In case you need something better, you’ll have to get inside the public key
packet. Basically, fingerprint is a hash of the actual public key material
and its creation timestamp, so if you do not care much about creation
timestamps, you can bruteforce _them_, which will be much faster. This way
you might get a timestamp that doesn’t make sense (e.g. in the future) and
some implementations can potentially become upset, so you either accept
that or choose timestamps carefully.
If you don’t need the key to actually work, that is, be able to
encrypt/decrypt, then you can safely brute force its other parameters, such
as p, q and e.
I do not know if there are tools around, but hacking GnuPG code should not
be too difficult.
On Mon, Jun 19, 2017 at 6:44 AM Long Si <longsi0008 at gmail.com> wrote:
> I am on Linux, and would like to generate a key with "unique 40"
> eg 1: Starts with ABCD XXXX ... XXXX
> eg 2: Starts with AXXX XXXX ... XXXA ends with A
> eg 3: XXXX ... XXXX without any '0' character at all
> How would I go about writing such a script? Don't mind running for
> months to get these sets.
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gnupg-users