[Gnuk-users] State of EdDSA in Gnuk / GnuPG

NIIBE Yutaka gniibe at fsij.org
Wed Jan 21 02:56:11 UTC 2015


On 01/21/2015 10:12 AM, NIIBE Yutaka wrote:
> No.  The warning means that you have registered a subkey already,
> haven't you?
> 
> 'KEYTOCARD failed: End of file' is unexpected.
> 
> Let me try to reproduce your failure.  I will be back.

It works for me, even with partially registered subkey (I got
"such a key has already been stored..." message, because of
this).

To debug, please have following file under your GPGHOME (default is
$HOME/.gnupg).  Then, you can get debug information in the log file.

============= gpg-agent.conf
debug-level guru
debug-all
log-file /var/tmp/gpg-agent.log
=============


My environment is Debian Jessie, and my GnuPG is a master branch from
the git repository, and a single patch of following is applied:

    http://lists.gnupg.org/pipermail/gnupg-devel/2014-December/029283.html

Here is the session log.

NOTE:

In GnuPG 2.1.x, main functionality of private keys are under control
of gpg-agent.  Thus, it doesn't ask to save private key changes or
not, like:

	Save changes? (y/N)

So, you need to save private keys in private-keys-v1.d beforehand,
when you want to keep original private keys.


=======================
$ gpg2 --homedir=/var/tmp/gh1 --edit-key 029966F6
gpg (GnuPG) 2.1.1; Copyright (C) 2014 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.

Secret key is available.

pub  rsa2048/029966F6
     created: 2015-01-21  expires: never       usage: SC
     trust: ultimate      validity: ultimate
sub  rsa2048/EE02D161
     created: 2015-01-21  expires: never       usage: E
sub  ed25519/5A3F6884
     created: 2015-01-21  expires: never       usage: A
[ultimate] (1). Niibe Yutaka <gniibe at computer.org>

gpg> toggle

pub  rsa2048/029966F6
     created: 2015-01-21  expires: never       usage: SC
     trust: ultimate      validity: ultimate
sub  rsa2048/EE02D161
     created: 2015-01-21  expires: never       usage: E
sub  ed25519/5A3F6884
     created: 2015-01-21  expires: never       usage: A
[ultimate] (1). Niibe Yutaka <gniibe at computer.org>

gpg> key 2

pub  rsa2048/029966F6
     created: 2015-01-21  expires: never       usage: SC
     trust: ultimate      validity: ultimate
sub  rsa2048/EE02D161
     created: 2015-01-21  expires: never       usage: E
sub* ed25519/5A3F6884
     created: 2015-01-21  expires: never       usage: A
[ultimate] (1). Niibe Yutaka <gniibe at computer.org>

gpg> keytocard
Please select where to store the key:
   (3) Authentication key
Your selection? 3

gpg: WARNING: such a key has already been stored on the card!

Replace existing key? (y/N) y

pub  rsa2048/029966F6
     created: 2015-01-21  expires: never       usage: SC
     trust: ultimate      validity: ultimate
sub  rsa2048/EE02D161
     created: 2015-01-21  expires: never       usage: E
sub* ed25519/5A3F6884
     created: 2015-01-21  expires: never       usage: A
[ultimate] (1). Niibe Yutaka <gniibe at computer.org>

$ gpg2 --homedir=/var/tmp/gh1 --card-status

Application ID ...: D276000124010200FFFE330069060000
Version ..........: 2.0
Manufacturer .....: unmanaged S/N range
Serial number ....: 33006906
Name of cardholder: [not set]
Language prefs ...: [not set]
Sex ..............: unspecified
URL of public key : [not set]
Login data .......: [not set]
Signature PIN ....: forced
Key attributes ...: 2048R 2048R 255?
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 3 3
Signature counter : 0
Signature key ....: 223E C889 ACD0 6E72 70EA  3260 349F 6607 0299 66F6
      created ....: 2015-01-21 01:46:26
Encryption key....: 1EE8 B1CB D862 5ACA 6B26  614F D696 F389 EE02 D161
      created ....: 2015-01-21 01:46:26
Authentication key: 23E8 07BA FA8A 93D0 5866  7079 81DA 382B 5A3F 6884
      created ....: 2015-01-21 01:47:30
General key info..: pub  rsa2048/029966F6 2015-01-21 Niibe Yutaka <gniibe at computer.org>
sec   rsa2048/029966F6  created: 2015-01-21  expires: never
ssb   rsa2048/EE02D161  created: 2015-01-21  expires: never
ssb   ed25519/5A3F6884  created: 2015-01-21  expires: never
$
======================
--



More information about the gnuk-users mailing list