GnuPG card && using the backup secret key

Matthias Apitz guru at unixarea.de
Tue Jun 13 12:51:01 CEST 2017


El día martes, junio 13, 2017 a las 11:58:51a. m. +0200, Werner Koch escribió:

> On Mon, 12 Jun 2017 20:12, guru at unixarea.de said:
> 
> > create some backup of the secret key into a file. It is totally unclear
> > to me how to make something usefull out of this file, for example import
> > it into a "normal" secret keyring to use it in case of the GnuPG acrd
> 
> To try it you best insert a new or scratch card.  Make sure your
> _public key_ exists.  Then run
> 
>   gpg --edit-key YOURKEY
> 
> and at the prompt enter
> 
>   bkuptocard FILENAME
> 
> the FILENAME is the sk_foo file.  You will then be asked where to store
> the key on the card (Signing, encryption, or authentication key).
> 

I tried (~/.gnupg-test is a copy of my normal GNUPGHOME):

$ cd .gnupg-test/
$ GNUPGHOME=`pwd`
$ env | grep GNU
GNUPGHOME=/home/guru/.gnupg-test

$ ls -l sk_61F1ECB625C9A6C3.gpg
-r--------  1 guru  wheel  1865 May 14 20:29 sk_61F1ECB625C9A6C3.gpg

$ gpg2 --edit-key sk_61F1ECB625C9A6C3.gpg
gpg (GnuPG) 2.1.19; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: key "sk_61F1ECB625C9A6C3.gpg" not found: No public key

$ gpg2 --import ../GnuPG/ccid--export-key-guru.pub
gpg: key 47CCF7E476FE9D11: "Matthias Apitz (GnuPG CCID) <guru at unixarea.de>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

The file "ccid--export-key-guru.pub" was created from the card with:

$ gpg2 --export --armor > ccid--export-key-guru.pub

	matthias

-- 
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  ☎ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: </pipermail/attachments/20170613/dd89902e/attachment.sig>


More information about the Gnupg-users mailing list