Section: 6.9.2.1.2 Non access stratum
Content: During mobility, NAS aspects that need to be considered are the possible KAMF change, the possible NAS algorithm change at AMF change, and the possible presence of a parallel NAS connection. There is the possibility that the source AMF and the target AMF do not support the same set of NAS algorithms or have different priorities regarding the use of NAS algorithms. In this case, the target AMF re-derives the NAS keys from the existing KAMF (if unchanged) or derives the NAS keys from the new KAMF (if changed) using the NAS algorithm identities and NAS algorithm types as input to the NAS key derivation functions (see Annex A.8). When the KAMF has not changed, all inputs, in particular the KAMF, will be the same in the re-derivation except for the NAS algorithm identity. When the KAMF has changed, new NAS keys are derived irrespective of change in NAS algorithms. In case the KAMF has changed or the target AMF decides to use NAS algorithms different from the ones used by the source AMF, the target AMF shall provide needed parameters to the UE as defined in Clause 6.9.2.3.3 for N2-Handover (i.e., using NAS Container) and Clause 6.9.3 for mobility registration update (i.e., using NAS SMC). NOTE 1: It is per operator's policy how to configure selection of handover types. Depending on an operator's security requirements, the operator can decide whether to have Xn or N2 handovers for a particular gNB/ng-eNB according to the security characteristics of a particular gNB/ng-eNB. NOTE 2: Following key change indicators are involved with N2 handovers. 1) Source AMF indicates AS key re-keying required meaning that the KAMF sent by source AMF to the target AMF is not in sync with current gNB/ng-eNB with keyAmfChangeInd (KAMF Change Indicator). 2) Source AMF indicates that the KAMF sent by source AMF to target AMF has been calculated using horizontal KAMF derivation with keyAmfHDerivationInd (KAMF Horizontal Derivation Indicator). 3) The target AMF indicates a horizontal KAMF derivation to the UE with K_AMF_change_flag in the NAS Container to tell the NAS layer of the UE to change KAMF. 4). The target AMF indicates anAS key re-keying to the gNB/ng-eNB with NSCI (New Security Context Indicator). 5) The gNB/ng-eNB indicates a AS re-keying to the UE with keySetChangeIndicator so that the AS layer of the UE knows that new KgNB needs to be derived from new KAMF instead of NH, and NCC needs to be reset to zero.