Mailing List Archive

Importing backed up card generated key
I've just generated a key pair using my smartcard and asked it to make a
backup which it did. I'm doing a practice restore to see how the
procedure works and I'm a little stuck. I can import my new public key
onto my keyring but when I try to import the secret key it fails to do
so and I get the following output.

$ gpg --import james.davis@ja.net-20070608-secret.gpg
gpg: key D7DDFF42: no user ID
gpg: Total number processed: 1
gpg: secret keys read: 1
$

What should I be doing? :-)

James

--
http://www.freecharity.org.uk/ - Free IT services for charities
http://www.freecharity.org.uk/wiki/ - The VCSWiki

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Importing backed up card generated key [ In reply to ]
James Davis wrote:
> I've just generated a key pair using my smartcard and asked it to make a
> backup which it did. I'm doing a practice restore to see how the
> procedure works and I'm a little stuck. I can import my new public key
> onto my keyring but when I try to import the secret key it fails to do
> so and I get the following output.
>
> $ gpg --import james.davis@ja.net-20070608-secret.gpg
> gpg: key D7DDFF42: no user ID
> gpg: Total number processed: 1
> gpg: secret keys read: 1
> $
>
> What should I be doing? :-)

Sorry to bring up this thread again but I've still not been able to work
out what I should be doing and I'd appreciate any help you can give me
as it's holding back my adoption of the smart card.

Thanks,

James

--
http://www.freecharity.org.uk/ - Free IT services for charities
http://www.freecharity.org.uk/wiki/ - The VCSWiki

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Importing backed up card generated key [ In reply to ]
James Davis wrote:

> Sorry to bring up this thread again but I've still not been able to work
> out what I should be doing and I'd appreciate any help you can give me
> as it's holding back my adoption of the smart card.

I'm making a little progress on this. Someone suggested it was because
gpg was confused by the existing secret key it believed was on the card
but deleting my secret key before trying to import it from the backup
didn't help.

I can use the backed up key using

--secret-keyring ~/sk_B6D49AF9C7335BD1.gpg

and copying sk_B6D49AF9C7335BD1.gpg over ~/.gnupg/secring.gpg works too
but neither are entirely practical. I've got other secret keys which I'd
like to avoid overwriting if it's just my card I've lost. I thoguht I
could do something like

$ gpg -a --secret-keyring ~/sk_B6D49AF9C7335BD1.gpg --export-secret-key
C7335BD1 > mysecretkey.asc but again I end up with a secret key that gpg
refuses to import with an error "gpg: key C7335BD1: no user ID".

Is there some way I can force a user ID upon gpg when I import the key?

James

--
http://www.freecharity.org.uk/ - Free IT services for charities
http://www.freecharity.org.uk/wiki/ - The VCSWiki

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Importing backed up card generated key [ In reply to ]
Hi,

Are you using gpg or gpg2 and what version? gpg2 and card interactions
are not that well tested. If you have problems with scdaemon, I suggest
to use the gpg internal code instead of gpg -> gpg-agent -> scdaemon:

Put a "disable-scdaemon" into gpg-agent.conf, give gpg-agent a HUP and
check that no scdaemon is running anymore (you may just kill it). Then
use "gpg --no-use-agent --edit-key". The command "bkuptocard" may then
be used to store a backup key on a card.

Yes, we really need a howto on recovering smartcard keys.


Salam-Shalom,

Werner





_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users