corrupted secret keyring

Brian M. Carlson karlsson@hal-pc.org
Wed Jul 17 01:27:02 2002


--zROEGoKAXsG5UqGB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 16, 2002 at 04:25:53PM -0400, David Shaw wrote:
> It's not terribly elegant, but you can use gpgsplit (comes with 1.0.7
> and later) to break your secret keyring into its component packets,
> delete the evil key, and then reassemble.

Elegance is unimportant to me right now. I am all for hacks as long as
they work.
=20
> Basically:
>=20
> 1) cd ~/.gnupg ; mkdir temp; cd temp
> 2) gpgsplit ../secring.gpg
> 3) Find which of the "secret_key" packets is the bad one (run gpg on
>    it to print out the key id) and delete it and the other packets
>    that go along with it (i.e. delete everything until the next
>    "secret_key").
> 4) cat * > newsecring.gpg

The key is a v2 key, 1024 bits, protected with IDEA (which I don't use).
I think it was that the key had the encrypted MPI length problem.

> Then backup your current secring, and give newsecring.gpg a try.

Excellent. It works beautifully.

--=20
Brian M. Carlson <karlsson@hal-pc.org> <http://decoy.wox.org/~bmc> 0x560553=
E7
It is a sobering thought that when Mozart was my age, he had been
dead for two years.
		-- Tom Lehrer

--zROEGoKAXsG5UqGB
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (GNU/Linux)
Comment: Ubi libertas, ibi patria.

iQFKBAEBAwA0BQI9NKv8LRpodHRwOi8vZGVjb3kud294Lm9yZy9+Ym1jL29wZW5w
Z3AvcG9saWN5LnRleAAKCRDlkf/JVgVT50M+B/sGD8yTAqNA9DEaykQFZ0faDjsM
UWtB9gHXi/cj0Nne+gBuRoJBzYOI20J0a0+Pts8b/fuxXA5miVNo5ZvocOdjC7Ri
Me1GYphYWtqfLE/GSeEE3ckfp8dDTRlsyIjho1c0mRzdLRpx6oxHuT7vvfNZGpeQ
1p5DeDpLo6PGfe19FMkagg4mAll2NQR3yJfDQ9AymYlIsnGxIykuEmykxRM7oyK9
lok9RmEHBGqDbbRCy+7abHICqbsnMo7+qC/18vzNP8m7sE6ngqjQmcp8LI3oOlBU
HDdCVSuhHvdMayEBvvXO7CPYFcXeLKjnlyYM2hD71w9vRa2MZy0Q2lHAqAzo
=+Qpk
-----END PGP SIGNATURE-----
Signature policy: http://decoy.wox.org/~bmc/openpgp/policy.tex

--zROEGoKAXsG5UqGB--