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!

CMAC calculation

843851Mar 6 2009 — edited Mar 6 2009
I'm having problems calculating valid CMACs for APDUs following the External Authencitcate command (which works perfectly).
I use security level 0x01 and do not use SCP02. Currently, I follow the below procedure:

1. Set the 3rd least significant bit of the APDU's CLA byte.
2. Increment the APDU's Le byte with 8.
3. Pad the APDU.
4. Apply 3DES in CBC mode with CMAC session key and IV = previous CMAC.

The CMAC is now the 8 rightmost bytes of the result gained in step 4.

Isn't this correct?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 3 2009
Added on Mar 6 2009
1 comment
297 views