Could anyone help me guide the calculation of MAC(4bytes) and CMAC(8bytes) for Mifare Desfire? I am getting unexpected results.
Deskey = 0000000000000000
Block1(B1) = 1122334455667788
Block2(B2) = 9900112200000000
IV = 0000000000000000
sessionkey = 2923be84b1495461
R1 = Enc(B1 xor IV) f2f13994d24714ca
R2 = Enc(R1 xor B2) 880fe38ab9e8a8d3
MAC 880fe38a
Expected MAC = c8d70ad2 95a88a36
CMAC results
AESKey = 00000000000000000000000000000000
Block = 000102030405060708090a0b0c0d0e0f
Enc(Block) = 7aca0fd9bcd6ec7c9f97466616e6a282
SubKey1 = CDD297A9DF1458771099F4B39468565C
SubKey2 = 9BA52F53BE28B0EE2133E96728D0AC3F
CMAC(16bytes) = 8A57896F795CB6ABF6867DAD41A5FB15
Is it true that CMAC is generated only by DES and TDES like DES encrypt all the blocks except the final block which should be TDES encrypted as in retail MAC calculation?