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.