![NXP Semiconductors MWCT101 S Series Reference Manual Download Page 798](http://html1.mh-extra.com/html/nxp-semiconductors/mwct101-s-series/mwct101-s-series_reference-manual_1722210798.webp)
32.5.13.11 CMD_VERIFY_MAC
The Verify MAC command verifies a MAC of a given MESSAGE, which can be
multiple 128-bit blocks of data, against a provided for MAC. The MESSAGE to
compare, starting with the leftmost bit of the MAC, are given in the
MESSAGE_LENGTH. The value 0 is not allowed and is interpreted by SHE to compare
all bits of the MAC. The function returns an error if the length provided for message has
another length than stated in MESSAGE_LENGTH. Input DATA1-DATAn until all
messages are entered, with the expected MAC being the last entry after all DATA are
input, i.e., MAC will be the position of block N+1 for 'N' number of DATA blocks.
All padding is to be done according to SHE specification using MESSAGE_LENGTH.
n = CEIL(MESSAGE_LENGTH / 128)
The first example shows 6 DATA blocks followed by the expected MAC, with the output
overwriting the DATA1 block at the end of the operation with the MAC verification
status.
The continuation examples show DATA1-10 by continuing from the first example but
DATA7 would be written in place of the CMAC from the first example, followed by
continuation with DATA8 which follows on the next page. Finally ending in DATA10
for this example, following with the expected CMAC value after the DATA 10 entry.
Table 32-71. Verify MAC command details
Parameter
Direction
Width
KEY_ID
IN
5
MESSAGE_LENGTH
IN
32
MESSAGE (DATA <n>)
IN
n * 128
MAC
IN
128
MAC_LENGTH (MAC Length[6:0])
IN
7
VERIFICATION_STATUS (Verification Status[0])
OUT
1
MAC
calc
= TRUNCATE(CMAC
KEY, KEY_ID
(MESSAGE, MESSAGE_LENGTH), MAC_LENGTH)
MAC
ref
= TRUNCATE (MAC, MAC_LENGTH)
VERIFICATION_STATUS = (0 ~= ( MAC
calc
- MAC
ref
))
Error Codes: ERC_NO_ERROR, ERC_SEQUENCE_ERROR, ERC_KEY_NOT_AVAILABLE,
ERC_KEY_INVALID,ERC_KEY_EMPTY, ERC_MEMORY_FAILURE, ERC_BUSY, ERC_GENERAL_ERROR
Figure 32-33. Verify MAC input parameters
Functional description
MWCT101xS Series Reference Manual, Rev. 3, 07/2019
798
NXP Semiconductors
Summary of Contents for MWCT101 S Series
Page 2: ...MWCT101xS Series Reference Manual Rev 3 07 2019 2 NXP Semiconductors...
Page 42: ...MWCT101xS Series Reference Manual Rev 3 07 2019 42 NXP Semiconductors...
Page 50: ...Conventions MWCT101xS Series Reference Manual Rev 3 07 2019 50 NXP Semiconductors...
Page 70: ...Aliased bit band regions MWCT101xS Series Reference Manual Rev 3 07 2019 70 NXP Semiconductors...
Page 78: ...Pinout diagrams MWCT101xS Series Reference Manual Rev 3 07 2019 78 NXP Semiconductors...
Page 96: ...WCT101xS safety concept MWCT101xS Series Reference Manual Rev 3 07 2019 96 NXP Semiconductors...
Page 130: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 130 NXP Semiconductors...
Page 284: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 284 NXP Semiconductors...
Page 430: ...Functional Description MWCT101xS Series Reference Manual Rev 3 07 2019 430 NXP Semiconductors...
Page 472: ...Application Information MWCT101xS Series Reference Manual Rev 3 07 2019 472 NXP Semiconductors...
Page 528: ...Module clocks MWCT101xS Series Reference Manual Rev 3 07 2019 528 NXP Semiconductors...
Page 634: ...SRAM configuration MWCT101xS Series Reference Manual Rev 3 07 2019 634 NXP Semiconductors...
Page 818: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 818 NXP Semiconductors...
Page 960: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 960 NXP Semiconductors...
Page 992: ...ADC calibration scheme MWCT101xS Series Reference Manual Rev 3 07 2019 992 NXP Semiconductors...
Page 1348: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 1348 NXP Semiconductors...
Page 1366: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 1366 NXP Semiconductors...
Page 1514: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 1514 NXP Semiconductors...
Page 1726: ...Debug and security MWCT101xS Series Reference Manual Rev 3 07 2019 1726 NXP Semiconductors...
Page 1760: ...MWCT101xS Series Reference Manual Rev 3 07 2019 1760 NXP Semiconductors...