Hello,
Since I have seen this thread about the reader's here I would like to
share my experience with some tests I have recently made to compare the
Towitoko Chipdrive Micro driver and two different drivers for the
GemPC410 seriel driver under Linux:
The environment I tested them was like this:
Readers:
� Towitoko Chipdrive Keyboard
� GemPC410-SL
Cards:
� GPK-16000
� GPK-8000
OS:
Linux Redhat with kernel 2.4.2-2 on i686 Pentium 3 with 500MHZ/256 MB Ram.
Drivers:
� Towitoko: TOWITOKO_CHIPDRIVE_MICRO libtowitoko.so.2.0.0
� GemPC410: GemPC410 libGemPC410.so.0.6.2
� GemPC410: GEMCORE libgp_core.so
The programm I used was always the same with all cards, drivers and
readers on the port /dev/ttyS0.
The result was that both drivers for the GemPC410 reader failed at the
CreateDirCrycs command ( both cards ).
The errormessages where
� GPK-8000 + GEMCORE:
[RSP] [ ]
pc/sc error ( 0x80100008 ): Insufficient buffer
� GPK-16000 + GEMCORE:
[RSP] [ ]
pc/sc error ( 0x80100008 ): Insufficient buffer
� GPK-8000 + GemPC410:
[RSP] [ 0x78 0x1E ]
� GPK-16000 + GemPC410:
[RSP] [ 0x0A 0x20 ]
Where the GemPC410 driver returns some unknow errorcodes the GEMCORE
returns the "Insufficient buffer" error.
The strange thing is that the Towitoko driver has not problems at this
point with the GPK-8000 card. So I do not assume that the code is wrong,
but that the result is a timing, driver or hardware issue ?
The Towitioko driver ( with the Towitoko reader ) drops out a lot later
when using the GPK-8000 card:
� -> pcsc_pk_int_aut() returned 0x80100016:
[CMD] [ 0x80 0x88 0x00 0x00 0x80 ]
[RSP] [ ]
pc/sc error: Transaction failed.
No Response - seems to be related a timin issue?
When using the Towitoko driver with the GPK-16000 card there is a
failure at soon at the beginning of the code:
-> pcsc_erase_card() returned 0x80100016:
[CMD] [ 0xDB 0xDE 0x00 0x00 ]
[RSP] [ ]
pc/sc error: Transaction failed.
No Response - seems also to be related to a timing issue?
Strange that every reader/driver seemst to react different to different
cards?
I attach a dump of the commands as somebody might be interested in the
details.
Greetings,
Arno Wilhelm
--
_ __ ___ _ _ _
/_\ _ _ _ _ ___ \ \ / (_) | |_ ___| |_ __
/ _ \| '_| ' \/ _ \ \ \/\/ /| | | ' \/ -_) | ' \
/_/ \_\_| |_||_\___/ \_/\_/ |_|_|_||_\___|_|_|_|_|
tel://+43/512/394545/72
fax://+43/512/394545/20
mail:[EMAIL PROTECTED]
http://www.phion.com
#####################################################################
#####################################################################
# Towitoko Chipdrive Micro
FRIENDLYNAME "Towitoko Chipdrive Micro"
DEVICENAME TOWITOKO_CHIPDRIVE_MICRO
LIBPATH /usr/local/towitoko/lib/libtowitoko.so.2.0.0
CHANNELID 0x000001
########## GPK-8000 #############
pcsc> ./PCSC
Reader = 0
-> pcsc_init(reader):
READER: Towitoko Chipdrive Micro 0 0
ATR: 3B A7 00 40 18 80 65 A2 08 01 01 52
LENGTH: 12
Found the GPK-8000 card from Gemplus.
OK
-> pcsc_erase_card() returned 0x0:
[CMD] [ 0xDB 0xDE 0x00 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file() returned 0x0:
[CMD] [ 0x00 0xA4 0x00 0x0C 0x02 0x3F 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file_key() returned 0x0:
[CMD] [ 0x80 0x28 0x00 0x01 0x08 0x00 0x01 0x02 0x03 0x04 0x00 0x06 0x07 ]
[RSP] [ 0x61 0x0C ]
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x0C ]
[RSP] [ 0x69 0x0E 0xD2 0xC5 0x00 0x01 0x02 0x03 0x5A 0x11 0x00 0xE5 0x90 0x00 ]
OK
-> pcsc_create_dir_crycs() returned 0x0:
[CMD] [ 0x84 0xE0 0x01 0x00 0x0F 0x10 0x00 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x83 0xDF 0x2C 0x03 ]
[RSP] [ 0x61 0x03 ]
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x03 ]
[RSP] [ 0x60 0x09 0x59 0x90 0x00 ]
OK
-> pcsc_select_file() returned 0x0:
[CMD] [ 0x00 0xA4 0x01 0x00 0x02 0x10 0x00 ]
[RSP] [ 0x61 0x12 ]
OK
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x12 ]
[RSP] [ 0x85 0x10 0xC1 0x02 0x10 0x00 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x70 0x90 0x00 ]
OK
-> pcsc_create_file() returned 0x0:
[CMD] [ 0x80 0xE0 0x02 0x00 0x0C 0x10 0x01 0x2C 0x00 0x00 0x94 0x00 0x00 0x00 0x00
0x00 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_apd_rec() returned 0x0:
[CMD] [ 0x00 0xE2 0x00 0x08 0x07 0x00 0x11 0x00 0x00 0x00 0x00 0xB4 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_create_private_key_file() returned 0x0:
[CMD] [ 0x80 0x12 0x01 0x57 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file() returned 0x0:
[CMD] [ 0x00 0xA4 0x02 0x00 0x02 0x10 0x01 ]
[RSP] [ 0x61 0x12 ]
OK
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x12 ]
[RSP] [ 0x85 0x10 0x42 0x01 0x10 0x01 0x2C 0x00 0x00 0x94 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x6D 0x90 0x00 ]
OK
-> pcsc_generate_rsa_key() returned 0x0:
[CMD] [ 0x80 0xD2 0x81 0x11 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x82 ]
[RSP] [ 0x90 0x00 0xD3 0x4F 0x3D 0x47 0xED 0x63 0x45 0x71 0x20 0xCF 0x6F 0xF8 0x8F
0x6F 0x44 0x06 0xF2 0x51 0x9E 0x18 0xCE 0x9A 0x37 0x5C 0x03 0x39 0x0A 0x93 0xF9 0xED
0x26 0xE6 0xF4 0x48 0xE1 0x48 0x06 0x5B 0x3E 0x66 0xD9 0xFF 0x7A 0x59 0x79 0xE9 0x7D
0x14 0xA5 0xC4 0x4B 0xBB 0x66 0x5A 0x0F 0x03 0x17 0xC5 0xB3 0xE2 0x67 0xCF 0xF5 0x01
0x64 0xC0 0x20 0x47 0xCF 0x0D 0xC2 0x25 0xF0 0x07 0xA4 0x37 0x82 0xEC 0x1D 0xE5 0x2F
0xA9 0xBE 0x68 0xBB 0x68 0xF8 0x11 0xC4 0x27 0xC6 0x64 0xF7 0xF8 0x08 0x16 0x46 0xC0
0x84 0x00 0x39 0x22 0x7C 0x19 0x7C 0x25 0xE6 0xCA 0x09 0x15 0x89 0x12 0x82 0x8D 0xC7
0x6A 0xFC 0xA3 0x19 0xF7 0xB2 0xCB 0xA3 0x4C 0x1F 0x9F 0x51 0xA7 0x90 0x00 ]
OK
-> pcsc_pk_dir() returned 0x0:
[CMD] [ 0x80 0xA0 0x00 0x00 0x03 ]
[RSP] [ 0x01 0x00 0x94 0x90 0x00 ]
OK
SFID = 0x01; Length = 148
-> pcsc_sel_crypto_context() returned 0x0:
[CMD] [ 0x80 0xA6 0x01 0x31 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_init_hashed_data() returned 0x0:
[CMD] [ 0x80 0xEA 0x00 0x00 0x10 0x39 0x33 0x32 0x32 0x31 0x35 0x37 0x62 0x64 0x36
0x61 0x37 0x37 0x35 0x35 0x30 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_pk_int_aut() returned 0x80100016:
[CMD] [ 0x80 0x88 0x00 0x00 0x80 ]
[RSP] [ ]
pc/sc error: Transaction failed.
-> pcsc_release():
OK
########## GPK-16000 #############
pcsc> ./PCSC
Reader = 0
-> pcsc_init(reader):
READER: Towitoko Chipdrive Micro 0 0
ATR: 3B A7 00 40 18 80 65 A2 09 01 01 52
LENGTH: 12
Found the GPK-16000 card from Gemplus.
OK
-> pcsc_erase_card() returned 0x80100016:
[CMD] [ 0xDB 0xDE 0x00 0x00 ]
[RSP] [ ]
pc/sc error: Transaction failed.
-> pcsc_release():
OK
#####################################################################
#####################################################################
# Gemplus GemPC410-SL
FRIENDLYNAME "Gemplus GemPC410 Reader - libGemPC410"
DEVICENAME GemPC410
LIBPATH /usr/lib/libGemPC410.so.0.6.2
CHANNELID 0x000001
########## GPK-8000 #############
pcsc> ./PCSC
Reader = 0
-> pcsc_init(reader):
READER: Gemplus GemPC410 Reader - libGemPC410 0 0
ATR: 3B A7 00 40 18 80 65 A2 08 01 01 52
LENGTH: 12
Found the GPK-8000 card from Gemplus.
OK
-> pcsc_erase_card() returned 0x0:
[CMD] [ 0xDB 0xDE 0x00 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file() returned 0x0:
[CMD] [ 0x00 0xA4 0x00 0x0C 0x02 0x3F 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file_key() returned 0x0:
[CMD] [ 0x80 0x28 0x00 0x01 0x08 0x00 0x01 0x02 0x03 0x04 0x00 0x06 0x07 ]
[RSP] [ 0x61 0x0C ]
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x0C ]
[RSP] [ 0x02 0xA9 0x79 0x6B 0x00 0x01 0x02 0x03 0xDD 0x5B 0x34 0xC3 0x90 0x00 ]
OK
-> pcsc_create_dir_crycs() returned 0x0:
[CMD] [ 0x84 0xE0 0x01 0x00 0x0F 0x10 0x00 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x8F 0x03 0xE5 0x03 ]
[RSP] [ 0x78 0x1E ]
Error: pcsc_create_dir_crycs() no checksum to read !
pc/sc error: Unknown internal error.
-> pcsc_release():
OK
########## GPK-16000 #############
pcsc> ./PCSC
Reader = 0
-> pcsc_init(reader):
READER: Gemplus GemPC410 Reader - libGemPC410 0 0
ATR: 3B A7 00 40 18 80 65 A2 09 01 01 52
LENGTH: 12
Found the GPK-16000 card from Gemplus.
OK
-> pcsc_erase_card() returned 0x0:
[CMD] [ 0xDB 0xDE 0x00 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file() returned 0x0:
[CMD] [ 0x00 0xA4 0x00 0x0C 0x02 0x3F 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file_key() returned 0x0:
[CMD] [ 0x80 0x28 0x00 0x01 0x08 0x00 0x01 0x02 0x03 0x04 0x00 0x06 0x07 ]
[RSP] [ 0x61 0x0C ]
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x0C ]
[RSP] [ 0x37 0x94 0x0F 0x97 0x00 0x01 0x02 0x03 0x69 0xCF 0x4F 0xA3 0x90 0x00 ]
OK
-> pcsc_create_dir_crycs() returned 0x0:
[CMD] [ 0x84 0xE0 0x01 0x00 0x0F 0x10 0x00 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x4A 0x6D 0x33 0x03 ]
[RSP] [ 0x0A 0x20 ]
Error: pcsc_create_dir_crycs() no checksum to read !
pc/sc error: Unknown internal error.
-> pcsc_release():
OK
[1]+ Done /usr/local/pcsc/sbin/pcscd
root@geaeini: pcsc>
#####################################################################
#####################################################################
# Gemplus GemPC410-SL
FRIENDLYNAME "Gemplus GemPC410 Reader - gemcore"
DEVICENAME GEMCORE
LIBPATH /usr/lib/libgp_core.so
CHANNELID 0x0103F8 <--- DOES WORK !!
#CHANNELID 0x000001 <--- DOES NOT WORK
########## GPK-8000 #############
pcsc> ./PCSC
Reader = 0
-> pcsc_init(reader):
READER: Gemplus GemPC410 Reader - gemcore 0 0
ATR: 3B A7 00 40 18 80 65 A2 08 01 01 52
LENGTH: 12
Found the GPK-8000 card from Gemplus.
OK
-> pcsc_erase_card() returned 0x0:
[CMD] [ 0xDB 0xDE 0x00 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file() returned 0x0:
[CMD] [ 0x00 0xA4 0x00 0x0C 0x02 0x3F 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file_key() returned 0x0:
[CMD] [ 0x80 0x28 0x00 0x01 0x08 0x00 0x01 0x02 0x03 0x04 0x00 0x06 0x07 ]
[RSP] [ 0x61 0x0C ]
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x0C ]
[RSP] [ 0x67 0xB0 0xC8 0x5C 0x00 0x01 0x02 0x03 0x38 0x8A 0x55 0x75 0x90 0x00 ]
OK
-> pcsc_create_dir_crycs() returned 0x80100008:
[CMD] [ 0x84 0xE0 0x01 0x00 0x0F 0x10 0x00 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x2E 0xB2 0xCA 0x03 ]
[RSP] [ ]
pc/sc error: Insufficient buffer. // <-- ERROR also with different cards!!
-> pcsc_release():
OK
########## GPK-16000 #############
pcsc> ./PCSC
Reader = 0
-> pcsc_init(reader):
READER: Gemplus GemPC410 Reader - gemcore 0 0
ATR: 3B A7 00 40 18 80 65 A2 09 01 01 52
LENGTH: 12
Found the GPK-16000 card from Gemplus.
OK
-> pcsc_erase_card() returned 0x0:
[CMD] [ 0xDB 0xDE 0x00 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file() returned 0x0:
[CMD] [ 0x00 0xA4 0x00 0x0C 0x02 0x3F 0x00 ]
[RSP] [ 0x90 0x00 ]
OK
-> pcsc_select_file_key() returned 0x0:
[CMD] [ 0x80 0x28 0x00 0x01 0x08 0x00 0x01 0x02 0x03 0x04 0x00 0x06 0x07 ]
[RSP] [ 0x61 0x0C ]
-> pcsc_get_response() returned 0x0:
[CMD] [ 0x00 0xC0 0x00 0x00 0x0C ]
[RSP] [ 0xED 0x65 0x63 0x56 0x00 0x01 0x02 0x03 0xBC 0x40 0x79 0xC0 0x90 0x00 ]
OK
-> pcsc_create_dir_crycs() returned 0x80100008:
[CMD] [ 0x84 0xE0 0x01 0x00 0x0F 0x10 0x00 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x44 0x7D 0xC4 0x03 ]
[RSP] [ ]
pc/sc error: Insufficient buffer.
-> pcsc_release():
OK