RRC integrity protection shall be provided by the PDCP layer between UE and gNB and no layers below PDCP shall be integrity protected. Replay protection shall be activated when integrity protection is activated (except for when the selected integrity protection algorithm is NIA0, see Annex D). Replay protection shall ensure that the receiver accepts each particular incoming PDCP COUNT value only once using the same AS security context.
The use and mode of operation of the 128-NIA algorithms are specified in Annex D.
The input parameters to the 128-bit NIA algorithms as described in Annex D are the RRC message as MESSAGE, an 128-bit integrity key KRRCint as KEY, a 5-bit bearer identity BEARER which value is assigned as specified by TS 38.323, the 1-bit direction of transmission DIRECTION and a bearer specific direction dependent 32-bit input COUNT which corresponds to the 32-bit PDCP COUNT.
The RRC integrity checks shall be performed both in the ME and the gNB. In case failed integrity check (i.e. faulty or missing MAC-I) is detected after the start of integrity protection, the concerned message shall be discarded. This can happen on the gNB side or on the ME side. UE may trigger a recovery procedure as specified in TS 38.331.
RRC confidentiality protection is provided by the PDCP layer between UE and gNB.
The use and mode of operation of the 128-NEA algorithms are specified in Annex D.
The input parameters to the 128-bit NEA algorithms as described in Annex D are a 128-bit cipher Key KRRCenc as KEY, a 5-bit bearer identity BEARER which corresponds to the radio bearer identity, the 1-bit direction of transmission DIRECTION, the length of the keystream required LENGTH and a bearer specific direction dependent 32-bit input COUNT which corresponds to the 32-bit PDCP COUNT.
The network should activate AS security (i.e., perform a successful AS SMC procedure) before running the RRC UE capability transfer procedure.
With the exception of unauthenticated emergency calls and the UEs using Control plane CIoT optimization,, if the network had acquired UE capabilities using RRC UE capability transfer procedure before AS security activation, then the network shall not store them locally for later use and shall not send them to other network entities. In that case, the network shall re-run the RRC UE capability transfer procedure after a successful AS SMC procedure.