er the data are transmitted in the downlink or uplink direction; - the BEARER parameter which is the identity of the bearer (5 bits); - the KRRCint key. The RRC message and the MAC-I authentication code are then encrypted using the KRRCenc key, then encapsulated by the PDCP header to form the PDCP frame transmitted to the RLC layer. On receiving the PDCP frames from the RLC layer, the following operations occur: - the PDCP header is removed; - the RRC message and the MAC-I authentication code are decrypted; 5G-NR Radio Interface - Data Link Layer - the RRC message and the PDCP header are integrity controlled; - the RRC messages are delivered in sequence. Numbering PDCP frames Delivery in sequence header COUNT BEARER gNB-RRC Authentication code calculation Integrity control MAC-I COUNT MAC-I BEARER CKgNB-RRC MAC-I Encryption Decryption MAC-I MAC-I Adding PDCP header Removing PDCP header MAC-I PDCP RRC MAC-I Figure 8.6. PDCP operations relating to the SRB bearer1 8.2.2.2. Operations relating to the DRB bearer Figure 8.7 describes the operations relating to the DRB bearer. At transmission, the IP packets are numbered which allows the receiver to detect duplicate or lost frames and to order. The sequence number is used during handover and allows retransmission requests for lost packets, but only if the acknowledgment mode is used for the RLC layer. The IP packet may be subject to the ROHC header compression to reduce the relative weight of headers. 1 In all figures, the shaded blocks are encrypted. 216 NG-RAN and 5G-NR The Message Authentication Code for Integrity (MAC-I) allows integrity control of the PDCP frame. Integrity for data is optional. The calculation of the MAC-I message authentication code is done from the following information: - the PDCP frame that contains the PDCP header and RRC message; - the COUNT parameter that aggregates the Hyper Frame Number (HFN) and the PDCP frame sequence number; - the DIR parameter that indicates whether the data are transmitted in the downlink or uplink direction; - the BE