release all SDAP entities, if any, that have no associated DRB as specified in clause 5.1.2 of TS 37.324, and indicate the release of the user plane resources for PDU Sessions associated with the released SDAP entities to upper layers;
release all SDAP entities that have no associated multicast MRB as specified in clause 5.1.2 of TS 37.324, and indicate the release of user plane resources for these MBS multicast sessions to upper layers.
configure the PDCP entity with the security algorithms according to securityConfig and apply the keys (KRRCenc and KRRCint) associated with the master key (KgNB);
configure the PDCP entity for the target cell group with state variables continuation as specified in TS 38.323, and with the same security configuration as the PDCP entity for the source cell group;
for each srb-Identity value included in the srb-ToAddModList that is not part of the current UE configuration (SRB establishment or reconfiguration from E-UTRA PDCP to NR PDCP):
configure the PDCP entity with the security algorithms according to securityConfig and apply the keys (KRRCenc and KRRCint) associated with the master key (KeNB) or secondary key (S-KgNB) as indicated in keyToUse, if applicable;
configure the PDCP entity with the security algorithms according to securityConfig and apply the keys (KRRCenc and KRRCint) associated with the master key (KeNB/ KgNB) or secondary key (S-KgNB) as indicated in keyToUse, if applicable;
configure the PDCP entity to apply the integrity protection algorithm and KRRCint key configured/derived as specified in TS 36.331, i.e. the integrity protection configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;
configure the PDCP entity to apply the ciphering algorithm and KRRCenc key configured/derived as specified in TS 36.331, i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;
configure the PDCP entity to apply the integrity protection algorithm and KRRCint key associated with the master key (KeNB) or secondary key (S-KgNB), as indicated in keyToUse, i.e. the integrity protection configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;
configure the PDCP entity to apply the ciphering algorithm and KRRCenc key associated with the master key (KeNB) or secondary key (S-KgNB) as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;
configure the PDCP entity to apply the integrity protection algorithm and KRRCint key associated with the master key (KeNB/KgNB) or secondary key (S-KgNB), as indicated in keyToUse , i.e. the integrity protection configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;
configure the PDCP entity to apply the ciphering algorithm and KRRCenc key associated with the master key (KeNB/KgNB) or secondary key (S-KgNB) as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent messages received and sent by the UE, including the message used to indicate the successful completion of the procedure;
for each drb-Identity value included in the drb-ToAddModList that is not part of the current UE configuration (DRB establishment including the case when full configuration option is used):
configure the PDCP entity with the ciphering algorithms according to securityConfig and apply the key (KUPenc) associated with the master key (KeNB) or secondary key (S-KgNB) as indicated in keyToUse, if applicable;
configure the PDCP entity with the ciphering algorithms according to securityConfig and apply the KUPenc key associated with the master key (KeNB/KgNB) or the secondary key (S-KgNB/S-KeNB) as indicated in keyToUse;
configure the PDCP entity with the integrity protection algorithms according to securityConfig and apply the KUPint key associated with the master (KeNB/KgNB) or the secondary key (S-KgNB) as indicated in keyToUse;
reconfigure the PDCP entity to configure DAPS with the ciphering function, integrity protection function and ROHC function of the target cell group as specified in TS 38.323 and configure it in accordance with the received pdcp-Config;
configure the ciphering function of the target cell group PDCP entity with the ciphering algorithm according to securityConfig and apply the KUPenc key associated with the master key (KgNB), as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent PDCP PDUs received from the target cell group and sent to the target cell group by the UE;
configure the integrity protection function of the target cell group PDCP entity with the integrity protection algorithms according to securityConfig and apply the KUPint key associated with the master key (KgNB) as indicated in keyToUse;
configure the ciphering function and the integrity protection function of the target cell group PDCP entity with the same security configuration as the PDCP entity for the source cell group;
if the sdap-Config is included and when indication of successful completion of random access towards target cell is received from lower layers as specified in [3]:
configure the PDCP entity with the ciphering algorithm and KUPenc key configured/derived as specified in clause 5.4.2.3 of TS 36.331, i.e. the ciphering configuration shall be applied to all subsequent PDCP PDUs received and sent by the UE;
configure the PDCP entity with the ciphering algorithm and KUPenc key associated with the master key (KeNB) or the secondary key (S-KgNB), as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent PDCP PDUs received and sent by the UE;
configure the PDCP entity with the ciphering algorithm and KUPenc key associated with the master key (KeNB/ KgNB) or the secondary key (S-KgNB/S-KeNB), as indicated in keyToUse, i.e. the ciphering configuration shall be applied to all subsequent PDCP PDUs received and sent by the UE;
configure the PDCP entity with the integrity protection algorithms according to securityConfig and apply the KUPint key associated with the master key (KeNB/KgNB) or the secondary key (S-KgNB) as indicated in keyToUse;
else if mrb-Identity value included in the mrb-ToAddModList is not part of the UE configuration (i.e., multicast MRB establishment including the case when full configuration option is used):