Section: 6.4.5 Handling of NAS COUNTs
Content: The NAS security context created at the registration time of the first access type contains the NAS integrity and encryption keys, selected algorithm common for all NAS connections. In addition, each NAS connection shall have a unique NAS connection identifier, a distinct pair of NAS COUNTs, one NAS COUNT for uplink and one NAS COUNT for downlink, associated with it. In the NAS security context, the NAS connection identifier shall be the differentiator for the connection-specific parameters. It is essential that the NAS COUNTs for a particular KAMF are not reset to the start values (that is the NAS COUNTs only have their start value when a new KAMF is generated). This prevents the security issue of using the same NAS COUNTs with the same NAS keys, e.g. key stream re-use, in the case a UE moves back and forth between two AMFs and the same NAS keys are re-derived. In the AMF, all the distinct pairs of NAS COUNTs part of the same 5G NAS security context, shall only be set to the start value in the following cases: - for a partial native 5GC NAS security context created by a successful primary authentication run on one of the NAS connections established between the same AMF and the UE, or, - for a mapped 5G security context generated when a UE moves from an MME to the AMF during both idle and connected mode mobility, or, - for a new KAMF taken into use in a target AMF during mobility registration update or handover. The start value of NAS COUNT shall be zero (0).