Key generation on card fails with key sizes larger than 1024 bits

Sevan / Venture37 venture37 at gmail.com
Tue May 17 19:39:25 CEST 2011


Hi Werner

On 17 May 2011 13:43, Werner Koch <wk at gnupg.org> wrote:
> On Sat, 14 May 2011 18:12, venture37 at gmail.com said:
>
>> I purchased a v2 OpenPGP card for use with a SCM SCR335 card reader,
>> attempting to generate keys larger than 1024 bits fails, I've been
>
> This should definitely work.  To help you we need more input:
>
> What version of GnuPG are you running (gpg --version)?

gpg (GnuPG) 2.0.17
libgcrypt 1.4.6
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
        CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

> Are you using pcscd? (it seems not).

No, I assumed I didn't need to as the reader works fine with the
internal CCID driver (I can fetch card status, edit card details &
generate 1024bit keyson the card)
I have the first reader listed on:
http://www.gnupg.org/howtos/card-howto/en/smartcard-howto-single.html#id2503342

scdaemon.log output on FreeBSD:
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver: T=1: waittime
extension of bwi=100
scdaemon[95141]: chan_7 -> S PROGRESS card_busy w 0 0
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver: PC_to_RDR_XfrBlock:
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   dwLength ..........: 5
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bSeq ..............: 123
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bBWI
..............: 0x04
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:
wLevelParameter ...: 0x0000
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   [0010]  00 E3 01 64 86
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver: RDR_to_PC_DataBlock:
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   dwLength ..........: 5
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bSeq ..............: 123
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bStatus ...........: 0
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:
bChainParameter ...: 0x04
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   [0010]  00 C3 01 64 A6
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver: T=1: S-block
request received cmd=3
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver: T=1: waittime
extension of bwi=100
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver: PC_to_RDR_XfrBlock:
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   dwLength ..........: 5
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bSeq ..............: 124
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   bBWI
..............: 0x04
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:
wLevelParameter ...: 0x0000
2011-05-17 17:55:44 scdaemon[95141] DBG: ccid-driver:   [0010]  00 E3 01 64 86
2011-05-17 17:55:49 scdaemon[95141] DBG: ccid-driver: usb_bulk_read
error: Device busy
2011-05-17 17:55:49 scdaemon[95141] ccid_transceive failed: (0x1000a)
2011-05-17 17:55:49 scdaemon[95141] apdu_send_simple(0) failed: card I/O error
2011-05-17 17:55:49 scdaemon[95141] generating key failed
2011-05-17 17:55:49 scdaemon[95141] operation genkey result: Card error
scdaemon[95141]: chan_7 -> ERR 100663404 Card error <SCD>
2011-05-17 17:55:49 scdaemon[95141] DBG: ccid-driver: usb_bulk_read
error: Device busy
2011-05-17 17:55:49 scdaemon[95141] DBG: ccid-driver: USB: CALLING
USB_CLEAR_HALT
2011-05-17 17:55:51 scdaemon[95141] DBG: ccid-driver: usb_bulk_read
error: Device busy
2011-05-17 17:55:51 scdaemon[95141] DBG: ccid-driver: USB: RETRYING
bulk_in AGAIN
2011-05-17 17:55:51 scdaemon[95141] DBG: ccid-driver: bulk-in seqno
does not match (127/125)
scdaemon[95141]: chan_7 <- RESTART
scdaemon[95141]: chan_7 -> OK


On OpenBSD:
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver: PC_to_RDR_XfrBlock:
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   dwLength ..........: 17
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSeq ..............: 124
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bBWI
..............: 0x04
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:
wLevelParameter ...: 0x0000
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   [0010]  00 40
0D 00 20 00
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   [0016]  83 08
31 32 33 34 35 36 37 38 EE
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver: RDR_to_PC_DataBlock:
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   dwLength ..........: 6
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSeq ..............: 124
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bStatus ...........: 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:
bChainParameter ...: 0x04
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   [0010]  00 00
02 90 00 92
2011-05-17 19:12:41 scdaemon[13770] please wait while key is being generated ...
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver: PC_to_RDR_XfrBlock:
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   dwLength ..........: 15
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSeq ..............: 125
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bBWI
..............: 0x04
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:
wLevelParameter ...: 0x0000
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   [0010]  00 00
0B 00 47 80
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   [0016]  00 00
00 02 B6 00 08 00 70
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver: RDR_to_PC_DataBlock:
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   dwLength ..........: 5
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSeq ..............: 125
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bStatus ...........: 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:
bChainParameter ...: 0x04
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   [0010]  00 C3 01 64 A6
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver: T=1: S-block
request received cmd=3
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver: T=1: waittime
extension of bwi=100
scdaemon[13770]: chan_7 -> S PROGRESS card_busy w 0 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver: PC_to_RDR_XfrBlock:
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   dwLength ..........: 5
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSlot .............: 0
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bSeq ..............: 126
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   bBWI
..............: 0x04
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:
wLevelParameter ...: 0x0000
2011-05-17 19:12:41 scdaemon[13770] DBG: ccid-driver:   [0010]  00 E3 01 64 86
2011-05-17 19:12:48 scdaemon[13770] DBG: ccid-driver: usb_bulk_read
error: Connection timed out
2011-05-17 19:12:48 scdaemon[13770] ccid_transceive failed: (0x1000a)
2011-05-17 19:12:48 scdaemon[13770] apdu_send_simple(0) failed: card I/O error
2011-05-17 19:12:48 scdaemon[13770] generating key failed
2011-05-17 19:12:48 scdaemon[13770] operation genkey result: Card error
scdaemon[13770]: chan_7 -> ERR 100663404 Card error <SCD>
2011-05-17 19:12:48 scdaemon[13770] DBG: ccid-driver: bulk-in seqno
does not match (127/126)



More information about the Gnupg-users mailing list