Bad news: I forgot a GnuPG secret key passphrase.
Good news: I do know the words it is constructed of. So, I can easily use john
or similar to recover (too many combinations to do it manually, though).
Problem: The secret key is not in the secring.gpg
format that john
understands, but in some new format, apparently distributed across 2 files, in
~/.gnupg/private-keys-v1.d/0123456789ABCDEF0123456789ABCDEF01234567.key
and
~/.gnupg/private-keys-v1.d/123456789ABCDEF0123456789ABCDEF012345678.key
(files renamed for this question, obviously) created within the timespan of a few seconds - could be pubkey and seckey, if so which one is which?
Could someone please help, maybe by telling me how to extract the (still locked) seckey from these files without a passphrase? An ASCII armor format would be ideal.
Alternatively, maybe someone knows how to feed these files to john
directly?
On a related note: Can I enforce the secring.gpg
format in GnuPG
? I share /home
between systems with different versions of GnuPG
and don't want to duplicate key files.
Thanks.
PS: Since I already have files encrypted with the key a revocation and replacement would not be a viable solution.