GP Secure Channel and Le byte

Hello!

Assume I have opened a secure channel successfully. This channel should only use C-MAC verification.

Now I want to send a commands through this channel.

What about commands with a Le byte. Do I have to callculate the C-MAC without the Le byte and insert it afterwards?

Thank you, dox.

[323 byte] By [doxygena] at [2007-11-27 5:29:42]
# 1

Do I have to callculate the C-MAC without the Le byte and insert it afterwards?

Yes, you calculate the MAC on the APDU w/o the Le byte and append the Le byte afterwards (behind the MAC).

Reference:

GlobalPlatform 2.1.1, E.4.4 APDU Command C-MAC Generation and Verification (p. 221), 1st paragraph: .. It does not include the Le.

lexdabeara at 2007-7-12 14:53:07 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2
Thanks.I couldn't find any hint in the GlobalPlatform Spec. whether I have to append the Le byte after the C-MAC or insert it before the C-MAC.Greetings, dox.
doxygena at 2007-7-12 14:53:07 > top of Java-index,Java Mobility Forums,Consumer and Commerce...