Communication method and devices

By carrying the message verification code based on load calculation in the MAC PDU, the problem of lack of security protection in the MAC layer is solved, and the security of message transmission and service quality are improved.

WO2025000304A1PCT designated stage expired Publication Date: 2025-01-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Application Number
PCT/CN2023/103494
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

In the prior art, protocol layers below the PDCP layer, such as the MAC layer, lack security protection mechanisms, resulting in privacy leakage and security issues in message transmission, affecting service quality.

Method used

A message verification code is carried in the MAC PDU, which is based on the load calculation in the MAC PDU, and a security protection mechanism is introduced to avoid message leakage.

Benefits of technology

By introducing a security protection mechanism at the MAC layer, the security of message transmission is ensured, privacy leakage is prevented, and the service quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023103494_02012025_PF_FP_ABST
    Figure CN2023103494_02012025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a communication method, and devices, a computer-readable storage medium, a computer program product and a computer program. The method comprises: a first device receiving a first media access control (MAC) protocol data unit (PDU) from a second device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated by the second device on the basis of one or more first loads of the first MAC PDU.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method and device Technical Field

[0001] The present application relates to the field of communications, and more particularly, to a communication method, device, computer-readable storage medium, computer program product, and computer program. Background Art

[0002] Related technologies primarily provide security mechanisms at the Packet Data Convergence Protocol (PDCP) layer. However, protocol layers below the PDCP layer, such as the Media Access Control (MAC) layer, lack security protection mechanisms for control signaling and data. This can lead to privacy leaks and other security issues in messages transmitted at the MAC layer, thus impacting service quality. Therefore, ensuring the security of MAC layer messages has become a pressing issue.

[0003] Summary of the Invention

[0004] Embodiments of the present application provide a communication method, device, computer-readable storage medium, computer program product, and computer program.

[0005] An embodiment of the present application provides a communication method, including:

[0006] A first device receives a first media access control layer (MAC) protocol data unit (PDU) from a second device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated by the second device based on one or more first loads of the first MAC PDU.

[0007] An embodiment of the present application provides a communication method, including:

[0008] The second device sends a first MAC PDU to the first device, wherein the first MAC PDU carries a first message verification code, and the first message verification code is calculated based on one or more first loads of the first MAC PDU.

[0009] An embodiment of the present application provides a first device, including:

[0010] A first communication unit is used to receive a first media access control layer MAC protocol data unit PDU from a second device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated by the second device based on one or more first loads of the first MAC PDU.

[0011] An embodiment of the present application provides a second device, including:

[0012] The second communication unit is used to send a first media access control layer MAC protocol data unit PDU to the first device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated based on one or more first loads of the first MAC PDU.

[0013] An embodiment of the present application provides a first device, including a processor and a memory communicating with the processor, wherein the memory is used to store instructions. When the instructions are executed by the processor, the instructions enable the first device to perform the above method.

[0014] An embodiment of the present application provides a second device, including a processor and a memory communicating with the processor, wherein the memory is used to store instructions. When the instructions are executed by the processor, the instructions enable the second device to perform the above method.

[0015] The embodiment of the present application provides a chip for implementing the above method.

[0016] Specifically, the chip includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes the above method.

[0017] An embodiment of the present application provides a computer-readable storage medium for storing a computer program, which enables a device to perform the above method when the computer program is executed by the device.

[0018] An embodiment of the present application provides a computer program product, including computer program instructions, which enable a computer to execute the above method.

[0019] An embodiment of the present application provides a computer program, which, when executed on a computer, enables the computer to execute the above method.

[0020] By adopting the solution provided in this embodiment, a message check code can be carried in the MAC PDU. This message check code is calculated based on the payload in the MAC PDU. This allows for the introduction of a security protection mechanism at the MAC layer, preventing security issues such as message leakage, and making messages transmitted at the MAC layer more secure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] FIG1 is a schematic diagram of an application scenario according to an embodiment of the present application.

[0022] FIG2 is a schematic flowchart of a communication method according to an embodiment of the present application.

[0023] FIG3 is a schematic flowchart of a communication method according to another embodiment of the present application.

[0024] 4 to 9 are schematic diagrams of various formats of MAC PDU in a communication method according to an embodiment of the present application.

[0025] FIG10 is a schematic block diagram of a first device according to an embodiment of the present application.

[0026] FIG11 is a schematic block diagram of a second device according to an embodiment of the present application.

[0027] FIG12 is a schematic block diagram of a communication device according to an embodiment of the present application.

[0028] FIG13 is a schematic block diagram of a chip according to an embodiment of the present application.

[0029] FIG14 is a schematic block diagram of a communication system according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as LTE, LTE-A, NR, NR evolution, WLAN, WiFi, or other communication systems.

[0031] The embodiments of the present application describe various embodiments in conjunction with network devices and terminals. The terminals can be mobile or fixed, and can also be referred to as mobile stations, user units, etc. The terminal can be a site in a WLAN, and can be a smart terminal, wireless modem, laptop computer, tablet computer, or other terminal. In the embodiments of the present application, the terminal can be a VR terminal / AR terminal, an industrial control terminal, an unmanned driving terminal, a telemedicine terminal, a smart grid terminal, a transportation safety terminal, a smart city terminal, or a wireless terminal for a smart home, etc. As an example and not a limitation, in the embodiments of the present application, the terminal can also be a wearable device.

[0032] In the embodiment of the present application, the network device may be a device for communicating with a terminal, an access point in a WLAN, an evolved base station in LTE, or a relay station, or a network device (gNB) in an in-vehicle device, a wearable device, and an NR network, or a network device in a future evolved PLMN network or a network device in a non-terrestrial network. As an example and not a limitation, in the embodiment of the present application, the network device may have a mobile feature, for example, the network device may be a mobile device.

[0033] It should be understood that the terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. It should be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B. In the description of the embodiments of this application, the term "corresponding" can mean that there is a direct or indirect correspondence between the two, or it can mean that there is an association relationship between the two, or it can mean a relationship between indication and indication, configuration and configuration, etc.

[0034] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following relevant technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all fall within the protection scope of the embodiments of the present application.

[0035] Figure 1 exemplarily illustrates a communication system 100. The communication system includes a network device 110 and two terminals 120. In one possible implementation, the communication system 100 may include multiple network devices 110, and each network device 110 may include a different number of terminals 120 within its coverage area, although this embodiment of the present application does not limit this. In one possible implementation, the communication system 100 may also include a mobility management entity, access and mobility management functions, and other network entities, although this embodiment of the present application does not limit this. The network devices may include access network devices and core network devices. That is, the communication system may also include multiple core networks for communicating with the access network devices. The access network devices may be base stations of LTE, LTE-A, or NR systems. Taking the communication system shown in Figure 1 as an example, the communication devices may include network devices and terminals with communication functions. The communication devices may also include other devices in the communication system, such as network controllers, mobility management entities, and other network entities, although this embodiment of the present application does not limit this.

[0036] FIG2 is a schematic flow chart of a communication method according to an embodiment of the present application. The method includes at least part of the following contents.

[0037] S210. The first device receives a first media access control layer (MAC) protocol data unit (PDU) from the second device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated by the second device based on one or more first loads of the first MAC PDU.

[0038] Figure 3 is a schematic flow chart of a communication method according to another embodiment of the present application. The method includes at least part of the following contents.

[0039] S310. The second device sends a first MAC PDU to the first device, where the first MAC PDU carries a first message verification code, and the first message verification code is calculated based on one or more first loads of the first MAC PDU.

[0040] The first device is a first terminal, and the second device is one of the following: a network device or a second terminal. Alternatively, the first device is a network device, and the second device is a second terminal. Here, the network device may be an access network device or a core network device. In a preferred embodiment, the network device may be an access network device.

[0041] The aforementioned first MAC PDU may be any MAC PDU sent by the second device to the first device.

[0042] Exemplarily, the first device is a first terminal, and the second device is an access network device. In this case, the first MAC PDU can be any downlink MAC PDU.

[0043] Exemplarily, the first device is a first terminal, and the second device is a second terminal. In this case, the first MAC PDU can be any sidelink MAC PDU.

[0044] Exemplarily, the first device may be an access network device, and the second device may be a second terminal. In this case, the first MAC PDU may be any uplink MAC PDU.

[0045] The aforementioned one or more first payloads may be one or more payloads used to calculate the first message check code among all the payloads in the first MAC PDU. This embodiment does not limit the number of all the payloads in the first MAC PDU. Each of the one or more first payloads is one of the following types: MAC service data unit (SDU), MAC control element (CE). It should be understood that the type of the aforementioned first payload being MAC SDU or MAC CE is only for illustrative purposes. In some possible examples, the type of the aforementioned first payload may also include MAC RAR (Random Access Response). All possible types of the aforementioned first payload are not exhaustively enumerated here. In addition, the types of different first payloads may be the same or different. For example, the type of the aforementioned first payloads may all be MAC CE. This embodiment does not limit whether the types of the various first payloads are the same.

[0046] In some possible implementations, the first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

[0047] The aforementioned message check code is used for integrity checking or verification. For example, a message check code may include a message integrity check code (MIC) or a message authentication code (MAC). It should be noted that, to distinguish it from the MAC layer, MIC is used in some examples below to represent a message check code. These examples do not limit the full range of possible types of message check codes.

[0048] The aforementioned first MAC PDU may be composed of one or more MAC sub-headers and one or more payloads. Different MAC sub-headers correspond to different payloads, and any MAC sub-header may have a corresponding relationship with one or more payloads. For example, MAC sub-header 1 in the first MAC PDU may have a corresponding relationship with payload 1, and MAC sub-header 2 may have a corresponding relationship with payload 2, without exhausting the examples. For another example, MAC sub-header 1 may have a corresponding relationship with payload 1 and payload 2, and MAC sub-header 2 may have a corresponding relationship with payload 3, without exhausting the examples. This embodiment does not limit the determination or configuration method of the corresponding relationship between each MAC sub-header and each payload.

[0049] In a possible example, in the first MAC PDU, the one or more MAC sub-headers may form a MAC header, the MAC header is located at the starting position of the MAC PDU, one or more payloads are located after the MAC header, and the type of any payload may be any one of MAC CE, MAC SDU, and Padding. For example, referring to a format of the first MAC PDU illustrated in FIG4 , the MAC header of the first MAC PDU in FIG4 is located before the MAC payload, and the MAC CE1, MAC CE2, and multiple MAC SDUs illustrated in FIG4 are all payloads included in the MAC Payload. In addition, the MAC payload also includes padding, and this embodiment does not limit or explain the padding part; FIG4 provides an illustration that the MAC header may include one or more MAC sub-headers, for example, the MAC header in FIG4 further includes MAC sub-header 1, MAC sub-header 2, etc., wherein MAC sub-header 1 may correspond to MAC CE1, and MAC sub-header 2 may correspond to MAC CE2.

[0050] In a possible example, the first MAC PDU may include one or more MAC sub-PDUs, and any one of the one or more MAC sub-PDUs may include a MAC sub-header and one or more payloads, or any one of the MAC sub-PDUs may only include one or more payloads and not include a MAC sub-header, for example, a MAC sub-PDU including padding may not carry a MAC sub-header. The type of any one of the payloads in this embodiment is the same as that in the above example, and may be any one of MAC CE, MAC SDU, and Padding. For example, referring to another format of the first MAC PDU illustrated in FIG5 , the first MAC PDU format in FIG5 is particularly suitable for uplink MAC PDUs, and any one of the MAC sub-PDUs may be composed of a MAC sub-header plus any one of the following: MAC SDU, MAC CE, for example, the first MAC sub-PDU in FIG5 includes a MAC sub-header and its corresponding MAC CE1. In addition, for the sake of simplicity, Figure 5 does not illustrate the content that may be contained in any MAC subheader. Any MAC subheader may also carry at least part of the information fields of R, L, F, and LCID. The detailed description of each information field is not limited here.

[0051] In some embodiments, the first MAC sub-header is a MAC sub-header corresponding to one or more first payloads, and the one or more first payloads are all payloads corresponding to the first MAC sub-header.

[0052] Optionally, the number of first payloads is one, and this first payload is the only payload corresponding to the first MAC sub-header. For example, a first message check code is calculated for payload 1 (i.e., a first payload) in the first MAC PDU. This payload 1 corresponds to MAC sub-header 1 in the first MAC PDU. This MAC sub-header 1 is the aforementioned first MAC sub-header, that is, this MAC sub-header 1 carries the first message check code calculated based on payload 1.

[0053] For example, referring to FIG4 , a MAC header includes multiple MAC sub-headers, where MAC sub-header 1 corresponds to MAC CE1 and MAC sub-header 2 corresponds to MAC CE2. If a first MIC is calculated based on MAC CE1, i.e., MAC CE1 is the aforementioned first payload, then the first MIC is carried in MAC sub-header 1. For example, referring to FIG5 , if a first MIC is calculated based on MAC CE1, i.e., MAC CE1 is the aforementioned first payload, then the first MIC is carried in the sub-header corresponding to MAC CE1 (i.e., the first MAC sub-header).

[0054] Optionally, there are multiple first payloads, and the multiple first payloads are all payloads corresponding to the first MAC sub-header. For example, payload 1 and payload 2 in the first MAC PDU both correspond to MAC sub-header 1 in the first MAC PDU, and a first message check code is calculated based on payload 1 and payload 2 (i.e., two first payloads), then MAC sub-header 1 is the aforementioned first MAC sub-header, that is, MAC sub-header 1 carries the first message check code calculated based on payload 1 and payload 2. For example, referring to FIG4 for exemplary description, a MAC header includes multiple MAC sub-headers, wherein MAC sub-header 1 corresponds to MAC CE1 and MAC CE2. If a first MIC is calculated based on MAC CE1 and MAC CE2, that is, MAC CE1 and MAC CE2 are the aforementioned two first payloads, then the first MIC is carried in MAC sub-header 1.

[0055] In this embodiment, the first MAC sub-header may further carry first indication information, where the first indication information is used to indicate each of the one or more first payloads. Alternatively, since the one or more first payloads are all payloads corresponding to the first MAC sub-header, the first MAC sub-header may not carry the first indication information. It should be understood that, in order to reduce overhead, the first MAC sub-header may not carry the first indication information in this embodiment.

[0056] In some embodiments, the first MAC sub-header is a MAC sub-header corresponding to one or more first payloads, and the one or more first payloads are part of all payloads corresponding to the first MAC sub-header.

[0057] Optionally, the number of first payloads is one, and the first payload is any one of the multiple payloads corresponding to the first MAC sub-header. For example, a first message check code is calculated for payload 1 (i.e., a first payload) in the first MAC PDU. The first payload 1 corresponds to MAC sub-header 1 in the first MAC PDU. The first MAC sub-header 1 is the aforementioned first MAC sub-header, that is, the first message check code calculated based on the payload 1.

[0058] Optionally, there are multiple first payloads, and the multiple first payloads are part of the multiple payloads corresponding to the first MAC sub-header. For example, payload 1 and payload 2 in the first MAC PDU both correspond to MAC sub-header 1 in the first MAC PDU, and a first message check code is calculated based on payload 1 and payload 2 (i.e., the two first payloads). Then, MAC sub-header 1 is the aforementioned first MAC sub-header, that is, MAC sub-header 1 carries the first message check code calculated based on payload 1 and payload 2.

[0059] In this embodiment, since the one or more first payloads are part of the entire payload corresponding to the first MAC sub-header, the first MAC sub-header may further carry first indication information, where the first indication information is used to indicate each of the one or more first payloads. The first indication information is used to indicate which payload is the first payload used to calculate the first message check code.

[0060] In one example, the first indication information may include an identifier of each of the one or more first payloads. In another example, the first indication information may include the position corresponding to each first payload; for example, the position corresponding to any first payload may be the order in which the first payload is arranged among all payloads of the first MAC PDU. In another example, the position corresponding to any first payload may be the order in which the first payload is arranged among all payloads corresponding to the first MAC subheader. For example, if the first MAC subheader corresponds to three payloads, where payload 1 (located in the first order of all payloads corresponding to the first MAC subheader, i.e., payload 1 is the first payload) and payload 2 (located in the second order of all payloads corresponding to the first MAC subheader, i.e., payload 2 is the second payload) are used to calculate the first message check code, then the first indication information may directly indicate the first payload and the second payload. It should be understood that this is merely an exemplary description of the first indication information, and any indication method that can uniquely identify each first payload is within the scope of protection of this embodiment, but this is not intended to be exhaustive.

[0061] In some embodiments, the first MAC sub-header may be a MAC sub-header corresponding to at least part of the first loads in the multiple first loads. In this embodiment, the multiple first loads may correspond to multiple MAC sub-headers, so any one of the multiple MAC sub-headers may be used as the aforementioned first MAC sub-header. It should be noted that this embodiment does not limit the number of first loads and the number of MAC sub-headers corresponding to them. Different first loads may correspond to different MAC sub-headers, or part of the first loads may correspond to the same MAC sub-header and the remaining first loads may correspond to another identical MAC sub-header. All of these are within the protection scope of this embodiment, but are not exhaustive.

[0062] For example, load 1 and load 2 (that is, two first loads) in the first MAC PDU are used to jointly calculate the first message check code. Load 1 corresponds to MAC sub-header 1 in the first MAC PDU, and load 2 corresponds to MAC sub-header 2. The MAC sub-header 1 can be used as the aforementioned first MAC sub-header, and the MAC sub-header 1 carries the first message check code jointly calculated based on load 1 and load 2.

[0063] In this embodiment, since the first MAC sub-header is one of multiple MAC sub-headers corresponding to multiple first payloads, the first MAC sub-header may also carry the aforementioned first indication information to indicate which payload is the first payload used to calculate the first message check code. The description of the specific content of the first indication information is the same as that of the aforementioned embodiment and is not repeated here.

[0064] In some embodiments, the first MAC subheader may be a designated MAC subheader among all MAC subheaders of the first MAC PDU. This embodiment is not limited by the correspondence between MAC subheaders and payloads, but directly uses the designated MAC subheader to carry the first message check code. The designated MAC subheader may be a MAC subheader with a designated number, a designated sequence number, a designated position, or a designated arrangement order. The designated number, the designated sequence number, the designated position, or the designated arrangement order may be predefined or preconfigured, and the manner of determining the designated number, the designated sequence number, the designated position, or the designated arrangement order is not limited herein.

[0065] In this embodiment, since the correspondence between the MAC sub-header and the payload is not important, the first MAC sub-header may also carry the aforementioned first indication information to indicate which payload is the first payload used to calculate the first message check code. The specific content of the first indication information is the same as in the aforementioned embodiment and is not repeated here.

[0066] In some possible embodiments, the bits occupied by the aforementioned first message check code in the first MAC sub-header can be set according to actual conditions, for example, they can be specified by the protocol or by default.

[0067] Specifically, the first message check code occupies one or more designated bits in the designated information field in the first MAC sub-header. In some possible examples, the designated information field may be a reserved field, that is, the first message check code may occupy one or more designated bits of the reserved field in the first MAC sub-header, and the length of the first message check code is equal to the number of the designated bits. This embodiment does not limit the length of the first message check code, as long as the total length of the reserved field is greater than the length of the first message check code, it is within the protection scope of this embodiment. It should be understood that this is only an exemplary description. In actual processing, the designated information field may also be an L or F field or other field. The designated bits vary with the designated information field, but the number of designated bits may remain unchanged. All possible situations are not exhaustively listed here.

[0068] It should be pointed out that, in some possible cases, if a MAC PDU transmission does not calculate the MIC for any load, the MIC may not be carried in any MAC sub-header. In this case, one or more specified bits in the specified information field in the MAC sub-header may be set to zero to indicate that no MIC is currently carried, or that integrity protection is not enabled; or, in this case, the MAC sub-header may not carry one or more specified bits in the specified information field.

[0069] In some possible implementations, each of the first payloads is used to carry plaintext data. The plaintext data carried by any first payload can be referred to as the plaintext data corresponding to the first payload, or the plaintext data that the first payload should carry, or the plaintext data of the first payload. Alternatively, the plaintext data can also be referred to as raw data, that is, unencrypted data.

[0070] In some possible implementations, the first message check code may be carried by any one of one or more first payloads.

[0071] Optionally, there is one first payload, that is, the first payload carries both the first message verification code and the plaintext data. This embodiment does not limit the positional relationship between the first message verification code and the plaintext data. For example, the first message verification code may be located before, after, or within the plaintext data, all within the scope of this embodiment. In this case, since there is only one first payload and the first payload directly carries the first message verification code, the first indication information may not be carried.

[0072] For example, the plaintext data of payload 1 (i.e., a first payload) in the first MAC PDU is used to calculate a first message check code. Payload 1 carries both the first message check code and the plaintext data. For example, referring to FIG6 for exemplary illustration, if a first MIC is calculated based on MAC CE1, i.e., MAC CE1 is the aforementioned first payload, then the first MIC is carried in MAC CE1. For example, referring to FIG7 for another exemplary illustration, if a first MIC is calculated based on MAC CE1, i.e., MAC CE1 is the aforementioned first payload, then the first MIC is carried in MAC CE1.

[0073] Optionally, there are multiple first payloads, and any one of the multiple first payloads may include both the first message check code and the plaintext data or the original data. For example, payload 1 and payload 2 (i.e., two first payloads) in the first MAC PDU jointly calculate the first message check code, payload 1 carries the first message check code and the plaintext data of payload 1, and payload 2 continues to carry its plaintext data unchanged.

[0074] In this case, since there are multiple first payloads, the first payload carrying the first message check code may also carry first indication information to indicate which payload(s) participated in calculating the first message check code. This embodiment does not limit the positional relationship between the first indication information, the first message check code, and the plaintext data. For example, the first indication information may be placed first, followed by the first message check code, and finally the plaintext data. Alternatively, the first indication information may be placed at the very beginning, the plaintext data in the middle, and the first message check code at the end. This is merely an illustrative description and does not constitute a limitation of this embodiment.

[0075] In some possible embodiments, one or more message verification codes may be carried in the first MAC PDU.

[0076] For example, the first MAC PDU may carry only one message check code, which is the aforementioned first message check code. The first message integrity check code may be carried by the first MAC sub-header of the first MAC PDU, and its specific carrying method is the same as that of the aforementioned embodiment and will not be repeated.

[0077] For another example, the first MAC PDU can carry multiple message check codes, and any one of the multiple message check codes is the aforementioned first message check code. In this case, different message check codes are calculated based on different loads. This embodiment does not limit the number of message check codes that a MAC PDU can carry. As long as any message check code can be carried when any MAC PDU is transmitted, it is within the protection scope of this embodiment. The way of carrying any message check code is similar to the first message check code. For example, the second message check code is calculated based on one or more other loads (other loads different from the first load). The possible carrying method of the second message check code is similar to the aforementioned first message check code, and will not be elaborated.

[0078] In some embodiments, any first payload may carry any type of plaintext data, that is, there is no limitation on the content that the plaintext data may contain.

[0079] In some embodiments, the plaintext data includes device information, where the device information includes at least one of the following: information related to the first device and information related to the second device, and the relevant information includes at least one of the following: an identifier, an address, a location, private data, and model training data. This embodiment enables integrity protection only for a portion of the first payload containing device information, thereby reducing computational and communication overhead.

[0080] In this embodiment, the plaintext data including the device information does not mean that the plaintext data can only include the device information, but means that the plaintext data at least includes the device information.

[0081] The aforementioned relevant information about the first device may specifically be at least one of the following: an identifier of the first device, an address of the first device, a location of the first device, private data of the first device, and model training data of the first device. The aforementioned relevant information about the second device may specifically be at least one of the following: an identifier of the second device, an address of the second device, a location of the second device, private data of the second device, and model training data of the second device.

[0082] The identifier of the first device may be the identity (ID) of the first device, and the ID may include but is not limited to at least one of the following: number, serial number, name, SUPI (Subscription Permanent Identifier), SUCI (Subscription Concealed Identifier), PEI (Permanent Equipment Identifier), 5G-GUTI (5G Globally Unique Temporary Identifier), Internal-Group Identifier (IGI), GPSI (Generic Public Subscription Identifier), etc. The description of the identifier of the second device is similar to that of the first device and is not repeated.

[0083] The address of the first device may refer to a network address or network identifier of the first device, which may include at least one of an IP (Internet Protocol) address, a MAC address (Media Access Control Address), and the like. The description of the address of the second device is similar to that of the first device and is not repeated here.

[0084] The location of the first device may refer to at least one of the network location of the first device, the geographic location of the first device, and the like. The network location of the first device may be represented by at least one of a registration area identifier, a TAI (Tracking Area Identity), a cell ID (Cell ID), and a PCI (Physical Cell Identifier). The geographic location of the first device may be a location coordinate, such as longitude and latitude. The description of the location of the second device is similar to that of the first device and is not repeated.

[0085] The private data of the first device may include at least one of the identification, address, and location of the first device. The private data of the second device may include at least one of the identification, address, and location of the second device.

[0086] The model training data of the first device may refer to data related to the communication model training between the first device and the second device. Exemplarily, the model training data of the first device may include at least one of an AI data set, an AI model, a model gradient, etc. sent by the first device to the second device in AIML (Artificial Intelligence / Machine Learning). Correspondingly, the model training data of the second device may include at least one of an AI data set, an AI model, a model gradient, etc. sent by the second device to the first device in AIML.

[0087] In some possible implementations, the processing before the second device sends the first MAC PDU further includes: the second device uses an integrity protection algorithm to calculate the first message check code based on the integrity protection key and the one or more first payloads.

[0088] After the first device receives the first MAC PDU, the method further includes: the first device uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads, and verifies the integrity based on the verification code and the first message check code.

[0089] The foregoing embodiment has described that each first payload carries plaintext data. Accordingly, the second device employing an integrity protection algorithm to calculate the first message check code based on the integrity protection key and the one or more first payloads may include: the second device employing an integrity protection algorithm to calculate the first message check code based on the integrity protection key and the plaintext data corresponding to each first payload. The first device employing an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first payloads may include: the first device employing an integrity protection algorithm to calculate a verification code based on the integrity protection key and the plaintext data of each first payload.

[0090] The processing of the integrity verification of the first device based on the verification code and the first message check code may include: determining that the integrity verification is successful when the verification code and the first message check code are the same; and / or determining that the integrity verification fails when the verification code and the first message check code are different. It should be noted that the first message check code (and / or verification code) is used to perform integrity verification or verification on one or more first loads; accordingly, determining the success or failure of the integrity verification here refers to the success or failure of the integrity verification of one or more first loads corresponding to the first message check code. Further, if it is determined that the integrity verification is successful, the first device can receive the plaintext data corresponding to each first load; if the integrity verification fails, the first device can refuse to receive the plaintext data of each first load, or perform other prescribed subsequent processing, which is not limited here.

[0091] For the second device, the integrity protection algorithm is predefined or determined by the second device; and / or the integrity protection key is predefined or determined by the second device. For the first device, the integrity protection algorithm is predefined or indicated by the second device; and / or the integrity protection key is predefined or indicated by the second device. Here, the predefined can be default, specified by a protocol, preconfigured, etc.

[0092] The integrity protection algorithm can be any one of a plurality of optional integrity protection algorithms used to calculate the message check code. The integrity protection algorithm can also be alternatively called a complete protection algorithm or an integrity protection and check algorithm, etc., and all possible names are not exhaustively listed here.

[0093] The aforementioned integrity protection key may be one of the following: an access layer security base key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, or a first key. That is, the access layer security base key, the access layer signaling plane integrity verification key, the user plane integrity verification key, the physical layer key, and the first key may be used as multiple optional integrity protection keys. Ultimately, the integrity protection key used by the first device and the second device is any one of the aforementioned optional integrity protection keys, and the first device and the second device use the same integrity protection key or use integrity protection keys that are mutually paired.

[0094] The access stratum (AS) security base key can be K specified in the relevant protocol. gNB This embodiment does not limit the method of deriving the key.

[0095] The access layer signaling plane integrity verification key may specifically be an RRC layer integrity protection key, such as Krrcint specified in the relevant protocol. The access layer signaling plane integrity verification key may be included in a NAS (Non-Access Stratun) security context. This embodiment does not limit the derivation method of the key. The access layer signaling plane integrity verification key may also be referred to as an access layer signaling plane integrity key, or as an access layer signaling plane integrity protection key, etc., and all possible names are not exhaustively listed here.

[0096] The user plane integrity check key may also be called a user plane integrity protection key, or a user plane integrity protection key, or a user plane integrity protection and check key, etc. All possible names are not exhaustively listed here. For example, it can be expressed as K UPint The user plane integrity verification key may be included in the AS security context. This embodiment does not limit the derivation method of the key.

[0097] The physical layer key can be a pair of keys between the first device and the second device. The physical layer key can be generated based on the characteristics of the physical layer channel between the first device and the second device. This embodiment does not limit the specific generation method of the physical layer key; for example, the physical layer key can be expressed as Kphy.

[0098] The first key may also be referred to as a MAC layer integrity protection key, or a MAC layer integrity key, or a MAC layer integrity protection key. Exemplarily, the first key may be expressed as K-mac-int or Kmacint.

[0099] The first key may be a key derived based on any one of the aforementioned access layer security base key, access layer signaling plane integrity verification key, user plane integrity verification key, and physical layer key. In the processing of the second device, the method may further include one of the following: the second device calculates the first key based on the access layer security base key; the second device calculates the first key based on the access layer signaling plane integrity verification key; the second device calculates the first key based on the user plane integrity verification key; the second device calculates the first key based on the physical layer key. Accordingly, in the processing of the first device, the method further includes one of the following: the first device calculates the first key based on the access layer security base key; the first device calculates the first key based on the access layer signaling plane integrity verification key; the first device calculates the first key based on the user plane integrity verification key; the first device calculates the first key based on the physical layer key.

[0100] Optionally, taking the second device as an example, the second device calculates the first key based on the access layer security basic key, which may include: using a first calculation method to calculate the first key on the access layer security basic key and a first parameter.

[0101] The first calculation method can be configured according to actual conditions, for example, it can include at least one of the following: a key derivation function (KDF), a first authentication function, a second authentication function, a third key generation function (for example, it can be expressed as f3), a fourth key generation function (for example, it can be expressed as f4), a fifth key generation function (for example, it can be expressed as f5), a hash algorithm, an Advanced Encryption Standard (AES), SNOW 3G (Snow Third Generation), ZUC (ZUChongzhi), an exclusive OR calculation, and a direct connection calculation. The first authentication function can be expressed as f1(), and the second authentication function can be expressed as f2(); the hash algorithm can be expressed as HASH(), and the hash algorithm can include HMAC-SHA-256 (Hash based Message Authentication Code-Secure Hash Algorithm-256), or other hash algorithms can be used, which are not exhaustive in this embodiment.

[0102] The first parameter may include at least one of the following: a first fixed value, a first algorithm type, a length of the first algorithm type, an identifier of the first algorithm, a length of the identifier of the first algorithm, an identifier of the first device, and an identifier of the second device.

[0103] The first fixed value may be specified by a protocol, or a default value, or a pre-configured value. The first fixed value may be represented as FC, for example, FC=0xXX.

[0104] The first algorithm may refer to an algorithm used to calculate a first key, the first key being a MAC layer integrity protection key. Accordingly, the first algorithm may be a MAC layer integrity protection algorithm. Furthermore, the first algorithm type may be a type of a MAC layer integrity protection algorithm; the length of the first algorithm type may be represented in a specified base, such as hexadecimal; and the identifier of the first algorithm may be an identifier of a MAC layer integrity protection algorithm.

[0105] Exemplarily, assuming that the first key is represented by K-mac-int, its derivation method may be to adopt a first calculation method, such as KDF, the input key is KgNB (ie, the access layer security basic key), and the input parameters include:

[0106] First fixed value FC=0xXX;

[0107] P0 = algorithm type distinguisher (algorithm type) value (value), where P0 in this example represents the value of the first algorithm type, that is, the value of the type of the aforementioned MAC layer integrity protection algorithm. The value of the type of the MAC layer integrity protection algorithm can be predefined; for example, the value of the type of the MAC layer integrity protection algorithm can be determined based on the values ​​of various algorithm types specified by the relevant protocol (for example, see Table 1 below).

[0108] L0 = length of algorithm type distinguisher, where L0 in this example represents the length of the first algorithm type, that is, the length of the value P0 of the type of the MAC layer integrity protection algorithm;

[0109] P1=algorithm identity (EIA-1 / 2 / 3, NIA-1 / 2 / 3), where P1 in this example represents the identity of the MAC layer integrity protection algorithm, such as EIA-1 / 2 / 3 and NIA-1 / 2 / 3. EIA1 represents LTE (or 4G) integrity protection algorithm 1 (which may be Snow 3G), EIA2 represents LTE (or 4G) integrity protection algorithm 2 (which may be AES), and EIA3 represents LTE (or 4G) integrity protection algorithm 3 (which may be ZUC). NIA1 to NIA3 represent NR (or 5G) integrity protection algorithms 1 to 3, respectively. This is for illustrative purposes only and does not limit the representation of MAC layer integrity protection algorithms.

[0110] L1=length of algorithm identity, where L1 in this example represents the length of the identifier of the MAC layer integrity protection algorithm, for example, it can be 0x00 or 0x01, etc.

[0111] The values ​​of various algorithm types specified in the relevant protocols involved in the above embodiments are further illustrated as follows in conjunction with Table 1:

[0112] Table 1

[0113] Optionally, taking the second device as an example, calculating the first key based on the access stratum signaling plane integrity verification key by the second device may include: calculating the first key using the access stratum signaling plane integrity verification key and a first parameter using a first calculation method. The first calculation method is the same as described in the preceding embodiment and is not described in detail here. The description of the first parameter is also the same as in the preceding embodiment and is not repeated here.

[0114] Optionally, taking the second device as an example, calculating the first key based on the user plane integrity verification key by the second device may include: calculating the first key using the user plane integrity verification key and a first parameter using a first calculation method. The first calculation method is the same as described in the preceding embodiment and is not further described. The description of the first parameter is also the same as in the preceding embodiment and is not repeated here.

[0115] Optionally, taking the second device as an example, calculating the first key based on the physical layer key by the second device may include: calculating the first key from the physical layer key and a first parameter using a first calculation method. The first calculation method is the same as described in the preceding embodiment and is not described in detail here. The description of the first parameter is also the same as in the preceding embodiment and is not described again here.

[0116] It should be understood that the above is only an exemplary explanation using the second device calculating the first key as an example. The process of the first device calculating the first key using different keys should be the same as the process of the second device calculating the first key using different keys, so no repeated explanation will be given. It should be pointed out that since the first device and the second device should use the same algorithm and the same parameters to calculate the first key respectively, the first keys obtained by the two should theoretically be the same. This embodiment no longer distinguishes between the different names of the first keys of the first device and the second device. In the following text, if necessary, the first key of the first device and the first key of the second device will be used to represent the first keys generated, derived or calculated by different devices, respectively, and if the first key of the first device or the first key of the second device is not specifically mentioned in the following text, it can represent the first key of any device.

[0117] In some possible implementations, the processing by the second device may further include: the second device sending third indication information to the first device, where the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, or an identifier of an integrity protection key. Accordingly, the processing by the first device may further include: the first device receiving the third indication information from the second device, where the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, or an identifier of an integrity protection key.

[0118] Whether the second device sends the aforementioned third indication information to the first device, and whether to send part or all of the third indication information, can be determined according to actual conditions.

[0119] In some embodiments, the second device and the first device may use a mutually agreed-upon integrity protection algorithm; alternatively, the second device and the first device may both use a protocol-specified integrity protection algorithm. As long as the integrity protection algorithms ultimately used by the first and second devices are the same or correspond to each other, they are protected within the scope of this embodiment. The second device and the first device may use a mutually agreed-upon integrity protection key; alternatively, the second device and the first device may both use a protocol-specified integrity protection key. As long as the integrity protection keys ultimately used by the first and second devices are the same, they are protected within the scope of this embodiment. In this embodiment, the second device is not required to send third indication information to the first device.

[0120] It should be noted that in different scenarios, the second device and the first device may use different keys as the aforementioned integrity protection key. Which scenarios use which integrity protection key may be predefined (such as specified by the protocol or by default). As long as the integrity protection keys used by the first device and the second device are the same or are paired keys to each other, they are within the protection scope of this embodiment. For example, the first device is an access network device and the second device is a second terminal. In one scenario, the second terminal does not have a 5G security context, and there may only be a physical layer key between the second terminal and the access network device as the paired key between the two parties. In this scenario, the second terminal and the access network device may determine by default or based on the protocol to use the physical layer key directly as the integrity protection key, or may determine by default or based on the protocol to use the first key obtained from the physical layer key as the integrity protection key. In another scenario, the second terminal has a complete 5G security context. The second terminal and the access network device may determine by default or based on the protocol provisions to use the access layer signaling plane integrity verification key or the user plane integrity verification key as the integrity protection key, or the second terminal and the access network device may determine by default or based on the protocol provisions to use the first key obtained from one of the access layer signaling plane integrity verification key and the user plane integrity verification key as the integrity protection key. In some other scenarios, the second terminal has a partial 5G security context, such as only a NAS security context. The second terminal and the access network device may determine by default or based on the protocol provisions to use the access layer signaling plane integrity verification key as the integrity protection key, or may determine by default or based on the protocol provisions to use the first key calculated from the access layer signaling plane integrity verification key as the integrity protection key. All possible scenarios and the integrity protection keys that may be used are not exhaustively listed and limited here.

[0121] In some embodiments, the second device and the first device can use a mutually agreed-upon integrity protection key; alternatively, both the second device and the first device can use a protocol-specified integrity protection key. As long as the first and second devices ultimately use the same integrity protection key, they are protected within the scope of this embodiment. The method for determining which integrity protection key to use between the first and second devices in different scenarios is the same as in the previous embodiment and is not further described.

[0122] The second device may select any one of multiple selectable integrity protection algorithms as the integrity protection algorithm. In this case, the second device may further include: the second device sending third indication information to the first device, where the third indication information indicates the identifier of the integrity protection algorithm; and the first device correspondingly receiving the third indication information from the second device, where the third indication information indicates the identifier of the integrity protection algorithm. Thus, after receiving the third indication information, the first device may determine the integrity protection algorithm based on the identifier of the integrity protection algorithm.

[0123] In some embodiments, the second device and the first device may adopt a default integrity protection algorithm for both parties; alternatively, the second device and the first device may both adopt an integrity protection algorithm specified in the protocol. As long as the integrity protection algorithms ultimately used by the first device and the second device are the same or corresponding, they are within the protection scope of this embodiment.

[0124] The second device may determine any one of multiple selectable integrity protection keys as the integrity protection key. In this case, the second device may further include: the second device sending third indication information to the first device, where the third indication information indicates an identifier of the integrity protection key; and the first device correspondingly receiving the third indication information from the second device, where the third indication information indicates the identifier of the integrity protection key. Thus, after receiving the third indication information, the first device may determine the integrity protection key based on the identifier of the integrity protection key.

[0125] It should be pointed out that the second device can determine which key to use as the aforementioned integrity protection key based on the actual scenario. For example, the first device is the first terminal and the second device is the network device (specifically the access network device). In one scenario, the first terminal does not have a 5G security context, and there may only be multiple optional physical layer keys between the first terminal and the access network device. In this scenario, the access network device can determine any one of the multiple optional physical layer keys as the integrity protection key, or can determine the first key calculated from any one of the multiple optional physical layer keys as the integrity protection key. In another scenario, the first terminal has a complete 5G security context, and the access network device can determine to use any one of the access layer signaling plane integrity verification key or the user plane integrity verification key as the integrity protection key, or the access network device determines to use the first key obtained from any one of the access layer signaling plane integrity verification key and the user plane integrity verification key as the integrity protection key. All possible scenarios and the integrity protection keys that may be used are not exhaustively enumerated and limited here.

[0126] In some embodiments, the second device may determine any one of multiple selectable integrity protection algorithms as the integrity protection algorithm; and the second device may determine any one of multiple selectable integrity protection keys as the integrity protection key. In this case, the second device may further include: the second device sending third indication information to the first device, where the third indication information indicates the identifier of the integrity protection algorithm and the identifier of the integrity protection key; and the first device correspondingly receiving the third indication information from the second device, where the third indication information indicates the identifier of the integrity protection algorithm and the identifier of the integrity protection key. Upon receiving the third indication information, the first device may determine the integrity protection algorithm based on the identifier of the integrity protection algorithm and the integrity protection key based on the identifier of the integrity protection key. In this embodiment, the manner in which the second device determines the integrity protection key is the same as in the previous embodiment and is not repeated here.

[0127] From the description of the above embodiment, it can be seen that whether the second device sends the aforementioned third indication information to the first device or what specific information to send is determined based on actual conditions. When the third indication information needs to be sent, the third indication information is carried by the first MAC PDU; or the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

[0128] In some embodiments, the third indication information is carried by the first MAC PDU, that is, the third indication information can be carried by the first MAC PDU currently being transmitted that carries the first MIC, that is, the second device indicates the identifier of the integrity protection algorithm and / or the identifier of the integrity protection key while sending the first MIC.

[0129] Optionally, the third indication information may be carried by any payload of the first MAC PDU, and the payload may be the same as or different from any of the aforementioned first payloads, all within the protection scope of this embodiment.

[0130] Optionally, the third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU. The second MAC sub-header may be the same as or different from the first MAC sub-header of the aforementioned embodiment, and both are within the protection scope of this embodiment. In the case where the third indication information is carried by the second MAC sub-header, the bits occupied by the third indication information in the information field of the second MAC sub-header are not limited in this embodiment, and may also be any one or more bits in any information field of the second MAC sub-header, and both are within the protection scope of this embodiment.

[0131] In some embodiments, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU. In this embodiment, the time domain occupied by the second MAC PDU is earlier than that of the first MAC PDU, that is, the second MAC PDU may be sent earlier than the first MAC PDU. This embodiment does not limit whether the second MAC PDU has other functions or indicates other content. In addition, the third indication information may be carried by any one or more payloads of the second MAC PDU, or by any one or more MAC sub-headers of the second MAC PDU, all of which are within the protection scope of this embodiment and are not limited or exhaustive here.

[0132] In some possible implementations, each of the one or more second payloads of the first MAC PDU is used to carry ciphertext data, the ciphertext data carried by each second payload is calculated by the second device based on the plaintext data corresponding to the second payload, and the one or more first payloads include the one or more second payloads.

[0133] In the aforementioned embodiment, all or part of the one or more first payloads used to calculate the first message check code may also carry ciphertext data calculated from the corresponding plaintext data. For the sake of convenience, this embodiment refers to any first payload carrying ciphertext data as a second payload.

[0134] Because not all first payloads may require encryption, the number of second payloads may be less than or equal to the number of first payloads. Furthermore, because not all first payloads may require encryption, the first MAC PDU may further carry second indication information, where the second indication information is used to indicate the one or more second payloads. In other words, the second indication information is used to indicate each second payload, specifically, which first payloads used to calculate the first message check code carry encrypted plaintext data, or which first payloads used to calculate the first message check code carry ciphertext data.

[0135] In one example, the second indication information may include an identifier of each second load in the one or more second loads. In another example, the second indication information may include a position corresponding to each second load; for example, the position corresponding to any second load may be the arrangement order of the second load in all the loads of the first MAC PDU; for another example, the position corresponding to any second load may be the arrangement order of the second load in all the first loads. It should be understood that this is only an exemplary description of the second indication information, and any indication method that can uniquely identify each second load can be within the protection scope of this embodiment, but it is not exhaustive.

[0136] In some examples, the first MAC subheader of the first MAC PDU also carries second indication information, and the second indication information is used to indicate the one or more second payloads. This embodiment does not limit the location of the first MAC subheader carrying the second indication information, nor the positional relationship between the second indication information and the first indication information. Any positional relationship between the first indication information and the second indication information that can be distinguished is within the scope of protection of this embodiment. In other examples, the second indication information can be carried by any second payload of the first MAC PDU, that is, the second payload can carry the second indication information in a certain designated location. As long as the second indication information and the ciphertext data carried by the second payload can be distinguished, it is within the scope of protection of this embodiment. Alternatively, the second indication information can be carried by any payload of the first MAC PDU, that is, any payload can carry the second indication information in a certain designated location. As long as the second indication information and the data carried by the payload can be distinguished, it is within the scope of protection of this embodiment. All possible ways of carrying the second indication information are not exhaustively listed here.

[0137] In some embodiments, the number of the aforementioned first payloads may be one, and the plaintext data of the first payload needs to be encrypted, that is, the first payload is the second payload of this embodiment. In this embodiment, since the first payload and the second payload are the same, that is, the payload used to calculate the first message check code also carries ciphertext data, no additional indication is required. Alternatively, in this embodiment, second indication information may be added to indicate that a payload carries ciphertext data in addition to being used to calculate the first message check code.

[0138] In some embodiments, the number of the aforementioned first loads may be multiple.

[0139] Optionally, the second device may determine that only the plaintext data of the i-th first payload among the multiple first payloads needs to be encrypted, and the i-th first payload is the second payload, where i is a positive integer. In this case, the first MAC PDU may carry the aforementioned first indication information and the aforementioned second indication information. The relevant description and carrying method of the first indication information and the second indication information are the same as those in the aforementioned embodiment and are not repeated here.

[0140] Optionally, the second device may determine that the plaintext data of the i-th first payload and the plaintext data of the j-th first payload among multiple first payloads need to be encrypted, in which case the i-th first payload and the j-th first payload are both second payloads, where j is different from i and is a positive integer. In this case, the first MAC PDU may carry the aforementioned first indication information and the aforementioned second indication information. The relevant description and carrying method of the first indication information and the second indication information are the same as those in the aforementioned embodiment and are not repeated here.

[0141] Optionally, the second device may encrypt the plaintext data of each first payload, that is, in this case, each first payload is a second payload in this embodiment. In this case, the first MAC PDU may carry the aforementioned first indication information and may or may not carry the aforementioned second indication information. The relevant description and carrying method of the first indication information and the second indication information are the same as those in the aforementioned embodiment and are not repeated here.

[0142] It should also be understood that the aforementioned embodiments have already explained that any first payload can carry plaintext data, and that this plaintext data can be of any type, including plaintext data containing device information. Similarly, in this embodiment, the description of the plaintext data corresponding to the second payload is the same as in the aforementioned embodiments and will not be repeated here.

[0143] In some possible implementations, the processing before the second device sends the first MAC PDU may also include: the second device uses a confidentiality algorithm and a confidentiality key to encrypt the plaintext data corresponding to each second load to obtain the ciphertext data carried by each second load.

[0144] After the first device receives the first MAC PDU, the method further includes: the first device decrypting the ciphertext data corresponding to each second payload using a confidentiality algorithm and a confidentiality key to obtain the plaintext data corresponding to each second payload.

[0145] There is no limitation on the order in which the second device calculates the first message verification code and performs encryption, and the order in which the first device verifies the integrity based on the verification code and the first message verification code and performs decryption.

[0146] In one embodiment, the one or more second loads are parts of the one or more first loads.

[0147] Optionally, the second device may first calculate the first message check code based on the integrity protection key and the plaintext data corresponding to each first payload using an integrity protection algorithm; then encrypt the plaintext data corresponding to each second payload to obtain the ciphertext data carried by each second payload. Accordingly, the first device may decrypt the ciphertext data corresponding to each second payload using the confidentiality algorithm and the confidentiality key to obtain the plaintext data corresponding to each second payload; then, the first device may calculate a verification code based on the integrity protection key and the plaintext data of each first payload using the integrity protection algorithm, and verify the integrity based on the verification code and the first message check code.

[0148] Since the second payload is part of the first payload, the first device uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the plaintext data of each first payload, which may mean that the first device uses an integrity protection algorithm to calculate a verification code based on the integrity protection key, the plaintext data corresponding to the second payload, and the plaintext data of each first payload except the second payload.

[0149] Optionally, the second device may first encrypt the plaintext data corresponding to each second payload to obtain the ciphertext data carried by each second payload; then, based on the integrity protection algorithm, the integrity protection key, the ciphertext data carried by each second payload, and the plaintext data corresponding to each first payload other than each second payload, calculate the first message check code. Accordingly, the first device may calculate a verification code based on the integrity protection key, the ciphertext data carried by each second payload, and the plaintext data corresponding to each first payload other than each second payload using the integrity protection algorithm, and verify the integrity based on the verification code and the first message check code; if it is determined that the integrity verification is successful, decrypt the ciphertext data corresponding to each second payload using the confidentiality algorithm and confidentiality key to obtain the plaintext data corresponding to each second payload, and save the plaintext data corresponding to each first payload.

[0150] In this embodiment, the process of the first device verifying the integrity based on the verification code and the first message check code is the same as that in the above embodiment and will not be repeated.

[0151] In one embodiment, the one or more second loads are all of the one or more first loads, that is, the first load and the second load are the same.

[0152] Optionally, the second device may first calculate the first message check code based on the integrity protection key and the plaintext data corresponding to each first payload using an integrity protection algorithm; then encrypt the plaintext data corresponding to each second payload to obtain the ciphertext data carried by each second payload. Accordingly, the first device may decrypt the ciphertext data corresponding to each second payload using a confidentiality algorithm and a confidentiality key to obtain the plaintext data corresponding to each second payload; then, the first device may calculate a verification code based on the integrity protection key and the plaintext data of each first payload using an integrity protection algorithm, and verify the integrity based on the verification code and the first message check code. Since the second payload in this embodiment is the same as the first payload, the first device calculates the verification code based on the integrity protection key and the plaintext data of each first payload using the integrity protection algorithm. This may refer to the following: the first device calculates the verification code based on the integrity protection key and the plaintext data corresponding to the second payload using the integrity protection algorithm.

[0153] Optionally, the second device may first encrypt the plaintext data corresponding to each second payload to obtain the ciphertext data carried by each second payload; then, using an integrity protection algorithm, the integrity protection key, and the ciphertext data carried by each second payload, calculate the first message check code. Accordingly, the first device may use the integrity protection algorithm to calculate a verification code based on the integrity protection key and the ciphertext data carried by each second payload, and verify the integrity based on the verification code and the first message check code; if the integrity verification is successful, decrypt the ciphertext data corresponding to each second payload using the confidentiality algorithm and the confidentiality key to obtain the plaintext data corresponding to each second payload.

[0154] In some embodiments, for the second device, the confidentiality algorithm is predefined or determined by the second device; and / or the confidentiality key is predefined or determined by the second device. For the first device, the confidentiality algorithm is predefined or indicated by the second device; and / or the confidentiality key is predefined or indicated by the second device.

[0155] The confidentiality algorithm may be any one of a variety of selectable confidentiality algorithms for encryption and / or decryption.

[0156] The confidentiality key is one of the following: an access layer security infrastructure key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, and a second key. That is, the access layer security infrastructure key, the access layer signaling plane confidentiality key, the user plane confidentiality key, the physical layer key, and the second key can be used as multiple optional confidentiality keys. Ultimately, the confidentiality key used by the first device and the second device is any one of the aforementioned optional confidentiality keys, and the first device and the second device use the same confidentiality key or use confidentiality keys that are mutually keyed.

[0157] Among them, the relevant descriptions of the access layer security basic key and the physical layer ciphertext are the same as those in the previous embodiment and are not repeated here.

[0158] The access layer signaling plane confidentiality key may specifically be an RRC layer confidentiality key, such as Krrcenc specified in the relevant protocol. The access layer signaling plane confidentiality key may be included in a NAS (non-access layer, Non-Access Stratun) security context. This embodiment does not limit the derivation method of the key.

[0159] The user plane confidentiality key can also be called the user plane confidentiality key, which can be expressed as K UPenc The user plane confidentiality key may be included in the AS security context. This embodiment does not limit the derivation method of the key.

[0160] The second key may also be referred to as a MAC layer confidentiality key. Exemplarily, the second key may be expressed as K-mac-enc or Kmacenc.

[0161] The second key may be a key derived based on any one of the aforementioned access layer security base key, access layer signaling plane confidentiality key, user plane confidentiality key, and physical layer key. In the processing of the second device, the method further includes one of the following: the second device calculates the second key based on the access layer security base key; the second device calculates the second key based on the access layer signaling plane confidentiality key; the second device calculates the second key based on the user plane confidentiality key; the second device calculates the second key based on the physical layer key. Correspondingly, in the processing of the first device, the method further includes one of the following: the first device calculates the second key based on the access layer security base key; the first device calculates the second key based on the access layer signaling plane confidentiality key; the first device calculates the second key based on the user plane confidentiality key; the first device calculates the second key based on the physical layer key.

[0162] Optionally, taking the second device as an example, the second device calculating the second key based on the access layer security basic key may include: using a second calculation method to calculate the second key on the access layer security basic key and a second parameter.

[0163] The second calculation method can be configured according to actual conditions, for example, it can include at least one of the following: KDF, a first authentication function, a second authentication function, a third key generation function, a fourth key generation function, a fifth key generation function, a hash algorithm, AES, SNOW 3G, ZUC, XOR calculation, and direct calculation. Specifically, the second calculation method and the first calculation method can select which algorithm or function to use based on actual conditions. That is, in actual processing, the algorithms or functions used for the first key and the second key can be the same or different, and this embodiment does not limit this.

[0164] The second parameter may include at least one of the following: a second fixed value, a second algorithm type, a length of the second algorithm type, an identifier of the second algorithm and a length of the identifier of the second algorithm, an identifier of the first device, and an identifier of the second device.

[0165] The second fixed value may be specified by the protocol, or a default value, or a preconfigured value. The second fixed value may be the same as or different from the first fixed value, for example, the second fixed value may be the same as the first fixed value and both may be expressed as FC, such as FC=0xXX.

[0166] The second algorithm may refer to an algorithm used to calculate a second key, the second key being a MAC layer confidentiality key. Accordingly, the second algorithm may be a MAC layer confidentiality algorithm. Furthermore, the second algorithm type may be a type of a MAC layer confidentiality algorithm; the length of the second algorithm type may be represented in a specified base, such as hexadecimal; and the second algorithm identifier may be an identifier of a MAC layer confidentiality algorithm.

[0167] Exemplarily, assuming that the second key is represented by K-mac-enc, its derivation method may be to adopt a second calculation method, such as KDF, the input key is KgNB (ie, the access layer security basic key), and the input parameters include:

[0168] The second fixed value (which may be equal to the first fixed value) FC=0xXX;

[0169] P0=algorithm type distinguisher (algorithm type) value (value), where P0 in this example represents the value of the second algorithm type, that is, the value of the type of the aforementioned MAC layer confidentiality algorithm. The value of the type of the MAC layer confidentiality algorithm can be predefined; for example, the value of the type of the MAC layer confidentiality algorithm can be determined based on the values ​​of various algorithm types specified by the relevant protocol (for example, see Table 2 below).

[0170] L0 = length of algorithm type distinguisher, where L0 in this example represents the length of the second algorithm type, that is, the length of the value P0 of the type of the MAC layer confidentiality algorithm;

[0171] P1=algorithm identity (EIA-1 / 2 / 3, NIA-1 / 2 / 3), where P1 in this example represents the identity of the MAC layer confidentiality algorithm, such as EIA-1 / 2 / 3, NIA-1 / 2 / 3. The description thereof is the same as in the previous embodiment and is not repeated here.

[0172] L1=length of algorithm identity, where L1 in this example represents the length of the identifier of the MAC layer confidentiality algorithm, for example, it can be 0x00 or 0x01, etc.

[0173] The values ​​of various algorithm types specified in the relevant protocols involved in the above embodiments are further illustrated as follows in conjunction with Table 2:

[0174] Table 2

[0175] Optionally, taking the second device as an example, calculating the second key based on the access stratum signaling plane confidentiality key by the second device may include: calculating the second key from the access stratum signaling plane confidentiality key and a second parameter using a second calculation method. The second calculation method is the same as described in the preceding embodiment and is not described in detail here. The description of the second parameter is also the same as in the preceding embodiment and is not repeated here.

[0176] Optionally, taking the second device as an example, calculating the second key based on the user plane confidentiality key by the second device may include: calculating the second key from the user plane confidentiality key and the second parameter using a second calculation method. The second calculation method is the same as described in the preceding embodiment and is not described again. The description of the second parameter is also the same as in the preceding embodiment and is not repeated here.

[0177] Optionally, taking the second device as an example, calculating the second key based on the physical layer key by the second device may include: calculating the second key from the physical layer key and a second parameter using a second calculation method. The second calculation method is the same as described in the previous embodiment and is not described in detail here. The description of the second parameter is also the same as in the previous embodiment and is not repeated here.

[0178] It should be understood that the above is only an illustrative description of the calculation of the second key by the second device. The process of the first device using different keys to calculate the second key should be the same as the process of the second device using different keys to calculate the second key, so no repeated description will be given. It should be pointed out that since the first device and the second device should use the same algorithm and the same parameters to calculate the second key respectively, the second keys obtained by the two should theoretically be the same, but the two devices use the second key in a corresponding manner. For example, the first device uses the second key for decryption and the second device uses the second key for encryption. Therefore, this embodiment no longer distinguishes between the different names of the second keys of the first device and the second device. In the following text, if necessary, the second key of the first device and the second key of the second device will be used to represent the second keys generated, derived or calculated by different devices, respectively, and if the second key of the first device or the second key of the second device is not specifically mentioned in the following text, it can represent the second key of any device.

[0179] In some possible implementations, the processing by the second device may further include: the second device sending third indication information to the first device, where the third indication information is used to indicate at least one of the following: an identifier of a confidentiality algorithm, or an identifier of a confidentiality key. Accordingly, the processing by the first device may further include: the first device receiving the third indication information from the second device, where the third indication information is used to indicate at least one of the following: an identifier of a confidentiality algorithm, or an identifier of a confidentiality key.

[0180] Whether the second device sends the aforementioned third indication information to the first device, and whether to send part or all of the third indication information, can be determined according to actual conditions.

[0181] In some embodiments, the second device and the first device may use a mutually agreed-upon confidentiality algorithm; alternatively, the second device and the first device may both use a protocol-specified confidentiality algorithm. As long as the confidentiality algorithms ultimately used by the first and second devices are the same or correspond to each other, they are protected by this embodiment. The second device and the first device may use a mutually agreed-upon confidentiality key; alternatively, the second device and the first device may both use a protocol-specified confidentiality key. As long as the confidentiality keys ultimately used by the first and second devices are the same, they are protected by this embodiment. In this embodiment, the second device is not required to send third indication information to the first device.

[0182] It should be pointed out that in different scenarios, the second device and the first device can use different keys as the aforementioned confidentiality keys. The description of which scenarios use which confidentiality keys is similar to the description of which scenarios use which integrity protection keys in the aforementioned embodiments. As long as the confidentiality keys used by the first device and the second device are the same or are paired keys to each other, they are within the protection scope of this embodiment and will not be repeated here.

[0183] In some embodiments, the second device and the first device may use a mutually agreed-upon confidentiality key; alternatively, both the second device and the first device may use a confidentiality key specified in the protocol. As long as the first and second devices ultimately use the same confidentiality key, they are protected by this embodiment. The method for determining which confidentiality key to use between the first and second devices in different scenarios is the same as in the previous embodiment and is not further described here.

[0184] The second device may determine any one of multiple selectable confidentiality algorithms as the confidentiality algorithm. In this case, the second device may further include: the second device sending third indication information to the first device, where the third indication information indicates the identifier of the confidentiality algorithm; and the first device correspondingly receiving the third indication information from the second device, where the third indication information indicates the identifier of the confidentiality algorithm. Thus, after receiving the third indication information, the first device may determine the confidentiality algorithm based on the identifier of the confidentiality algorithm.

[0185] In some embodiments, the second device and the first device may adopt a confidentiality algorithm that is mutually agreed upon; alternatively, the second device and the first device may both adopt a confidentiality algorithm specified in the protocol. As long as the confidentiality algorithms ultimately used by the first device and the second device are the same or correspond to each other, they are within the protection scope of this embodiment.

[0186] The second device may determine any one of a plurality of optional confidentiality keys as the confidentiality key; in this case, the second device may further include: the second device sends a third indication message to the first device, the third indication message being used to indicate the identifier of the confidentiality key; and correspondingly, the first device receives the third indication message from the second device, wherein the third indication message is used to indicate the identifier of the confidentiality key. In this way, after the first device receives the third indication message, it may determine the confidentiality key based on the identifier of the confidentiality key. It should be noted that the second device may determine which key to use as the aforementioned confidentiality key based on the actual scenario. The specific description thereof is similar to the description of the second device determining which key to use as the aforementioned integrity protection key based on the actual scenario in the aforementioned embodiment, and will not be repeated.

[0187] In some embodiments, the second device may be any one of a plurality of optional confidentiality algorithms as a confidentiality algorithm; and the second device may be any one of a plurality of optional confidentiality keys as a confidentiality key. In this case, the second device may further include: the second device sends a third indication message to the first device, the third indication message being used to indicate the identifier of the confidentiality algorithm and the identifier of the confidentiality key; and correspondingly, the first device receives the third indication message from the second device, wherein the third indication message is used to indicate the identifier of the confidentiality algorithm and the identifier of the confidentiality key. In this way, after the first device receives the third indication message, it can determine the confidentiality algorithm based on the identifier of the confidentiality algorithm, and determine the confidentiality key based on the identifier of the confidentiality key. In this embodiment, the manner in which the second device determines the confidentiality key is the same as in the aforementioned embodiment and will not be repeated.

[0188] From the description of the above embodiment, it can be seen that whether the second device sends the aforementioned third indication information to the first device or what specific information to send is determined based on actual conditions. When the third indication information needs to be sent, the third indication information is carried by the first MAC PDU; or the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

[0189] Based on the solutions provided in the aforementioned embodiments, it can be seen that the third indication information can be used to indicate at least one of the following: an identifier of the integrity protection algorithm, an identifier of the integrity protection key, an identifier of the confidentiality algorithm, and an identifier of the confidentiality key. It should be noted that the third indication information can be sent multiple times or only once. If the third indication information can be sent multiple times, the content type contained in the third information sent multiple times can be different. For example, the third indication information sent once may only include the identifier of the integrity protection key, while the third indication information sent next time may only include the identifier of the confidentiality key. This is not an exhaustive list. In some examples, some of the identifiers of the integrity protection algorithm, integrity protection key, confidentiality algorithm, and confidentiality key may be default, while others may be determined by the second device, and none of them need to be updated. In this case, the third indication information may be sent only once, and the third indication information may include at least one of the identifier of the integrity protection algorithm, integrity protection key, confidentiality algorithm, and confidentiality key. In some examples, some of the integrity protection algorithm identifier, integrity protection key identifier, confidentiality algorithm identifier, and confidentiality key identifier may be determined by the second device and need to be updated. In this case, when the second device determines that at least one of the integrity protection algorithm identifier, integrity protection key identifier, confidentiality algorithm identifier, and confidentiality key identifier needs to be updated, the third indication information may be sent, and the third indication information may carry at least one of the updated integrity protection algorithm identifier, integrity protection key identifier, confidentiality algorithm identifier, and confidentiality key identifier. The manner of carrying the third indication information each time is the same as in the aforementioned embodiment and is not repeated here.

[0190] In the aforementioned embodiment, the processing of the first device as the receiving end of the first MAC PDU and the processing of the second device as the sending end of the first MAC PDU are applicable to various possible scenarios, such as the first device is a first terminal and the second device is an access network device; or the first device is a first terminal and the second device is a second terminal; or the first device can be an access network device and the second device can be a second terminal.

[0191] In some embodiments, when the first device is an access network device, it is further explained that the first device includes a central unit (CU) and a distributed unit (DU). The number of the DUs is not limited in this embodiment; the integrity protection key and / or confidentiality key may be stored in the CU.

[0192] In this embodiment, the aforementioned first device receiving the first MAC PDU from the second device may refer to the DU of the first device receiving the first MAC PDU from the second device.

[0193] The first device calculates a verification code based on the integrity protection key and the one or more first payloads using an integrity protection algorithm, and verifies the integrity based on the verification code and the first message check code, including one of the following:

[0194] The DU of the first device obtains the integrity protection key from the CU, the DU uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first payloads, and verifies the integrity based on the verification code and the first message check code;

[0195] The CU of the first device calculates a verification code based on the integrity protection key and the one or more first payloads using an integrity protection algorithm, and verifies the integrity based on the verification code and the first message check code.

[0196] Optionally, the DU of the first device obtains the integrity protection key from the CU, and the DU of the first device may obtain the default or protocol-specified integrity protection key from the CU. Optionally, the DU of the first device may obtain an identifier of the integrity protection key from the third indication information, and then the DU of the first device may send the identifier of the integrity protection key based on the third indication information to the CU, and receive the integrity protection key returned by the CU. The detailed description of the integrity protection key is the same as that of the aforementioned embodiment and is not repeated here.

[0197] The manner in which the DU of the first device determines the integrity protection algorithm can be predefined or obtained from the third indication information, and is not further described here. It should be noted that, regardless of how the third indication information is carried, it can be received and stored by the DU of the first device. The specific manner in which the DU calculates the verification code and verifies the integrity is the same as the manner in which the first device verifies the integrity in the aforementioned embodiment, and is not further described here.

[0198] The CU of the first device uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads. Before verifying the integrity based on the verification code and the first message check code, it may also include: the DU of the first device sends the received first MAC PDU to the CU.

[0199] Optionally, the CU of the first device uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads. The CU of the first device may obtain the default or protocol-specified integrity protection key, and then use the integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads.

[0200] Optionally, the CU of the first device employs an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first payloads. This may be: the CU of the first device may determine the integrity protection key based on the identifier of the integrity protection key included in the third indication information, and employ the integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first payloads. The manner in which the CU obtains the integrity protection key is the same as in the aforementioned embodiment and is not repeated here.

[0201] The manner in which the CU of the first device determines the integrity protection algorithm may be predefined, or may be determined based on the identifier of the integrity protection algorithm in the third indication information, which will not be elaborated here. It should be noted that, no matter how the third indication information is carried, it may be received by the DU of the first device and sent to the CU. The specific manner in which the CU calculates the verification code and verifies the integrity is the same as the manner in which the first device verifies the integrity in the aforementioned embodiment, and will not be elaborated here.

[0202] The first device includes a central unit CU and a distribution unit DU, and the first device uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second payload to obtain the plaintext data corresponding to each second payload, including one of the following:

[0203] The DU of the first device obtains the confidentiality key from the CU, and the DU decrypts the ciphertext data corresponding to each second payload using the confidentiality algorithm and the confidentiality key to obtain the plaintext data corresponding to each second payload;

[0204] The CU of the first device decrypts the ciphertext data corresponding to each second payload using a confidentiality algorithm and a confidentiality key to obtain the plaintext data corresponding to each second payload.

[0205] Optionally, the DU of the first device obtains the confidentiality key from the CU, and the DU of the first device may obtain the default or protocol-specified confidentiality key from the CU. Optionally, the DU of the aforementioned first device may obtain the identifier of the confidentiality key from the third indication information, and then the DU of the first device may send the identifier of the confidentiality key based on the third indication information to the CU, and receive the confidentiality key returned by the CU. The detailed description of the confidentiality key is the same as that of the aforementioned embodiment and will not be repeated.

[0206] The manner in which the DU of the first device determines the confidentiality algorithm may be predefined or determined based on the identifier of the confidentiality algorithm in the third indication information, and is not further described here. It should be noted that, regardless of how the third indication information is carried, it may be received and stored by the DU of the first device. The specific manner in which the DU calculates the plaintext data corresponding to each second payload is the same as the relevant description of the first device in the aforementioned embodiment and is not further described here.

[0207] The CU of the first device uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second load, and before obtaining the plaintext data corresponding to each second load, it may also include: the DU of the first device sends the received first MAC PDU to the CU.

[0208] Optionally, the CU of the first device uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load. The CU of the first device may obtain the confidentiality key specified by default or the protocol, and then use the confidentiality algorithm and the confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load.

[0209] Optionally, the CU of the first device uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load. It can be that: the CU of the first device can determine the confidentiality key based on the identifier of the confidentiality key included in the third indication information, and use the confidentiality algorithm and the confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load.

[0210] The manner in which the CU of the first device determines the confidentiality algorithm may be predefined or determined based on the identifier of the confidentiality algorithm in the third indication information, which is not described in detail here. It should be noted that, regardless of how the third indication information is carried, it may be received by the DU of the first device and sent to the CU.

[0211] In some possible embodiments, security processing can also be performed at the PDCP (Packet Data Convergence Protocol) layer, with interaction between the MAC and PDCP layers to ensure that security information is included in the MAC message. For example, the second device can calculate a check code at the PDCP layer, add this check code to the MAC layer payload, and then send it to the first device; the first device can then pass this check code to the PDCP layer for verification at the MAC layer. This embodiment does not limit the specific verification method.

[0212] The communication method provided in this embodiment is exemplarily described below with reference to various possible examples.

[0213] Example 1: Targeting L1 / L2 downlink message security scenarios. This example primarily describes the activation of an integrity protection mechanism for a MAC CE / MAC subPDU. In this example, the first device may be a first terminal, such as a UE, and the second device may be a network device, such as a gNB or a RAN (Radio Access Network) node.

[0214] In this embodiment, the L1 / L2 downlink messages sent by the gNB to the UE may contain content requiring security protection, so a protection mechanism at the MAC layer is considered. The exemplary scenario of this embodiment is during LTM (L1 or L2-triggered Mobility), when the UE is in the RRC connected state and a 5G security context exists. Therefore, the solution provided in this embodiment can be used to protect the gNB's transmission of a cell switch command based on the existing 5G security context. The cell switch command indicates the cell information to which the UE is switching. This cell switch command can be used to indicate an inter-base station cell handover or an intra-base station cell handover, and can include the PCI of the cell. In the aforementioned exemplary scenario, the cell information to be switched is provided to the UE before LTM is executed, so the UE can only switch to a cell configured by the legitimate gNB. An attacker could tamper with the target cell information in the MAC CE, redirecting the UE to a non-target cell, potentially causing service interruption. In order to reduce computing and communication overhead, integrity protection can be enabled only for the MAC CE corresponding to the Cell switch command issued by the gNB (i.e., the first payload in the aforementioned embodiment). That is, in this embodiment, the type of the first payload is MAC CE, and the plaintext data corresponding to the first payload is plaintext data including device information, which may include the PCI of the UE's cell.

[0215] On the gNB (or RAN node) side: If integrity protection is enabled for the MAC CE (i.e., the first payload in the aforementioned embodiment) contained in the MAC subPDU, the corresponding MAC subheader (i.e., the first MAC subheader in the aforementioned embodiment) contains the integrity protection key identifier, the algorithm identity of the integrity protection algorithm, and the MIC (i.e., the first MIC in the aforementioned embodiment).

[0216] In addition to the key identifier (i.e., the identifier of the integrity protection key) and the algorithm identifier (i.e., the identifier of the integrity protection algorithm), the MAC subPDU may also include a MAC CE identifier (i.e., the identifier of the first payload in the aforementioned embodiment). The gNB may use the RRC key Krrcint or the integrity protection key Kmacint derived from the key KgNB (i.e., the first key in the aforementioned embodiment) as the aforementioned integrity protection key. In addition, if integrity protection is not enabled in the MAC CE sent by the gNB to the UE, the designated bits corresponding to the MIC (i.e., the first MIC) may be set to all 0s.

[0217] UE side: After receiving the MAC subPDU, the UE confirms the integrity protection key used based on the identifier of the integrity protection key contained therein, generates a MIC verification value based on the identifier and integrity protection key of the integrity protection algorithm and the corresponding MAC CE, and uses the MIC verification value (i.e., the verification code in the aforementioned embodiment) to compare with the MIC to verify the integrity of the MAC subPDU (or verify the integrity of the MAC CE carried by the MAC subPDU).

[0218] Example 2: For L1 / L2 downlink message security scenarios, encryption and integrity protection are enabled for MAC CE / MAC subPDU. In this embodiment, the first device may be a first terminal, such as a UE, and the second device may be a network device, such as a gNB or a RAN (Radio Access Network) node.

[0219] This embodiment targets scenarios where the device information contained in the plaintext data carried by a MAC CE (i.e., the aforementioned first payload) is private UE information (e.g., UE ID, UE address). To prevent attackers from launching link attacks and tracking attacks against a specific UE, encryption and integrity protection can be performed on the specific MAC CE. The plaintext data in this embodiment can be the same as that in the aforementioned embodiment 1, namely, a cell switch command.

[0220] On the RAN node (or gNB) side, the plaintext data to be carried by the MAC CE to be sent to the UE, namely the Cell switch command (including the UE's privacy information), is integrity protected to generate a MIC (i.e., the first MIC in the aforementioned embodiment), and the MIC is included in the MAC subheader (i.e., the first MAC subheader in the first MAC PDU in the aforementioned embodiment). The plaintext data Cell switch command to be carried by the MAC CE to be sent to the UE is then encrypted and protected, and the encrypted ciphertext data is carried in the MAC CE. In this way, the MAC CE1 in the subPDU can be transmitted via ciphertext.

[0221] For example, with reference to Figure 8 , the MIC in Figure 8 (i.e., the first MIC in the aforementioned embodiment) can be calculated based on the plaintext data of MAC CE1 (i.e., the first payload in the aforementioned embodiment), and the MIC can be carried in the MAC header. Specifically, the MIC can be carried by MAC subheader1 in the MAC header corresponding to MAC CE1 (i.e., the first MAC subheader in the first MAC PDU in the aforementioned embodiment). For the sake of simplicity, Figure 8 does not illustrate the various MAC subheaders contained in the MAC header. Furthermore, MAC CE1 in Figure 8 carries ciphertext data calculated based on the plaintext data corresponding to MAC CE1 (i.e., the first payload is also used as the second payload in the aforementioned embodiment). In this embodiment, encryption and integrity protection are enabled for MAC CE1. Therefore, the MAC subheader corresponding to MAC CE1 (i.e., the first MAC subheader in the first MAC PDU in the aforementioned embodiment) can also carry the identifier of the confidentiality key, the identifier of the integrity protection key, and the algorithm identity (the identifier of the integrity protection algorithm and the identifier of the confidentiality algorithm). In addition, the MAC subheader may also carry the MAC CE1 identifier. In this embodiment, since both integrity protection and encryption are performed on the MAC CE1, only one first indication information may be carried to indicate the identifier of the MAC CE1.

[0222] It should also be noted that when integrity protection is not enabled, the designated bits corresponding to the MIC can all be set to 0.

[0223] In this embodiment, the description of the integrity protection key is the same as that in the previous embodiment and is not repeated here. The confidentiality key can use the RRC key Krrcenc or Kmacenc derived from KgNB.

[0224] UE side: After receiving the MAC subPDU, the UE confirms the integrity protection key used based on the integrity protection key identifier contained in the MAC subheader (i.e., the first MAC subheader in the first MAC PDU in the aforementioned embodiment), generates a MIC value (i.e., the verification code in the aforementioned embodiment) based on the integrity protection algorithm identifier, the integrity protection key, and the corresponding MAC CE, and compares the MIC value contained in the header to verify the integrity of the MAC subPDU. After receiving the MAC subPDU, the UE confirms the confidentiality key used based on the confidentiality key identifier contained in the MAC subheader (i.e., the first MAC subheader in the first MAC PDU in the aforementioned embodiment), generates a key stream keysteam based on the confidentiality algorithm identifier and the confidentiality key, and obtains the plaintext MAC CE after XORing it with the ciphertext.

[0225] Example 3: The L1 / L2 uplink messages sent by the UE to the gNB may contain content that requires security protection. Therefore, a MAC layer security mechanism is also considered for such scenarios. In this embodiment, the first device may be a network device, which is represented as a RAN node for simplicity. The second device may be a second terminal, which is represented as a UE for simplicity.

[0226] This embodiment describes the use of integrity protection for L1 / L2 control signaling (e.g., Channel State Information (CSI)) reported by the UE. Specifically, this embodiment addresses the case where the plaintext data carried by the first payload includes the UE's location. One scenario involves the UE reporting measurement results containing PCI during LTM. Other potential use cases include UE reporting CSI messages, including Sounding Reference Signal (SRS), Physical Uplink Control Channel (PUCCH), or UE reporting measurements.

[0227] For UEs in RRC connected state, there is a 5G security context. The UE can use the existing 5G security context to enable integrity protection for the transmitted MAC PDU. Alternatively, if the UE is in RRC IDLE state and has an RRC integrity protection key, the UE can directly use the key for integrity protection.

[0228] On the UE side, the MAC PDU integrity protection method is the same as that on the RAN node (or gNB) side in Example 1 and is not further described. For example, with reference to Figure 9, assuming that the MIC is calculated for integrity protection of MAC CE3, the MIC can be carried in the MAC sub-header corresponding to MAC CE3.

[0229] On the RAN node side, after receiving L1 / L2 control signaling reported by the UE, there are two ways to verify the integrity of the MAC PDU / MAC subPDU: First, the DU sends an integrity protection key identifier to the CU and receives the corresponding integrity protection key (Krrcint, or Kmacint derived from the KgNB) returned by the CU. The DU uses the corresponding integrity protection key to verify or validate the integrity of the MAC PDU / MAC subPDU. Second, the DU sends the MAC PDU / MAC subPDU to the CU, which performs an integrity check using the corresponding UE security context.

[0230] Example 4: In this embodiment, the first device may be a network device, which is represented as a RAN node for simplicity. The second device may be a second terminal, which is represented as a UE for simplicity. This embodiment enables encryption and integrity protection for L1 / L2 control signaling (such as CSI information) reported by the UE.

[0231] UE side: The method of encrypting and integrity protecting the MAC PDU is the same as that of the RAN node side in the second embodiment, and will not be repeated here. For example, with reference to Figure 9, assuming that the MIC is calculated for integrity protection of MAC CE3, the MIC (i.e., the first message check code of the aforementioned embodiment) can be carried in the MAC subheader corresponding to the MAC CE3; and if the plaintext data of the MAC CE3 is encrypted, the MAC CE3 carries the ciphertext data. Furthermore, Figure 9 also illustrates that, in addition to carrying the MIC, the MAC subheader corresponding to the MAC CE3 can also carry an algorithm identifier (i.e., an identifier of the integrity protection algorithm and / or an identifier of the confidentiality algorithm) and a key identifier (i.e., an identifier of the integrity protection key and / or an identifier of the confidentiality key).

[0232] RAN node side: After receiving the L1 / L2 control signaling reported by the UE, there are two ways to verify the integrity of the MAC PDU / MAC subPDU: the DU sends a key identifier (including the identifier of the integrity protection key and / or the identifier of the confidentiality key) to the CU, and receives the corresponding integrity protection key / confidentiality key (Krrcenc / Krrcint, or Kmacenc / Kmacint derived from the KgNB) returned by the CU; the DU uses the corresponding integrity protection key to check or verify the integrity of the MAC PDU / MAC subPDU. After the check is successful, the confidentiality key is used to decrypt the MAC PDU / MAC subPDU. Alternatively, the DU sends the MAC PDU / MAC subPDU to the CU, and the CU uses the security context of the corresponding UE to perform integrity check and decryption.

[0233] Embodiment 5: In this embodiment, the first device may be a network device, which is represented as a RAN node for simplicity. The second device may be a second terminal, which is represented as a UE for simplicity. In this embodiment, integrity protection is enabled for L1 / L2 data reported by the UE.

[0234] The applicable use case scenario of this embodiment may be a scenario for communication model training between a UE and a RAN node. In this scenario, the plaintext data that may be transmitted includes: an AI dataset reported by the UE in AIML, or an AI model, or a model gradient, etc.

[0235] There are two processing methods on the UE side: Method 1: Use NAS security context to protect the MAC PDU / MAC subPDU reported by the UE: The UE uses the NAS security context (Krrcint) or the integrity protection key Kmacint derived from the KgNB to calculate the MIC. Method 2: Use AS security context to protect the MAC PDU / MAC subPDU reported by the UE: The UE uses the AS security context (Kupint) or the integrity protection key Kmacint derived from the KgNB to calculate the MIC.

[0236] On the RAN node side: the processing method is the same as that in Example 3 and will not be repeated here.

[0237] Example 6: In this example, the first device may be a network device, which is represented as a RAN node for simplicity. The second device may be a second terminal, which is represented as a UE for simplicity. This example enables encryption and integrity protection for L1 / L2 data reported by the UE. The scenario corresponding to this example is the same as that of Example 5 and is not further described.

[0238] There are two processing methods on the UE side: Method 1: Use NAS security context to protect the MAC PDU / MAC subPDU reported by the UE: The UE uses the NAS security context (Krrcint, Krrcenc) or the keys Kmacint, Kmacenc derived from the KgNB to calculate the MIC and encrypt the plaintext. Method 2: Use AS security context to protect the MAC PDU / MAC subPDU reported by the UE: The UE uses the AS security context (Kupint, Krrcenc) or the keys Kmacint, Kmacenc derived from the KgNB to calculate the MIC and encrypt the plaintext data.

[0239] On the RAN node side: the processing method is the same as that in Example 4 and will not be repeated here.

[0240] Embodiment 7: Physical layer key used for MAC layer security mechanism In this embodiment, the first device may be a network device, which is represented as a RAN node for simplicity, and the second device may be a second terminal, which is represented as a UE for simplicity.

[0241] In this embodiment, for the case where there is no 5G security context in the UE, the security protection of the message reported by the UE to the RAN node can use the physical layer key between the UE and the RAN node, that is, the extracted physical layer channel characteristics.

[0242] The UE uses the physical layer key Kphy to calculate the MIC and ciphertext, and sends the MAC PDU containing the algorithm identifier and MIC to the RAN node. After extracting the corresponding physical layer key, the RAN node verifies the MIC based on the algorithm identifier (that is, the identifier of the integrity protection algorithm and the identifier of the confidentiality algorithm), calculates the keystream, and decrypts the plaintext.

[0243] Here, the UE may use the physical layer key directly as the integrity protection key and the confidentiality key for the above processing; alternatively, the UE may use the first key calculated from the physical layer key as the integrity protection key and the second key calculated from the physical layer key as the confidentiality key for the above processing; alternatively, the UE may use the physical layer key directly as the integrity protection key and the second key calculated from the physical layer key as the confidentiality key for the above processing; alternatively, the UE may use the physical layer key directly as the confidentiality key and the first key calculated from the physical layer key as the integrity protection key for the above processing. The RAN node determines the integrity protection key and the confidentiality key in the same manner as the UE, and this description is not repeated here.

[0244] As can be seen, by adopting the solution provided by this embodiment, a message check code can be carried in the MAC PDU. This message check code is calculated based on the payload in the MAC PDU. This allows a security protection mechanism to be introduced into the MAC layer, preventing problems such as message leakage, making messages transmitted at the MAC layer more secure.

[0245] Finally, the effect of the solution provided by this embodiment is described in combination with relevant technologies.

[0246] According to the existing conclusions of Release 18, MAC CE is used to carry LTM-related information, which is used to trigger cell handovers. Layer 1 (L1) and Layer 2 (L2) signaling do not use permanent identifiers such as PCIs, but rather temporary identifiers configured by RRC. Cell handover trigger information is transmitted in a MAC CE, which contains at least a candidate configuration index. Cell-specific, radio bearer, and measurement configurations can be part of the LTM candidate cell configuration. In other words, in LTM, L1 measurements are used as handover triggers, and L1 / L2 messages are used for handover commands, without encryption or integrity protection.

[0247] Some related technical discussions have discussed using masked identities to protect PCI. Specifically, when the UE reports measurement results, it uses a reported masked identity to protect PCI. Others suggest that the CU provide cell-pair tokens generated by the PDCP layer in the MAC CE for integrity and encryption protection. Upon receipt, the UE passes the MAC layer message to the PDCP layer for verification. Other proposals have discussed introducing L2 security mechanisms, raising the aforementioned issues but failing to provide solutions.

[0248] The above analysis shows that cellular security in related technologies is based on protecting the PDCP layer. However, the lack of security protection mechanisms in the control signaling transmitted in the lower layers may lead to privacy leaks or affect service quality. Based on this, the solution provided in the embodiments of the present application provides a MAC layer security mechanism. By adopting the solution provided in this embodiment, encryption and integrity protection of MAC PDUs / MAC subPDUs can be provided. Specifically, the solution provided in this embodiment addresses the security issue of LTM MAC CE carrying the permanent identifier PCI, designs a downlink MAC message integrity protection mechanism to prevent possible service interruptions, and further expands it to provide encryption protection for downlink MAC messages. The solution provided in this embodiment designs multiple uplink MAC message security mechanisms to address potential security use cases for L1 / L2 uplink messages (e.g., UE reporting measurement results, CSI reports, AI data set reports, etc.) and different security environments during transmission (e.g., UE in RRC connected state, RRC IDLE state, and the presence of non-5G security context). It can be seen that by adopting the solution provided in this embodiment, the security mechanism established at the MAC layer can be applied to different security environments and can provide multiple security protection methods for different protection scopes.

[0249] FIG10 is a schematic diagram of the composition structure of a first device according to an embodiment of the present application, including:

[0250] The first communication unit 1001 is used to receive a first media access control layer MAC protocol data unit PDU from a second device, wherein the first MAC PDU carries a first message verification code, and the first message verification code is calculated by the second device based on one or more first loads of the first MAC PDU.

[0251] The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

[0252] The first MAC sub-header also carries first indication information, where the first indication information is used to indicate each first payload among the one or more first payloads.

[0253] As shown in FIG10 , the first device further includes: a first processing unit 1002 , configured to calculate a verification code based on an integrity protection key and the one or more first payloads using an integrity protection algorithm, and verify integrity based on the verification code and the first message check code.

[0254] The integrity protection algorithm is predefined or indicated by the second device. The integrity protection key is predefined or indicated by the second device.

[0255] The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

[0256] The first processing unit is used to perform one of the following: calculating the first key based on the access layer security base key; calculating the first key based on the access layer signaling plane integrity verification key; calculating the first key based on the user plane integrity verification key; calculating the first key based on the physical layer key.

[0257] Each first payload is used to carry plaintext data.

[0258] Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

[0259] The first MAC sub-header of the first MAC PDU also carries second indication information, where the second indication information is used to indicate the one or more second loads.

[0260] The first processing unit is configured to decrypt the ciphertext data corresponding to each second payload by using a confidentiality algorithm and a confidentiality key to obtain the plaintext data corresponding to each second payload.

[0261] The confidentiality algorithm is predefined or indicated by the second device. The confidentiality key is predefined or indicated by the second device.

[0262] The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, or a second key.

[0263] The first processing unit is used to perform one of the following: calculating the second key based on the access layer security base key; calculating the second key based on the access layer signaling plane confidentiality key; calculating the second key based on the user plane confidentiality key; calculating the second key based on the physical layer key.

[0264] The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

[0265] The first communication unit is used to receive third indication information from the second device, wherein the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

[0266] The third indication information is carried by the first MAC PDU; or, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

[0267] The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

[0268] The first processing unit includes a central unit CU and a distribution unit DU; wherein the DU is used to obtain the integrity protection key from the CU, adopt an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads, and verify the integrity based on the verification code and the first message check code; or, the CU adopts an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads, and verify the integrity based on the verification code and the first message check code.

[0269] The first processing unit includes a central unit CU and a distribution unit DU; wherein the DU is used to obtain the confidentiality key from the CU, and use the confidentiality algorithm and the confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load; or, the CU uses the confidentiality algorithm and the confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load.

[0270] Each first payload of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

[0271] The first device is a first terminal, and the second device is one of the following: a network device and a second terminal. The first device is a network device, and the second device is a second terminal.

[0272] FIG11 is a schematic diagram of the structure of a second device according to an embodiment of the present application, including:

[0273] The second communication unit 1101 is used to send a first media access control layer MAC protocol data unit PDU to the first device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated based on one or more first loads of the first MAC PDU.

[0274] The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

[0275] The first MAC sub-header also carries first indication information, where the first indication information is used to indicate an identifier of each first payload in the one or more first payloads.

[0276] As shown in FIG11 , the second device further includes: a second processing unit 1102 , configured to calculate the first message check code based on the integrity protection key and the one or more first payloads using an integrity protection algorithm.

[0277] The integrity protection algorithm is predefined or determined by the second device. The integrity protection key is predefined or determined by the second device.

[0278] The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

[0279] The second processing unit is used to perform one of the following: calculating the first key based on the access layer security base key; calculating the first key based on the access layer signaling plane integrity verification key; calculating the first key based on the user plane integrity verification key; calculating the first key based on the physical layer key.

[0280] Each first payload is used to carry plaintext data.

[0281] Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

[0282] The first MAC sub-header of the first MAC PDU also carries second indication information, where the second indication information is used to indicate the one or more second loads.

[0283] The second processing unit is configured to encrypt the plaintext data corresponding to each second payload using a confidentiality algorithm and a confidentiality key to obtain the ciphertext data carried by each second payload.

[0284] The confidentiality algorithm is predefined or determined by the second device.

[0285] The confidentiality key is predefined or determined by the second device.

[0286] The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, or a second key.

[0287] The second processing unit is used to perform one of the following: calculating the second key based on the access layer security base key; calculating the second key based on the access layer signaling plane confidentiality key; calculating the second key based on the user plane confidentiality key; calculating the second key based on the physical layer key.

[0288] The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

[0289] The second communication unit is used to send third indication information to the first device, where the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

[0290] The third indication information is carried by the first MAC PDU; or, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

[0291] The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

[0292] Each first payload of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

[0293] The first device is a first terminal, and the second device is one of the following: a network device, a second terminal; or, the first device is a network device, and the second device is a second terminal.

[0294] The device of the embodiment of the present application can realize the corresponding functions of each device in the aforementioned communication method embodiment. The process, function, implementation method and beneficial effect corresponding to each module (submodule, unit or component, etc.) in the first device or the second device can be found in the corresponding description in the above method embodiment, which will not be repeated here. It should be noted that the functions described by each module (submodule, unit or component, etc.) in the device of the embodiment of the application can be implemented by different modules (submodule, unit or component, etc.) or by the same module (submodule, unit or component, etc.).

[0295] Figure 12 is a schematic structural diagram of a communication device 1200 according to an embodiment of the present application. The communication device 1200 includes a processor 1210, which can call and execute a computer program from a memory to enable the communication device 1200 to implement the method in the embodiment of the present application.

[0296] In a possible implementation, the communication device 1200 may further include a memory 1220. The processor 1210 may call and execute a computer program from the memory 1220 to enable the communication device 1200 to implement the method in the embodiment of the present application.

[0297] The memory 1220 may be a separate device independent of the processor 1210 , or may be integrated into the processor 1210 .

[0298] In one possible implementation, the communication device 1200 may further include a transceiver 1230 , and the processor 1210 may control the transceiver 1230 to communicate with other devices. Specifically, the transceiver 1230 may send information or data to other devices, or receive information or data sent by other devices.

[0299] The transceiver 1230 may include a transmitter and a receiver. The transceiver 1230 may further include an antenna, and the number of antennas may be one or more.

[0300] An embodiment of the present application provides a first device, comprising: a processor, and a memory communicating with the processor, the memory being used to store instructions, wherein when the instructions are executed by the processor, the instructions cause the first device to execute: receiving a first media access control layer MAC protocol data unit PDU from a second device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated by the second device based on one or more first loads of the first MAC PDU.

[0301] The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

[0302] The first MAC sub-header also carries first indication information, where the first indication information is used to indicate each first payload among the one or more first payloads.

[0303] The instructions further cause the first device to execute: using an integrity protection algorithm to calculate a verification code based on an integrity protection key and the one or more first payloads, and verifying integrity based on the verification code and the first message check code.

[0304] The integrity protection algorithm is predefined or indicated by the second device; and / or the integrity protection key is predefined or indicated by the second device.

[0305] The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

[0306] The instruction also causes the first device to execute: calculating the first key based on the access layer security base key; calculating the first key based on the access layer signaling plane integrity verification key; calculating the first key based on the user plane integrity verification key; and calculating the first key based on the physical layer key.

[0307] Each first payload is used to carry plaintext data.

[0308] Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

[0309] The first MAC sub-header of the first MAC PDU also carries second indication information, where the second indication information is used to indicate the one or more second loads.

[0310] The instruction further causes the first device to execute: decrypting the ciphertext data corresponding to each second payload using a confidentiality algorithm and a confidentiality key to obtain the plaintext data corresponding to each second payload.

[0311] The confidentiality algorithm is predefined or indicated by the second device. The confidentiality key is predefined or indicated by the second device.

[0312] The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, or a second key.

[0313] The instruction also causes the first device to perform one of the following: calculating the second key based on the access layer security base key; calculating the second key based on the access layer signaling plane confidentiality key; calculating the second key based on the user plane confidentiality key; calculating the second key based on the physical layer key.

[0314] The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

[0315] The instruction further causes the first device to execute: receiving third indication information from the second device, wherein the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

[0316] The third indication information is carried by the first MAC PDU; or, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

[0317] The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

[0318] Each first payload of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

[0319] The instruction causes the second device to execute: obtaining the integrity protection key, using an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first payloads, and verifying the integrity based on the verification code and the first message check code; or using an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first payloads, and verifying the integrity based on the verification code and the first message check code.

[0320] The instruction causes the second device to execute: obtaining the confidentiality key, decrypting the ciphertext data corresponding to each second load using the confidentiality algorithm and the confidentiality key to obtain the plaintext data corresponding to each second load; or decrypting the ciphertext data corresponding to each second load using the confidentiality algorithm and the confidentiality key to obtain the plaintext data corresponding to each second load.

[0321] An embodiment of the present application provides a second device, comprising: a processor, a memory communicating with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the second device to execute: sending a first media access control layer MAC protocol data unit PDU to a first device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated based on one or more first loads of the first MAC PDU.

[0322] The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

[0323] The first MAC sub-header also carries first indication information, where the first indication information is used to indicate an identifier of each first payload in the one or more first payloads.

[0324] The instructions cause the second device to execute: using an integrity protection algorithm to calculate the first message check code based on an integrity protection key and the one or more first payloads.

[0325] The integrity protection algorithm is predefined or determined by the second device. The integrity protection key is predefined or determined by the second device.

[0326] The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

[0327] The instruction causes the second device to perform one of the following: calculating the first key based on the access layer security base key; calculating the first key based on the access layer signaling plane integrity verification key; calculating the first key based on the user plane integrity verification key; calculating the first key based on the physical layer key.

[0328] Each first payload is used to carry plaintext data.

[0329] Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

[0330] The first MAC sub-header of the first MAC PDU also carries second indication information, where the second indication information is used to indicate the one or more second loads.

[0331] The instruction causes the second device to execute: encrypting the plaintext data corresponding to each second payload using a confidentiality algorithm and a confidentiality key to obtain the ciphertext data carried by each second payload.

[0332] The confidentiality algorithm is predefined or determined by the second device. The confidentiality key is predefined or determined by the second device.

[0333] The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, or a second key.

[0334] The instruction causes the second device to perform one of the following: calculating the second key based on the access layer security base key; calculating the second key based on the access layer signaling plane confidentiality key; calculating the second key based on the user plane confidentiality key; calculating the second key based on the physical layer key.

[0335] The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

[0336] The instruction causes the second device to execute: sending third indication information to the first device, where the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

[0337] The third indication information is carried by the first MAC PDU; or, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

[0338] The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

[0339] Each first payload of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

[0340] 13 is a schematic structural diagram of a chip 1300 according to an embodiment of the present application. The chip 1300 includes a processor 1310, which can call and execute a computer program from a memory to implement the method according to the embodiment of the present application.

[0341] In one possible implementation, the chip 1300 may further include a memory 1320. The processor 1310 may call and execute a computer program from the memory 1320 to implement the method performed by the access network device or the core network device in the embodiments of the present application. The memory 1320 may be a separate device independent of the processor 1310 or integrated into the processor 1310.

[0342] In one possible implementation, the chip 1300 may further include an input interface 1330. The processor 1310 may control the input interface 1330 to communicate with other devices or chips, specifically, to obtain information or data sent by other devices or chips. In one possible implementation, the chip 1300 may further include an output interface 1340. The processor 1310 may control the output interface 1340 to communicate with other devices or chips, specifically, to output information or data to other devices or chips.

[0343] In one possible implementation, the chip can be applied to the second device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the second device in each method in the embodiments of the present application. For the sake of brevity, no further description is given here. In one possible implementation, the chip can be applied to the first device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the first device in each method in the embodiments of the present application. For the sake of brevity, no further description is given here.

[0344] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0345] The processor mentioned above may be a general-purpose processor, a digital signal processor (DSP), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or other programmable logic devices, transistor logic devices, discrete hardware components, etc. The general-purpose processor mentioned above may be a microprocessor or any conventional processor, etc.

[0346] The memory mentioned above may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM).

[0347] It should be understood that the above-mentioned memories are exemplary but not restrictive. For example, the memories in the embodiments of the present application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM RAM (DR RAM), etc. In other words, the memories in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0348] Figure 14 is a schematic block diagram of a communication system 1400 according to an embodiment of the present application. The communication system 1400 includes a first device 1410 and a second device 1420. In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions in accordance with the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0349] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0350] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0351] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included within the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A communication method, comprising: The first device receives a first media access control layer MAC protocol data unit PDU from the second device, wherein the first MAC PDU carries a first message verification code, and the first message verification code is calculated by the second device based on one or more first loads of the first MAC PDU.

2. The method according to claim 1, wherein: The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

3. The method according to claim 2, wherein: The first MAC sub-packet header also carries first indication information, where the first indication information is used to indicate each first load among the one or more first loads.

4. The method according to any one of claims 1 to 3, wherein: The method further comprises: The first device calculates a verification code based on an integrity protection key and the one or more first loads using an integrity protection algorithm, and verifies integrity based on the verification code and the first message check code.

5. The method according to claim 4, wherein: The integrity protection algorithm is predefined or indicated by the second device.

6. The method according to claim 4 or 5, wherein: The integrity protection key is predefined or indicated by the second device.

7. The method according to any one of claims 4 to 6, wherein: The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

8. The method according to claim 7, wherein: The method further comprises one of the following: The first device calculates the first key based on the access layer security basic key; The first device calculates the first key based on the access layer signaling plane integrity verification key; The first device calculates the first key based on the user plane integrity verification key; The first device calculates the first key based on the physical layer key.

9. The method according to any one of claims 1 to 8, wherein: Each of the first payloads is used to carry plaintext data.

10. The method according to any one of claims 1 to 8, wherein: Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

11. The method according to claim 10, wherein: The first MAC sub-header of the first MAC PDU also carries second indication information, and the second indication information is used to indicate the one or more second loads.

12. The method according to claim 10 or 11, wherein: The method further comprises: The first device uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second payload to obtain the plaintext data corresponding to each second payload.

13. The method according to claim 12, wherein: The confidentiality algorithm is predefined or indicated by the second device.

14. The method according to claim 12 or 13, wherein: The confidentiality key is predefined or indicated by the second device.

15. The method according to any one of claims 12 to 14, wherein: The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, and a second key.

16. The method according to claim 15, wherein: The method further comprises one of the following: The first device calculates the second key based on the access layer security basic key; The first device calculates the second key based on the access layer signaling plane confidentiality key; The first device calculates the second key based on the user plane confidentiality key; The first device calculates the second key based on the physical layer key.

17. The method according to any one of claims 9 to 16, wherein: The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

18. The method according to any one of claims 5, 6, 13 and 14, wherein: The method further comprises: The first device receives third indication information from the second device, wherein the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

19. The method according to claim 18, wherein: The third indication information is carried by the first MAC PDU; or, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

20. The method according to claim 19, wherein: The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

21. The method according to any one of claims 4 to 8, wherein: The first device includes a central unit CU and a distribution unit DU, wherein the first device uses an integrity protection algorithm to calculate a verification code based on an integrity protection key and the one or more first loads, and verifies integrity based on the verification code and the first message check code, including one of the following: The DU of the first device obtains the integrity protection key from the CU, the DU uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads, and verifies the integrity based on the verification code and the first message check code; The CU of the first device uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads, and verifies the integrity based on the verification code and the first message check code.

22. The method according to any one of claims 12 to 16, wherein: The first device includes a central unit CU and a distribution unit DU, and the first device uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load, including one of the following: The DU of the first device obtains the confidentiality key from the CU, and the DU decrypts the ciphertext data corresponding to each second payload using the confidentiality algorithm and the confidentiality key to obtain the plaintext data corresponding to each second payload; The CU of the first device uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second load to obtain the plaintext data corresponding to each second load.

23. The method according to any one of claims 1 to 22, wherein: Each of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

24. The method according to any one of claims 1 to 20, wherein: The first device is a first terminal, and the second device is one of the following: a network device, a second terminal.

25. The method according to any one of claims 1 to 22, wherein: The first device is a network device, and the second device is a second terminal.

26. A communication method, comprising: The second device sends a first media access control layer MAC protocol data unit PDU to the first device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated based on one or more first loads of the first MAC PDU.

27. The method according to claim 26, wherein: The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

28. The method according to claim 27, wherein: The first MAC sub-packet header also carries first indication information, where the first indication information is used to indicate an identifier of each first load in the one or more first loads.

29. The method according to any one of claims 26 to 28, wherein: The method further comprises: The second device calculates the first message check code based on the integrity protection key and the one or more first payloads using an integrity protection algorithm.

30. The method of claim 29, wherein: The integrity protection algorithm is predefined or determined by the second device.

31. The method according to claim 29 or 30, wherein: The integrity protection key is predefined or determined by the second device.

32. The method according to any one of claims 29 to 31, wherein: The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

33. The method of claim 32, wherein: The method further comprises one of the following: The second device calculates the first key based on the access layer security basic key; The second device calculates the first key based on the access layer signaling plane integrity verification key; The second device calculates the first key based on the user plane integrity verification key; The second device calculates the first key based on the physical layer key.

34. The method according to any one of claims 26 to 33, wherein: Each of the first payloads is used to carry plaintext data.

35. The method according to any one of claims 26 to 33, wherein: Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

36. The method of claim 35, wherein: The first MAC sub-header of the first MAC PDU also carries second indication information, and the second indication information is used to indicate the one or more second loads.

37. The method according to claim 35 or 36, wherein: The method further comprises: The second device encrypts the plaintext data corresponding to each second payload using a confidentiality algorithm and a confidentiality key to obtain the ciphertext data carried by each second payload.

38. The method of claim 37, wherein: The confidentiality algorithm is predefined or determined by the second device.

39. The method according to claim 37 or 38, wherein: The confidentiality key is predefined or determined by the second device.

40. The method according to any one of claims 37 to 39, wherein: The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, and a second key.

41. The method of claim 40, wherein: The method further comprises one of the following: The second device calculates the second key based on the access layer security basic key; The second device calculates the second key based on the access layer signaling plane confidentiality key; The second device calculates the second key based on the user plane confidentiality key; The second device calculates the second key based on the physical layer key.

42. The method according to any one of claims 34 to 41, wherein: The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

43. The method according to any one of claims 30, 31, 38, and 39, wherein: The method further comprises: The second device sends third indication information to the first device, where the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

44. The method of claim 43, wherein: The third indication information is carried by the first MAC PDU; or, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

45. The method of claim 44, wherein: The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

46. ​​The method according to any one of claims 26 to 45, wherein: Each of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

47. The method according to any one of claims 26 to 46, wherein: The first device is a first terminal, and the second device is one of the following: a network device, a second terminal; Alternatively, the first device is a network device, and the second device is a second terminal.

48. A first device, comprising: A first communication unit is used to receive a first media access control layer MAC protocol data unit PDU from a second device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated by the second device based on one or more first loads of the first MAC PDU.

49. The first device according to claim 48, wherein The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

50. The first device according to claim 49, wherein The first MAC sub-packet header also carries first indication information, where the first indication information is used to indicate each first load among the one or more first loads.

51. The first device according to any one of claims 48 to 50, wherein: The first device also includes: The first processing unit is configured to calculate a verification code based on an integrity protection key and the one or more first loads using an integrity protection algorithm, and verify integrity based on the verification code and the first message check code.

52. The first device according to claim 51, wherein The integrity protection algorithm is predefined or indicated by the second device.

53. The first device according to claim 51 or 52, wherein: The integrity protection key is predefined or indicated by the second device.

54. The first device according to any one of claims 51 to 53, wherein: The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

55. The first device according to claim 54, wherein The first processing unit is configured to perform one of the following: calculating the first key based on the access layer security basic key; calculating the first key based on the access layer signaling plane integrity verification key; Calculate the first key based on the user plane integrity check key; The first key is calculated based on the physical layer key.

56. A first device according to any one of claims 48 to 55, wherein: Each of the first payloads is used to carry plaintext data.

57. A first device according to any one of claims 48 to 55, wherein: Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

58. The first device according to claim 57, wherein The first MAC sub-header of the first MAC PDU also carries second indication information, and the second indication information is used to indicate the one or more second loads.

59. The first device according to claim 57 or 58, wherein The first device also includes: The first processing unit is used to decrypt the ciphertext data corresponding to each second payload by using a confidentiality algorithm and a confidentiality key to obtain the plaintext data corresponding to each second payload.

60. The first device according to claim 59, wherein The confidentiality algorithm is predefined or indicated by the second device.

61. The first device according to claim 59 or 60, wherein: The confidentiality key is predefined or indicated by the second device.

62. The first device according to any one of claims 59 to 61, wherein: The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, and a second key.

63. The first device according to claim 62, wherein: The first processing unit is configured to perform one of the following: calculating the second key based on the access layer security basic key; calculating the second key based on the access layer signaling plane confidentiality key; calculating the second key based on the user plane confidentiality key; The second key is calculated based on the physical layer key.

64. A first device according to any one of claims 56 to 63, wherein: The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

65. The first device according to any one of claims 52, 53, 60, and 61, wherein: The first communication unit is used to receive third indication information from the second device, wherein the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

66. The first device according to claim 65, wherein The third indication information is carried by the first MAC PDU; Alternatively, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

67. The first device according to claim 66, wherein The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

68. The first device according to any one of claims 51 to 55, wherein: The first processing unit includes a central unit CU and a distribution unit DU; wherein, The DU is configured to obtain the integrity protection key from the CU, calculate a verification code based on the integrity protection key and the one or more first payloads using an integrity protection algorithm, and verify integrity based on the verification code and the first message check code; Alternatively, the CU uses an integrity protection algorithm to calculate a verification code based on the integrity protection key and the one or more first loads, and verifies the integrity based on the verification code and the first message check code.

69. The first device according to any one of claims 59 to 63, wherein: The first processing unit includes a central unit CU and a distribution unit DU; wherein, The DU is used to obtain the confidentiality key from the CU, and decrypt the ciphertext data corresponding to each second payload using the confidentiality algorithm and the confidentiality key to obtain the plaintext data corresponding to each second payload; Alternatively, the CU uses a confidentiality algorithm and a confidentiality key to decrypt the ciphertext data corresponding to each second payload to obtain the plaintext data corresponding to each second payload.

70. The first device according to any one of claims 48 to 69, wherein: Each of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

71. A first device according to any one of claims 48 to 67, wherein: The first device is a first terminal, and the second device is one of the following: a network device, a second terminal.

72. The first device according to any one of claims 48 to 69, wherein: The first device is a network device, and the second device is a second terminal.

73. A second device, comprising: The second communication unit is used to send a first media access control layer MAC protocol data unit PDU to the first device, wherein the first MAC PDU carries a first message check code, and the first message check code is calculated based on one or more first loads of the first MAC PDU.

74. The second device according to claim 73, wherein The first MAC PDU includes a first MAC sub-header, the first MAC sub-header carries the first message check code, and the first MAC sub-header is one of one or more MAC sub-headers of the first MAC PDU.

75. The second device according to claim 74, wherein The first MAC sub-packet header also carries first indication information, where the first indication information is used to indicate an identifier of each first load in the one or more first loads.

76. The second device according to any one of claims 73 to 75, wherein: The second device also includes: The second processing unit is configured to calculate the first message check code based on the integrity protection key and the one or more first payloads by adopting an integrity protection algorithm.

77. The second device according to claim 76, wherein The integrity protection algorithm is predefined or determined by the second device.

78. The second device according to claim 76 or 77, wherein The integrity protection key is predefined or determined by the second device.

79. The second device according to any one of claims 76 to 78, wherein: The integrity protection key is one of the following: an access layer security basic key, an access layer signaling plane integrity verification key, a user plane integrity verification key, a physical layer key, and a first key.

80. The second device according to claim 79, wherein The second processing unit is configured to perform one of the following: calculating the first key based on the access layer security basic key; calculating the first key based on the access layer signaling plane integrity verification key; Calculate the first key based on the user plane integrity check key; The first key is calculated based on the physical layer key.

81. The second device according to any one of claims 73 to 80, wherein: Each of the first payloads is used to carry plaintext data.

82. The second device according to any one of claims 73 to 80, wherein: Each of the one or more second loads of the first MAC PDU is used to carry ciphertext data, and the ciphertext data carried by each second load is calculated by the second device based on the plaintext data corresponding to the second load, and the one or more first loads include the one or more second loads.

83. The second device according to claim 82, wherein: The first MAC sub-header of the first MAC PDU also carries second indication information, and the second indication information is used to indicate the one or more second loads.

84. The second device according to claim 82 or 83, wherein The second device also includes: The second processing unit is used to encrypt the plaintext data corresponding to each second payload by using a confidentiality algorithm and a confidentiality key to obtain the ciphertext data carried by each second payload.

85. The second device according to claim 84, wherein The confidentiality algorithm is predefined or determined by the second device.

86. The second device according to claim 84 or 85, wherein The confidentiality key is predefined or determined by the second device.

87. The second device according to any one of claims 84 to 86, wherein: The confidentiality key is one of the following: an access layer security basic key, an access layer signaling plane confidentiality key, a user plane confidentiality key, a physical layer key, and a second key.

88. The second device according to claim 87, wherein The second processing unit is configured to perform one of the following: calculating the second key based on the access layer security basic key; calculating the second key based on the access layer signaling plane confidentiality key; calculating the second key based on the user plane confidentiality key; The second key is calculated based on the physical layer key.

89. The second device according to any one of claims 81 to 88, wherein: The plaintext data includes device information, wherein the device information includes at least one of the following: relevant information of the first device, relevant information of the second device, and the relevant information includes at least one of the following: identification, address, location, privacy data, and model training data.

90. The second device according to any one of claims 77, 78, 85, and 86, wherein: The second communication unit is used to send third indication information to the first device, and the third indication information is used to indicate at least one of the following: an identifier of an integrity protection algorithm, an identifier of an integrity protection key, an identifier of a confidentiality algorithm, and an identifier of a confidentiality key.

91. The second device according to claim 90, wherein The third indication information is carried by the first MAC PDU; or, the third indication information is carried by a second MAC PDU, and the second MAC PDU is different from the first MAC PDU.

92. The second device according to claim 91, wherein The third indication information is carried by the second MAC sub-header of the first MAC PDU, and the second MAC sub-header is one of the one or more MAC sub-headers of the first MAC PDU.

93. The second device according to any one of claims 73 to 92, wherein: Each of the one or more first payloads is one of the following types: a MAC service data unit SDU, a MAC control element CE.

94. The second device according to any one of claims 73 to 93, wherein: The first device is a first terminal, and the second device is one of the following: a network device, a second terminal; or, the first device is a network device, and the second device is a second terminal.

95. A first device, comprising: A processor, a memory in communication with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the first device to perform the method as claimed in any one of claims 1 to 25.

96. A second device, comprising: A processor, a memory in communication with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the second device to perform the method as claimed in any one of claims 26 to 47.

97. A chip, comprising: A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes a method as claimed in any one of claims 1 to 25 or claims 26 to 47.

98. A computer-readable storage medium for storing a computer program, which, when executed by a device, causes the device to perform the method according to any one of claims 1 to 25 or claims 26 to 47.

99. A computer program product comprising computer program instructions, the computer program instructions causing a computer to perform the method of any one of claims 1 to 25 or claims 26 to 47.

100. A computer program causing a computer to perform the method of any one of claims 1 to 25 or claims 26 to 47.

Citation Information

Patent Citations

  • Communication method and device

    CN115696319A

  • Communication method and device

    CN115884173A

  • Data transmission protection method, equipment and system

    CN116233848A

  • Medium access control security

    US20200236537A1

Cited By

  • Mac ce security protection

    EP4827048A1