Page 1 of 1
Does extended length APDU affect calculation of C-MAC
Posted: Wed Apr 27, 2016 3:16 am
by notuo
Hi! If I want to send an extended length APDU, does it affect calculation of various C-MAC?
Re: Does extended length APDU affect calculation of C-MAC
Posted: Wed Apr 27, 2016 3:49 am
by warex
notuo wrote:Hi! If I want to send an extended length APDU, does it affect calculation of various C-MAC?
There is no effect at all. The crypto operation is the same regardless of the length of the data.
Re: Does extended length APDU affect calculation of C-MAC
Posted: Wed Apr 27, 2016 4:04 am
by notuo
Do you have a reference that specifically addresses extended length APDUs for GP?
My concern is related to the coding of Lc and the SCP01 length (L) byte for encrypted data.
For SCP01, the length of the data field prior to padding is explicitly encoded in one byte and pre-pended to the data field. LC is the data field total length including padding and CMAC, L is the length of the data field prior to padding.
Re: Does extended length APDU affect calculation of C-MAC
Posted: Wed Apr 27, 2016 4:28 am
by leogen
GP does not specify the size of Lc or Le. It says to adjust the Lc for instance but doesn't specify how big Lc is.