exporting secret keys

Atom 'Smasher' atom-gpg at suspicious.org
Fri Apr 16 05:39:44 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I recently wanted to move an ElGamal/DSA keypair to another machine. I
> used the "--export-secret-keys" option to write a keyfile. After
> importing the key on the other machine, it appeared that only the secret
> key had been transferred, but not the public key. I have a few questions
> about this.
>
> -- under what circumstances would you want to transfer ONLY a secret
> key? Shouldn't the public key always go with it? Why doesn't GnuPG do
> this by default?
>
> -- in any case, isn't the public key easily computable from the secret
> key? Or is that only true for RSA?
=======================

you can recover the public key from a private key using gpgsplit, but it's
much easier to just export/import both keys.


> -- this seems like a fairly common thing to want to do. How is it
> supposed to be accomplished? Can you use the "--export" and
> "--export-secret-keys" options simultaneously? I couldn't find any
> mention of this in the documentation.
=======================

i'm sure there are almost as many ways to do this as there are people on
the list ;) here's ~one~ of the ways i'd do it:
  $ gpg --export-secret-key 0x12345678 > key-file
  $ gpg --export-key 0x12345678 >> key-file

copy the "key-file" to the other machine, and run:
  $ gpg --import < key-file


	...atom

 _________________________________________
 PGP key - http://atom.smasher.org/pgp.txt
 3EBE 2810 30AE 601D 54B2 4A90 9C28 0BBF 3D7D 41E3
 -------------------------------------------------

	"TELEVISION IS DRUGS"
		-- Bumper Sticker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
Comment: What is this gibberish?  -  http://atom.smasher.org/links/#digital_signatures

iEYEARECAAYFAkB/VYQACgkQnCgLvz19QePDXACfRLZXRPmI0rRT61HUtHLf8vWD
K5wAoKp8jUkMPKAMll8OefTBytBjl/S+
=M/eO
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list