Hi all!
I'm newer in the field of the smartcards and I have recently started playing
with an eToken PRO. I'm interested in how it work in the low-level fashion.
For that, I have read the ISO-7816-4 at
http://www.ttfn.net/techno/smartcards/iso7816_4.html but I have some doubts
about the APDUs.
According to the ISO-7816-4, the GET CHALLENGE APDU is
00 84 00 00 MM (CLA=00, INS=84, P1=00, P2=00, Le = MM = Max. length of
expected response)
that is the same that reports opensc-explorer -vvvvvvv when we require a
random value:
bash ~ # opensc-explorer -vvvvvvv
[...]
OpenSC [3F00]> random 1
card.c:793:sc_get_challenge: called
card.c:254:sc_transmit_apdu: called
card.c:221:sc_transceive: Sending 5 bytes (resp. 258 bytes):
00 84 00 00 08 ..... <---------------- GET CHALLENGE APDU!!!!!!
card.c:274:sc_transmit_apdu: Received 8 bytes (SW1=90 SW2=00)
B2 69 68 D2 A1 64 5F DB ²ihÒ¡d_Û
card.c:797:sc_get_challenge: returning with: 0
00000000: B2 ²
That's all ok, but the problems appears with what the USB subsystem reports:
bash ~ # echo Y > /sys/module/usbcore/parameters/usbfs_snoop
[ here I do a random 1 with opensc-explorer]
bash ~ # dmesg
[...]
usb 3-2: usbdev_ioctl: CONTROL
usb 3-2: control write: bRequest=06 bRrequestType=40 wValue=0000 wIndex=0000
wLength=0009
usb 3-2: control write: data: 00 40 05 00 84 00 00 08 c9 <--- GET CHALLENGE
APDU?!?!??!
As I can see, the usb subsystem sends additional data to the eToken PRO
attached as follow: there are some bytes before the APDU's Header (00 40 05)
and after the body (C9)... Has anyone idea about what this bytes represent
and how they can be calculated?
For other APDUs I have seen the same pattern: 3 bytes before the APDU, and
another additional bytes after the body of the APDU.
Thank you in advance,
Sergio
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel