Section: 5.3.13.3 Actions related to transmission of RRCResumeRequest or RRCResumeRequest1 message
Content: The UE shall set the contents of RRCResumeRequest or RRCResumeRequest1 message as follows: 1> if field useFullResumeID is signalled in SIB1: 2> select RRCResumeRequest1 as the message to use; 2> set the resumeIdentity to the stored fullI-RNTI value; 1> else: 2> select RRCResumeRequest as the message to use; 2> set the resumeIdentity to the stored shortI-RNTI value; 1> restore the RRC configuration, RoHC state, the EHC context(s), the UDC state, the stored QoS flow to DRB mapping rules and the KgNB and KRRCint keys from the stored UE Inactive AS context except for the following: - masterCellGroup; - mrdc-SecondaryCellGroup, if stored; and - pdcp-Config; 1> set the resumeMAC-I to the 16 least significant bits of the MAC-I calculated: 2> over the ASN.1 encoded as per clause 8 (i.e., a multiple of 8 bits) VarResumeMAC-Input; 2> with the KRRCint key in the UE Inactive AS Context and the previously configured integrity protection algorithm; and 2> with all input bits for COUNT, BEARER and DIRECTION set to binary ones; 1> derive the KgNB key based on the current KgNB key or the NH, using the nextHopChainingCount value received in the previous RRCRelease message and stored in the UE Inactive AS Context, as specified in TS 33.501[ Security architecture and procedures for 5G System ]  [11]; 1> derive the KRRCenc key, the KRRCint key, the KUPint key and the KUPenc key; 1> configure lower layers to apply integrity protection for all radio bearers except SRB0 and MRBs using the configured algorithm and the KRRCint key and KUPint key derived in this clause immediately, i.e., integrity protection shall be applied to all subsequent messages received and sent by the UE; NOTE 1: Only DRBs with previously configured UP integrity protection shall resume integrity protection. 1> configure lower layers to apply ciphering for all radio bearers except SRB0 and MRBs and to apply the configured ciphering algorithm, the KRRCenc key and the KUPenc key derived in this clause, i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE; 1> re-establish PDCP entities for SRB1; 1> resume SRB1; 1> if the resume procedure is initiated for SDT: 2> for each radio bearer that is configured for SDT and for SRB1: 3> restore the RLC-BearerConfig associated with the RLC bearers of masterCellGroup and pdcp-Config from the UE Inactive AS context; 3> if the radio bearer is a DRB configured with Ethernet Header Compression: 4> indicate to lower layer that ethernetHeaderCompression is not configured; 3> if the radio bearer is a DRB configured with UDC: 4> indicate to lower layer that uplinkDataCompression is not configured; 3> if the radio bearer is a DRB configured with ROHC function: 4> if sdt-DRB-ContinueROHC is set to cell and the resume procedure is initiated in a cell that is the same as the PCell in which the UE received the previous RRCRelease message; or 4> if sdt-DRB-ContinueROHC is set to rna and the resume procedure is initiated in a cell belonging to the same RNA as the PCell in which the UE received the previous RRCRelease message: 5> indicate to lower layer that drb-continueROHC is configured; 4> else: 5> indicate to lower layer that drb-continueROHC is not configured; 3> re-establish PDCP entity for the radio bearer that is configured for SDT without triggering PDCP status report; 2> resume all the radio bearers that are configured for SDT; 1> submit the selected message RRCResumeRequest or RRCResumeRequest1 for transmission to lower layers. NOTE 2: Only DRBs with previously configured UP ciphering shall resume ciphering. NOTE 2a: Before the lower layers first transmit the RRCResumeRequest or RRCResumeRequest1, the UE may initiate a new resume procedure if other conditions for initiation of the resume procedure as specified in 5.3.13.2 are satisfied. If lower layers indicate an integrity check failure while T319 is running or SDT procedure is ongoing, perform actions specified in 5.3.13.5. If the UE is an (e)RedCap UE and the (e)RedCap-specific initial downlink BWP is not associated with CD-SSB, the UE may continue cell re-selection related measurements as well as cell re-selection evaluation, otherwise the UE shall continue cell re-selection related measurements as well as cell re-selection evaluation. If the conditions for cell re-selection are fulfilled, the UE shall perform cell re-selection as specified in 5.3.13.6. NOTE 3: For L2 U2N Remote UE in RRC_INACTIVE, the cell (re)selection procedure as specified in TS 38.304[ NR; User Equipment (UE) procedures in Idle mode and in RRC Inactive state ]  [20] and relay (re)selection procedure as specified in 5.8.15.3 are performed independently and it is up to UE implementation to select either a cell or a L2 U2N Relay UE.