A.6 Calculation of MIC value for discovery message

33.5033GPPRelease 17Security Aspects of Proximity based Services (ProSe) in the 5G System (5GS)TS

When calculating a MIC using the Discovery Key for open discovery or the DUIK for restricted discovery, the following parameters shall be used to form the input S to the KDF that is specified in Annex B of TS 33.220 [8]:

– FC = 0x89.

– P0 = UTC-based counter associated with the discovery slot.

– L0 = length of above (i.e. 0x00 0x04).

– P1 = discovery message with the MIC value field set to all zeros.

– L1 = length of above.

The MIC is set to the 32 least significant bits of the output of the KDF.

The Discovery Key, DUIK, Time parameter and discovery message follow the encoding also specified in Annex B of TS 33.220 [8].