Good Day!
I am trying to decrypt the SDMACFull from AN12196 document as reference PAGE 18 with the given example STEP 17.
This is the formula:
SDMMACfull = MAC(KSesSDMFileReadMAC;DynamicFileData[ SDMMACInputOffset ::SDMMACOffset - 1 ])
SDMMACOffset:
6A0000
SDMMACInputOffset:
440000
KSesSDMFileReadMAC:
3ED0920E5E6A0320D823D5987FEAFBB1
DynamicFileData (ASCII):
CEE9A53E3E463EF1F459635736738962&cmac=
DynamicFileData (HEX): 434545394135334533453436334546314634353936333537333637333839363226636d61633d
I have some basic understanding calculating the SliceLength. If i convert the hex2dec
0x6A0000−0x440000=0x260000 in decimal 2490368 bytes. However, my DynamicFileData does not provide this byte length.
Secondly, in the example 2 different length of DynamicFileData in Hex and ASCII.
Which one is the correct to use, HEX, ASCII or Both?
Also what is also not clear, in STEP 15 the Data Message has a suffix &cmac=
Not sure if it has to be part of it or not.
Hello @xxxlucaxxx
Hope you are doing well.
Cryptographic parameters, keys, random numbers, TI and computed MACs are represented as most significant byte (MSB) first.
Perhaps you may some useful information and other examples in NTAG 424 Data Sheet, Section 9.3; Section 9.3.10 shows an example of output mapping.
Also, you can refer to TagWriter User Manual, Section 4.3 for an example of how to enable UID and Counter Mirror by using TagWriter app.
Regards,
Eduardo.