Communication method and device

By shortening the terminal identifier length and encrypting it during random access, the method reduces the information available to attackers, enhancing security and maintaining protocol compatibility.

JP7955477B2Active Publication Date: 2026-11-24HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025504722
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-07-29
Filing Date
2023-06-30
Publication Date
2026-11-24
Estimated Expiration
2043-06-30

AI Technical Summary

Technical Problem

Unauthorized attackers can exploit the random access procedure in communication systems by using message 3 and message 4 to perform secret communication, compromising the security of the communication process.

Method used

The communication method involves reducing the length of the terminal identifier to less than the standard length, using data padding or truncation to ensure compatibility with existing protocols, and encrypting the identifier to minimize the information exposed during random access, thereby reducing the impact of unauthorized access.

Benefits of technology

This approach minimizes the amount of information exposed to unauthorized attackers, reducing the vulnerability and maintaining security while ensuring compatibility with existing communication protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007955477000001
    Figure 0007955477000001
  • Figure 0007955477000002
    Figure 0007955477000002
  • Figure 0007955477000003
    Figure 0007955477000003
Patent Text Reader

Abstract

A communication method and apparatus are provided. The method includes: a first terminal determines an identifier of the first terminal, the length of the identifier of the first terminal being less than or equal to a first length, the first length being configured in the first terminal before the first terminal performs random access to the network; the first terminal sends a message 3 to a network device in the random access process, the message 3 including the identifier of the first terminal; the first terminal receives a message 4 from the network device in the random access process, the message 4 including information identifying a second terminal, the length of the information identifying the second terminal being less than the first length. In the solution, information that can be obtained by the first terminal by using the message 4 in the random access process is information identifying the second terminal, and the length of the information identifying the second terminal is less than the first length. Compared to a solution in which the first terminal can obtain information corresponding to the first length by using the message 4, this solution reduces the amount of information in the covert communication caused by the Sparrow vulnerability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of this application relate to the field of communication technologies, and in particular, to a communication method and apparatus. BACKGROUND

[0002] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202210908597.4, titled "COMMUNICATION METHOD AND APPARUMENT" and filed with the China National Intellectual Property Administration on July 29, 2022, which is incorporated herein by reference in its entirety.

[0003] Random access is a procedure required to establish a radio link between a terminal and a network. Data transmission can be normally performed between a base station and the terminal only after random access is completed. In a random access procedure, the terminal may send a message 3 to the base station, where the message 3 carries an identifier of the terminal. After receiving the message 3, the base station broadcasts a message 4 to the terminal in plaintext, where the message 4 carries information, that is, the identifier of the terminal carried in the message 3. In this procedure, an unauthorized attacker may perform secret communication by using the message 3 and the message 4 in the random access procedure. This application focuses on how to reduce impact caused by the secret communication. SUMMARY

[0004] This application provides a communication method and apparatus, to reduce impact caused by secret communication in a random access procedure.

[0005] According to the first embodiment, a communication method is provided. This method may be performed by a first terminal or by a component (such as a processor or chip) located within the first terminal. For example, this method is performed by the first terminal. This method includes: The first terminal determines an identifier of the first terminal, the length of which the identifier of the first terminal is less than or equal to a first length, the first length being configured in the first terminal before the first terminal performs random access to the network, or optionally, the first length being the length of a terminal identifier specified in a Long-Term Evolution LTE system, the length of a terminal identifier specified in a New Wireless NR system, or the length of a terminal identifier specified in a protocol. Optionally, the first length may be 40 bits. In random access processing, the first terminal sends message 3 to a network device, message 3 containing the identifier of the first terminal. The first terminal receives message 4 from a network device during random access processing, and message 4 contains information identifying the second terminal, the length of which is less than the length of the first terminal's information.

[0006] According to the above design, the length of information used by the first terminal to identify the second terminal, obtained by the first terminal using message 4 in random access processing, is less than the first length configured before the first terminal performed random access to the network. Even if the first terminal is a malicious attacker, the first terminal can only obtain an amount of information whose length is less than the first length. Compared to current solutions in which a malicious attacker can obtain an amount of information of the first length by using message 4 in random access processing, this application can reduce the amount of information in secure communication in random access processing and minimize the impact caused by secure communication in random access processing.

[0007] In one design, the method further includes: A first terminal receives a first broadcast message from a network device, the first broadcast message containing information indicating a second length, the second length being less than the first length, and optionally, the first broadcast message is a system information block (SIB), e.g., SIB1. This is not limited to SIB1. Determining the identifier of the first terminal includes: The first terminal determines the identifier of the first terminal based on the second length. Optionally, the length of the identifier of the first terminal may be the second length or less than the second length. For example, the first terminal may adjust the second length indicated by the network device based on local configuration and policies. Optionally, in a scenario where the length of the identifier of the first terminal determined by the first terminal is less than the second length, in addition to the identifier of the first terminal, message 3 in random access processing sent by the first terminal to the network device may further include indication information such as the length of the identifier of the first terminal or the position of the identifier of the first terminal.

[0008] According to the above design, the network device sends a first broadcast message to a first terminal, the first broadcast message having a second length. The first terminal determines its identifier based on the second length, and the length of the first terminal identifier is less than or equal to the second length. Since the second length is less than the first length, the length of the first terminal identifier is indeed less than the first length. The first terminal includes its identifier in message 3 during random access processing, and the network device broadcasts the information obtained from message 3 in plaintext by using message 4 during random access processing. In the above design, the length of the information obtained from message 3 and broadcast in plaintext by the network device is less than the first length. Compared to the current solution in which the network device broadcasts the first length of information in message 3 in plaintext by using message 4, this application can reduce the bits of secure communication in random access processing and reduce the value of vulnerability that can be exploited by a malicious attacker.

[0009] In one design, message 3 includes a first sequence, the first sequence includes the identifier of a first terminal, and the length of the first sequence is equal to a first length. Optionally, the first sequence further includes first data, the first data being either pre-configured data or data received from a network device prior to message 3. Optionally, the first data is data received from a network device prior to message 3, and the method further includes the following: The first terminal receives message 2 from a network device in random access processing, message 2 includes first data, the first data being a temporary cell radio network temporary identifier.

[0010] According to the above design, the first terminal reduces the length of its identifier in order to reduce the number of bits of secure communication during random access processing. However, since the length of the terminal identifier specified in the current protocol is the first length, the above design determines terminal identifiers whose length is less than the first length, and then performs data padding on the first terminal identifier using pre-configured data, previously notified data, etc., to determine the first sequence. The first terminal includes the first sequence in message 3 during random access processing, and network devices can broadcast the first sequence in plaintext by using message 4 during random access processing. This design satisfies the current protocol's specification regarding the length of the terminal identifier, assuming that the number of bits of secure communication is reduced during random access processing, and this design is compatible with the current protocol.

[0011] In one design, the method further includes the following: A first terminal verifies information identifying a second terminal based on the identifier of the first terminal, the information identifying the second terminal being the identifier of the second terminal. Optionally, if the identifier of the first terminal is the same as the identifier of the second terminal, the random access of the first terminal is considered successful; if the identifier of the first terminal is different from the identifier of the second terminal, the random access of the first terminal is considered failed.

[0012] In one design, the method further includes: A first terminal receives a second broadcast message from a network device, the second broadcast message does not contain information indicating a second length, the second length is less than the first length, and optionally the second broadcast message may be an SIB, e.g., SIB1. Determining the identifier of the first terminal includes: The first terminal determines the identifier of the first terminal based on a first length, for example, the length of the identifier of the first terminal is the first length.

[0013] In one design, message 4 includes a second sequence, the second sequence includes information identifying a second terminal, and the length of the second sequence is equal to the length of the first. Optionally, the second sequence further includes a second data, the second data being either pre-configured data or data received from a network device prior to message 4. Optionally, the second data is data received from a network device prior to message 4, and the method further includes the following: The first terminal receives message 2 from a network device in random access processing, message 2 includes a second data, the second data being a temporary cell radio network temporary identifier.

[0014] According to the above design, message 4 contains information identifying the second terminal and may be part of the data within the second terminal's identifier. This can reduce the amount of information in secure communication during random access processing. Furthermore, to satisfy the specification that the length of the terminal identifier is a first length specified in the current protocol, the second data is used to perform data padding on a portion of the data in order to obtain the second sequence, and message 4 contains the second sequence. The above design can be used not only to reduce the amount of information in secure communication during random access processing, but also to satisfy the specification for the length of the terminal identifier in the current protocol and to ensure compatibility with the current protocol.

[0015] In one design, the method further includes: The first terminal determines information that identifies the second terminal in a second sequence according to a data truncation rule, determines a first portion of the data in the identifier of the first terminal, the information that identifies the second terminal is a portion of the data in the identifier of the second terminal, and the first terminal verifies the information that identifies the second terminal based on the first portion of the data.

[0016] According to the above design, message 4 contains a second sequence, which contains a portion of the data within the identifier of the second terminal. The first terminal truncates the second sequence according to a data truncation rule to obtain a portion of the data, and also truncates the identifier of the first terminal to obtain a portion of the data. If the two portions of the data are the same, the random access is considered successful; if the two portions of the data are different, the random access is considered failed. The data truncation rule can be pre-configured or communicated to the first terminal in advance by a network device. This is not limited to these. In the above solution, when message 4 carries the second sequence, the first terminal determines whether its random access was successful.

[0017] In one design, the method further includes the following: The first terminal determines a second portion of the data within the identifier of the first terminal according to a data truncation rule; the first terminal verifies the information identifying the second terminal contained in message 4 based on the second portion of the data, and the information identifying the second terminal is a portion of the data within the identifier of the second terminal.

[0018] According to the above design, message 4 directly contains a portion of the data within the identifier of the second terminal. The first terminal may truncate its identifier according to a data truncation rule in order to obtain a portion of the data, and this portion of the data may be called the second portion of the data. If the second portion of the data is the same as the portion of the data contained in message 4, the random access of the first terminal is considered successful; if the two portions of the data are different, the random access of the first terminal is considered unsuccessful. In the above design, when message 4 carries a portion of the data within the identifier of the second terminal, the first terminal determines whether its random access was successful.

[0019] According to a second aspect, a communication method is provided. This method is performed by a network device or a component (such as a processor or chip) located within a network device. For example, this method is performed by a network device. This method includes: The network device receives message 3 from a terminal in random access processing, message 3 containing a terminal identifier, the length of which the terminal identifier is less than or equal to a first length, which is configured in the terminal before the terminal performs random access to the network, or optionally, the first length is the length of the terminal identifier specified in the Long-Term Evolution LTE system, the length of the terminal identifier specified in the New Wireless NR system, or the length of the terminal identifier specified in the protocol. Optionally, the first length is 40 bits. The network device sends message 4 to the terminal in random access processing, message 4 containing information identifying the terminal, the length of which the information identifying the terminal is less than a first length.

[0020] According to the above design, the length of information contained in message 4 in random access processing broadcast in plaintext by a network device is less than the first length. Compared to a solution in which the length of information contained in message 4 in random access processing broadcast in plaintext by a network device is the first length, this application can reduce the amount of information in secure communication that can be obtained by a malicious attacker by using message 4.

[0021] In one design, the method further includes: A network device sends a first broadcast message to a terminal, the first broadcast message containing information indicating a second length, the second length being less than the first length, and the length of the terminal's identifier being determined based on the second length.

[0022] According to the above design, the network device, by using a first broadcast message, notifies the terminal in advance that the length of the terminal identifier carried in message 3 is a second length, and that the second length is less than the first length. Similarly, the length of the information broadcast in plaintext by the network device in message 4 (i.e., the terminal identifier) ​​is also less than the first length. In a random access hacking scenario, the hacking receiving end can only obtain the amount of information whose length is less than the first length. This reduces the amount of information in secure communication during random access processing.

[0023] In one design, before sending the first broadcast message to the terminal, the method further includes the following: The network device determines a second length based on the network load.

[0024] According to the above design, when the network device load is high, the second length value may be set to a large value, for example, 39, to prevent multiple terminals from selecting the same random number as their terminal identifier. When the network device load is low, the second length value may be set to a small value, for example, 8, so that the network device can flexibly adjust the second length value based on the load.

[0025] In one design, message 3 includes a first sequence, the first sequence includes a terminal identifier, and the length of the first sequence is equal to the length of the first sequence. Optionally, the first sequence further includes first data, the first data being either pre-configured data or data sent to the terminal before message 3. Optionally, the first data is data sent to the terminal before message 3, and the method further includes the following: A network device sends message 2 to a terminal in random access processing, message 2 includes first data, the first data being a temporary cell radio network temporary identifier.

[0026] According to the above design, upon receiving the message 3, the network device obtains the first sequence in the message 3. The network device generates a message 4 based on the first sequence, that is, the message 4 includes the first sequence. The first sequence includes an identifier of the terminal and first data, and the length of the identifier of the terminal is less than a first length. The first data is preset data, or data that is notified in advance to the terminal by the network device. For an unauthorized attacker, even if the identifier of the terminal is set to information with a specific meaning, by using the message 4 in the random access procedure, only an amount of information whose length is less than the first length can be sent. This reduces the amount of information in secret communication in the random access procedure.

[0027] In a design, the method further includes: sending, by a network device, a second broadcast message to a terminal, where the second broadcast message does not include information indicating a second length, the second length is less than a first length, and a length of an identifier of the terminal is equal to the first length.

[0028] According to the above design, the message 3 includes an identifier of the terminal, and the length of the identifier of the terminal is equal to the first length. When obtaining the identifier of the terminal in the message 3, the network device truncates the identifier of the terminal according to a data truncation rule to obtain a part of data, and broadcasts the part of data in plaintext by using a message 4. The part of data is used as information for identifying the terminal. In this way, an unauthorized receiving end can obtain only a part of data sent by another terminal by using the message 3. This reduces the amount of information in secret communication in the random access procedure.

[0029] In one design, message 4 includes a second sequence, the second sequence includes information used to identify a terminal, and the length of the second sequence is equal to the first length. Optionally, the second sequence further includes second data, where the second data is preconfigured data, or the second data is data sent to the terminal before message 4. Optionally, the second data is data sent to the terminal before message 4, and the method further includes: sending, by the network device, message 2 to the terminal in a random access procedure, where message 2 includes the second data, and the second data is a temporary cell radio network temporary identifier.

[0030] According to the foregoing design, after a part of data is obtained by truncating an identifier of the terminal in message 3 to meet a length specification of the identifier of the terminal in a current protocol, data padding is performed on the part of data obtained through truncation by using preconfigured data or data previously notified to the terminal, to obtain the second sequence. The network device broadcasts the second sequence in a plaintext by using message 4. The foregoing design meets the length specification of the identifier of the terminal in the current protocol.

[0031] In one design, the method further includes: determining, by the network device based on a network load, a length of information used to identify a terminal, where the information used to identify the terminal is a part of data obtained by truncating an identifier of the terminal.

[0032] According to the foregoing design, when a network load is high, a length value of the part of data obtained through truncation may be set to a large value, to avoid a collision caused by a same part of data in identifiers of different terminals; or when a network load is low, a length value of the part of data obtained through truncation may be set to a small value, to further reduce an amount of information in secure communication in a random access procedure.

[0033] According to a third aspect, a communication method is provided. This method is performed by a terminal or a component configured within the terminal (such as a processor or chip). This method includes: The terminal receives message 2 from a network device in random access processing, message 2 containing first data. The terminal sends message 3 to the network device in random access processing, message 3 containing an identifier of a first terminal. The terminal receives message 4 from the network device in random access processing, message 4 containing a first sequence, the first sequence being determined based on first data and an identifier of a second terminal. The terminal verifies the first sequence based on the identifier of a first terminal and first data.

[0034] According to the above design, when a network device receives the terminal identifier sent by the terminal using message 3, it determines a first sequence based on the terminal identifier and the first data. The network device includes the first sequence in message 4 and does not include the data obtained using message 3 (i.e., the terminal identifier) ​​in plain text. In this way, in scenarios where an unauthorized receiving end cannot know the first data, it is difficult to decode the first sequence and obtain the data carried in message 3. This solves, to some extent, the problem of unauthorized communication in random access processing.

[0035] Optionally, the receiving end needs to decode the first sequence carried in message 4 based on the first data to determine whether the current terminal's random access was successful. In this application, it is found that the terminal needs to know the first data for encoding the data carried in message 3. In this design, the random first data originally carried in message 2 is encrypted, and the first data does not need to be additionally notified to the terminal. This reduces air interface overhead.

[0036] In one design, the verification of a first sequence by a terminal based on the identifier of a first terminal and the first data includes the following: The terminal performs a hash operation on the identifier of the first terminal and the first data to determine a hash value; the terminal obtains the hash value by truncating it according to a hash value truncation rule; and the terminal verifies the first sequence based on the hash value obtained by truncation.

[0037] In the above design, if the hash value obtained through truncation by the terminal is the same as the first sequence, the current terminal's random access is considered successful; if the hash value obtained through truncation by the terminal is different from the first sequence, the current terminal's random access is considered failed. The hash value truncation rule may be specified in the protocol or notified by the network device. For example, a terminal receives indication information for the hash value truncation rule from the network device, and the hash value truncation rule includes the following information: namely, the length of the data obtained through truncation, or the position of the data obtained through truncation.

[0038] In one design, the first data includes a temporary cell wireless network temporary identification.

[0039] In one design, the length of the first sequence is the same as the length of the first terminal identifier, and is the first length. The first length is the length of the terminal identifier specified in the Long-Term Evolution LTE system, or the length of the terminal identifier specified in the New Wireless NR system, or the length of the terminal identifier specified in the protocol. Optionally, the first length is 40 bits.

[0040] According to the above design, the data in message 3, i.e., the terminal identifier, will no longer be broadcast in plaintext in message 4, but the data in message 3 will be encoded based on the first data. This can solve the problem of secret communication at unauthorized receiving ends in random access processing in certain programs. Furthermore, since the terminal identifier specified in the current protocol is of a first length, i.e., the length at the position corresponding to message 4 specified in the current protocol is of a first length, in this design the terminal identifier is replaced by a first sequence of the same first length. This satisfies the requirements of the current protocol, is easily integrated with the current protocol, and has little impact on the current network, based on the implementation of cryptographic protection on the terminal identifier.

[0041] According to a fourth aspect, a communication method is provided. This method is performed by a network device or a component (such as a processor or chip) located within a network device. For example, this method is performed by a network device. This method includes: The network device sends message 2 to a terminal in random access processing, message 2 containing first data. The network device receives message 3 from the terminal in random access processing, message 3 containing the terminal identifier. The network device determines a first sequence based on the first data and the terminal identifier. The network device sends message 4 to the terminal in random access processing, message 4 containing the first sequence.

[0042] In the above design, the network device no longer broadcasts the data carried in message 3 in plaintext, but determines the first sequence based on the data carried in message 3, i.e., the terminal identifier and the first data. Broadcasting the first sequence in plaintext by using message 4 provides some protection against the data carried in message 3 being stolen by an unauthorized receiving end. Furthermore, in this design, the data obtained by using message 3 is encrypted using the random first data in message 2, and the first data does not need to be additionally notified to the terminal. This reduces air interface overhead.

[0043] In one design, the network device determining a first sequence based on first data and a terminal identifier includes the following: The network device performs a hash operation on the first data and the terminal identifier to determine a hash value; and the network device obtains the hash value by truncating it according to a hash value truncation rule to obtain the first sequence.

[0044] According to the above design, the length of the hash value, which is directly determined based on the first data and the terminal identifier, is usually long. In this design, in order to satisfy the requirement that the terminal identifier carried in message 4 is of the first length, the determined hash value is obtained by truncation, and the length of the hash value obtained by truncation is the first length, and the hash value obtained by truncation may be called the first sequence. This satisfies the requirement for the terminal identifier carried in message 4 in the current protocol and satisfies the specifications of the current protocol.

[0045] In one design, the method further includes the following: The network device sends indication information for a hash truncation rule to the terminal, and the hash truncation rule includes the following information, namely the length of the data obtained through truncation, or the position of the data obtained through truncation.

[0046] According to the above design, the network device notifies the terminal of the hash value truncation rule. The terminal performs a hash operation based on the first data and an identifier stored locally on the terminal, and obtains the hash value determined by truncating according to the same hash value truncation rule in order to determine the second sequence. The second sequence can be considered as the hash value obtained through truncation. If the second sequence is the same as the first sequence received by using message 4, the random access is considered successful, and if the second sequence is different from the first sequence received by using message 4, the random access is considered failed. The network device notifies the terminal of the hash value truncation rule, and as a result, the terminal can verify the first sequence received by using message 4.

[0047] In one design, the first data includes a temporary cell wireless network temporary identification.

[0048] In one design, the length of the first data is less than the length of the first sequence.

[0049] In one design, the length of the first sequence is the same as the length of the terminal identifier, and is the first length. The first length is the length of the terminal identifier specified in the Long-Term Evolution LTE system, or the length of the terminal identifier specified in the New Wireless NR system, or the length of the terminal identifier specified in the protocol. Optionally, the first length is 40 bits.

[0050] According to a fifth aspect, a communication device is provided. This device may be a terminal, or a device configured within a terminal (e.g., a chip), or a device that can be used in conjunction with a terminal. This device has a function that implements the method according to the first or third aspect. This function may be implemented by hardware, or by hardware running corresponding software. The hardware or software includes one or more units corresponding to the above function, for example, a transceiver unit and a processing unit.

[0051] According to the sixth aspect, a communication device is provided which includes a unit or means configured to perform a step according to either the first or third aspect.

[0052] According to the seventh aspect, a communication device is provided, including a processor and memory. The memory is configured to store computer instructions. When the device is in operation, the processor executes the computer instructions stored in the memory, and as a result, the device performs the method according to the first or third aspect.

[0053] According to the eighth aspect, a communication device is provided, including a processor coupled to memory. The processor is configured to call a program stored in memory and execute the method according to the first or third aspect. The memory may be located inside or outside the device. In addition, one or more processors may be present.

[0054] According to the ninth aspect, a communication device is provided, comprising a processor and an interface circuit. The processor is configured to communicate with another device through the interface circuit and to perform the method according to the first or third aspect. There may be one or more processors.

[0055] According to the tenth aspect, a communication device is provided. The device may be a network device, or a device configured within a network device (e.g., a chip), or a device that can be used in conjunction with a network device. The device has a function that implements the second or fourth aspect. This function may be implemented by hardware, or by hardware running corresponding software. The hardware or software includes one or more units corresponding to the above function, for example, a transceiver unit and a processing unit.

[0056] According to the eleventh aspect, a communication device is provided which includes a unit or means configured to perform a step according to either the second or fourth aspect.

[0057] According to the twelfth aspect, a communication device is provided, including a processor and memory. The memory is configured to store computer instructions. When the device is in operation, the processor executes the computer instructions stored in the memory, and as a result, the device performs the method according to the second or fourth aspect.

[0058] According to the 13th aspect, a communication device is provided, including a processor coupled to memory. The processor is configured to call a program stored in memory and execute the method according to the second or fourth aspect. The memory may be located inside or outside the device. In addition, one or more processors may be present.

[0059] According to the 14th aspect, a communication device is provided, comprising a processor and an interface circuit. The processor is configured to communicate with another device through the interface circuit and to perform the method according to the second or fourth aspect. There may be one or more processors.

[0060] According to the 15th aspect, a chip system is provided which includes a processor configured to perform a method according to any one of the first to fourth aspects.

[0061] According to the sixteenth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, and when an instruction is executed on a communication device, a method according to any one of the first to fourth aspects is performed.

[0062] According to the 17th aspect, a computer program product is provided. The computer program product includes a computer program or instructions. When the computer program or instructions are executed by a communication device, a method according to any one of the first to fourth aspects is performed.

[0063] According to the 18th aspect, a communication system is provided. This system includes an apparatus according to any one of the 5th to 9th aspects and an apparatus according to any one of the 10th to 14th aspects. [Brief explanation of the drawing]

[0064] [Figure 1] This is a diagram of the architecture of the communication system according to this application. [Figure 2] This is a flowchart of the competition-based random access method described in this application. [Figure 3] This is a flowchart of the communication method described in this application. [Figure 4] This diagram compares the identifiers of terminal devices in the current protocol with those of terminal devices in this application. [Figure 5] This is a flowchart of the communication method described in this application. [Figure 6] This diagram compares the data transmitted in Msg4 under the current protocol with the data transmitted in Msg4 under this application. [Figure 7] This is a diagram of the hash operation according to this application. [Figure 8] This is a flowchart of the communication method described in this application. [Figure 9] This is a diagram of the hash operation according to this application. [Figure 10] This is a diagram of the apparatus according to this application. [Figure 11] This is a diagram of the apparatus according to this application. [Modes for carrying out the invention]

[0065] Figure 1 is a diagram of the architecture of a communication system 1000 to which this application applies. As shown in Figure 1, the communication system includes a wireless access network 100 and a core network 200. Optionally, the communication system 1000 may further include an internet 300. The wireless access network 100 may include at least one wireless access network device (e.g., 110a and 110b in Figure 1) and may further include at least one terminal (e.g., 120a to 120j in Figure 1). The terminal is wirelessly connected to the wireless access network device, and the wireless access network device is connected to the core network wirelessly or wired. The core network device and the wireless access network device may be separate physical devices, or the functions of the core network device and the logical functions of the wireless access network device may be integrated into the same physical device, or some functions of the core network device and some functions of the wireless access network device may be integrated into one physical device. Wired or wireless methods may be used for connections between terminals and between wireless access network devices. Figure 1 is merely a schematic diagram. The communication system may further include other network devices, such as wireless relay devices and wireless backhaul devices not shown in Figure 1.

[0066] A radio access network device may also be called a network device. A radio access network device may be a base station, an evolved node B (eNodeB), a transmission reception point (TRP), a next-generation node B (gNB) in a 5th generation (5G) mobile communication system, a next-generation base station in a 6th generation (6G) mobile communication system, a base station in a future mobile communication system, an access node in a wireless fidelity (Wi-Fi) system, or alternatively, a module or unit that completes some functions of a base station, for example, a central unit (CU) or a distributed unit (DU). The CU completes the functions of the base station's radio resource control (RRC) protocol and packet data convergence protocol (PDCP), and may further complete the functions of the service data adaptation protocol (SDAP). The DU completes the functions of the base station's radio link control (RLC) and medium access control (MAC) layers, and may further complete the functions of some or all physical (PHY) layers. For a detailed description of the protocol layers mentioned above, refer to the relevant technical specifications of the 3rd generation partnership project (3GPP). The radio access network device may be a macro base station (e.g., 110a in Figure 1), or a micro base station or indoor base station (e.g., 110b in Figure 1), or a relay node or donor node.The specific technologies and device configurations used by wireless access network devices are not limited in this application. For the sake of clarity, the following explanation will be provided using the example that the wireless access network device is a base station.

[0067] Terminals may also be referred to as terminal devices, user equipment (UE), mobile stations, or mobile terminals. Terminals can be widely used in various scenarios, such as device-to-device (D2D), vehicle-to-everything (V2X) communication, machine-type communication (MTC), the Internet of Things (IOT), virtual reality, augmented reality, industrial control, autonomous driving, telemedicine, smart grids, smart furniture, smart offices, smart wearables, smart transportation, and smart cities. Terminals may include mobile phones, tablet computers, computers with wireless receiver capabilities, wearable devices, vehicles, unmanned aerial vehicles, helicopters, airplanes, ships, robots, mechanical arms, smart home devices, etc. The specific technologies and device forms used by terminals are not limited in this application.

[0068] Base stations and terminals may be in a fixed location or may be mobile. Base stations and terminals, including indoor devices, outdoor devices, handheld devices, or vehicle-mounted devices, may be deployed on land, on water, or on airplanes, balloons, and satellites in the air. Application scenarios for base stations and terminals are not limited in this application.

[0069] The roles of base stations and terminals can be relative. For example, the helicopter or unmanned aerial vehicle 120i in Figure 1 may be configured as a mobile base station, and terminal 120j accessing the radio access network 100 through 120i is a base station. However, for base station 110a, 120i is a terminal. In other words, communication between 110a and 120i is performed based on the radio air interface protocol. Indeed, communication between 110a and 120i may, alternatively, be performed based on the interface protocol between base stations. In this case, for 110a, 120i is also a base station. Therefore, both base stations and terminals may be collectively called communication devices, and 110a and 110b in Figure 1 may be called communication devices with base station functionality, and 120a through 120j in Figure 1 may be called communication devices with terminal functionality.

[0070] Communication between base stations and terminals, between base stations, or between terminals may be conducted on licensed spectrum, on unlicensed spectrum, or on both licensed and unlicensed spectrum. Communication may be conducted on spectrum below 6 gigahertz (GHz), on spectrum above 6 GHz, or on spectrum below 6 GHz and above 6 GHz. Spectral resources for wireless communication are not limited in this application.

[0071] In this application, the functions of a base station may be performed by a module (e.g., a chip) within the base station, or by a control subsystem that includes the functions of a base station. The control subsystem that includes the functions of a base station as described herein may be a control center in the above application scenarios such as smart grids, industrial control, smart transportation, and smart cities. Alternatively, the functions of a terminal may be performed by a module (e.g., a chip or modem) within the terminal, or by a device that includes the functions of a terminal.

[0072] In this application, the base station sends downlink signals or downlink information to the terminal, with the downlink information carried over the downlink channel, and the terminal sends uplink signals or uplink information to the base station, with the uplink information carried over the uplink channel. In order to communicate with the base station, the terminal needs to establish a wireless connection to a cell controlled by the base station. The cell with which the terminal establishes a wireless connection is called the terminal's serving cell. When communicating with the serving cell, the terminal is further interfered with by signals from neighboring cells.

[0073] Generally, random access is classified into competition-based random access and non-competition-based random access. In this application, competition-based random access is used as an example to illustrate the solution of this application. As shown in Figure 2, competition-based random access processing may include the following steps.

[0074] Step 201: The terminal sends message 1 (message1, Msg1) over the random access channel (physical random access channel, PRACH), and Msg1 contains a random access preamble.

[0075] For example, the terminal selects one preamble from 64 pre-configured preambles and determines a random access resource to send the preamble to. The terminal then sends Msg1, which includes the preamble, to the base station on the determined random access resource.

[0076] Optionally, the preamble is a sequence. The base station may perform signal processing on the received preamble sequence to determine the starting position at which the base station received the preamble, thereby obtaining, through estimation, the transmission delay between the terminal and the base station, and further determining the timing advance (TA) based on the transmission delay between the terminal and the base station. The base station notifies the terminal of the TA by using Msg2, and the terminal may adjust its uplink timing based on the TA.

[0077] Optionally, the base station may, by detecting the preamble, further determine the time unit in which it receives the preamble, further infer the time unit in which the terminal sends the preamble, and determine the downlink transmit beam for sending Msg2 based on the correspondence between the time unit in which the terminal sends the preamble and the downlink transmit beam for Msg2. In addition, on the terminal side, the terminal may infer the downlink beam for receiving Msg2 based on the time unit in which it sends the preamble. Therefore, the base station may notify the terminal in advance of the correspondence between the time unit in which the terminal sends the preamble and the downlink transmit beam for Msg2. For example, the terminal broadcasts a message to notify the terminal. This is not limited to these.

[0078] Optionally, the base station may determine a random access radio network temporary identity (RA-RNTI) based on the detected preamble identity (ID), random access resources for transmitting the preamble, etc. The base station assigns a temporary cell radio network temporary identity (TC-RNTI) to terminals performing random access and determines an uplink grant (UL Grant) for scheduling message 3 (Msg3), etc. The base station may, but is not limited to, include the determined RA-RNTI, TC-RNTI, UL Grant, etc., in Msg2.

[0079] Step 202: The base station sends message 2 (Msg2) over the physical downlink shared channel (PDSCH), and Msg2 is sometimes called a random access response (RAP).

[0080] Optionally, Msg2 carries a timing advance (TA) corresponding to the transmit delay determined in step 201, RA-RNTI, TC-RNTI, and a UL grant for scheduling Msg3. In one design, the base station broadcasts Msg2 downlink, and terminals within the base station's service range may receive Msg2 and verify the RA-RNTI contained in Msg2. If verification is successful, the terminal sends Msg3 to the base station based on the UL grant scheduling in Msg2; otherwise, if verification fails, the terminal does not process Msg2. For example, the base station may determine the RA-RNTI based on the preamble sequence sent in Msg1 and the random access resources for sending the preamble. The terminal compares the RA-RNTI determined by the terminal with the RA-RNTI obtained in Msg2. If the two are the same, RA-RNTI is considered successfully verified, and step 203 below, which sends Msg3 to the base station, is performed based on the UL grant scheduling in Msg2. If the two are different, the terminal does not perform any action on Msg2, and the terminal may restart random access.

[0081] Step 203: The terminal sends message 3 (message3, Msg3) to the base station, and Msg3 includes the terminal's identifier.

[0082] Step 204: The base station sends message 4 (message4, Msg4) to the terminal, which may be called a contention resolution message. Msg4 contains a contention resolution identity, which contains the identifier of the terminal that received Msg3. Msg4 can be used to resolve issues such as contentions and conflicts that occur when multiple terminals attempt to use the same random access resource and the same preamble for access.

[0083] In the random access processing shown in Figure 2, a scenario may occur where multiple terminals simultaneously select the same random access resource and send the same preamble. In this scenario, the base station can only receive or detect the preamble with the strongest energy, and the base station cannot determine the number of terminals that simultaneously claim the uplink resource in this scenario. This scenario is one in which collisions occur during random access performed by multiple terminals. After receiving Msg1, the base station broadcasts Msg2 on the downlink over the PDSCH, and Msg2 carries the RA-RNTI. Upon receiving Msg2, the terminal calculates the RA-RNTI based on the preamble sent in Msg1, the random access resource used to send the preamble, etc. If the RA-RNTI calculated locally by the terminal is the same as the RA-RNTI received from the base station, the terminal considers Msg2 to have been sent to the terminal and continues to send Msg3 to the base station based on the UL grant scheduling in Msg2. When multiple terminals send Msg1 using the same preamble and the same random access resource, the RA-RNTI determined by the multiple terminals based on the preamble and random access resource is the same. If the RA-RNTI determined by the multiple terminals is the same as the RA-RNTI advertised by the base station in Msg2, the multiple terminals send Msg3 to the base station based on the UL grant scheduling in Msg2. Since the multiple terminals send Msg3 on the same time-frequency resource based on the UL grant scheduling, the Msg3s from the multiple terminals will collide with each other via the air interface, and the base station can correctly decode only one Msg3. To resolve the conflict access problem, terminals send a 40-bit random number to the base station in Msg3 to identify the terminal, and this identification is sometimes called the terminal identifier. Optionally, the 40-bit random number may include a 39-bit random number and a 1-bit reserved bit. Thus, the 40-bit random number is sometimes referred to as a 39-bit random number and a 1-bit reserved bit.In the following description, an example in which the terminal device identifier is a random number is used for illustrative purposes. Upon receiving and successfully decoding Msg3, the base station broadcasts the 40-bit random number received in Msg3 in the terminal conflict resolution identifier in Msg4 on the downlink; that is, the base station broadcasts Msg4 on the downlink. Msg4 contains a conflict resolution identifier, which may contain 48 bits. Of the 48 bits, 40 bits are the terminal identifier carried in Msg3, and the remaining 8 bits may be a service type identifier. This application focuses on the transmission of the 40-bit terminal identifier. Therefore, the following description mainly describes the processing of Msg4 containing the terminal identifier. Upon receiving Msg4, each of several terminals may compare the 40-bit identifier carried in Msg4 with the terminal identifier sent in Msg3. If the two identifiers are the same, the terminal considers the random access to be successful; if the two identifiers are different, the terminal considers the random access to have failed. Optionally, Msg4 may carry scheduling information. After a successful random access, the terminal may perform uplink and downlink communication with the base station based on the scheduling information carried in Msg4.

[0084] Vulnerabilities exist in race-based random access processing, and these vulnerabilities are sometimes called stealth pirate attacks in random access processing, such as Sparrow attacks using RACH rebroadcast overwrites (RACH rebroadcast overwrites), or simply put, secret communications attacks in random access processing, which exploit the characteristics of air interface downlink broadcasts in random access processing to secretly transmit sensitive information by overwriting valid information. A malicious terminal may exploit the Sparrow vulnerability in the random access mechanism to perform malicious secret communications. For example, attacker terminals A and B pre-negotiate information of specific meaning. When terminal A's geographical location is far from terminal B's geographical location, terminal A may send information of specific meaning in Msg3 to the base station, replacing a random number that identifies terminal A. After receiving and correctly decoding Msg3 from terminal A, the base station broadcasts specific meaningful information contained in Msg3 in plaintext via Msg4, and terminal B may acquire Msg4 via blind detection through an air interface at a remote geographical location in order to obtain the specific meaningful information sent by terminal A and carried in Msg4. The communication between terminal A and terminal B is carried out secretly, and the base station cannot detect it. How to avoid or mitigate the secretive communication caused by the Sparrow vulnerability is a technical problem to be solved in this application.

[0085] This application provides a solution to a Sparrow attack, including the following: A terminal determines a terminal identifier, the length of which is less than or equal to a first length, which is configured on the terminal before it performs random access to the network. For example, the first length may be 40 bits. The terminal sends Msg3 to the base station during random access processing, and Msg3 contains the terminal identifier. Upon receiving Msg3 during random access processing, the base station sends Msg4 to the terminal during random access processing, and Msg4 during random access processing contains information that identifies the terminal, the length of which the information that identifies the terminal is less than the first length. For example, the first length is 40 bits. In the current solution, the length of the terminal identifier included in Msg4 by the base station is 40 bits. For a malicious attacker, the amount of meaningful information obtained by using Msg4 during random access processing is 40 bits. However, in this solution, the length of the terminal identifier included in Msg4 by the base station is less than 40 bits. The amount of meaningful information that a malicious attacker can obtain by using Msg4 in random access processing is less than 40 bits. This reduces the amount of information in secure communications caused by the Sparrow vulnerability.

[0086] Embodiment 1 In Embodiment 1, the length of the terminal identifier included in Msg3 sent by the terminal to the base station is less than a first length. Upon receiving Msg3, the base station may obtain the terminal identifier from Msg3 and use the terminal identifier as information to identify the terminal. The base station sends Msg4 to the terminal, which includes information to identify the terminal, and this information is the terminal identifier, and the length of this information is less than a first length. Alternatively, upon obtaining the terminal identifier from Msg3, the base station may truncate the terminal identifier to obtain a portion of the data, and use the portion of the data obtained through truncation as information to identify the terminal. The base station sends Msg4 to the terminal, which includes information to identify the terminal. In this case, the information to identify the terminal is the portion of the data obtained by truncating the terminal identifier, and the length of this information is less than a first length.

[0087] For example, the information that identifies a terminal included in Msg4 is the terminal identifier. In one design, a base station may send a broadcast message to a terminal, which may be called a first broadcast message, which may contain information of a second length, where the second length is less than the first length. The terminal may determine its identifier based on the second length. For example, the length of the terminal identifier may be equal to the second length, or the length of the terminal identifier may be less than the second length. This is not limited to these cases.

[0088] For example, in one implementation, the base station notifies a second length by using a first broadcast message, and the terminal may adjust the second length notified by the base station based on local configuration, local policies, etc. Indeed, the adjustment is usually a length adjustment in the direction of reducing the size of the second length. For example, the length of the terminal identifier determined by the terminal is a third length, and the third length is less than the second length. Optionally, since the length of the terminal identifier is a third length and different from the second length notified by the base station, in addition to the terminal identifier being carried in Msg3 by the terminal, Msg3 further carries at least one of the following: indication information for the third length, the position of the terminal identifier within Msg3, etc., and as a result the base station can extract the terminal identifier from Msg3.

[0089] In one implementation, the terminal may include the terminal identifier directly in Msg3 (i.e., it may be understood that the terminal identifier does not need to be padded), or the terminal may determine a first sequence based on the determined terminal identifier. The length of the first sequence is equal to the first length, and the terminal includes the first sequence in Msg3. Optionally, in addition to the terminal identifier, the first sequence may further include the first data, the length of the terminal identifier, and the length of the first data. The sum of the length of the terminal identifier and the length of the first data is equal to the first length. Alternatively, it can be described as follows: After determining the terminal identifier, the terminal may perform data padding on the terminal identifier based on the first data to determine the first sequence, the length of the first sequence is the first length, and the terminal includes the first sequence in Msg3. According to the specification in the current protocol, the length of the terminal identifier carried in Msg3 is the first length. However, in this design, taking into consideration the amount of information lost during malicious communication due to the Sparrow vulnerability, the length of the terminal identifier is set to be less than a first length. In addition, to satisfy the specifications in the current protocol, the terminal identifier is padded by using first data to obtain a first sequence of length first, and the terminal includes a first sequence of length first in Msg3.

[0090] The above design, while assuming a reduction in the amount of information in secure communications caused by the Sparrow vulnerability, can further satisfy the current protocol's specification for the length of the terminal identifier and is compatible with the current protocol. Optionally, the first data may be pre-configured data or data received from the base station before Msg3. For example, before Msg3, the terminal may receive Msg2 from the base station, which contains TC-RNTI. TC-RNTI may be used as the first data, and is used to pad the terminal identifier, determine the first sequence, etc. For details, see the following explanation for rules and padding methods for terminals to pad their identifiers.

[0091] As shown in Figure 3, this application provides a procedure for a communication method. This procedure includes at least the following steps:

[0092] Step 301: The base station sends the first broadcast message to the terminal.

[0093] The first broadcast message indicates a second length, which is less than the first length. The first length is the length of the terminal identifier configured on the terminal before it performs random access to the network. For example, when the terminal is powered on, the base station may notify the terminal of the first length by using a broadcast message, or the base station may periodically send broadcast messages to notify the terminal of the first length. Alternatively, the first length may be the length of the terminal identifier specified in the protocol, or the length of the terminal identifier specified in the fourth-generation mobile communication system Long Term Evolution (LTE) system, or the length of the terminal identifier specified in the fifth-generation mobile communication system New Radio (NR) system. Optionally, the first length is 40 bits. The first broadcast message may be a system information block (SIB), for example, SIB1. Optionally, the terminal identifier may be represented by using a random number, and the first broadcast message may be in random access Msg3 and used to notify the terminal of the number of bits N of a random number representing the terminal identifier, the number of bits N corresponds to a second length.

[0094] Optionally, before step 301, the method may further include the following: The base station determines a second length based on the network load. For example, in a low-load scenario, the base station assumes that the probability of Msg1 collisions in the current network is low, and terminals may identify their identity by using a small number of bits. The value of the second length may be small. For example, the value of the second length may be 8 bits. Alternatively, in a high-load scenario, the base station assumes that the probability of Msg1 collisions in the current network is high, and terminals need to use a large number of bits to identify their identity. The value of the second length may be large to prevent terminals from selecting the same random number to represent each other. For example, the value of the second length may be 39 bits.

[0095] Step 302: The terminal sends Msg1 to the base station on a random access resource, and Msg1 includes a preamble.

[0096] Step 303: The base station sends Msg2 to the terminal, Msg2 includes at least one of the TA, RA-RNTI, TC-RNTI, and UL grants for scheduling Msg3.

[0097] Steps 301 through 303 are optional.

[0098] Step 304: The terminal sends Msg3 to the base station, and Msg3 includes the terminal's identifier.

[0099] In one design, a terminal may determine its identifier based on a second length notified by a first broadcast message. The determined length of the terminal identifier may be equal to or less than the second length, etc. See the explanation above for details. Optionally, the terminal identifier may be a random number.

[0100] In possible implementations, Msg3 directly contains the terminal identifier. The terminal may determine an N-bit random number based on a second length notified by the first broadcast message, where the N-bit random number represents the terminal identifier, and the length corresponding to the N bits is less than or equal to the second length. In this implementation, Msg3 sent by the terminal to the base station contains the N-bit random number.

[0101] In another possible implementation, Msg3 includes a first sequence. In addition to determining the terminal identifier in the manner described above, the terminal may further determine the first data and perform data padding on the terminal identifier based on the first data to determine the first sequence. In addition to the terminal identifier, the first sequence further includes the first data. Optionally, the first data is pre-configured data. For example, the pre-configured data may be pre-configured data for padding, and the pre-configured data may also be called fixed data, etc., or data received by the terminal from the base station prior to Msg3. This is not limited to this. In this implementation, Msg3 sent by the terminal to the base station includes a first sequence, the first sequence includes an N-bit random number (i.e., the terminal identifier) ​​and the first data.

[0102] In detail, a terminal may perform data padding on its identifier based on first data according to data padding rules, and the padded data is called the first sequence. The data padding rules are not limited. For example, the first data may be padded before the terminal identifier, or after the terminal identifier, or in the middle of the terminal identifier, or at equal intervals according to the rules. This is not limited. Data padding rules may be pre-configured or communicated to the terminal in advance by a network device. For example, in addition to the second length, the first broadcast message may further communicate data padding rules, etc. For example, the first length may be 40 bits and the second length may correspond to N bits.

[0103] As shown in Figure 4, in the current protocol, a 40-bit random number represents the terminal identifier. In this implementation, an N-bit random number represents the terminal identifier, where N is a positive integer between 8 and 39. The terminal performs data padding on the N-bit random number based on pre-configured data or TC-RNTI, and the length of the padded data is 40 bits. Figure 4 provides an explanation by using an example where the first data is padded at the end of the N-bit random number. According to the specifications in the current protocol, the length of the terminal identifier in Msg3 is the first length. In this solution, the length of the terminal identifier is reduced in order to reduce the amount of information in the secure communication caused by the Sparrow vulnerability, but the length of the terminal identifier is padded to the first length based on pre-configured data or data previously obtained from the base station in Msg3, and as a result, this solution is applicable to and compatible with the specifications in the current protocol.

[0104] Step 305: The base station sends Msg4 to the terminal, Msg4 containing information that identifies the terminal, the length of which the information that identifies the terminal is less than a first length. As described above, the information that identifies the terminal may be the terminal identifier, or it may be part of the data obtained by truncating the terminal identifier.

[0105] Optionally, in the procedure shown in Figure 3, the length of the terminal identifier is the second length, and the information identifying the terminal is the terminal identifier or part of the data obtained by truncating the terminal identifier. Therefore, in the procedure shown in Figure 3, the length of the information identifying the terminal is less than or equal to the second length.

[0106] When the information identifying a terminal is the terminal identifier, the above Msg3 may directly include the terminal identifier or include a first sequence. In this application, when a base station receives Msg3, it may directly obtain the information contained in Msg3, and the obtained information may be the terminal identifier or a first sequence. The base station broadcasts Msg4 in plaintext, and Msg4 includes the information obtained from Msg3. For example, Msg4 includes a conflict resolution identifier, the conflict resolution identifier includes the information obtained from Msg3, i.e., the conflict resolution identifier includes the terminal identifier. Since Msg4 is a broadcast message, terminals within the service scope of Msg4 may receive Msg4, and the terminals may obtain the information carried in Msg4. The terminal compares the information obtained from Msg4 with the information contained in Msg3 by the terminal. If the information is the same, the terminal's random access may be considered successful; if the information is different, the terminal's random access may be considered unsuccessful. Optionally, if a terminal fails to perform random access, the terminal may resume random access processing. For example, the first length is 40 bits and the second length is N bits. In this design, after receiving Msg4, the Sparrow attack receiving terminal may reduce the number of bits transmitted from 40 bits to N bits by using stealth information. This reduces the number of information bits that an attacker could use for stealth transmission, thus reducing the value of exploiting the vulnerability for an attacker.

[0107] Similarly, when information identifying a terminal is part of the data within the terminal identifier, Msg3 may directly contain the terminal identifier or contain a first sequence, the first sequence containing the terminal identifier and the first data. Upon receiving Msg3, the base station may obtain the terminal identifier from Msg3. Part of the data is obtained by truncating the terminal identifier. For an explanation of the part of the data obtained by truncation, see the following explanation in Figure 5. For example, Msg4 contains a conflict resolution identifier, which contains the M-th to (M+K)-th bits of the data obtained by truncating the terminal identifier in Msg3.

[0108] The base station broadcasts Msg4 in plaintext, and Msg4 carries a portion of the data obtained through truncation. Optionally, Msg4 may carry a portion of the data directly. Alternatively, the base station may pad a portion of the data obtained through truncation to determine a second sequence, the length of which is equal to the length of the first sequence. Msg4 carries the second sequence. In this design, a portion of the data is carried in Msg4, and the length of this portion of the data is less than the length of the second sequence. This further reduces the information bits used by a Sparrow attacker, allowing for the indirect transmission of information.

[0109] It should be noted that the above focuses on the process by which Msg3 or Msg4 carries terminal identifier-related data. In one design, Msg3 or Msg4 carries two parts of data: one part of the data is terminal identifier-related data, and the other part of the data is a service type identifier. The size of the service type identifier may be 8 bits. Optionally, in this application, in addition to terminal identifier-related data, Msg3 or Msg4 may further include a service type identifier.

[0110] In this application, during random access processing, a terminal sends Msg3 to a base station, and the base station broadcasts the data in the received Msg3 in plaintext using Msg4. As a result, a vulnerability exists in the random access processing for secure communication attacks. For example, when attacker terminal A is far away from attacker terminal B, terminal A may send information with a predetermined meaning to the base station in Msg3. After receiving and correctly decrypting Msg3 from terminal A, the base station broadcasts the information contained in Msg3 by terminal A, which has a predetermined meaning, in plaintext using Msg4. After receiving the plaintext broadcasted Msg4, terminal B may obtain the information sent by terminal A, which has a predetermined meaning, in order to communicate with terminal A. However, in the above process, the communication between terminal A and terminal B is performed secretly, and the base station is unaware of the communication. As a result, the communication between terminal A and terminal B is unauthorized. In one design, the length of the data contained in Msg3 (i.e., the terminal's identifier) ​​is a first length, depending on the terminal. In the malicious communication scenario described above, the malicious attack receiving terminal can obtain the amount of data corresponding to the first length by using Msg4. However, in this design, the base station notifies the terminal that the length of the terminal's identifier, i.e., the length of the data contained in Msg3, depending on the terminal, is a second length, and the second length is less than the first length, by using a first broadcast message. The base station may broadcast the second length of data in plaintext using Msg4, or perform further data truncation on the second data to obtain a portion of the data, and broadcast the portion of the data in plaintext using Msg4. According to the solution of this application, in the malicious communication scenario described above, the data that can be obtained by the malicious attack receiving terminal by using Msg4 is less than the amount of data corresponding to the first length. This reduces the information bits in the secure communication in random access processing, reducing the value for an attacker to exploit the vulnerability.

[0111] This application further provides another solution to a Sparrow attack, including the following: A terminal determines a terminal identifier, the length of which is equal to a first length. The terminal sends Msg3 to the base station in random access processing, and Msg3 contains the terminal identifier. The base station obtains the terminal identifier of the first length from Msg3, truncates the terminal identifier to obtain a portion of the data, the portion of which can be used as information to identify the terminal.

[0112] The base station sends Msg4 to the terminal, and Msg4 carries a portion of the data, the length of which is less than a first length. For example, the first length is 40 bits. In this solution, the amount of meaningful information that a malicious attacker can obtain by using Msg4 in random access processing is less than 40 bits. This reduces the amount of information in secure communication caused by the Sparrow vulnerability.

[0113] Embodiment 2 In Embodiment 2, the terminal may determine its identifier based on a first length, and the length of the terminal identifier may be the first length. The terminal sends Msg3 to the base station in random access processing, and Msg3 contains the terminal identifier, which has a length of the first length. When the base station retrieves the terminal identifier from Msg3, it truncates the terminal identifier to obtain a portion of the data. The base station sends Msg4 to the terminal, and Msg4 either directly contains the portion of the data obtained through truncation (i.e., it can be understood that the terminal identifier does not need to be padded), or Msg4 contains a second sequence, which contains the portion of the data obtained through truncation, and the length of the second sequence is equal to the first length. Optionally, the second sequence may further contain second data. The second data may be pre-configured data, or it may be sent to the terminal before message 4. For example, the second data may be TC-RNTI, which is carried in Msg2 in random access processing.

[0114] As shown in Figure 5, this application provides a procedure for a communication method. This procedure includes at least the following steps:

[0115] Step 500: The base station sends a second broadcast message to the terminal.

[0116] The second broadcast message may not contain information indicating the second length, and the second length is less than the first length. See the explanation in Figure 3 for details on the first length.

[0117] Optionally, the second broadcast message may be an SIB, for example, SIB1.

[0118] Step 501: The terminal sends Msg1 to the base station, and Msg1 includes a preamble.

[0119] Step 502: The base station sends Msg2 to the terminal, Msg2 includes at least one of the TA, RA-RNTI, TC-RNTI, and UL grants for scheduling Msg3.

[0120] Steps 500 through 502 are optional.

[0121] Step 503: The terminal sends Msg3 to the base station, and Msg3 includes the terminal's identifier.

[0122] For example, a terminal determines its identifier based on a first length, the length of the terminal identifier may be the first length, and the terminal identifier may be a random number.

[0123] Step 504: The base station sends Msg4 to the terminal, Msg4 containing information that identifies the terminal, the length of which the information that identifies the terminal is less than a first length.

[0124] In one design, after obtaining the terminal identifier from Msg3, the base station may obtain a portion of the data within the terminal identifier by truncating it according to a data truncation rule. The data truncation rule includes the position of the data obtained through truncation, the length of the data obtained through truncation, etc. The data truncation rule may be pre-configured or determined by the base station based on the current network load status. For example, the base station may determine the length of the data obtained through truncation based on the network load, and the length of the data obtained through truncation is the length of the portion of the data obtained through truncation. For example, the data truncation rule may truncate the terminal identifier to obtain the Mth to the (M+K)th bit of the data, where M and K are positive integers greater than 0, where M represents the starting bit of the data obtained through truncation of the terminal identifier, and K represents the length of the data obtained through truncation of the terminal identifier, i.e., the length of the portion of the data obtained through truncation. For example, in a low-network load scenario, the base station may assume that the probability of a Msg1 collision in the current network is low and that the probability of multiple terminals selecting the same random number in Msg3 is extremely low. Therefore, K may be set to a small value. In a high-network load scenario, the base station assumes that the probability of a Msg1 collision in the current network is high. Terminals need to use a large number of random numbers in Msg3 to identify their terminal identity and need to increase the amount of bits of the message in Msg3 that the base station returns in Msg4. Therefore, K may be set to a large value. Optionally, Msg4 may include a conflict resolution identifier, which includes the M-th to (M+K)-th bits of the data obtained by truncating the terminal identifier in Msg3.

[0125] Optionally, the base station may send indication information for a data truncation rule to the terminal, which may indicate at least one of the following: the location of the data obtained through truncation, the length of the data obtained through truncation, etc. The data truncation rule may explicitly or implicitly indicate at least one of the following: the location of the data obtained through truncation, the length of the data obtained through truncation, etc. In a possible implementation, the data truncation rule may explicitly indicate at least one of the following: the location of the data obtained through truncation, the length of the data obtained through truncation, etc. In this case, the data truncation rule may be described as including at least one of the following: the location of the data obtained through truncation, the length of the data obtained through truncation, etc. For example, in step 500, the base station may notify the terminal of the data truncation rule by using a second broadcast message, for example, the second broadcast message may include indication information for the data truncation rule.

[0126] In possible implementations, Msg4 directly contains a portion of the data obtained through truncation. Upon receiving and correctly decoding Msg4, the terminal may obtain a portion of the data within Msg4. The terminal determines a second portion of the data within its locally generated identifier according to the data truncation rule, and this locally generated terminal identifier is the terminal identifier sent by the terminal to the base station in Msg3. The terminal verifies the portion of the data contained in Msg4 based on this second portion. For example, if the second portion of the data is the same as a portion of the data received in Msg4, the terminal's random access is considered successful; if the second portion of the data is different from a portion of the data received in Msg4, the terminal's random access is considered unsuccessful. The data truncation rule is either pre-configured or received by the terminal from the base station. See the above description for how the base station sends the data truncation rule to the terminal. The above example is still used. The data truncation rule may truncate the terminal's identifier to obtain the M-th through (M+K)-th bits of the data. The terminal may truncate a locally generated identifier in order to obtain the M-th through (M+K)-th bits of the data as a second part of the data, according to data truncation rules.

[0127] In another possible implementation, after obtaining a portion of the data obtained through truncation, the base station may determine a second sequence by performing data padding on the portion of the data obtained through truncation based on the second data. In addition to the portion of the data obtained through truncation mentioned above, the second sequence further includes the second data, and the length of the second sequence is the length of the first. The rules for performing data padding on the portion of the data obtained through truncation based on the second data are not limited. For example, the second data may be padded forward of the portion of the data obtained through truncation, or backward of the portion of the data obtained through truncation, or in the middle of the portion of the data obtained through truncation, or evenly spaced padding on the portion of the data obtained through truncation. This is not limited. The rules for performing data padding on the portion of the data obtained through truncation may be predetermined or notified to the terminal by the base station. This is not limited. For example, the base station may notify the terminal of rules for performing data padding on a portion of the data obtained through truncation by using a second broadcast message in step 500. Msg4, sent by the base station to the terminal, includes a second sequence. In the above design, where the second sequence is carried in Msg4 and the length of the second sequence is a first length, a portion of the data carried in Msg3 is broadcast in plaintext in Msg4 in order to reduce the amount of information in the secure communication caused by a Sparrow attack. In addition, to meet the requirements of Msg4 in the current protocol, the length of a portion of the data is padded by a first length specified in the protocol. This is compatible with the current protocol.

[0128] The method for verifying the second sequence when the terminal receives Msg4 includes the following:

[0129] The terminal determines a portion of the data obtained by truncating a second sequence according to a data truncation rule, and the terminal determines a first portion of the data within the terminal's local identifier according to the data truncation rule. Optionally, the data truncation rule may be pre-configured or pre-notified to the terminal by the base station, etc. This is not limited to these. The terminal verifies the portion of the data obtained by truncating a second sequence based on the first portion of the data. For example, if the two portions of the data are the same, the terminal's random access is considered successful; if the two portions of the data are different, the terminal's random access is considered unsuccessful. For example, the data truncation rule is to obtain the Mth through (M+K)th bits of the data within the terminal's identifier through truncation. When obtaining the terminal's identifier from Msg3, the base station truncates the terminal's identifier to obtain the Mth through (M+K)th bits of the data, and the Mth through (M+K)th bits of the data obtained through truncation are called a portion of the data. Bits 1 through (M-1) and bits 1 through (M+K+1) of the data are padded with pre-set data or TC-RNTI, and the padded data is called the second sequence.

[0130] For example, as shown in Figure 6, the first length is 40 bits. In the current solution, Msg4 contains a 40-bit random number, which represents the terminal identifier. However, in this application, Msg4 contains a second sequence, the length of which is also 40 bits. Of the 40 bits, the first to (M-1) bits are padded data, the M to (M+K) bits are random numbers obtained by truncating Msg3, and the (M+K+1) to 40 bits are padded data. The padded data may be fixed data, TC-RNTI, etc. Upon receiving the second sequence in Msg4, the terminal truncates the second sequence to obtain a portion of the data in the M to (M+K) bits. In the terminal's local identifier, the data in the M to (M+K) bits is obtained by truncation, and the data obtained by truncation is called the first portion of the data. The portion of the data obtained through truncating the second sequence is validated based on the first portion of the data. If the first portion of the data is the same as the portion of the data obtained through truncating the second sequence, the terminal's random access is considered successful. If the first portion of the data is different from the portion of the data obtained through truncating the second sequence, the terminal's random access is considered failed.

[0131] Alternatively, the terminal performs data truncation on its local identifier according to data truncation rules, and the portion of data obtained through truncation is called the third portion of the data. The terminal then performs data padding on the third portion of the data according to data padding rules to determine the third sequence. The data truncation and data padding rules may be pre-configured or pre-notified to the terminal by the base station, but are not limited to these. The terminal verifies the second sequence in Msg4 based on the third sequence. If the third sequence is the same as the second sequence, the terminal's random access is considered successful; if the third sequence and the second sequence are different, the terminal's random access is considered failed. The above example is still used, and the first length is 40 bits. The terminal first obtains a portion of the data about the local identifier through truncation in the manner shown in Figure 6, and then may pad the portion of the data obtained through truncation based on pre-configured data or TC-RNTI to obtain the third sequence. The third sequence is used to verify the second sequence obtained in Msg4.

[0132] According to the design described above, after receiving Msg4, a malicious receiving end of a Sparrow attack can reduce the bits that could be used to transmit stealth information from bits corresponding to the terminal identifier to bits corresponding to a portion of the data within the terminal identifier. This reduces the number of information bits that can be used by the attacker for stealth transmission and reduces the amount of confidential communication information that can be obtained by the attacker.

[0133] In one design, in a scenario where collisions occur during random access by multiple terminals, each terminal sends a Msg3 to the base station based on the UL grant scheduling in Msg2, each Msg3 containing the identifier of the corresponding terminal, and the Msg3s sent by each of the multiple terminals collide with each other via the air interface, and the base station can correctly decode only one Msg3. The terminal identifier is obtained from the correctly decoded Msg3, and the terminal identification information is broadcast in plaintext using Msg4. Terminals within the base station's service range may receive Msg4, and each terminal verifies the terminal identification information obtained in Msg4 based on the terminal identifier sent by the terminal in Msg3. If the verification is successful, the terminal's random access is considered successful; if the verification fails, the terminal's random access is considered failed. From each terminal's perspective, the terminal sends its terminal identifier in Msg3. The terminal identification information received in Msg4 may be information that identifies the terminal, or information that identifies another terminal. To facilitate distinction, the solution in the above embodiment may be described as follows: The first terminal determines its identifier, the first terminal sends Msg3 to the base station in random access processing, Msg3 includes the identifier of the first terminal, the length of which is less than or equal to a first length, the first terminal receives Msg4 from the base station in random access processing, Msg4 includes information identifying the second terminal, the length of which is less than a first length. Optionally, the second terminal is the same as or different from the first terminal. For example, in competition-based random access processing, if terminals A and B select the same random access resource and send the same preamble, a collision is considered to occur between terminals A and B in random access processing. Terminals A and B may each send Msg3 to the base station based on the UL grant scheduling in Msg2.If the base station correctly decodes Msg3 sent by terminal A, Msg4 will carry information identifying terminal A. Alternatively, if the base station correctly decodes Msg3 sent by terminal B, Msg4 will carry information identifying terminal B. From terminal A's perspective, the terminal identification information obtained by terminal A using Msg4 may be information identifying terminal A, i.e., information identifying terminal A, or it may be information identifying another terminal, such as information identifying terminal B.

[0134] This application further provides another solution against the Sparrow attack. In this solution, after the base station obtains the identifier of the terminal carried in Msg3, the base station selects a random number Nounce as a salt value based on the terminal identifier, the salt value is a random value that is additionally added in the hash operation. The base station performs a hash operation based on the terminal identifier and Nounce and truncates the hash operation result to obtain a portion of the hash value. The hash value and salt value Nounce obtained through truncation are broadcast in plaintext in Msg4, i.e., Msg4 contains the hash value and Nounce obtained through truncation. For example, in one implementation, as shown in Figure 7, both the length of Nounce and the terminal identifier are 40 bits. The base station performs a hash operation on the 40-bit Nounce and the 40-bit terminal identifier, truncates the hash operation result h(x) to obtain 40 bits of data. The base station broadcasts the Nounce and 40 bits of data obtained by truncating the hash calculation result in plaintext using Msg4. Upon receiving Msg4, the terminal performs a hash calculation on the Nounce and a locally generated identifier contained in Msg4, and truncates the hash calculation result to obtain a portion of the hash value. The terminal compares the portion of the hash value obtained locally through truncation with the portion of the hash value received using Msg4. If the two portions are the same, the terminal's random access is considered successful; if the two portions are different, the terminal's random access is considered unsuccessful. In this design, the base station no longer broadcasts the information received in Msg3 in plaintext, but broadcasts the hash calculation result and Nounce determined based on the information received from Msg3 and the Nounce, in plaintext. Theoretically, it is difficult for a malicious receiver of a Sparrow attack to infer the information carried in Msg3 based on the hash calculation result and the Nounce carried in Msg4. This solves the secretive communication problem caused by the Sparrow vulnerability.

[0135] However, in this solution, the base station needs to further notify the terminal of the Nounce by using Msg4. This increases the air interface overhead of Msg4. For example, the terminal conflict resolution identifier in Msg4 has only 48 bits in the current protocol definition. Of these 48 bits, 40 bits are for transmitting the information received in Msg3, and the remaining 8 bits are the service type identifier. However, in the hash solution shown in Figure 7, the length of the hash value obtained through truncation and the length of the Nounce value are both 40 bits. The hash value obtained through truncation can be set in the information bits corresponding to the 40 bits of the terminal conflict resolution identifier in Msg4. To send the Nounce, an additional 40 bits of information bits need to be added to Msg4. This increases the air interface overhead of Msg4.

[0136] In this application, the solution is improved as follows: Before Msg4, the base station notifies the terminal of a first data to be used as a Nounce. In Msg3, the base station performs a hash operation based on the first data received and the terminal identifier, and truncates the hash operation result to obtain a portion of the hash value. In Msg4, the base station notifies the terminal of the portion of the hash value obtained through truncation, and does not notify a Nounce in Msg4. This reduces the air interface overhead of Msg4.

[0137] As shown in Figure 8, this application provides a procedure for a communication method. This procedure includes at least the following steps:

[0138] Step 801: The terminal sends Msg1 to the base station to initiate random access processing. Step 801 is optional.

[0139] Step 802: The base station sends Msg2 to the terminal, and Msg2 contains the first data. Optionally, the first data may be TC-RNTI, which is generated by the base station and has a length of 16 bits. Alternatively, the first data may be random data other than TC-RNTI. This is not limited to this.

[0140] Step 803: The terminal sends Msg3 to the base station, which contains the terminal's identifier, the length of which is the first length. For details on the first length, please refer to the procedure description shown in Figure 3.

[0141] Step 804: The base station determines a first sequence based on the first data and the terminal identifier.

[0142] For example, a base station may perform a hash operation on a terminal identifier and a first data to determine a hash value, and the hash value is the result of the hash operation. The hash value may be obtained by truncating it according to a hash value truncation rule to obtain a first sequence. Optionally, the length of the first sequence may be the same as the length of the terminal identifier and is a first length. For example, the first length is 40 bits. The hash value truncation rule may include at least one of the following: the length of the data obtained through truncation, the position of the data obtained through truncation, etc. The length of the data obtained through truncation may be a first length. The position of the data obtained through truncation may be data obtained through truncation of a first length at a forward position in the hash operation result, or data obtained through truncation of a first length at a backward position in the hash operation result, or data obtained through truncation of a first length at an intermediate position in the hash operation result, etc. This is not limited to these.

[0143] For example, upon receiving Msg3, the base station obtains the terminal identifier from Msg3, which has a length of 40 bits. As shown in Figure 9, X may represent the terminal identifier, and the TC-RNTI received in Msg2 is used as the hash Nounce salt value. The base station performs a hash operation on the terminal identifier and TC-RNTI to obtain the hash value h(x). Since the length of the obtained hash value h(x) is usually long, the hash value h(x) generally needs to be obtained through truncation. For example, 40 bits of data may be obtained by truncating h(x), and the data obtained through truncation is sometimes called the first sequence.

[0144] Step 805: The base station sends Msg4 to the terminal, and Msg4 contains the first sequence.

[0145] In the solution, the conflict resolution identifier within Msg4 may include a first sequence, the length of which is 40 bits. In addition to the first sequence, the conflict resolution identifier may further include an 8-bit service type identifier.

[0146] Upon receiving Msg4, the terminal may obtain a hash value by performing a hash operation on a locally generated identifier and the received first data, and then truncating it according to a hash value truncation rule. The hash value truncation rule may be predefined or notified to the terminal by the base station. For example, the base station may send indication information for the hash value truncation rule to the terminal, which indicates at least one of the following: the length of the data obtained through truncation, the position of the data obtained through truncation, etc. The terminal may verify the first sequence based on the hash value obtained locally through truncation. For example, if the hash value obtained locally by the terminal through truncation is the same as the first sequence, the terminal's random access is successful; or if the hash value obtained locally by the terminal through truncation is different from the first sequence, the terminal's random access fails.

[0147] According to the above solution, the information received from Msg3 is no longer broadcast in plaintext in Msg4, but the first sequence determined based on the information received from Msg3 is broadcast in plaintext. Therefore, it is difficult for the receiving end of a Sparrow attack to infer the information carried in Msg3 based on the first sequence carried in Msg4. This solves the secret communication problem caused by the Sparrow vulnerability. Furthermore, Msg4 carries only the 40-bit first sequence. This can reduce air interface overhead, minimize the impact on the current network, and is more compatible with the current network.

[0148] In the procedure shown in Figure 8, from the terminal's perspective, note that Msg3 sent by the terminal to the base station carries the terminal's identifier. Msg3, correctly decoded by the base station, may be sent by the terminal or by another terminal. For ease of explanation, the above process can be described as follows: The first terminal sends Msg3 to the base station, and Msg3 carries the identifier of the first terminal. Msg3, correctly decoded by the base station, carries the identifier of a second terminal, which is either the same as or different from the identifier of the first terminal. The base station performs a hash operation on the identifier of the second terminal and the first data to obtain a hash value, and truncates the hash value according to a hash value truncation rule to obtain a first sequence. The base station sends Msg4 to the first terminal, and Msg4 carries the first sequence. The first sequence carried in Msg4 received by the first terminal is determined based on the identifier of the second terminal and the first data. The first terminal performs a hash operation on its identifier and the first data to determine a hash value, truncates the determined hash value according to the hash value truncation rule, and verifies the first sequence based on the hash value obtained through truncation. For example, if the hash value obtained by the first terminal through truncation is the same as the first sequence, the random access of the first terminal is considered successful; if the hash value obtained by the first terminal through truncation is different from the first sequence, the random access of the first terminal is considered to have failed.

[0149] To implement the functions in the embodiments described above, it can be understood that base stations and terminals include corresponding hardware structures and / or software modules for performing various functions. Those skilled in the art will readily recognize that, in this application, the units and method steps in the examples described with reference to the embodiments disclosed herein may be implemented in hardware or in combination of hardware and computer software. Whether the functions are performed by hardware or by hardware driven by computer software depends on the specific application scenario and design constraints of the technical solution.

[0150] Figures 10 and 11 show possible structures of a communication device according to one embodiment of the present application, respectively. These communication devices may be configured to perform the functions of a terminal or base station in the embodiments of the above method, and thus may achieve the beneficial effects of the embodiments of the above method. In this embodiment of the present application, the communication device may be one of the terminals 120a to 120j shown in Figure 1, or a base station 110a or 110b shown in Figure 1, or a unit (e.g., a chip) used in a terminal or base station.

[0151] As shown in Figure 10, the communication device 10000 includes a processing unit 1010 and a transceiver unit 1020. The communication device 10000 is configured to perform the functions of a terminal or base station in the embodiments of the methods shown in Figure 3, Figure 5, or Figure 8.

[0152] When the communication device 10000 is configured to perform the functions of a terminal in an embodiment of the method shown in Figure 3 or Figure 5, the processing unit 1010 is configured to determine the identifier of a first terminal, the length of which the identifier of the first terminal is less than or equal to a first length, the first length being configured at the first terminal before the first terminal performs random access to the network, the transceiver unit 1020 is configured to send message 3 to the network device in random access processing, message 3 including the identifier of the first terminal, and to receive message 4 from the network device in random access processing, message 4 including information identifying a second terminal, the length of the information identifying the second terminal being less than the first length.

[0153] When the communication device 10000 is configured to perform the functions of a base station in the method embodiment shown in Figure 3 or Figure 5, the transceiver unit 1020 is configured to receive message 3 from a terminal in random access processing, message 3 including a terminal identifier, the length of which of the terminal identifier is less than or equal to a first length, which is configured at the terminal before the terminal performs random access to the network, and to send message 4 to the terminal in random access processing, message 4 including information that identifies the terminal, the length of which of the information that identifies the terminal is less than the first length. Optionally, the processing unit 1010 is configured to process message 3, generate message 4, etc.

[0154] When the communication device 10000 is configured to perform the functions of a terminal in the embodiment of the method shown in Figure 8, the transceiver unit 1020 is configured to receive message 2 from a network device in random access processing, message 2 containing first data, send message 3 to the network device in random access processing, message 3 containing a first terminal identifier, receive message 4 from the network device in random access processing, message 4 containing a first sequence, the first sequence being determined based on first data and a second terminal identifier, and the processing unit 1010 is configured to verify the first sequence based on the first terminal identifier and first data.

[0155] When the communication device 10000 is configured to perform the functions of a base station in the method embodiment shown in Figure 8, the transceiver unit 1020 is configured to send message 2 containing first data to a terminal in random access processing and to receive message 3 containing a terminal identifier from the terminal in random access processing, and the processing unit 1010 is configured to determine a first sequence based on the first data and the terminal identifier. The transceiver unit 1020 is further configured to send message 4 to a terminal in random access processing, message 4 containing a first sequence.

[0156] For a more detailed description of the processing unit 1010 and the transceiver unit 1020, please refer directly to the relevant descriptions in the method embodiments shown in Figures 3, 5, and 8, as further details are not provided here.

[0157] As shown in Figure 11, the communication device 1100 includes a processor 1110 and an interface circuit 1120. The processor 1110 and the interface circuit 1120 are coupled to each other. It can be understood that the interface circuit 1120 may be a transceiver or an input / output interface. Optionally, the communication device 1100 may further include a memory 1130 configured to store instructions executed by the processor 1110, or input data required by the processor 1110 to execute an instruction, or data generated after the processor 1110 has executed an instruction.

[0158] When the communication device 1100 is configured to implement the method shown in Figure 3, Figure 5, or Figure 8, the processor 1110 is configured to perform the functions of the processing unit 1010 described above, and the interface circuit 1120 is configured to perform the functions of the transceiver unit 1020 described above.

[0159] When the communication device is a chip used in a terminal, the chip in the terminal performs the functions of the terminal in the embodiment of the above method. The chip in the terminal receives information from another unit in the terminal (e.g., a radio frequency unit or an antenna), and the information is sent to the terminal by a base station, or the chip in the terminal sends information to another unit in the terminal (e.g., a radio frequency unit or an antenna), and the information is sent to the base station by the terminal.

[0160] When the communication device is a unit used in a base station, the unit within the base station performs the functions of the base station in the embodiment of the method described above. The unit within the base station receives information from another unit within the base station (e.g., a radio frequency unit or antenna), and the information is sent to the base station by a terminal, or the unit within the base station sends information to another unit within the base station (e.g., a radio frequency unit or antenna), and the information is sent to a terminal by the base station. The unit within the base station as described herein may be a baseband chip within the base station, or a DU or another unit. The DU as described herein may be a DU in an open radio access network (O-RAN) architecture.

[0161] It can be understood that the processor in the embodiments of this application may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or another programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The general-purpose processor may be a microprocessor or any ordinary processor, etc.

[0162] The method steps in embodiments of this application may be implemented in hardware or by executing software instructions by a processor. Software instructions may include corresponding software modules. Software modules may be stored in random access memory, flash memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, hard disks, removable hard disks, CD-ROMs, or any other form of storage medium well known in the art. For example, the storage medium may be coupled to a processor, and therefore the processor may read information from and write information to the storage medium. Indeed, the storage medium may be a component of the processor. The processor and storage medium may be located in an ASIC. In addition, the ASIC may be located in a base station or terminal. Indeed, the processor and storage medium may exist as separate components in a base station or terminal.

[0163] All or part of the embodiments described above may be implemented using software, hardware, firmware, or any combination thereof. When software is used to implement an embodiment, all or part of the embodiment may be implemented in the form of a computer program product. A computer program product includes one or more computer programs or instructions. When a computer program or instruction is loaded into a computer and executed, all or part of the procedures or functions in the embodiments of this application are executed. The computer may be a general-purpose computer, a separate computer, a computer network, a network device, a user device, or another programmable device. The computer program or instruction may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, a computer program or instruction may be transmitted wired or wirelessly from one website, computer, server, or data center to another website, computer, server, or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device, such as a server or data center integrating one or more available media. The usable media may be magnetic media, such as floppy disks, hard disks, or magnetic tapes; optical media, such as digital video discs; or semiconductor media, such as solid-state drives. Computer-readable storage media may be volatile or non-volatile storage media, or may include both types of storage media: volatile and non-volatile storage media.

[0164] In the embodiments of this application, unless otherwise specified or unless there is a logical inconsistency, the terminology and / or descriptions between different embodiments are consistent and may refer to one another, and the technical features of different embodiments may be combined into the newer embodiments based on their internal logical relationships.

[0165] In this application, “at least one” means one or more, and “multiple” means two or more. The term “and / or” describes an association relationship between related objects and indicates that three relationships may exist. For example, A and / or B may mean: only A exists, both A and B exist, or only B exists. A and B may be singular or plural. In the textual descriptions of this application, the letter “ / ” indicates an “or” relationship between related objects. In the formulas of this application, the letter “ / ” indicates a “split” relationship between related objects. “Containing at least one of A, B, and C” may mean containing A, containing B, containing C, containing A and B, containing A and C, containing B and C, and containing A, B, and C.

[0166] It should be understood that the various numbers in the embodiments of this application are used solely for the purpose of distinction to facilitate explanation and are not intended to limit the scope of the embodiments of this application. The sequence numbers of the processes described above do not imply an execution order, and the execution order of the processes should be determined based on the function and internal logic of the processes.

Claims

1. A step of determining the identifier of a first terminal by a first terminal, wherein the length of the identifier of the first terminal is less than or equal to a first length, and the first length is configured at the first terminal before the first terminal performs random access to the network. The first terminal sends message 3 to a network device in random access processing, wherein message 3 includes the identifier of the first terminal. The first terminal receives a message 4 from the network device in the random access processing, wherein the message 4 includes information identifying a second terminal, the length of the information identifying the second terminal is less than the length of the first terminal, and the information identifying the second terminal is part of the data obtained by truncating the identifier of the first terminal. A communication method that includes the following features.

2. The method further comprises the step of receiving a first broadcast message from the network device by the first terminal, wherein the first broadcast message includes information indicating a second length, and the second length is less than the first length. The method according to claim 1, wherein the step of determining the identifier of the first terminal by the first terminal includes the step of determining the identifier of the first terminal based on the second length by the first terminal.

3. The method according to claim 2, wherein the message 3 includes a first sequence, the first sequence includes the identifier of the first terminal, and the length of the first sequence is equal to the first length.

4. The method according to claim 3, wherein the first sequence further comprises first data, the first data being pre-configured data or data received from the network device prior to the message 3.

5. The first data is the data received from the network device before the message 3, and the method is The method according to claim 4, further comprising the step of receiving a message 2 from the network device in the random access processing by the first terminal, wherein the message 2 includes first data, and the first data is a temporary cell radio network temporary identifier.

6. The aforementioned method, The method according to claim 1, further comprising the step of verifying the information that identifies the second terminal based on the identifier of the first terminal using the first terminal, wherein the information that identifies the second terminal is the identifier of the second terminal.

7. The method according to claim 6, further comprising the step of determining that the random access process has been successful by the first terminal if the identifier of the first terminal is the same as the identifier of the second terminal.

8. The aforementioned method, The first terminal receives a second broadcast message from the network device, the second broadcast message does not include information indicating a second length, and the second length is less than the first length, further comprising the steps of: The method according to claim 1, wherein the step of determining the identifier of the first terminal by the first terminal includes the step of determining the identifier of the first terminal based on the first length by the first terminal.

9. The method according to any one of claims 1 to 8, wherein the message 4 includes a second sequence, the second sequence includes the information identifying the second terminal, and the length of the second sequence is equal to the length of the first sequence.

10. The method according to claim 9, wherein the second sequence further includes second data, the second data being either pre-configured data or data received from the network device prior to the message 4.

11. The second data is the data received from the network device before message 4, and the method is, The method according to claim 10, further comprising the step of receiving the message 2 from the network device in the random access processing by the first terminal, wherein the message 2 includes the second data, and the second data is a temporary cell radio network temporary identifier.

12. The aforementioned method, The first terminal determines the information that identifies the second terminal in a second sequence according to a data truncation rule, and determines a first portion of the data in the identifier of the first terminal, wherein the information that identifies the second terminal is a portion of the data in the identifier of the second terminal. The first terminal verifies the information used to identify the second terminal based on a first portion of the data. The method according to any one of claims 1 to 8, further comprising:

13. The aforementioned method, The first terminal determines a second portion of the data within the identifier of the first terminal in accordance with a data truncation rule, A step of verifying the information that identifies the second terminal contained in the message 4 based on the second portion of the data, wherein the information that identifies the second terminal is part of the data in the identifier of the second terminal. The method according to any one of claims 1 to 8, further comprising:

14. The method according to any one of claims 1 to 8, wherein the first length is 40 bits.

15. A network device receives a message 3 from a terminal in random access processing, wherein the message 3 includes an identifier of the terminal, the length of the identifier of the terminal is less than or equal to a first length, and the first length is configured at the terminal before the terminal performs random access to the network. The step of sending a message 4 in the random access processing to the terminal by the network device, wherein the message 4 includes information identifying the terminal, the length of the information identifying the terminal is less than the first length, and the information identifying the terminal is part of the data obtained by truncating the terminal identifier. A communication method that includes the following features.

16. The aforementioned method, The method according to claim 15, further comprising the step of sending a first broadcast message to the terminal by the network device, wherein the first broadcast message includes information indicating a second length, the second length being less than the first length, and the length of the identifier of the terminal is determined based on the second length.

17. Before the step in which the network device sends the first broadcast message to the terminal, the method The method according to claim 16, further comprising the step of determining the second length based on the network load using the network device.

18. The method according to claim 16, wherein the message 3 includes a first sequence, the first sequence includes the identifier of the terminal, and the length of the first sequence is equal to the first length.

19. The method according to claim 18, wherein the first sequence further includes first data, the first data being a preset data or the first data being data sent to the terminal before the message 3.

20. The first data is the data sent to the terminal before the message 3, and the method is, The method according to claim 19, further comprising the step of sending a message 2 to the terminal in the random access processing by the network device, wherein the message 2 includes the first data, and the first data is a temporary cell wireless network temporary identifier.

21. The aforementioned method, The method according to claim 15, further comprising the step of sending a second broadcast message to the terminal by the network device, wherein the second broadcast message does not include information indicating a second length, the second length is less than the first length, and the length of the identifier of the terminal is equal to the first length.

22. The method according to any one of claims 15 to 21, wherein the message 4 includes a second sequence, the second sequence includes the information identifying the terminal, and the length of the second sequence is equal to the length of the first sequence.

23. The method according to claim 22, wherein the second sequence further includes second data, the second data being either pre-configured data or data sent to the terminal prior to the message 4.

24. The second data is the data sent to the terminal before message 4, and the method is, The method according to claim 23, further comprising the step of sending a message 2 to the terminal in the random access processing by the network device, wherein the message 2 includes the second data, and the second data is a temporary cell wireless network temporary identifier.

25. The aforementioned method, The method according to any one of claims 15 to 21, further comprising the step of determining the length of the information identifying the terminal based on the network load using the network device.

26. The method according to any one of claims 15 to 21, wherein the first length is 40 bits.

27. A communication device comprising a unit configured to perform the method described in any one of claims 1 to 8.

28. A communication device comprising a processor and an interface circuit, wherein the interface circuit is configured to receive a signal from a communication device other than the communication device and send the signal to the processor, or send a signal from the processor to a communication device other than the communication device, and the processor is configured to carry out the method according to any one of claims 1 to 8 via a logic circuit or by executing code instructions.

29. A communication device comprising a processor and memory, The communication device is configured such that the processor executes a computer program or instruction stored in the memory so that the communication device carries out the method according to any one of claims 1 to 8.

30. A communication device comprising a unit configured to perform the method described in any one of claims 15 to 21.

31. A communication device comprising a processor and an interface circuit, wherein the interface circuit is configured to receive a signal from a communication device other than the communication device and send the signal to the processor, or send a signal from the processor to a communication device other than the communication device, and the processor is configured to carry out the method according to any one of claims 15 to 21 via a logic circuit or by executing code instructions.

32. A communication device comprising a processor and memory, The communication device is configured such that the processor executes a computer program or instruction stored in the memory so that the communication device carries out the method according to any one of claims 15 to 21.

33. A computer-readable storage medium, wherein the storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a communication device, the method according to any one of claims 1 to 8 is performed.

34. A computer-readable storage medium, wherein the storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a communication device, the method according to any one of claims 15 to 21 is carried out.

35. A chip comprising a processor, wherein the processor is coupled to a memory and configured to execute a computer program or instruction stored in the memory, and as a result, the chip implements the method according to any one of claims 1 to 8.

36. A chip comprising a processor, wherein the processor is coupled to a memory and configured to execute a computer program or instruction stored in the memory, and as a result the chip implements the method according to any one of claims 15 to 21.

37. A computer program wherein, when the computer program is executed by a device, the method according to any one of claims 1 to 8 is executed.

38. A computer program wherein, when the computer program is executed by a device, the method according to any one of claims 15 to 21 is executed.

Citation Information

Patent Citations

  • Method and apparatus for transferring messages on a common control channel for random access in a wireless communication network

    JP2011508538A

  • Communication method and communication device

    JP2023513261A

  • Method and apparatus for management of extended mobile device identity information

    US20210160726A1

  • User equipment and base station device

    WO2020157993A1

  • Communication method and communication apparatus

    WO2021159986A1