Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Generate Session Key

843851May 7 2003 — edited Apr 15 2007
SELECT Card Manager:
C-APDU: 00 A4 04 00 07 A0 00 00 01 51 00 00 00
R-APDU: 6F 44 84 07 A0 00 00 01 51 00 00 A5 39 73 33 06 07 2A 86 48 86 FC 6B 01 60 0B 06 09 2A 86 48 86 FC 6B 02 02 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 01 05 66 03 C0 01 00 9F 65 01 FF 90 00

INITIALIZE UPDATE:
C-APDU: 80 50 00 00 08 00 00 00 00 00 00 00 00 00
R-APDU: 00 00 00 00 00 00 00 00 00 00 01 01 45 14 7B 7A 9D 5A 86 9E 9C 4B A9 0E 24 2A 08 7F 90 00

EXTERNAL AUTHENTICATE:
C-APDU: 84 82 00 00 10 B3 92 64 55 D4 52 BA 96 FD 57 24 EB 60 AE BE DC 00
R-APDU: 90 00


The above are part of the result from my toolkit after install the applet. I just want to verify the card cyrtogram generated by the card. So from the above result, it should be:

Host Challege: 00 00 00 00 00 00 00 00
Card Challege: 45 14 7B 7A 9D 5A 86 9E
Card Cryptogram: 9C 4B A9 0E 24 2A 08 7F

I cannot get the card crytogram as above result i wondering which was my mistake? Below are my calculation,

Derivation Data: 9D 5A 86 9E 00 00 00 00 45 14 7B 7A 00 00 00 00
Static S-ENC key: 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F (given)

Session S-ENC Key: Triple DES ECB the DD using the S-ENC key.
CF E6 9B A2 74 93 DB 80 B1 FC 82 58 0E 03 E7 4B

From the GP spec, the card cryptogram is performed by concatenating the 8-byte host challenge and 8-byte card challenge resulting in a 16-byte block and 8 bytes padding, so it would like this:

000000000000000045147B7A9D5A869E8000000000000000

using the S-ENC session key and an ICV of binary zeroes, is applied across this 24-byte block and the resulting 8-byte signature is the card cryptogram. But i couldn't get the 8 bytes signature. Is my step above correct and how can i continue? your help wolud greatly appreciated!


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2007
Added on May 7 2003
36 comments
2,048 views