Thanks @Peacekeeper for this thorough debugging check-up.
OS: Trisquel 8.0 (Ubuntu 16.04 derivative)
Answering in a ordered way:
- Yes, I got a normal and valid answer
- Yes, I was also able to edit the personal information fields with this command (name, language pref…)
- First, I had RSA 2048bits that I tried to move with
keytocard. Then, I tried to generate directly on the Nitrokey both RSA 2048bits and 4096bits which yielded the same gpg
- Initially the key attributes were rsa2048 and I tried the 4096bits generation. I got a message like the key attribute were modified to match the key generation request. And it did, even after the card error, I checked with
gpg2 --card-status and the attributes were now rsa4096. The same when I tried 2048, they changed accordingly but the error was still there. Now the attribute is rsa2048 and I just tried again to generate a 2048bit key but I still got the same error.
- When I do
gpg/card> admin and
gpg/card> generate, I can specify the key size, the expiration date and the identity. Then, the Nitrokey starts the generation and eventually stops yielding the error message
gpg: key generation failed: Erreur de carte Échec de génération de la clef : Erreur de carte
Translated as: gpg: key generation failed: card error. Generation of key failed: card error.
- I just did. So, I started over with my existing keys. I followed the procedure with
keytocard again but I got the same problem. The keys are move onto the Nitrokey but there is no stubs on my hard drive (checked with
gpg2 -K). I also try the generation again on the key but I got the same error message.
Is there something in my gpg.conf that could prevent the Nitrokey to work properly?
default-key 0xyyyyyyyyyy (my subkey for signing because my primary has just certification usage and I keep it on a separate media).
#group mynames = paige 0x12345678 joe patti
default-preference-list SHA512 SHA384 SHA256 RIPEMD160 AES256 TWOFISH BLOWFISH ZLIB BZIP2 ZIP Uncompressed