WO2022198671A1 - Communication method and apparatus - Google Patents

Communication method and apparatus Download PDF

Info

Publication number
WO2022198671A1
WO2022198671A1 PCT/CN2021/083416 CN2021083416W WO2022198671A1 WO 2022198671 A1 WO2022198671 A1 WO 2022198671A1 CN 2021083416 W CN2021083416 W CN 2021083416W WO 2022198671 A1 WO2022198671 A1 WO 2022198671A1
Authority
WO
WIPO (PCT)
Prior art keywords
security
access network
message
network device
key
Prior art date
Application number
PCT/CN2021/083416
Other languages
French (fr)
Chinese (zh)
Inventor
李飞
邓娟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202180095304.9A priority Critical patent/CN116941263A/en
Priority to PCT/CN2021/083416 priority patent/WO2022198671A1/en
Publication of WO2022198671A1 publication Critical patent/WO2022198671A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]

Definitions

  • the present application relates to the field of wireless communication technologies, and in particular, to a communication method and device.
  • the messages between the terminal device and the network need to be encrypted.
  • the sender uses a key to encrypt the message to be sent,
  • the parameters COUNT, BEARER, DIRECTION are also used as input parameters during encryption.
  • the receiver will also use the above input parameters to decrypt the encrypted message data.
  • COUNT is the value in the packet data convergence protocol (packet data convergence protocol, PDCP) counter (COUNT), which is 32 bits;
  • BEARER is the 5-bit bearer identifier (5-bit bearer identity).
  • DIRECTION is 1 bit, which identifies the upstream and downstream directions of the data. The value is 0 for upstream and 1 for downstream.
  • the three parameters (COUNT, BEARER, DIRECTION) described above are generally called initialization vector (IV).
  • the purpose of the embodiments of the present application is to provide a communication method and apparatus, so as to improve the security of messages in a communication network.
  • the present application provides a communication method
  • the execution subject of the method is a terminal device or an access network device or a core network device
  • the method includes: acquiring security parameters; the security parameters are used to encrypt messages to be sent, and/ or used to decrypt the received message; encrypt the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second The bearer identifier, the second direction information and the key decrypt the received message.
  • the security parameter is a bit sequence greater than or equal to 80 bits.
  • the length of the security parameter is at least 80 bits, the complexity of encryption is increased and the risk of being cracked is reduced.
  • the security parameter is a random number; or, the security parameter is related to at least one of the following parameters: a physical cell identifier; a synchronization signal block index; a temporary mobile user identifier; a resource identifier; an access network key; The derivation key of the access network key; the next hop chain counter value; the information of the next hop.
  • the security parameter is a random number, which can ensure that the security parameter does not have a generation law and reduce the risk of being cracked.
  • the security parameters are generated according to other parameters, which can ensure that each terminal device obtains different security parameters, that is, for a terminal device, the security parameters of the terminal device are unique, which can improve the security. Further, for the access network key, the derivation secret key of the access network key, the next hop chain counter value and the information of the next hop among other parameters, these parameters are only the terminal equipment and the The corresponding network device knows, so the confidentiality of the generated security parameters can be guaranteed, thereby further improving the security of the security parameters. For parameters such as physical cell identity, synchronization signal block index, and temporary mobile user identity among other parameters, these parameters are easy to obtain, reducing the complexity of obtaining security parameters.
  • acquiring the security parameter includes: receiving a configuration message from a network device, where the configuration message includes the security parameter, and the network device is an access network device or a core network device; or, determining the security parameter according to the shared parameter,
  • the security parameters are used for message transmission between the terminal device and the network device, and the shared parameters are parameters known to both the terminal device and the network device.
  • the network device does not need to transmit the security parameters to the terminal device, thereby reducing the risk of security parameter exposure and improving security.
  • the shared parameters include at least one of the following: a physical cell identifier; a synchronization signal block index; a temporary mobile user identifier; a resource identifier; an access network key; Next hop chain counter value; next hop information.
  • the method is applied to the terminal device, and before the security parameter is determined according to the shared parameter, the method further includes: receiving an access stratum security mode command message or a radio resource control connection reconfiguration message.
  • the terminal device After receiving the above message, the terminal device generates security parameters, which can ensure that all messages after the above message can be encrypted and decrypted, thereby improving system security.
  • the method is applied to a core network device; before acquiring the security parameters, the method further includes: determining that at least one of the following is satisfied: determining to send a new next hop chain counter value and a next hop chain counter value to the access network device At least one of the hop information, wherein at least one of the new next hop chain counter value and the next hop information can be sent to the access network device together with the security parameter; determine to send the new access network password. determine the activation/change of the user plane security policy; determine to execute the non-access stratum security mode command process with the terminal device; determine to update the non-access stratum key; determine to generate the core network key or perform the core network key level deduction .
  • the core network device also needs to send the security parameter to the access network device. If the security parameter is used to encrypt and decrypt NAS layer messages, the core network device may not send the security parameter to the access network device.
  • the method is applied to an access network device; before acquiring the security parameters, the method further includes: determining that at least one of the following is satisfied: determining to perform an access layer security mode command process or a radio resource control connection reconfiguration; Receive a new next hop chain counter value or next hop information or access network key; update the access network key; determine to send the next hop chain counter value or next hop to other access network devices information or access network key.
  • the method before acquiring the security parameter, further includes: determining that the access network device and the terminal device support encryption and decryption using the security parameter; or, determining that the terminal device supports encryption and decryption using the security parameter.
  • the method is applied to an access network device or a core network device, and the method further includes: sending a configuration message to the terminal device, where the configuration message includes security parameters.
  • the security parameters include a first security parameter and a second security parameter; the first security parameter is used to encrypt the message to be sent, and the second security parameter is used to decrypt the received message.
  • the configuration message is an access stratum security mode command message in the access stratum security mode command process; or, the configuration message is a radio resource control connection reconfiguration message in the radio resource control connection reconfiguration process. ; or, the configuration message is a non-access stratum security mode command message in the non-access stratum security mode command flow.
  • the access layer security mode command message and the radio resource control connection reconfiguration message can be considered as messages for activating user plane security. Sending security parameters through these messages can enable the messages that need to be encrypted and/or decrypted to be encrypted and/or decrypted in time. decrypt. If the security parameter is sent before the access layer security mode command message and the RRC connection reconfiguration message, because the previous message is not protected, the security parameter in the message will be tampered with, so the security of the security parameter cannot be guaranteed.
  • the access layer security mode command message and the RRC connection reconfiguration message are themselves protected by security, such as being protected by the base station key, which can prevent the security parameters carried in these two messages from being tampered with, so the security parameters can be guaranteed. security.
  • the present application further provides a communication device, the communication device having any of the methods provided in the above-mentioned first aspect.
  • the communication device may be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more units or modules corresponding to the above functions.
  • the communication apparatus includes: a processor configured to support the communication apparatus to perform corresponding functions of the methods shown above.
  • the communication device may also include a memory, which may be coupled to the processor, which holds program instructions and data necessary for the communication device.
  • the communication apparatus further includes an interface circuit, and the interface circuit is used to support communication between the communication apparatus and equipment such as network equipment.
  • the communication device includes corresponding functional modules, which are respectively used to implement the steps in the above method.
  • the functions can be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the communication device includes a processing unit and a communication unit, and these units can perform the corresponding functions in the above method examples.
  • these units can perform the corresponding functions in the above method examples.
  • a communication device comprising a processor and an interface circuit, wherein the interface circuit is configured to receive signals from other communication devices other than the communication device and transmit to the processor or send signals from the processor
  • the processor is configured to execute the computer program or instructions stored in the memory, so that the communication device implements the aforementioned first aspect and the method in any possible implementation manner of the first aspect.
  • a computer-readable storage medium is provided, and a computer program or instruction is stored in the computer-readable storage medium, and when the computer program or instruction is executed on a computer, the computer is executed to realize the aforementioned first Aspects and methods in any possible implementation of the first aspect.
  • a computer program product comprising computer-readable instructions, which, when executed on a computer, cause the computer to implement the aforementioned first aspect and any possible implementation manner of the first aspect Methods.
  • a chip in a sixth aspect, includes a processor, and may also include a memory, the processor is coupled to the memory, and is configured to execute a computer program or instruction stored in the memory, so as to implement the foregoing first aspect and the first A method in any possible implementation of an aspect.
  • FIG. 1 is a schematic diagram of a network architecture suitable for an embodiment of the present application
  • Fig. 2 is a kind of encryption and decryption flow schematic diagram in the prior art
  • FIG. 3 is a schematic flowchart of a communication method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a communication method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a communication method provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a communication method provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • the embodiments of the present application can be applied to various mobile communication systems, such as: a new radio (new radio, NR) system, a long term evolution (long term evolution, LTE) system, and other communication systems such as future communication systems. make restrictions.
  • a new radio new radio
  • LTE long term evolution
  • the interaction between a terminal device and an access network device or a core network device is used as an example for description. It should be noted that the methods provided in the embodiments of the present application can not only be applied to the interaction between the terminal device and the network side
  • the interaction between two devices may also be applied to the interaction between any two devices, for example, device-to-device (device-to-device, D2D) communication, which is not limited in this embodiment of the present application.
  • a terminal device may be referred to as a terminal for short, which is a device with a wireless transceiver function or a chip that can be provided in the device.
  • the terminal device may also be referred to as user equipment (user equipment, UE), access terminal, or the like.
  • the terminal device in the embodiments of the present application may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal, an augmented reality (augmented reality) , AR) terminal, wireless terminal in industrial control, etc.
  • VR virtual reality
  • AR augmented reality
  • the device for implementing the function of the terminal device may be the terminal device; it may also be a device capable of supporting the terminal device to realize the function, such as a chip system, and the device may be installed in the terminal device or connected with the terminal device. Match use.
  • Access network device It can be a wireless access device under various standards in a wireless network.
  • an access network device can be a radio access network (RAN) node that connects a terminal device to a wireless network, or it can be a radio access network (RAN) node. It is called RAN equipment or base station.
  • RAN equipment or base station.
  • Some examples of access network equipment are: generation Node B (gNodeB), transmission reception point (TRP), evolved node B (evolved node B, eNB), radio network controller (radio network) controller, RNC), etc.
  • the access network device may include a centralized unit (centralized unit, CU) node or a distributed unit (distributed unit, DU) node, or include a CU node and a DU node.
  • a centralized unit centralized unit, CU
  • DU distributed unit
  • the device for implementing the function of the access network device may be the access network device; it may also be a device capable of supporting the access network device to realize the function, such as a chip system, and the device may be installed in the access network device. It can be used in the network access device or matched with the access network device.
  • Core network equipment which can be a device used to manage the access and mobility of terminal equipment, such as an Access and Mobility Management Function (AMF) network element, or a mobility management entity (mobility management entity, MME) network element, etc., which are not limited in this application.
  • AMF Access and Mobility Management Function
  • MME mobility management entity
  • FIG. 1 is a schematic diagram of a network architecture to which an embodiment of the present application is applied.
  • a terminal device can access a wireless network through an access network device to obtain services from an external network (eg, the Internet) through the wireless network, or communicate with other devices through the wireless network, such as with other terminal devices.
  • an external network eg, the Internet
  • the access stratum (access stratum, AS) message between the access network device and the terminal device needs to be encrypted.
  • the sender uses the key KEY to encrypt the plaintext data, it uses the parameters COUNT, BEARER, DIRECTION and the data length LENGTH as input parameters, and uses the encryption algorithm to generate a key stream block (KEYSTREAM BLOCK).
  • the sender performs XOR calculation on the generated key stream block and the plaintext block (PLAINTEXT BLOCK) to be sent to the receiver, and then sends the ciphertext block (CIPHERTEXT BLOCK) obtained by the XOR calculation to the receiver.
  • the receiving end uses the parameters COUNT, BEARER, DIRECTION and the data length LENGTH as input parameters, and uses the same encryption algorithm to generate a key stream block.
  • the receiver performs XOR calculation between the key stream block and the ciphertext block from the sender, thereby recovering the plaintext block sent by the sender.
  • the key KEY can be the encryption key of the AS layer
  • COUNT is the value in the PDCP counter, with a length of 32 bits
  • BEARER is a 5-bit bearer identifier
  • DIRECTION indicates the direction information, which identifies the upstream and downstream directions of the data, with a length of 1 bit , the value is 0 when going up, and 1 when going down.
  • the specific implementation manner of the encryption algorithm is not limited, and it can be stipulated by the protocol or specified by the network side.
  • the encryption algorithm may be a 128-bit 5G encryption algorithm (encryption algorithm for 5G) or a 256-bit 5G encryption algorithm, etc.
  • the 128-bit 5G encryption algorithm includes but is not limited to the third generation of SNOW (the third generation, 3G) 128 algorithm, advanced encryption standard (AES) 128 algorithm, Zu Chongzhi 128 algorithm, etc.; 256-bit 5G encryption algorithms include but are not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi 256 algorithm, etc.
  • non-access stratum (non access stratum, NAS) messages between the core network device and the terminal device also need to be encrypted.
  • the key used at the NAS layer is the encryption key of the NAS layer
  • the corresponding BEARER is the NAS connection identifier
  • the COUNT is 0x00
  • the length of the NAS COUNT is 24 bits, and the entire COUNT is also 32 bits.
  • the meaning of DIRECTION is similar to that of the AS layer.
  • the upper line is the terminal device to send a message to the core network device, the lower line is the core network device to send the message to the terminal device, and
  • the network architecture and service scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application.
  • the evolution of the architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
  • the security parameters are introduced to encrypt and decrypt messages, so as to enhance the security of encryption and decryption.
  • the terminal device obtains the security parameter from the network device, so that the message to be sent can be encrypted according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, And/or decrypt the received message according to the security parameter, the second count value, the second bearer identifier, the second direction information and the key.
  • the security parameter is used to encrypt the message to be sent and/or used to decrypt the received message.
  • the security parameter can be a sequence of bits.
  • the length of the security parameter is not limited, for example, it can be greater than or equal to 80 bits, such as 88 bits or 90 bits, etc., other lengths are also possible.
  • the first count value, the first bearer identifier and the first direction information are determined according to the message to be sent.
  • the first count value may refer to the sequence number corresponding to the message to be sent at the PDCP layer, which may also be referred to as COUNT;
  • the first bearer identifier may refer to the bearer identifier of the bearer corresponding to the message to be sent;
  • the information may indicate the transmission direction of the message to be sent.
  • the first direction information includes 1 bit, and the value is 0 when the transmission direction of the message to be sent is uplink, and the value is 1 when the transmission direction of the message to be sent is downlink.
  • the second count value, the second bearer identifier, and the second direction information are determined according to the received message.
  • the second count value may refer to the sequence number corresponding to the received message at the PDCP layer, which may also be called COUNT;
  • the second bearer identifier may refer to the bearer identifier of the bearer corresponding to the received message;
  • the second direction information may Indicates the transmission direction of the received message.
  • the second direction information includes 1 bit, and the value is 0 when the transmission direction of the received message is uplink, and the value is 1 when the transmission direction of the received message is downlink.
  • the key may refer to the encryption key of the AS layer, or may refer to the encryption key of the NAS layer, which is determined according to the actual situation.
  • the count value, bearer identifier, and direction information used by the sender for encryption are the same as the count value, bearer identifier, and direction information used by the receiver for decryption.
  • the count value, bearer identification and direction information may vary according to the change of the message.
  • the message to be sent may also be encrypted according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier , the second direction information and the key to decrypt the received message.
  • the network device may be an access network device or a core network device.
  • the security parameter may be used to encrypt and/or decrypt the AS layer message; the security parameter may also be used to encrypt and/or decrypt the NAS layer message.
  • the NAS layer message and the AS layer message may be encrypted and/or decrypted using the same security parameters, or may be encrypted and/or decrypted using different security parameters.
  • the same method may be used to generate security parameters between the network device and the terminal device, so as to avoid sending the security parameters through the network.
  • the terminal device may obtain security parameters from the first access network device, and the security parameters may be used to encrypt and/or decrypt AS layer messages.
  • the security parameters may be used to encrypt and/or decrypt AS layer messages.
  • the security parameter can also be used to encrypt and/or decrypt the NAS layer message.
  • FIG. 3 a schematic flowchart of a communication method provided by an embodiment of the present application is shown.
  • operations performed by the terminal device may also be performed by a chip or module inside the terminal device
  • operations performed by the first access network device may also be performed by a chip or module inside the first access network device.
  • the method includes:
  • S301 The first access network device acquires security parameters, and sends the security parameters.
  • the first access network device may acquire the security parameters in various manners. In the first implementation manner, the first access network device may generate the security parameters autonomously.
  • the first access network device may generate a random number and use the random number as a security parameter.
  • the first access network device may also generate a new security parameter according to the currently used security parameter, and use the security parameter obtained by the new security parameter, such as the accumulation of the currently used security parameter and a preset value. and as security parameters.
  • the first access network device may also generate security parameters according to other parameters, for example, the security parameters may also be related to at least one of the following parameters:
  • the information for example, can be the information of the current next hop.
  • the next hop information may refer to the next hop key, and the next hop key may refer to the intermediate key in the cell handover process, which can be used to provide forward security (forward secrecy) in the cell handover process. .
  • the next hop information can be used to generate a new access network key.
  • the access layer security mechanism is activated during the establishment of the initial security context.
  • the terminal device and the network side respectively calculate the initial access stratum root key, that is, the access network key, according to the core network key (also referred to as the access stratum root key).
  • the terminal device and the access network device further calculate one or more encryption and integrity protection keys for encryption and integrity protection of signaling and user plane data.
  • the integrity protection key is the key used to encrypt the message to be sent and decrypt the received message.
  • a "next hop” mechanism is introduced into the radio access network.
  • the access layer can always perform a so-called “horizontal handover”: directly use the initial access network key to calculate a new access network key.
  • the access layer needs to perform at least “vertical handover”: calculate a new access network key according to a certain "next hop information" provided by the non-access layer.
  • Intra-node switching can still use the "horizontal switching" method.
  • the network side will determine the new access network key by instructing the terminal device which next hop to use through the next hop chain counter value.
  • a new next-hop chain counter value or new next-hop information or a new access network key may indicate that the message to be sent is encrypted and/or the message to be received is encrypted.
  • the key for decrypting the message also needs to be updated, and accordingly, security parameters need to be updated or generated.
  • the algorithm used by the first access network device to generate the security parameter is not limited in the embodiments of the present application, for example, it may be a hash-based message authentication code (HMAC) secure hash algorithm 256 (secure hash).
  • HMAC hash-based message authentication code
  • algorithm 256 SHA-256 algorithm, that is, the HMAC algorithm that uses SHA-256 to generate hash values.
  • the first access network device acquires the security parameters
  • the first access network device acquires the security parameters
  • timings may include but not limited to one or more of the following timings:
  • the first access network device may first determine that the access layer security mode command process or radio resource control connection reconfiguration is to be performed, and then acquire or generate security parameters. Before acquiring or generating the security parameter, the first access network device may also execute a part or all of the access layer security mode command process or the radio resource control connection reconfiguration.
  • next-hop chain counter value or new next-hop information or a new access network key is received.
  • next hop chain counter value the information of the next hop, the access network key, and the relationship between the keys, reference may be made to the description in the prior art, and details are not repeated here.
  • the third opportunity is to update the access network key.
  • the access network key may refer to the key used to encrypt user plane services, for example, the access network key may refer to the base station key Kgnb.
  • next hop chain counter value next hop information or access network key
  • next hop chain counter value next hop information or Access network key
  • the terminal device When one or more of the above occasions are satisfied, it indicates that the terminal device needs to be configured with parameters and keys for encrypting and/or decrypting messages, or it indicates that the parameters and keys for encrypting and/or decrypting messages need to be updated for the terminal device.
  • key for which the first access network device can obtain the security parameters and send them to the terminal device.
  • the various timings described above can correspond to various scenarios, for example, including but not limited to the following scenarios:
  • Scenario 1 The terminal device initially accesses the first access network device. At this time, the terminal device initiates an initial registration request to the core network through the first access network device, and the first access network device can receive the information from the core network. After the terminal device makes the initial context establishment request, it needs to perform the access layer security mode command flow or the radio resource control connection reconfiguration with the terminal device.
  • a terminal device in an idle mobility state accesses the first access network device.
  • the first access network device may determine that the access layer security mode command process or the radio resource control connection reconfiguration needs to be performed with the terminal device.
  • the first access network device when the first access network device includes a CU node and a DU node, when the DU node of the terminal device in the first access network device changes but the CU node does not change, the first access network device needs to update the AS layer Security context, such as update access network key Kgnb.
  • Scenario 4 The terminal device is switched from the evolved packet system (EPS) to the 5G system.
  • the first access network device target access network device
  • the second The access network device source access network device
  • the first access network device needs to send the next hop chain counter value or the next hop information or the access network key to other access network devices (ie, the second access network device).
  • the first access network device generates security parameters, and sends the security parameters to the target AMF through the handover request response message.
  • the target AMF then forwards the security parameters to the source MME, and the source MME forwards the security parameters to the second access network. device, so that the security parameter is forwarded to the terminal device by the second access network device.
  • the terminal device is in an idle state in the EPS, and then switches to the 5G system.
  • the first access network device target access network device
  • the first access network device can determine that it needs to perform an access layer security mode command with the terminal device. Process or RRC connection reconfiguration.
  • the security parameters are generated by the first access network device and sent to the terminal device.
  • the source access network device can be The device or the target access network device generates the security parameter, that is to say, the first access network device may be the source access network device or the target access network device. Due to the change of the air interface, when the first access network device can be the source access network device, the first access network device needs to send the next hop chain counter value or the next hop chain counter value to other access network devices (source access network devices). hop information or access network key, etc., so as to determine the need to generate security parameters.
  • the first access network device may be the target access network device, since the RRC re-establishment needs to perform an RRC reconfiguration process, it is determined that the security parameter needs to be generated.
  • the first access network device may be a primary base station or a secondary base station. If the primary base station needs to add or modify the secondary base station, the access layer security mode command process or the radio resource control connection reconfiguration process needs to be performed between the secondary base station and the terminal device, then the primary base station or the secondary base station can generate security parameters. If the secondary base station generates security parameters, the security parameters are sent to the primary base station through messages such as the secondary base station addition response message or the secondary base station modification response message, and finally the primary base station sends the security parameters to the terminal device.
  • the primary base station needs to add or modify the secondary base station, the access layer security mode command process or the radio resource control connection reconfiguration process needs to be performed between the secondary base station and the terminal device, then the primary base station or the secondary base station can generate security parameters. If the secondary base station generates security parameters, the security parameters are sent to the primary base station through messages such as the secondary base station addition response message or the secondary base station modification response message, and finally the primary base station sends the security parameters to the terminal device.
  • the core network device for example, AMF
  • the core network device does not change: Specifically, the terminal device is switched from the second access network device to the first access network device.
  • the first access network device Can receive the new next-hop chain counter value, new next-hop information and new access network key and other information, the first access network device can generate security parameters, and pass the handover request (handover request)
  • An acknowledgement (acknowledge, ACK) message sends the security parameter to the second access network device, so that the second access network device forwards the security parameter to the terminal device.
  • the core network equipment changes: Specifically, the terminal equipment is switched from the second access network equipment to the first access network equipment, and the first access network equipment can After receiving the new next-hop chain counter value, new next-hop information, and new access network key and other information, the first access network device can generate security parameters and respond with a handover request The message sends security parameters to the target core network device (eg, target AMF), and the target core network device forwards the security parameters to the second access network device, so that the second access network device forwards the security parameters to the terminal device.
  • the target core network device eg, target AMF
  • the first access network device may directly send the security parameters, or may send the identifiers of the security parameters or the parameters and algorithms used to generate the security parameters.
  • the first access network device can also determine whether the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm. If it is determined that the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm, The core network equipment may generate security parameters.
  • the first access network device may also determine whether the terminal device supports encryption and/or decryption by using security parameters. If it is determined that the terminal device supports encryption and/or decryption by using security parameters, the core network device may Generate security parameters.
  • the first access network device may also determine whether the terminal device supports encryption and/or decryption by using the extended IV. If it is determined that the terminal device supports encryption and/or decryption by using the extended IV, the core network device may Generate security parameters. Wherein, using the extended IV to perform encryption and/or decryption may refer to using the IV and parameters other than the IV (for example, security parameters) to perform encryption and/or decryption.
  • the terminal equipment, access network equipment and core network equipment in the current standard all support the 128-bit encryption algorithm, and the 128-bit encryption algorithm is in the In the future, it will no longer be safe. Therefore, in the embodiment of the present application, when the security parameter is used, it is required that the terminal device, the access network device, and the core network device all support the 256-bit encryption algorithm. Therefore, the first access network device can determine whether the terminal device can use the security parameter to encrypt and/or decrypt the message according to whether the terminal device supports the 256-bit encryption algorithm.
  • the first access network device acquires the security parameters from the core network device.
  • the first access network device acquires the security parameters, that is, the timing when the core network device generates the security parameters
  • the core network device Determine to send the new next hop chain counter value or new next hop information to the access network device, wherein at least one of the new next hop chain counter value and the next hop information can be together with the security parameter sent to the access network device
  • the core network device determines to send a new access network key, wherein the new access network key can be sent to the access network device together with the security parameters
  • the core network device determines to activate/modify User plane security policy.
  • the above-mentioned various occasions can be applied to the scenarios 1 to 2 and scenarios 4 to 9 described above.
  • the following describes how, in various scenarios, the first access network device specifically acquires security parameters from the core network device.
  • the core network device may send the security parameters to the first access network device through an initial context setup message.
  • Scenario 2 In the scenario where the terminal device in the idle mobility state accesses the first access network device, the core network device can send the security parameters to the first access network device through the UE context modification request message. access network equipment.
  • Scenario 4 The terminal device switches from EPS to 5G system.
  • the target base station can obtain the security parameters from the handover request of the AMF, and then carry the security parameters in the handover request response sent to the target AMF.
  • the handover request response is sent to the target AMF via the target AMF. It is forwarded to the source MME, and then forwarded by the source MME to the source base station, and finally sent to the UE by the source base station.
  • the first access network device may be the source base station, and the core network device may be the AMF.
  • the terminal device is in the idle state in the EPS, and then switches to the 5G system.
  • the core network device target core network device
  • the core network device can send the security parameters to the first access network device through the initial context establishment message or the UE context modification request message , and then sent by the first access network device (target access network device) to the terminal device.
  • Scenario 6 In the RRC re-establishment scenario, if the terminal device switches access network devices, the core network device can generate security parameters and send them to the source access network device, and the target access network device can obtain the UE through the data sent by the source access network device. Security parameters are obtained from the context response (retrieve UE context response) message.
  • the first access network device in the Xn handover scenario, can obtain the security parameters through the path switch request ACK (path switch request ACK) message of the core network device.
  • path switch request ACK path switch request ACK
  • the first access network device may obtain security parameters through a handover request message of the core network device (target core network device).
  • the first access network device sends the security parameter to the source core network device through the handover request response message, and then forwards it to the second access network device (source access network device) by the source core network device, and finally the source access network device.
  • the device sends security parameters to the end device.
  • the core network device can also determine whether the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm. If it is determined that the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm, the core network device Security parameters can be generated.
  • the core network device may also determine whether the terminal device supports encryption and/or decryption using the security parameters. If it is determined that the terminal device supports encryption and/or decryption using the security parameters, the core network device may generate the security parameters. .
  • the core network device can also determine whether the terminal device supports encryption and/or decryption using the extended IV, and if it is determined that the terminal device supports encryption and/or decryption using the extended IV, the core network device can generate the security parameters.
  • using the extended IV to perform encryption and/or decryption may refer to using the IV and parameters other than the IV (for example, security parameters) to perform encryption and/or decryption.
  • the first access network device may send the security parameter to the terminal device through a configuration message.
  • the configuration message may be an access layer security mode command message in an access layer security mode command (security mode command, SMC) process
  • the AS security mode command message may be used to instruct to perform an AS security mode command
  • the message can also indicate the 256-bit encryption algorithm used for encryption.
  • Security parameters, count values, bearer identifiers, direction information, and message length can be used as input parameters, and a 256-bit encryption algorithm is used to generate a key stream block for encrypting or decrypting messages.
  • 256-bit encryption algorithms include but are not limited to SNOW-V 256 algorithm, AES 256 algorithm, Zu Chongzhi 256 algorithm, etc.
  • the first access network device can indicate information such as integrity protection and confidentiality protection algorithms, so as to establish AS security with the terminal device.
  • the configuration message may also be a RRC connection reconfiguration message in the RRC connection reconfiguration process, and the RRC connection reconfiguration message may be used to instruct to perform RRC connection reconfiguration;
  • the first access network device may indicate information such as integrity protection and confidentiality protection algorithms, so as to establish AS security with the terminal device.
  • the 256-bit encryption algorithm used for encryption may also be indicated in the RRC connection reconfiguration message.
  • the access layer security mode command message and the radio resource control connection reconfiguration message can be considered as messages for activating user plane security. Sending security parameters through these messages can enable the messages that need to be encrypted and/or decrypted to be encrypted and/or decrypted in time. decrypt. If the security parameter is sent before the access layer security mode command message and the RRC connection reconfiguration message, the previous message is not protected, and the security parameter in the message will be tampered with.
  • the first access network device may also send security parameters for encrypting and/or decrypting AS layer messages to the terminal device through the NAS SMC process.
  • the first access network device may also send parameters such as a key, a next-hop chain counter value, and next-hop information to the terminal device, which will not be described one by one here.
  • S302 The terminal device obtains security parameters.
  • the terminal device may acquire the security parameters from the first access network device.
  • the security parameters are obtained through the access layer security mode command message in the AS SMC process, or the security parameters are obtained through the RRC connection reconfiguration message in the RRC connection reconfiguration process.
  • the terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
  • the first access network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second The bearer identifier, the second direction information and the key decrypt the received message.
  • S303 and S304 are not limited, and may be executed sequentially or simultaneously.
  • the security parameter is used to encrypt the message to be sent, which may refer to the encryption operation of the message to be sent by using the security parameter and the like as an input parameter.
  • the security parameter is used to decrypt the message to be sent, which may refer to the decryption operation of the received message by using the security parameter and the like as an input parameter parameter.
  • FIG. 4 a schematic diagram of an encryption/decryption message provided by an embodiment of the present application is shown.
  • the sender the first access network device or the terminal device
  • the plaintext block including the data to be transmitted
  • the key KEY uses the security parameters, the first count value, the first bearer identifier, the The first direction information and length are used as input parameters, and an encryption algorithm is used to generate a key stream block.
  • length is the length of the message to be sent.
  • the sender performs XOR calculation between the key stream block and the plaintext block to be sent to the receiver (terminal device or the first access network device) to obtain the ciphertext block, and then sends the ciphertext block to the receiver.
  • the encryption algorithm may be a 256-bit encryption algorithm, including but not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi 256 algorithm, etc.
  • the receiving end uses the parameter security parameter, the first count value, the first bearer identifier, the first direction information, and the length as input parameters, and uses the same encryption algorithm to generate the key stream block.
  • the receiver performs XOR calculation between the key stream block and the ciphertext block from the sender, thereby recovering the plaintext block sent by the sender.
  • the message sent by the sender is received by the receiver, so for this message, the first count value, the first bearer identifier, and the first direction information are all used as input parameters. If the message sent by the sender and the message received by the receiver in FIG. 4 are not the same message, the count value, bearer identifier and direction information may be different.
  • the key KEY is the encryption key of the AS layer
  • COUNT is the value in the PDCP counter
  • BEARER is the bearer identifier
  • DIRECTION represents the direction information, which identifies the upstream and downstream directions of the data .
  • the security parameter may be used to encrypt the message to be sent, and may also be used to decrypt the received message.
  • the security parameters used by the sender when encrypting the message to be sent are the same as those used by the receiver when encrypting the message to be sent.
  • the security parameters include a first security parameter and a second security parameter; the first security parameter is used to encrypt the message to be sent, and the second security parameter is used to decrypt the received message.
  • the security parameter used by the sender to encrypt the message to be sent is different from the security parameter used by the receiver to encrypt the message to be sent.
  • the sender uses the first security parameter when encrypting the message to be sent, and the receiver encrypts the message to be sent. message using the second security parameter.
  • the message to be sent is encrypted by using the security parameter at the AS layer, and/or the received message is decrypted, so that the security of the AS layer message can be improved and the risk of being cracked can be reduced.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the terminal device and the access network device respectively generate security parameters according to the same method, in this case, the access network device does not need to send the security parameters to the terminal device
  • the security parameter can be used to encrypt and/or decrypt the AS layer message.
  • the security parameter can also be used to encrypt and/or decrypt the NAS layer message. It will be described in detail below.
  • FIG. 5 a schematic flowchart of a communication method provided by an embodiment of the present application is shown.
  • operations performed by the terminal device may also be performed by a chip or module inside the terminal device
  • operations performed by the access network device may also be performed by a chip or module inside the access network device.
  • the method includes:
  • S501 The access network device sends an AS security mode command message or an RRC connection reconfiguration message to the terminal device.
  • the AS security mode command message can be used to instruct the AS security mode command
  • the RRC connection reconfiguration message can be used to instruct the RRC connection reconfiguration.
  • These two messages can also indicate the 256-bit encryption algorithm used for encryption, where the 256 Bit encryption algorithms include but are not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi (ZUC) 256 algorithm, etc.
  • S502 The access network device acquires security parameters.
  • the access network device can also send the security parameter to the core network device.
  • S503 The terminal device obtains security parameters.
  • execution order of S502 and S503 is not limited, and may be executed sequentially or simultaneously.
  • the access network device may acquire the security parameters through the core network device, or may generate the security parameters independently. End devices can generate security parameters autonomously.
  • the core network device may determine the security parameter according to the shared parameter, and send the security parameter to the access network device.
  • the access network device or the terminal device independently generates the security parameter
  • the access network device or the terminal device can determine the security parameter according to the shared parameter, where the shared parameter is the terminal device and the core network device, or the terminal device and the access network device. parameters known to all network devices.
  • the shared parameters may include at least one of the following:
  • Physical cell identification such as the identification of the physical cell where the terminal equipment is located; synchronization signal block index, such as the index of the synchronization signal block sent by the access network equipment to the terminal equipment; S-TMSI of the terminal equipment; resource identification, such as the terminal equipment receives or the resource identifier for sending data;
  • the access network key for example, the access network key may refer to the current base station key Kgnb;
  • the derivation secret key of the access network key for example, may refer to the current base station key Kgnb Derive the secret key;
  • the next hop chain counter value for example, can refer to the currently used next hop chain counter value;
  • the next hop information for example, can refer to the currently used next hop information.
  • the shared parameters may include at least one of the following:
  • Physical cell identification such as the identification of the physical cell where the terminal equipment is located; synchronization signal block index, such as the index of the synchronization signal block sent by the access network equipment to the terminal equipment; uplink (uplink, UL) NAS COUNT; downlink (downlink, DL) ) NAS COUNT; globally unique temporary UE identity (GUTI) of the terminal device; resource identifier, such as the resource identifier of the terminal device to receive or send data; core network key, such as the core network key can refer to the current The AMF key Kamf, the core network key can be used to generate the access network key, the access network key can be used to generate the encryption and integrity protection key, the encryption and integrity protection key is to be sent The key for message encryption and/or decryption of the received message; the derivation key of the core network key, for example, can refer to the derivation key of the current AMF key Kamf; the next hop chain counter value, for example, can refer to the current The counter value of the next hop chain used; the information of the next
  • the currently used next hop chain counter value and the currently used next hop information may respectively refer to the next hop chain counter value and the next hop information for generating the current access network key.
  • the algorithm used when generating the security parameter is not limited in the embodiment of the present application, and may be, for example, the HMAC-SHA256 algorithm.
  • the shared parameters are the current base station key Kgnb and S-TMSI
  • the HMAC-SHA256 algorithm can be used, and the base station key Kgnb and S-TMSI can be used as input parameters to obtain security parameters.
  • the specific calculation process is no longer Repeat.
  • the timing for the terminal device to generate security parameters may include but is not limited to the following timings:
  • the terminal device After receiving the above message, the terminal device generates security parameters, which can ensure that the messages after the above message can be encrypted and/or decrypted by the security parameters, improving the Communication security performance.
  • An access stratum security context is generated, where the access stratum security context includes at least one of a next hop chain counter value, next hop information, and an access network key.
  • the terminal device may determine that the access stratum security context needs to be generated when receiving the access stratum security mode command message or the RRC connection reconfiguration message.
  • the timing of generating the security parameter by the access network device and the core network device reference may be made to the description in Embodiment 1, and details are not repeated here.
  • the application scenarios corresponding to the timing of generating the security parameters by the terminal device, the access network device, and the core network device may be scenarios 1 to 9 in the first embodiment, which will not be repeated here.
  • the core network device or the access network device can also determine whether the terminal device supports the 256-bit encryption algorithm for encryption and/or decryption by using security parameters, or whether it supports encryption and/or decryption by using security parameters. or decryption, or whether to support encryption and/or decryption with extended IV, if it is determined that the terminal device supports 256-bit encryption algorithm or supports the use of security parameters or whether it supports encryption and/or decryption with extended IV, security parameters can be generated.
  • the terminal device Before generating the security parameter, the terminal device can generate the security parameter if it is determined that the AS security mode command message or the RRC connection reconfiguration message indicates a 256-bit encryption algorithm or that the access network device supports encryption and/or decryption using the security parameter.
  • S504 The terminal device sends an AS security mode command completion message or an RRC connection reconfiguration completion message to the access network device.
  • S505 The terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
  • the access network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, and the second bearer identifier , the second direction information and the key to decrypt the received message.
  • execution order of S505 and S506 is not limited, and may be executed sequentially or simultaneously.
  • the access network device and the terminal device can respectively generate the same security parameters according to the same parameters and methods, so the access network device does not need to send security parameters to the terminal device, thereby avoiding security parameter exposure and improving system security. .
  • the terminal device may obtain security parameters from the core network device, and the security parameters may be used to encrypt and/or decrypt NAS layer messages.
  • the security parameters may be used to encrypt and/or decrypt NAS layer messages.
  • the security parameter can also be used to encrypt and/or decrypt the AS layer message.
  • FIG. 6 a schematic flowchart of a communication method provided by an embodiment of the present application is shown.
  • operations performed by the terminal device may also be performed by a chip or module inside the terminal device
  • operations performed by the core network device may also be performed by a chip or module inside the core network device.
  • the method includes:
  • S601 The core network device obtains security parameters and sends the security parameters.
  • the core network equipment may be equipment such as AMF or MME, which is not limited in this application.
  • the timing for the core network device to generate the security parameter may include but is not limited to the following timings:
  • the key refers to the NAS key
  • the core network key may refer to Kamf, etc.
  • the terminal device may indicate that the terminal device needs to be configured with parameters and keys for encrypting and/or decrypting messages, or it may indicate that the terminal device needs to update the parameters and keys for encrypting and/or decrypting messages. key.
  • the core network device can also determine whether the terminal device supports the 256-bit encryption algorithm for encryption and/or decryption using security parameters, or whether it supports encryption and/or decryption using security parameters, or whether Encryption and/or decryption using extended IV is supported. If it is determined that the terminal device supports a 256-bit encryption algorithm or supports using security parameters or whether it supports encryption and/or decrypting using extended IV, security parameters can be generated.
  • the core network device may send the security parameters to the terminal device in the NAS security mode command message in the NAS SMC process.
  • the core network device can also indicate information such as integrity protection and confidentiality protection algorithms, so as to establish NAS security with the terminal device.
  • the core network device may directly send the security parameters, and may also send the identifiers of the security parameters or the parameters and algorithms used to generate the security parameters.
  • the core network device may also send the security parameters for encrypting and/or decrypting the NAS layer message to the terminal device through other processes.
  • the core network device may also send parameters such as a key, a next-hop chain counter value, and next-hop information to the terminal device, which will not be described one by one here.
  • S602 The terminal device obtains security parameters.
  • the terminal device can obtain the security parameters from the core network device, for example, obtain the security parameters through the NAS security mode command message in the NAS SMC process.
  • the terminal device sends a NAS security mode command completion message to the core network device.
  • the terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
  • the core network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer identifier, The second direction information and the key decrypt the received message.
  • the sender core network device or terminal device
  • the key KEY used to encrypt the plaintext block (including the message to be transmitted)
  • it uses the security parameters, and the count value corresponding to the message
  • the bearer identification, direction information, and length are used as input parameters, and an encryption algorithm is used to generate a key stream block.
  • the sender performs XOR calculation between the key stream block and the plaintext block to be sent to the receiver (terminal device or core network device) to obtain the ciphertext block, and then sends the ciphertext block to the receiver.
  • the receiving end uses the parameter security parameter, the count value, bearer identifier, direction information and length corresponding to the message as input parameters, and uses the same encryption algorithm to generate a key stream block.
  • the receiver performs XOR calculation between the key stream block and the ciphertext block from the sender, thereby recovering the plaintext block sent by the sender.
  • the encryption algorithm may be a 256-bit encryption algorithm, including but not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi 256 algorithm, etc.
  • the key KEY is the encryption key of the NAS layer
  • COUNT 0x00
  • BEARER is the NAS link identifier
  • DIRECTION indicates the direction information, which identifies the upper and lower parts of the data row direction.
  • execution order of S604 and S605 is not limited, and may be executed sequentially or simultaneously.
  • the message to be sent is encrypted by using the security parameters at the NAS layer, and/or the received message is decrypted, so that the security of the NAS layer message can be improved and the risk of being cracked can be reduced.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • the terminal device and the core network device respectively generate security parameters according to the same method, in this case, the core network device does not need to send the security parameters to the terminal device.
  • the security parameter can be used for encrypting and/or decrypting NAS layer messages.
  • the security parameter can also be used to encrypt and/or decrypt the AS layer message. It will be described in detail below.
  • FIG. 7 a schematic flowchart of a communication method provided by an embodiment of the present application is shown.
  • operations performed by the terminal device may also be performed by a chip or module inside the terminal device
  • operations performed by the core network device may also be performed by a chip or module inside the core network device.
  • the method includes:
  • S701 The core network device sends a NAS security mode command message to the terminal device.
  • the NAS security mode command message may be used to instruct the NAS security mode command flow, wherein a 256-bit encryption algorithm may be indicated.
  • S702 The core network device obtains security parameters.
  • the core network device can also send the security parameter to the access network device.
  • S703 The terminal device obtains security parameters.
  • the core network device and the terminal device can respectively generate security parameters according to the shared parameters, and the specific process can refer to the foregoing description, which will not be repeated here.
  • S704 The terminal device sends a NAS security mode completion message to the core network device.
  • S705 The terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
  • the core network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer identifier, The second direction information and the key decrypt the received message.
  • S705 and S706 are not limited, and may be executed sequentially or simultaneously.
  • the core network device and the terminal device can respectively generate the same security parameters according to the same parameters and methods, so the core network device does not need to send security parameters to the terminal device, thereby avoiding security parameter exposure and improving system security.
  • the core network device, the access network device, or the terminal device may include a hardware structure and/or a software module, and a hardware structure, a software module, or a hardware structure plus a software module form to achieve the above functions. Whether one of the above functions is performed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
  • each functional module in each embodiment of the present application may be integrated into one processor, or may exist physically alone, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
  • an embodiment of the present application further provides an apparatus 800 for implementing the functions of the core network device or the access network device or the terminal device in the above method.
  • the apparatus may be a software module or a system-on-chip.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the apparatus 800 may include: a processing unit 801 and a communication unit 802 .
  • the communication unit may also be referred to as a transceiver unit, and may include a sending unit and/or a receiving unit, which are respectively configured to execute the data sent and received by the core network device or the access network device or the terminal device in the above method embodiments. step.
  • a communication unit may also be referred to as a transceiver, transceiver, transceiver, or the like.
  • the processing unit may also be referred to as a processor, a processing single board, a processing module, a processing device, and the like.
  • the device for implementing the receiving function in the communication unit 802 may be regarded as a receiving unit, and the device for implementing the sending function in the communication unit 802 may be regarded as a transmitting unit, that is, the communication unit 802 includes a receiving unit and a transmitting unit.
  • a communication unit may also sometimes be referred to as a transceiver, transceiver, or transceiver circuit, or the like.
  • the receiving unit may also sometimes be referred to as a receiver, receiver, or receiving circuit, or the like.
  • the transmitting unit may also sometimes be referred to as a transmitter, a transmitter, or a transmitting circuit, or the like.
  • a communication unit used to obtain security parameters; the security parameters are used to encrypt messages to be sent, and/or to decrypt received messages;
  • a processing unit configured to encrypt the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count The value, the second bearer identification, the second direction information, and the key decrypt the received message.
  • processing unit 801 and the communication unit 802 may also perform other functions.
  • processing unit 801 and the communication unit 802 may also perform other functions.
  • FIG. 9 shows an apparatus 900 provided by an embodiment of the present application.
  • the apparatus shown in FIG. 9 may be an implementation of a hardware circuit of the apparatus shown in FIG. 8 .
  • the communication apparatus can be applied to the flow chart shown above to perform the functions of the terminal device or the network device in the above method embodiments. For convenience of explanation, FIG. 9 only shows the main components of the communication device.
  • the communication apparatus 900 includes a processor 910 and an interface circuit 920 .
  • the processor 910 and the interface circuit 920 are coupled to each other.
  • the interface circuit 920 can be a transceiver or an input-output interface.
  • the communication device 900 may further include a memory 930 for storing instructions executed by the processor 910 or input data required by the processor 910 to execute the instructions or data generated after the processor 910 executes the instructions.
  • the processor 910 is used to implement the functions of the above-mentioned processing unit 801
  • the interface circuit 920 is used to implement the functions of the above-mentioned communication unit 802 .
  • the terminal device chip When the above communication device is a chip applied to a terminal device, the terminal device chip implements the functions of the terminal device in the above method embodiments.
  • the terminal device chip receives information from other modules (such as a radio frequency module or an antenna) in the terminal device, and the information is sent by the network device to the terminal device; or, the terminal device chip sends information to other modules (such as a radio frequency module or an antenna) in the terminal device antenna) to send information, the information is sent by the terminal equipment to the network equipment.
  • modules such as a radio frequency module or an antenna
  • the network device chip When the above communication device is a chip applied to a network device, the network device chip implements the functions of the network device in the above method embodiments.
  • the network device chip receives information from other modules (such as a radio frequency module or an antenna) in the network device, and the information is sent by the terminal device to the network device; or, the network device chip sends information to other modules in the network device (such as a radio frequency module or an antenna). antenna) to send information, the information is sent by the network equipment to the terminal equipment.
  • modules such as a radio frequency module or an antenna
  • the processor in the embodiments of the present application may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field Programmable Gate Array (Field Programmable Gate Array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
  • a general-purpose processor may be a microprocessor or any conventional processor.
  • the memory may be a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable memory Programmable Read Only Memory (Erasable PROM, EPROM), Electrically Erasable Programmable Read Only Memory (Electrically Erasable Programmable Read Only Memory, EEPROM), registers, hard disks, removable hard disks, CD-ROMs or any other form of storage medium known in the art .
  • An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and storage medium may reside in an ASIC.
  • the ASIC may be located in a network device or in an end device.
  • the processor and storage medium may also exist as discrete components in a network device or terminal device.
  • the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) having computer-usable program code embodied therein.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A communication method and apparatus. The method comprises: acquiring a security parameter, wherein the security parameter is used to encrypt a message to be sent and/or used to decrypt a received message; and according to the security parameter, a first count value, a first bearer identity, first direction information and a key, encrypting the message to be sent, and/or according to the security parameter, a second count value, a second bearer identity, second direction information and a key, decrypting the received message. According to the method, an additional security parameter is added to existing parameters used for encryption and decryption, so as to encrypt a message to be sent, and/or decrypt a received message, so that the message security can be improved, and the risk of cracking a message can be reduced.

Description

一种通信方法及装置A communication method and device 技术领域technical field
本申请涉及无线通信技术领域,特别涉及一种通信方法及装置。The present application relates to the field of wireless communication technologies, and in particular, to a communication method and device.
背景技术Background technique
为了保证终端设备和接入网以及核心网之间通信的安全性,终端设备和网络之间的消息需要进行加密处理。例如在第五代(the 5rd generation,5G)移动通信系统,新无线(new radio,NR)系统中,在接入层(access stratum,AS),发送方使用密钥对待发送的消息进行加密,加密时还会使用参数COUNT、BEARER、DIRECTION作为输入参数。与之对应的,接收方同样会使用上述输入参数对加密的消息数据进行解密操作。其中,密钥是AS层的加密密钥,COUNT是分组数据汇聚协议(packet data convergence protocol,PDCP)计数器(COUNT)中的值,为32比特;BEARER为5比特的承载标识(5-bit bearer identity)。DIRECTION为1比特,标识数据上下行方向,上行时取值为0,下行时取值为1。上面描述的三个参数(COUNT、BEARER、DIRECTION),一般称为初始化向量(initialization vector,IV)。In order to ensure the security of the communication between the terminal device and the access network and the core network, the messages between the terminal device and the network need to be encrypted. For example, in the 5th generation (5G) mobile communication system and the new radio (NR) system, in the access stratum (AS), the sender uses a key to encrypt the message to be sent, The parameters COUNT, BEARER, DIRECTION are also used as input parameters during encryption. Correspondingly, the receiver will also use the above input parameters to decrypt the encrypted message data. Among them, the key is the encryption key of the AS layer, COUNT is the value in the packet data convergence protocol (packet data convergence protocol, PDCP) counter (COUNT), which is 32 bits; BEARER is the 5-bit bearer identifier (5-bit bearer identity). DIRECTION is 1 bit, which identifies the upstream and downstream directions of the data. The value is 0 for upstream and 1 for downstream. The three parameters (COUNT, BEARER, DIRECTION) described above are generally called initialization vector (IV).
随着计算机技术的发展,上述的初始化向量产生的密钥流随机性和安全强度存在被攻破的风险,因此如何提升密钥流随机性和安全强度,以保障移动通信网络中消息的安全性,是一个亟待解决的问题。With the development of computer technology, the randomness and security strength of the key stream generated by the above initialization vector are at risk of being breached. Therefore, how to improve the randomness and security strength of the key stream to ensure the security of messages in the mobile communication network, is an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本申请实施方式的目的在于提供一种通信方法及装置,用以提高通信网络中消息的安全性。The purpose of the embodiments of the present application is to provide a communication method and apparatus, so as to improve the security of messages in a communication network.
第一方面,本申请提供一种通信方法,该方法的执行主体为终端设备或接入网设备或核心网设备,该方法包括:获取安全参数;安全参数用于加密待发送的消息,和/或用于解密接收的消息;根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。In a first aspect, the present application provides a communication method, the execution subject of the method is a terminal device or an access network device or a core network device, the method includes: acquiring security parameters; the security parameters are used to encrypt messages to be sent, and/ or used to decrypt the received message; encrypt the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second The bearer identifier, the second direction information and the key decrypt the received message.
通过上面的方法,在现有加解密所使用的参数中,通过额外增加安全参数对待发送的消息进行加密,和/或对接收的消息进行解密,从而可以提高消息传输的安全性,降低消息被破解的风险。在将安全参数作为初始化向量中的一部分的情况下,本申请方案相当于使得初始化向量更长,使用更长的初始化向量对消息进行加解密,可以提高消息传输的安全性。Through the above method, among the parameters used in the existing encryption and decryption, additional security parameters are added to encrypt the message to be sent, and/or decrypt the received message, so that the security of message transmission can be improved, and the security of the message can be reduced. risk of cracking. When the security parameter is used as a part of the initialization vector, the solution of the present application is equivalent to making the initialization vector longer, and using the longer initialization vector to encrypt and decrypt messages can improve the security of message transmission.
在一种可能的实现方式中,安全参数为大于或等于80比特的比特序列。In a possible implementation manner, the security parameter is a bit sequence greater than or equal to 80 bits.
由于安全参数的长度至少为80比特,从而提高加密的复杂度,降低被破解的风险。Since the length of the security parameter is at least 80 bits, the complexity of encryption is increased and the risk of being cracked is reduced.
在一种可能的实现方式中,安全参数为随机数;或者,安全参数与以下至少一项参数相关:物理小区标识;同步信号块索引;临时移动用户标识;资源标识;接入网密钥;接入网密钥的推演秘钥;下一跳链计数器值;下一跳的信息。In a possible implementation manner, the security parameter is a random number; or, the security parameter is related to at least one of the following parameters: a physical cell identifier; a synchronization signal block index; a temporary mobile user identifier; a resource identifier; an access network key; The derivation key of the access network key; the next hop chain counter value; the information of the next hop.
安全参数为随机数,可以保证安全参数不存在生成规律,降低被破解的风险。安全参 数根据其他参数生成,可以保证每个终端设备获得不同的安全参数,即对于一个终端设备,该终端设备的安全参数具有唯一性,能够提高安全性。进一步地,对于其他参数中的接入网密钥、所述接入网密钥的推演秘钥、下一跳链计数器值和下一跳的信息来说,这几个参数只有该终端设备和对应的网络设备知道,因此可以保证所生成的安全参数的机密性,从而进一步提高了安全参数的安全性。对于其他参数中的物理小区标识、同步信号块索引以及临时移动用户标识等参数,这些参数容易获取,减少获取安全参数的复杂度。The security parameter is a random number, which can ensure that the security parameter does not have a generation law and reduce the risk of being cracked. The security parameters are generated according to other parameters, which can ensure that each terminal device obtains different security parameters, that is, for a terminal device, the security parameters of the terminal device are unique, which can improve the security. Further, for the access network key, the derivation secret key of the access network key, the next hop chain counter value and the information of the next hop among other parameters, these parameters are only the terminal equipment and the The corresponding network device knows, so the confidentiality of the generated security parameters can be guaranteed, thereby further improving the security of the security parameters. For parameters such as physical cell identity, synchronization signal block index, and temporary mobile user identity among other parameters, these parameters are easy to obtain, reducing the complexity of obtaining security parameters.
在一种可能的实现方式中,获取安全参数,包括:接收来自网络设备的配置消息,配置消息包括安全参数,网络设备为接入网设备或核心网设备;或者,根据共享参数确定安全参数,安全参数用于终端设备和网络设备之间消息传输,共享参数为终端设备与网络设备均已知的参数。In a possible implementation manner, acquiring the security parameter includes: receiving a configuration message from a network device, where the configuration message includes the security parameter, and the network device is an access network device or a core network device; or, determining the security parameter according to the shared parameter, The security parameters are used for message transmission between the terminal device and the network device, and the shared parameters are parameters known to both the terminal device and the network device.
如果终端设备和网络设备分别根据共享参数生成安全参数,网络设备就不需要把安全参数传输至终端设备,从而可以降低安全参数暴露的风险,提高安全性。If the terminal device and the network device respectively generate security parameters according to the shared parameters, the network device does not need to transmit the security parameters to the terminal device, thereby reducing the risk of security parameter exposure and improving security.
在一种可能的实现方式中,共享参数包括以下至少一项:物理小区标识;同步信号块索引;临时移动用户标识;资源标识;接入网密钥;接入网密钥的推演秘钥;下一跳链计数器值;下一跳的信息。In a possible implementation manner, the shared parameters include at least one of the following: a physical cell identifier; a synchronization signal block index; a temporary mobile user identifier; a resource identifier; an access network key; Next hop chain counter value; next hop information.
在一种可能的实现方式中,方法应用于终端设备,根据共享参数确定安全参数之前,方法还包括:接收接入层安全模式命令消息或者无线资源控制连接重配置消息。In a possible implementation manner, the method is applied to the terminal device, and before the security parameter is determined according to the shared parameter, the method further includes: receiving an access stratum security mode command message or a radio resource control connection reconfiguration message.
终端设备在收到上述消息后,就去生成安全参数,这样可以保证在上述消息之后的消息都能被加解密,提高系统安全性。After receiving the above message, the terminal device generates security parameters, which can ensure that all messages after the above message can be encrypted and decrypted, thereby improving system security.
在一种可能的实现方式中,方法应用于核心网设备;获取安全参数之前,方法还包括:确定满足以下至少一项:确定向接入网设备发送新的下一跳链计数器值和下一跳的信息中的至少一个,其中,新的下一跳链计数器值和下一跳的信息中的至少一个,可以和安全参数一起发送至该接入网设备;确定发送新的接入网密钥;确定激活/更改用户面安全策略;确定与终端设备之间执行非接入层安全模式命令流程;确定更新非接入层密钥;确定生成核心网密钥或进行核心网密钥水平推演。In a possible implementation manner, the method is applied to a core network device; before acquiring the security parameters, the method further includes: determining that at least one of the following is satisfied: determining to send a new next hop chain counter value and a next hop chain counter value to the access network device At least one of the hop information, wherein at least one of the new next hop chain counter value and the next hop information can be sent to the access network device together with the security parameter; determine to send the new access network password. determine the activation/change of the user plane security policy; determine to execute the non-access stratum security mode command process with the terminal device; determine to update the non-access stratum key; determine to generate the core network key or perform the core network key level deduction .
在该情况下,如果安全参数用于加解密AS层消息,核心网设备还需要把安全参数发给接入网设备。如果安全参数用于加解密NAS层消息,核心网设备则可以不把安全参数发给接入网设备。In this case, if the security parameter is used to encrypt and decrypt AS layer messages, the core network device also needs to send the security parameter to the access network device. If the security parameter is used to encrypt and decrypt NAS layer messages, the core network device may not send the security parameter to the access network device.
在一种可能的实现方式中,方法应用于接入网设备;获取安全参数之前,方法还包括:确定满足以下至少一项:确定进行接入层安全模式命令流程或者无线资源控制连接重配置;接收到新的下一跳链计数器值或者下一跳的信息或者接入网密钥;对接入网密钥进行更新;确定向其它接入网设备发送下一跳链计数器值或者下一跳的信息或者接入网密钥。In a possible implementation manner, the method is applied to an access network device; before acquiring the security parameters, the method further includes: determining that at least one of the following is satisfied: determining to perform an access layer security mode command process or a radio resource control connection reconfiguration; Receive a new next hop chain counter value or next hop information or access network key; update the access network key; determine to send the next hop chain counter value or next hop to other access network devices information or access network key.
在一种可能的实现方式中,获取安全参数之前,还包括:确定接入网设备和终端设备支持采用所述安全参数进行加解密;或者,确定终端设备支持采用安全参数进行加解密。In a possible implementation manner, before acquiring the security parameter, the method further includes: determining that the access network device and the terminal device support encryption and decryption using the security parameter; or, determining that the terminal device supports encryption and decryption using the security parameter.
在一种可能的实现方式中,方法应用于接入网设备或核心网设备,方法还包括:向终端设备发送配置消息,配置消息包括安全参数。In a possible implementation manner, the method is applied to an access network device or a core network device, and the method further includes: sending a configuration message to the terminal device, where the configuration message includes security parameters.
在一种可能的实现方式中,安全参数包括第一安全参数和第二安全参数;第一安全参数用于对待发送的消息进行加密,第二安全参数用于对接收的消息进行解密。In a possible implementation manner, the security parameters include a first security parameter and a second security parameter; the first security parameter is used to encrypt the message to be sent, and the second security parameter is used to decrypt the received message.
在一种可能的实现方式中,配置消息为接入层安全模式命令流程中的接入层安全模式命令消息;或者,配置消息为无线资源控制连接重配置流程中的无线资源控制连接重配置 消息;或者,配置消息为非接入层安全模式命令流程中的非接入层安全模式命令消息。In a possible implementation manner, the configuration message is an access stratum security mode command message in the access stratum security mode command process; or, the configuration message is a radio resource control connection reconfiguration message in the radio resource control connection reconfiguration process. ; or, the configuration message is a non-access stratum security mode command message in the non-access stratum security mode command flow.
接入层安全模式命令消息以及无线资源控制连接重配置消息,可以认为是激活用户面安全的消息,通过这些消息发送安全参数,可以使得需要加密和/或解密的消息能够及时进行加密和/或解密。如果在接入层安全模式命令消息以及无线资源控制连接重配置消息之前发安全参数,因为之前的消息没有被保护,消息中的安全参数会被篡改,所以无法保证安全参数的安全性。而接入层安全模式命令消息以及无线资源控制连接重配置消息本身是有安全保护的,比如被基站密钥保护,可以防止携带在这两个消息中的安全参数被篡改,因此可以保证安全参数的安全性。The access layer security mode command message and the radio resource control connection reconfiguration message can be considered as messages for activating user plane security. Sending security parameters through these messages can enable the messages that need to be encrypted and/or decrypted to be encrypted and/or decrypted in time. decrypt. If the security parameter is sent before the access layer security mode command message and the RRC connection reconfiguration message, because the previous message is not protected, the security parameter in the message will be tampered with, so the security of the security parameter cannot be guaranteed. The access layer security mode command message and the RRC connection reconfiguration message are themselves protected by security, such as being protected by the base station key, which can prevent the security parameters carried in these two messages from being tampered with, so the security parameters can be guaranteed. security.
第二方面,本申请还提供一种通信装置,该通信装置具有实现上述第一方面提供的任一方法。该通信装置可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的单元或模块。In a second aspect, the present application further provides a communication device, the communication device having any of the methods provided in the above-mentioned first aspect. The communication device may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more units or modules corresponding to the above functions.
在一种可能的实现方式中,该通信装置包括:处理器,该处理器被配置为支持该通信装置执行以上所示方法的相应功能。该通信装置还可以包括存储器,该存储可以与处理器耦合,其保存该通信装置必要的程序指令和数据。可选地,该通信装置还包括接口电路,该接口电路用于支持该通信装置与网络设备等设备之间的通信。In a possible implementation manner, the communication apparatus includes: a processor configured to support the communication apparatus to perform corresponding functions of the methods shown above. The communication device may also include a memory, which may be coupled to the processor, which holds program instructions and data necessary for the communication device. Optionally, the communication apparatus further includes an interface circuit, and the interface circuit is used to support communication between the communication apparatus and equipment such as network equipment.
在一种可能的实现方式中,该通信装置包括相应的功能模块,分别用于实现以上方法中的步骤。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。In a possible implementation manner, the communication device includes corresponding functional modules, which are respectively used to implement the steps in the above method. The functions can be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一种可能的实施方式中,该通信装置的结构中包括处理单元和通信单元,这些单元可以执行上述方法示例中相应功能,具体参见第一方面提供的方法中的描述,此处不做赘述。In a possible implementation manner, the structure of the communication device includes a processing unit and a communication unit, and these units can perform the corresponding functions in the above method examples. For details, please refer to the description of the method provided in the first aspect, which will not be repeated here. .
第三方面,提供了一种通信装置,包括处理器和接口电路,接口电路用于接收来自该通信装置之外的其它通信装置的信号并传输至该处理器或将来自该处理器的信号发送给该通信装置之外的其它通信装置,该处理器用于执行存储器中存储的计算机程序或指令,使得所述通信装置实现前述第一方面、以及第一方面的任意可能的实现方式中的方法。In a third aspect, a communication device is provided, comprising a processor and an interface circuit, wherein the interface circuit is configured to receive signals from other communication devices other than the communication device and transmit to the processor or send signals from the processor For other communication devices other than the communication device, the processor is configured to execute the computer program or instructions stored in the memory, so that the communication device implements the aforementioned first aspect and the method in any possible implementation manner of the first aspect.
第四方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行实现前述第一方面以及第一方面的任意可能的实现方式中的方法。In a fourth aspect, a computer-readable storage medium is provided, and a computer program or instruction is stored in the computer-readable storage medium, and when the computer program or instruction is executed on a computer, the computer is executed to realize the aforementioned first Aspects and methods in any possible implementation of the first aspect.
第五方面,提供了一种包括计算机可读指令的计算机程序产品,所述计算机可读指令在计算机上运行时,使得所述计算机实现前述第一方面以及第一方面的任意可能的实现方式中的方法。In a fifth aspect, there is provided a computer program product comprising computer-readable instructions, which, when executed on a computer, cause the computer to implement the aforementioned first aspect and any possible implementation manner of the first aspect Methods.
第六方面,提供一种芯片,该芯片包括处理器,还可以包括存储器,所述处理器与存储器耦合,用于执行所述存储器中存储的计算机程序或指令,实现前述第一方面以及第一方面的任意可能的实现方式中的方法。In a sixth aspect, a chip is provided, the chip includes a processor, and may also include a memory, the processor is coupled to the memory, and is configured to execute a computer program or instruction stored in the memory, so as to implement the foregoing first aspect and the first A method in any possible implementation of an aspect.
附图说明Description of drawings
图1为适用于本申请实施例的一种网络架构示意图;FIG. 1 is a schematic diagram of a network architecture suitable for an embodiment of the present application;
图2为现有技术中的一种加密和解密流程示意图;Fig. 2 is a kind of encryption and decryption flow schematic diagram in the prior art;
图3为本申请实施例提供的一种通信方法流程示意图;3 is a schematic flowchart of a communication method provided by an embodiment of the present application;
图4为本申请实施例提供的一种加密和解密流程示意图;4 is a schematic flow chart of encryption and decryption provided by an embodiment of the present application;
图5为本申请实施例提供的一种通信方法流程示意图;FIG. 5 is a schematic flowchart of a communication method provided by an embodiment of the present application;
图6为本申请实施例提供的一种通信方法流程示意图;FIG. 6 is a schematic flowchart of a communication method provided by an embodiment of the present application;
图7为本申请实施例提供的一种通信方法流程示意图;FIG. 7 is a schematic flowchart of a communication method provided by an embodiment of the present application;
图8为本申请实施例提供的一种通信装置结构示意图;FIG. 8 is a schematic structural diagram of a communication device according to an embodiment of the present application;
图9为本申请实施例提供的一种通信装置结构示意图。FIG. 9 is a schematic structural diagram of a communication device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例作进一步地详细描述。The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
本申请实施例可以应用于各种移动通信系统,例如:新无线(new radio,NR)系统、长期演进(long term evolution,LTE)系统以及未来通信系统等其它通信系统,具体的,在此不做限制。The embodiments of the present application can be applied to various mobile communication systems, such as: a new radio (new radio, NR) system, a long term evolution (long term evolution, LTE) system, and other communication systems such as future communication systems. make restrictions.
本申请实施例中,以终端设备和接入网设备或核心网设备之间的交互为例进行描述,需要说明的是,本申请实施例提供的方法,不仅可以应用于终端设备与网络侧之间的交互,还可以应用于任意两个设备之间的交互中,例如设备到设备(device-to-device,D2D)通信中,本申请实施例对此并不限定。In the embodiments of the present application, the interaction between a terminal device and an access network device or a core network device is used as an example for description. It should be noted that the methods provided in the embodiments of the present application can not only be applied to the interaction between the terminal device and the network side The interaction between two devices may also be applied to the interaction between any two devices, for example, device-to-device (device-to-device, D2D) communication, which is not limited in this embodiment of the present application.
本申请实施例中,终端设备可以简称为终端,为具有无线收发功能的设备或可设置于该设备的芯片。其中,终端设备也可以称为用户设备(user equipment,UE)、接入终端等。在实际应用中,本申请的实施例中的终端设备可以是手机(mobile phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端、增强现实(augmented reality,AR)终端、工业控制(industrial control)中的无线终端等。本申请实施例中,用于实现终端设备的功能的装置可以是终端设备;也可以是能够支持终端设备实现该功能的装置,例如芯片系统,该装置可以被安装在终端设备中或者与终端设备匹配使用。In this embodiment of the present application, a terminal device may be referred to as a terminal for short, which is a device with a wireless transceiver function or a chip that can be provided in the device. The terminal device may also be referred to as user equipment (user equipment, UE), access terminal, or the like. In practical applications, the terminal device in the embodiments of the present application may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) terminal, an augmented reality (augmented reality) , AR) terminal, wireless terminal in industrial control, etc. In this embodiment of the present application, the device for implementing the function of the terminal device may be the terminal device; it may also be a device capable of supporting the terminal device to realize the function, such as a chip system, and the device may be installed in the terminal device or connected with the terminal device. Match use.
接入网设备:可以是无线网络中各种制式下无线接入设备,例如接入网设备可以是将终端设备接入到无线网络的无线接入网(radio access network,RAN)节点,又可以称为RAN设备或基站。一些接入网设备的举例为:下一代基站(generation Node B,gNodeB)、传输接收点(transmission reception point,TRP)、演进型节点B(evolved node B,eNB)、无线网络控制器(radio network controller,RNC)等。在一种网络结构中,接入网设备可以包括集中单元(centralized unit,CU)节点或分布单元(distributed unit,DU)节点,或包括CU节点和DU节点。接入网设备包括CU和DU时,多个DU可以由一个CU集中控制。本申请实施例中,用于实现接入网设备的功能的装置可以是接入网设备;也可以是能够支持接入网设备实现该功能的装置,例如芯片系统,该装置可以被安装在接入网设备中或者与接入网设备匹配使用。Access network device: It can be a wireless access device under various standards in a wireless network. For example, an access network device can be a radio access network (RAN) node that connects a terminal device to a wireless network, or it can be a radio access network (RAN) node. It is called RAN equipment or base station. Some examples of access network equipment are: generation Node B (gNodeB), transmission reception point (TRP), evolved node B (evolved node B, eNB), radio network controller (radio network) controller, RNC), etc. In a network structure, the access network device may include a centralized unit (centralized unit, CU) node or a distributed unit (distributed unit, DU) node, or include a CU node and a DU node. When the access network equipment includes CUs and DUs, multiple DUs can be centrally controlled by one CU. In the embodiment of the present application, the device for implementing the function of the access network device may be the access network device; it may also be a device capable of supporting the access network device to realize the function, such as a chip system, and the device may be installed in the access network device. It can be used in the network access device or matched with the access network device.
核心网设备,可以是用于对终端设备的接入和移动性进行管理的设备,例如可以是接入和移动性管理(Access and Mobility Management Function,AMF)网元,还可以是移动性管理实体(mobility management entity,MME)网元等,本申请对此并不限定。Core network equipment, which can be a device used to manage the access and mobility of terminal equipment, such as an Access and Mobility Management Function (AMF) network element, or a mobility management entity (mobility management entity, MME) network element, etc., which are not limited in this application.
为便于理解本申请实施例,首先说明适用于本申请实施例的通信系统。如图1所示,图1为本申请实施例适用的一种网络架构示意图。图1中,终端设备可通过接入网设备接入到无线网络,以通过无线网络获取外网(例如因特网)的服务,或者通过无线网络与其它设备通信,如可以与其它终端设备通信。To facilitate understanding of the embodiments of the present application, a communication system applicable to the embodiments of the present application is first described. As shown in FIG. 1 , FIG. 1 is a schematic diagram of a network architecture to which an embodiment of the present application is applied. In FIG. 1 , a terminal device can access a wireless network through an access network device to obtain services from an external network (eg, the Internet) through the wireless network, or communicate with other devices through the wireless network, such as with other terminal devices.
为了提高数据传输的安全性,接入网设备与终端设备之间的接入层(access stratum, AS)消息需要进行加密。具体的,如图2所示,发送端使用密钥KEY对明文数据进行加密时,使用参数COUNT、BEARER、DIRECTION以及数据的长度LENGTH等作为输入参数,采用加密算法,生成密钥流块(KEYSTREAM BLOCK)。发送端对生成的密钥流块与要发送给接收端的明文块(PLAINTEXT BLOCK)进行异或计算,再将经过异或计算所得到的密文块(CIPHERTEXT BLOCK)发送至接收端。In order to improve the security of data transmission, the access stratum (access stratum, AS) message between the access network device and the terminal device needs to be encrypted. Specifically, as shown in Figure 2, when the sender uses the key KEY to encrypt the plaintext data, it uses the parameters COUNT, BEARER, DIRECTION and the data length LENGTH as input parameters, and uses the encryption algorithm to generate a key stream block (KEYSTREAM BLOCK). The sender performs XOR calculation on the generated key stream block and the plaintext block (PLAINTEXT BLOCK) to be sent to the receiver, and then sends the ciphertext block (CIPHERTEXT BLOCK) obtained by the XOR calculation to the receiver.
相应的,接收端使用参数COUNT、BEARER、DIRECTION以及数据的长度LENGTH等作为输入参数,采用同样的加密算法,生成密钥流块。接收端将密钥流块与来自发送端的密文块进行异或计算,从而恢复出发送端所发送的明文块。Correspondingly, the receiving end uses the parameters COUNT, BEARER, DIRECTION and the data length LENGTH as input parameters, and uses the same encryption algorithm to generate a key stream block. The receiver performs XOR calculation between the key stream block and the ciphertext block from the sender, thereby recovering the plaintext block sent by the sender.
其中,密钥KEY可以是AS层的加密密钥,COUNT是PDCP计数器中的值,长度为32比特;BEARER为5比特的承载标识;DIRECTION表示方向信息,标识数据上下行方向,长度为1比特,上行时取值为0,下行时取值为1。加密算法的具体实现方式并不限定,可以由协议约定,也可以由网络侧指定。本申请实施例中,加密算法可以为128位的5G加密算法(encryption algorithm for 5G)或者256位的5G加密算法等,128位的5G加密算法包括但不限于SNOW第三代(the third generation,3G)128算法、高级加密标准(advanced encryption standard,AES)128算法、祖冲之128算法等;256位的5G加密算法包括但不限于SNOW-V 256算法、AES256算法、祖冲之256算法等。Among them, the key KEY can be the encryption key of the AS layer, COUNT is the value in the PDCP counter, with a length of 32 bits; BEARER is a 5-bit bearer identifier; DIRECTION indicates the direction information, which identifies the upstream and downstream directions of the data, with a length of 1 bit , the value is 0 when going up, and 1 when going down. The specific implementation manner of the encryption algorithm is not limited, and it can be stipulated by the protocol or specified by the network side. In the embodiment of the present application, the encryption algorithm may be a 128-bit 5G encryption algorithm (encryption algorithm for 5G) or a 256-bit 5G encryption algorithm, etc. The 128-bit 5G encryption algorithm includes but is not limited to the third generation of SNOW (the third generation, 3G) 128 algorithm, advanced encryption standard (AES) 128 algorithm, Zu Chongzhi 128 algorithm, etc.; 256-bit 5G encryption algorithms include but are not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi 256 algorithm, etc.
同样的,核心网设备与终端设备之间的非接入层(non access stratum,NAS)消息也需要进行加密。与AS层不同的是,在NAS层使用的密钥是NAS层的加密密钥,相应的BEARER则是非接入层链接标识符(NAS connection identifier),COUNT则是0x00||NAS COUNT,NAS COUNT可以认为是NAS侧的一个计数器的值,NAS COUNT的长度是24比特,COUNT整个也是32比特。NAS层中,DIRECTION含义和AS层类似,上行为终端设备向核心网设备发送消息,下行为核心网设备向终端设备发送消息,||为拼接符。Similarly, non-access stratum (non access stratum, NAS) messages between the core network device and the terminal device also need to be encrypted. Different from the AS layer, the key used at the NAS layer is the encryption key of the NAS layer, the corresponding BEARER is the NAS connection identifier, and the COUNT is 0x00||NAS COUNT, NAS COUNT It can be considered as the value of a counter on the NAS side. The length of the NAS COUNT is 24 bits, and the entire COUNT is also 32 bits. In the NAS layer, the meaning of DIRECTION is similar to that of the AS layer. The upper line is the terminal device to send a message to the core network device, the lower line is the core network device to send the message to the terminal device, and || is a splicer.
本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The network architecture and service scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. The evolution of the architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请实施例中部分场景以NR网络的场景为例进行说明,应当指出的是,本申请实施例中的方案还可以应用于其他无线通信网络中,相应的名称也可以用其他无线通信网络中的对应功能的名称进行替代,在此不再赘述。Some scenarios in the embodiments of the present application are described by taking the scenario of an NR network as an example. It should be noted that the solutions in the embodiments of the present application can also be applied to other wireless communication networks, and the corresponding names can also be used in other wireless communication networks. The name of the corresponding function will be replaced, and it will not be repeated here.
本申请实施例中,为提高设备之间通信的安全性,通过引入安全参数对消息进行加解密,增强加解密安全性。In the embodiment of the present application, in order to improve the security of communication between devices, the security parameters are introduced to encrypt and decrypt messages, so as to enhance the security of encryption and decryption.
具体来说,一种实现方式中,终端设备获取来自网络设备的安全参数,从而可以根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。Specifically, in an implementation manner, the terminal device obtains the security parameter from the network device, so that the message to be sent can be encrypted according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, And/or decrypt the received message according to the security parameter, the second count value, the second bearer identifier, the second direction information and the key.
其中,安全参数用于加密待发送的消息,和/或用于解密接收的消息,安全参数可以为一串比特序列,安全参数的长度并不限定,例如可以大于或等于80比特,例如88比特或90比特等,也可以为其他长度。Wherein, the security parameter is used to encrypt the message to be sent and/or used to decrypt the received message. The security parameter can be a sequence of bits. The length of the security parameter is not limited, for example, it can be greater than or equal to 80 bits, such as 88 bits or 90 bits, etc., other lengths are also possible.
第一计数值、第一承载标识以及第一方向信息根据待发送的消息确定。举例来说,第一计数值可以是指待发送的消息在PDCP层对应的序列号,也可以称为COUNT;第一承 载标识可以是指待发送的消息对应的承载的承载标识;第一方向信息可以指示待发送的消息传输方向,例如第一方向信息包括1比特,待发送的消息的传输方向为上行时取值为0,待发送的消息的传输方向为下行时取值为1。The first count value, the first bearer identifier and the first direction information are determined according to the message to be sent. For example, the first count value may refer to the sequence number corresponding to the message to be sent at the PDCP layer, which may also be referred to as COUNT; the first bearer identifier may refer to the bearer identifier of the bearer corresponding to the message to be sent; the first direction The information may indicate the transmission direction of the message to be sent. For example, the first direction information includes 1 bit, and the value is 0 when the transmission direction of the message to be sent is uplink, and the value is 1 when the transmission direction of the message to be sent is downlink.
第二计数值、第二承载标识以及第二方向信息根据接收的消息确定。举例来说,第二计数值可以是指接收的消息在PDCP层对应的序列号,也可以称为COUNT;第二承载标识可以是指接收的消息对应的承载的承载标识;第二方向信息可以指示接收的消息传输方向,例如第二方向信息包括1比特,接收的消息的传输方向为上行时取值为0,接收的消息的传输方向为下行时取值为1。The second count value, the second bearer identifier, and the second direction information are determined according to the received message. For example, the second count value may refer to the sequence number corresponding to the received message at the PDCP layer, which may also be called COUNT; the second bearer identifier may refer to the bearer identifier of the bearer corresponding to the received message; the second direction information may Indicates the transmission direction of the received message. For example, the second direction information includes 1 bit, and the value is 0 when the transmission direction of the received message is uplink, and the value is 1 when the transmission direction of the received message is downlink.
密钥可以是指AS层的加密密钥,也可以是指NAS层的加密密钥,具体根据实际情况确定。The key may refer to the encryption key of the AS layer, or may refer to the encryption key of the NAS layer, which is determined according to the actual situation.
需要说明的是,对于同一条消息,发送方加密时采用的计数值、承载标识以及方向信息,和接收方解密时采用的计数值、承载标识以及方向信息是相同的。对于不同消息,除了安全参数和密钥外,计数值、承载标识以及方向信息都可能根据消息的变化而变化。It should be noted that, for the same message, the count value, bearer identifier, and direction information used by the sender for encryption are the same as the count value, bearer identifier, and direction information used by the receiver for decryption. For different messages, in addition to the security parameters and keys, the count value, bearer identification and direction information may vary according to the change of the message.
对于网络设备,同样可以根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。网络设备可以为接入网设备,也可以为核心网设备。For the network device, the message to be sent may also be encrypted according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier , the second direction information and the key to decrypt the received message. The network device may be an access network device or a core network device.
本申请实施例中,安全参数可以用于加密和/或解密AS层消息;安全参数也可以用于加密和/或解密NAS层消息。NAS层消息和AS层消息可以采用相同的安全参数加密和/或解密,也可以采用不同的安全参数加密和/或解密。In this embodiment of the present application, the security parameter may be used to encrypt and/or decrypt the AS layer message; the security parameter may also be used to encrypt and/or decrypt the NAS layer message. The NAS layer message and the AS layer message may be encrypted and/or decrypted using the same security parameters, or may be encrypted and/or decrypted using different security parameters.
另一种实现方式中,网络设备与终端设备之间,可以分别采用相同的方法生成安全参数,从而避免将安全参数通过网络发送。In another implementation manner, the same method may be used to generate security parameters between the network device and the terminal device, so as to avoid sending the security parameters through the network.
下面将从设备交互的角度,分别进行描述如何获取安全参数,以及如何使用安全参数。本申请各个实施例中,如果参数名称相同,可以代表相同的含义,不再逐一说明。The following describes how to obtain security parameters and how to use security parameters from the perspective of device interaction. In each embodiment of the present application, if the parameter names are the same, they may represent the same meaning, and will not be described one by one.
实施例一:Example 1:
实施例一中,以网络设备为第一接入网设备为例,终端设备可以从第一接入网设备获取安全参数,该安全参数可以用于加密和/或解密AS层消息。当然,如果AS层消息和NAS层消息可以采用相同的安全参数加密和/或解密,那么该安全参数也可以用于加密和/或解密NAS层消息。In the first embodiment, taking the network device as the first access network device as an example, the terminal device may obtain security parameters from the first access network device, and the security parameters may be used to encrypt and/or decrypt AS layer messages. Of course, if the AS layer message and the NAS layer message can be encrypted and/or decrypted using the same security parameter, then the security parameter can also be used to encrypt and/or decrypt the NAS layer message.
如图3所示,为本申请实施例提供的一种通信方法流程示意图。图3中,以终端设备执行的操作也可以由终端设备内部的芯片或模块执行,第一接入网设备执行的操作也可以由第一接入网设备内部的芯片或模块执行。参见图3,该方法包括:As shown in FIG. 3 , a schematic flowchart of a communication method provided by an embodiment of the present application is shown. In FIG. 3 , operations performed by the terminal device may also be performed by a chip or module inside the terminal device, and operations performed by the first access network device may also be performed by a chip or module inside the first access network device. Referring to Figure 3, the method includes:
S301:第一接入网设备获取安全参数,并发送安全参数。S301: The first access network device acquires security parameters, and sends the security parameters.
第一接入网设备可以采用多种方式获取安全参数,第一种实现方式中,第一接入网设备可以自主生成安全参数。The first access network device may acquire the security parameters in various manners. In the first implementation manner, the first access network device may generate the security parameters autonomously.
举例来说,第一接入网设备可以生成一个随机数,并将该随机数作为安全参数。或者,第一接入网设备还可以根据当前使用的安全参数生成一个新的安全参数,并将该新的安全参数获取到的安全参数,例如将当前使用的安全参数与一个预设值的累加和作为安全参数。For example, the first access network device may generate a random number and use the random number as a security parameter. Alternatively, the first access network device may also generate a new security parameter according to the currently used security parameter, and use the security parameter obtained by the new security parameter, such as the accumulation of the currently used security parameter and a preset value. and as security parameters.
再举例来说,第一接入网设备还可以根据其他参数生成安全参数,例如安全参数还可以与以下至少一项参数相关:For another example, the first access network device may also generate security parameters according to other parameters, for example, the security parameters may also be related to at least one of the following parameters:
第一接入网设备生成的随机数;物理小区标识,例如终端设备所处的物理小区的标识;同步信号块索引,例如第一接入网设备向终端设备发送的同步信号块的索引;终端设备的临时移动用户标识(serving-temporary mobile subscriber identity,s-TMSI);终端设备接收或发送数据的资源标识;当前的接入网密钥,例如接入网密钥可以是指基站密钥Kgnb;当前的接入网密钥的推演秘钥;下一跳链计数器值(next hop chaining counter,NCC),例如可以是当前的下一跳链计数器值;下一跳(next hop,NH)的信息,例如可以是当前的下一跳的信息。其中,下一跳的信息可以是指下一跳密钥,下一跳密钥可以是指小区切换过程中的中间密钥,可以用来在小区切换过程中提供前向安全性(forward secrecy)。下一跳的信息可以用来生成新的接入网密钥。A random number generated by the first access network device; a physical cell identifier, such as the identifier of the physical cell where the terminal device is located; a synchronization signal block index, such as the index of a synchronization signal block sent by the first access network device to the terminal device; the terminal device Temporary mobile subscriber identity (serving-temporary mobile subscriber identity, s-TMSI) of the device; resource identifier for the terminal device to receive or send data; the current access network key, for example, the access network key may refer to the base station key Kgnb ; Deduction secret key of the current access network key; next hop chaining counter value (next hop chaining counter, NCC), for example, can be the current next hop chain counter value; next hop (next hop, NH) The information, for example, can be the information of the current next hop. The next hop information may refer to the next hop key, and the next hop key may refer to the intermediate key in the cell handover process, which can be used to provide forward security (forward secrecy) in the cell handover process. . The next hop information can be used to generate a new access network key.
以上只是示例,生成安全参数的参数并不限于上面列举的,还可以存在其他参数,在此不再赘述。The above are just examples, and the parameters for generating the security parameters are not limited to those listed above, and other parameters may exist, which will not be repeated here.
需要说明的是,下面简单介绍一下接入层安全机制。在无线接入网的接入层存在着一套完整的安全机制。以NR网络为例,接入层安全机制在初始安全上下文建立过程中激活。在该过程中,终端设备与网络侧分别根据核心网密钥(也可以称为接入层根密钥)计算出初始接入层根密钥,即接入网密钥。以接入网密钥为基础,终端设备与接入网设备进一步计算出一个或多个加密与完整性保护密钥,用于对信令与用户面数据进行加密与完整性保护,该加密与完整性保护密钥也就是对待发送的消息加密以及对接收的消息解密的密钥。It should be noted that the following briefly introduces the security mechanism of the access layer. There is a complete set of security mechanisms in the access layer of the wireless access network. Taking the NR network as an example, the access layer security mechanism is activated during the establishment of the initial security context. In this process, the terminal device and the network side respectively calculate the initial access stratum root key, that is, the access network key, according to the core network key (also referred to as the access stratum root key). Based on the access network key, the terminal device and the access network device further calculate one or more encryption and integrity protection keys for encryption and integrity protection of signaling and user plane data. The integrity protection key is the key used to encrypt the message to be sent and decrypt the received message.
为了提升安全性,无线接入网中引入了“下一跳”机制。在第一次切换时,接入层总是可以执行所谓“水平切换”:直接使用初始接入网密钥计算出新的接入网密钥。但是,在之后的节点间切换过程中,接入层需要至少进行“垂直切换”:根据非接入层所提供的某个“下一跳的信息”计算出新的接入网密钥。节点内切换仍然可以采用“水平切换”方式。为了保证终端设备与网络侧的同步,网络侧会通过下一跳链计数器值指示终端设备使用哪一个下一跳的信息确定新的接入网密钥。In order to improve security, a "next hop" mechanism is introduced into the radio access network. At the first handover, the access layer can always perform a so-called "horizontal handover": directly use the initial access network key to calculate a new access network key. However, in the subsequent handover process between nodes, the access layer needs to perform at least "vertical handover": calculate a new access network key according to a certain "next hop information" provided by the non-access layer. Intra-node switching can still use the "horizontal switching" method. In order to ensure the synchronization between the terminal device and the network side, the network side will determine the new access network key by instructing the terminal device which next hop to use through the next hop chain counter value.
因此,本申请实施例中,如果需要获取新的下一跳链计数器值或者新的下一跳的信息或者新的接入网密钥,那么可以表示对待发送的消息加密和/或及对接收的消息解密的密钥也需要更新,相应的,需要更新或生成安全参数。Therefore, in this embodiment of the present application, if a new next-hop chain counter value or new next-hop information or a new access network key needs to be acquired, it may indicate that the message to be sent is encrypted and/or the message to be received is encrypted. The key for decrypting the message also needs to be updated, and accordingly, security parameters need to be updated or generated.
另外,第一接入网设备生成安全参数时使用的算法,本申请实施例也不限定,例如可以为散列消息认证码(hash-based message authentication code,HMAC)安全散列算法256(secure hash algorithm 256,SHA-256)算法,即使用SHA-256生成哈希值的HMAC算法。In addition, the algorithm used by the first access network device to generate the security parameter is not limited in the embodiments of the present application, for example, it may be a hash-based message authentication code (HMAC) secure hash algorithm 256 (secure hash). algorithm 256, SHA-256) algorithm, that is, the HMAC algorithm that uses SHA-256 to generate hash values.
本申请实施例中,第一接入网设备在什么时机下获取安全参数,可能存在多种情况,例如可以包括但不限于以下的一种或者多种时机:In this embodiment of the present application, when the first access network device acquires the security parameters, there may be various situations, for example, it may include but not limited to one or more of the following timings:
时机一,确定进行接入层安全模式命令流程或者无线资源控制连接重配置。其中,第一接入网设备可以先确定要进行接入层安全模式命令流程或者无线资源控制连接重配置,然后获取或者生成安全参数。第一接入网设备在获取或者生成安全参数之前,也可以执行接入层安全模式命令流程或者无线资源控制连接重配置的一部分或者全部。At the first opportunity, it is determined to perform the access layer security mode command process or the radio resource control connection reconfiguration. The first access network device may first determine that the access layer security mode command process or radio resource control connection reconfiguration is to be performed, and then acquire or generate security parameters. Before acquiring or generating the security parameter, the first access network device may also execute a part or all of the access layer security mode command process or the radio resource control connection reconfiguration.
时机二,接收到新的下一跳链计数器值或者新的下一跳的信息或者新的接入网密钥。下一跳链计数器值、下一跳的信息、接入网密钥以及密钥之间的关系,可以参考现有技术中的描述,在此不再赘述。At the second opportunity, a new next-hop chain counter value or new next-hop information or a new access network key is received. For the next hop chain counter value, the information of the next hop, the access network key, and the relationship between the keys, reference may be made to the description in the prior art, and details are not repeated here.
时机三,对接入网密钥进行更新,接入网密钥可以是指用于加密用户面业务的密钥,例如接入网密钥可以是指基站密钥Kgnb。The third opportunity is to update the access network key. The access network key may refer to the key used to encrypt user plane services, for example, the access network key may refer to the base station key Kgnb.
时机四,确定向其它接入网设备发送下一跳链计数器值、下一跳的信息或者接入网密钥中的至少一项,其中,下一跳链计数器值、下一跳的信息或者接入网密钥中的至少一项可以和安全参数一起发送至该其它接入网设备。At the fourth opportunity, it is determined to send at least one of the next hop chain counter value, next hop information or access network key to other access network devices, wherein the next hop chain counter value, next hop information or At least one of the access network keys may be sent to the other access network device together with the security parameters.
当满足上述一种或多种时机时,表示需要为终端设备配置用于加密和/或解密消息的参数和密钥,或者表示需要为终端设备更新用于加密和/或解密消息的参数和密钥,为此第一接入网设备可以获取安全参数,并发送至终端设备。When one or more of the above occasions are satisfied, it indicates that the terminal device needs to be configured with parameters and keys for encrypting and/or decrypting messages, or it indicates that the parameters and keys for encrypting and/or decrypting messages need to be updated for the terminal device. key, for which the first access network device can obtain the security parameters and send them to the terminal device.
结合上面的描述,上面描述的各种时机可以对应多种场景,例如包括但不限于以下场景:In combination with the above description, the various timings described above can correspond to various scenarios, for example, including but not limited to the following scenarios:
场景一,终端设备初始接入第一接入网设备,此时终端设备通过第一接入网设备向核心网发起初始注册请求,第一接入网设备可以在从核心网收到与所述终端设备进行初始化上下文建立请求后,需要与终端设备之间进行接入层安全模式命令流程或者无线资源控制连接重配置。Scenario 1: The terminal device initially accesses the first access network device. At this time, the terminal device initiates an initial registration request to the core network through the first access network device, and the first access network device can receive the information from the core network. After the terminal device makes the initial context establishment request, it needs to perform the access layer security mode command flow or the radio resource control connection reconfiguration with the terminal device.
场景二,处于空闲移动(idle mobility)状态的终端设备,接入第一接入网设备。同样的,在该场景中,第一接入网设备可以确定需要与终端设备之间进行接入层安全模式命令流程或者无线资源控制连接重配置。Scenario 2, a terminal device in an idle mobility state accesses the first access network device. Likewise, in this scenario, the first access network device may determine that the access layer security mode command process or the radio resource control connection reconfiguration needs to be performed with the terminal device.
场景三,第一接入网设备包括CU节点和DU节点时,当终端设备在第一接入网设备的DU节点发生变化而CU节点不发生变化时,第一接入网设备需要更新AS层安全上下文,如更新接入网密钥Kgnb。Scenario 3, when the first access network device includes a CU node and a DU node, when the DU node of the terminal device in the first access network device changes but the CU node does not change, the first access network device needs to update the AS layer Security context, such as update access network key Kgnb.
场景四,终端设备从演进分组系统(evolved packet system,EPS)切换到5G系统,该场景中,第一接入网设备(目标接入网设备)为5G系统中的接入网设备,第二接入网设备(源接入网设备)为EPS系统中的接入网设备。在该场景中,第一接入网设备需要向其它接入网设备(即第二接入网设备)发送下一跳链计数器值或者下一跳的信息或者接入网密钥。此时第一接入网设备生成安全参数,并将安全参数通过切换请求响应消息发送至目标AMF,目标AMF再将安全参数转发至源MME,源MME再将安全参数转发至第二接入网设备,从而由第二接入网设备将安全参数转发至终端设备。Scenario 4: The terminal device is switched from the evolved packet system (EPS) to the 5G system. In this scenario, the first access network device (target access network device) is the access network device in the 5G system, and the second The access network device (source access network device) is the access network device in the EPS system. In this scenario, the first access network device needs to send the next hop chain counter value or the next hop information or the access network key to other access network devices (ie, the second access network device). At this time, the first access network device generates security parameters, and sends the security parameters to the target AMF through the handover request response message. The target AMF then forwards the security parameters to the source MME, and the source MME forwards the security parameters to the second access network. device, so that the security parameter is forwarded to the terminal device by the second access network device.
场景五,终端设备在EPS中处于空闲态,然后切换到5G系统,该场景中,第一接入网设备(目标接入网设备)可以确定需要与终端设备之间进行接入层安全模式命令流程或者无线资源控制连接重配置。由第一接入网设备生成安全参数,并发送至终端设备。Scenario 5, the terminal device is in an idle state in the EPS, and then switches to the 5G system. In this scenario, the first access network device (target access network device) can determine that it needs to perform an access layer security mode command with the terminal device. Process or RRC connection reconfiguration. The security parameters are generated by the first access network device and sent to the terminal device.
场景六,在无线资源控制(radio resource control,RRC)重建立时,如果终端设备的空口发生变化,从而源接入网设备切换到目标接入网设备,在该场景中,可以由源接入网设备或者目标接入网设备生成安全参数,也就是说第一接入网设备可以为源接入网设备或者目标接入网设备。由于空口发生变化,第一接入网设备可以为源接入网设备时,第一接入网设备需要向其它接入网设备(源接入网设备)发送下一跳链计数器值或者下一跳的信息或者接入网密钥等,从而确定需要生成安全参数。第一接入网设备可以为目标接入网设备时,由于RRC重建立需要进行RRC重配置流程,从而确定需要生成安全参数。Scenario 6: When the radio resource control (RRC) is re-established, if the air interface of the terminal device changes, the source access network device switches to the target access network device. In this scenario, the source access network device can be The device or the target access network device generates the security parameter, that is to say, the first access network device may be the source access network device or the target access network device. Due to the change of the air interface, when the first access network device can be the source access network device, the first access network device needs to send the next hop chain counter value or the next hop chain counter value to other access network devices (source access network devices). hop information or access network key, etc., so as to determine the need to generate security parameters. When the first access network device may be the target access network device, since the RRC re-establishment needs to perform an RRC reconfiguration process, it is determined that the security parameter needs to be generated.
场景七,在双连接(dual-connectivity,DC)场景中,在该场景中,第一接入网设备可以为主基站或者辅基站。如果主基站需要添加或修改辅基站,那么辅基站与终端设备之间需要进行接入层安全模式命令流程或者无线资源控制连接重配置流程,那么主基站或者辅基站可以生成安全参数。如果辅基站生成安全参数,则将安全参数通过辅基站添加响应消息或辅基站修改响应消息等消息发送至主基站,最终由主基站发送给终端设备。Scenario 7, in a dual-connectivity (DC) scenario, in this scenario, the first access network device may be a primary base station or a secondary base station. If the primary base station needs to add or modify the secondary base station, the access layer security mode command process or the radio resource control connection reconfiguration process needs to be performed between the secondary base station and the terminal device, then the primary base station or the secondary base station can generate security parameters. If the secondary base station generates security parameters, the security parameters are sent to the primary base station through messages such as the secondary base station addition response message or the secondary base station modification response message, and finally the primary base station sends the security parameters to the terminal device.
场景八,Xn切换,该场景中,核心网设备(例如AMF)不发生变化:具体的,终端设备从第二接入网设备切换到第一接入网设备,此时第一接入网设备可以收到新的下一跳链计数器值、新的下一跳的信息以及者新的接入网密钥等信息,第一接入网设备可以生成安全参数,并通过切换请求(handover request)确认(acknowledge,ACK)消息向第二接入网设备发送安全参数,从而由第二接入网设备将安全参数转发至终端设备。Scenario 8, Xn handover, in this scenario, the core network device (for example, AMF) does not change: Specifically, the terminal device is switched from the second access network device to the first access network device. At this time, the first access network device Can receive the new next-hop chain counter value, new next-hop information and new access network key and other information, the first access network device can generate security parameters, and pass the handover request (handover request) An acknowledgement (acknowledge, ACK) message sends the security parameter to the second access network device, so that the second access network device forwards the security parameter to the terminal device.
场景九,N2切换,该场景中,核心网设备(例如AMF)发生变化:具体的,终端设备从第二接入网设备切换到第一接入网设备,此时第一接入网设备可以收到新的下一跳链计数器值、新的下一跳的信息以及者新的接入网密钥等信息,第一接入网设备可以生成安全参数,并通过切换请求(handover request)响应消息向目标核心网设备(例如目标AMF)发送安全参数,目标核心网设备再将安全参数转发至第二接入网设备,从而由第二接入网设备将安全参数转发至终端设备。Scenario 9, N2 handover, in this scenario, the core network equipment (such as AMF) changes: Specifically, the terminal equipment is switched from the second access network equipment to the first access network equipment, and the first access network equipment can After receiving the new next-hop chain counter value, new next-hop information, and new access network key and other information, the first access network device can generate security parameters and respond with a handover request The message sends security parameters to the target core network device (eg, target AMF), and the target core network device forwards the security parameters to the second access network device, so that the second access network device forwards the security parameters to the terminal device.
需要说明的是,场景一至场景九中,第一接入网设备可以直接发送安全参数,也可以发送安全参数的标识或者生成安全参数使用的参数以及算法。It should be noted that, in scenarios 1 to 9, the first access network device may directly send the security parameters, or may send the identifiers of the security parameters or the parameters and algorithms used to generate the security parameters.
另外,在生成安全参数之前,第一接入网设备还可以判断终端设备是否支持采用256位加密算法进行加密和/或解密,如果确定终端设备支持采用256位加密算法进行加密和/或解密,核心网设备可以生成安全参数。In addition, before generating the security parameter, the first access network device can also determine whether the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm. If it is determined that the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm, The core network equipment may generate security parameters.
或者,在生成安全参数之前,第一接入网设备还可以判断终端设备是否支持采用安全参数进行加密和/或解密,如果确定终端设备支持采用安全参数进行加密和/或解密,核心网设备可以生成安全参数。Alternatively, before generating the security parameters, the first access network device may also determine whether the terminal device supports encryption and/or decryption by using security parameters. If it is determined that the terminal device supports encryption and/or decryption by using security parameters, the core network device may Generate security parameters.
或者,在生成安全参数之前,第一接入网设备还可以判断终端设备是否支持采用扩展IV进行加密和/或解密,如果确定终端设备支持采用扩展IV进行加密和/或解密,核心网设备可以生成安全参数。其中,采用扩展IV进行加密和/或解密,可以是指采用IV以及IV之外的参数(例如安全参数)进行加密和/或解密。Alternatively, before generating the security parameter, the first access network device may also determine whether the terminal device supports encryption and/or decryption by using the extended IV. If it is determined that the terminal device supports encryption and/or decryption by using the extended IV, the core network device may Generate security parameters. Wherein, using the extended IV to perform encryption and/or decryption may refer to using the IV and parameters other than the IV (for example, security parameters) to perform encryption and/or decryption.
需要说明的是,在对接收的消息进行解密或对待发送的消息进行加密时,当前标准中终端设备、接入网设备以及核心网设备均支持的是128位加密算法,而128位加密算法在未来会不再安全,所以本申请实施例中,当使用安全参数时,需要终端设备、接入网设备以及核心网设备均支持256位加密算法。因此第一接入网设备可以根据终端设备是否支持256位加密算法,来确定终端设备是否可以采用安全参数进行加密和/或解密消息。It should be noted that when decrypting the received message or encrypting the message to be sent, the terminal equipment, access network equipment and core network equipment in the current standard all support the 128-bit encryption algorithm, and the 128-bit encryption algorithm is in the In the future, it will no longer be safe. Therefore, in the embodiment of the present application, when the security parameter is used, it is required that the terminal device, the access network device, and the core network device all support the 256-bit encryption algorithm. Therefore, the first access network device can determine whether the terminal device can use the security parameter to encrypt and/or decrypt the message according to whether the terminal device supports the 256-bit encryption algorithm.
第二种实现方式中,第一接入网设备从核心网设备获取安全参数。In the second implementation manner, the first access network device acquires the security parameters from the core network device.
在该实现方式中,第一接入网设备在什么时机下获取安全参数,即核心网设备生成安全参数的时机,可能存在多种情况,例如可以包括但不限于以下任一时机:核心网设备确定向接入网设备发送新的下一跳链计数器值或者新的下一跳的信息,其中,新的下一跳链计数器值和下一跳的信息中的至少一个,可以和安全参数一起发送至该接入网设备;核心网设备确定发送新的接入网密钥,其中,新的接入网密钥可以和安全参数一起发送至该接入网设备;核心网设备确定激活/更改用户面安全策略。In this implementation manner, when the first access network device acquires the security parameters, that is, the timing when the core network device generates the security parameters, there may be various situations, for example, it may include but not limited to any of the following timings: the core network device Determine to send the new next hop chain counter value or new next hop information to the access network device, wherein at least one of the new next hop chain counter value and the next hop information can be together with the security parameter sent to the access network device; the core network device determines to send a new access network key, wherein the new access network key can be sent to the access network device together with the security parameters; the core network device determines to activate/modify User plane security policy.
同样的,上述各种时机可以对应用前面描述的场景一至场景二,以及场景四至场景九。下面分别描述在各种场景中,第一接入网设备具体如何从核心网设备获取安全参数。Likewise, the above-mentioned various occasions can be applied to the scenarios 1 to 2 and scenarios 4 to 9 described above. The following describes how, in various scenarios, the first access network device specifically acquires security parameters from the core network device.
场景一,终端设备初始接入第一接入网设备的场景中,核心网设备可以通过初始上下文建立(initial context setup)消息将安全参数发送至第一接入网设备。Scenario 1, in the scenario where the terminal device initially accesses the first access network device, the core network device may send the security parameters to the first access network device through an initial context setup message.
场景二,处于空闲移动(idle mobility)状态的终端设备,接入第一接入网设备的场景 中,核心网设备可以通过UE上下文修改请求(UE context modification request)消息将安全参数发送至第一接入网设备。Scenario 2: In the scenario where the terminal device in the idle mobility state accesses the first access network device, the core network device can send the security parameters to the first access network device through the UE context modification request message. access network equipment.
场景四,终端设备从EPS切换到5G系统,此时目标基站可以从AMF的切换请求中获取安全参数,然后将安全参数携带在发送给目标AMF的切换请求响应中,该切换请求响应经由目标AMF转给源MME,然后由源MME转给源基站,最终由源基站发送给UE。第一接入网设备可以为源基站,核心网设备可以为AMF。Scenario 4: The terminal device switches from EPS to 5G system. At this time, the target base station can obtain the security parameters from the handover request of the AMF, and then carry the security parameters in the handover request response sent to the target AMF. The handover request response is sent to the target AMF via the target AMF. It is forwarded to the source MME, and then forwarded by the source MME to the source base station, and finally sent to the UE by the source base station. The first access network device may be the source base station, and the core network device may be the AMF.
场景五,终端设备在EPS中处于空闲态,然后切换到5G系统,核心网设备(目标核心网设备)可以通过初始上下文建立消息或者UE上下文修改请求消息将安全参数发送至第一接入网设备,再由第一接入网设备(目标接入网设备)发送至终端设备。Scenario 5, the terminal device is in the idle state in the EPS, and then switches to the 5G system. The core network device (target core network device) can send the security parameters to the first access network device through the initial context establishment message or the UE context modification request message , and then sent by the first access network device (target access network device) to the terminal device.
场景六,RRC重建立场景中,如果终端设备切换了接入网设备,核心网设备可以生成安全参数发送至源接入网设备,目标接入网设备可以通过源接入网设备发送的获取UE上下文响应(retrieve UE context response)消息中获取安全参数。Scenario 6: In the RRC re-establishment scenario, if the terminal device switches access network devices, the core network device can generate security parameters and send them to the source access network device, and the target access network device can obtain the UE through the data sent by the source access network device. Security parameters are obtained from the context response (retrieve UE context response) message.
场景八,Xn切换场景中,第一接入网设备(目标接入网设备)可以通过核心网设备的路径切换请求确认(path switch request ACK)消息获取安全参数。Scenario 8, in the Xn handover scenario, the first access network device (target access network device) can obtain the security parameters through the path switch request ACK (path switch request ACK) message of the core network device.
场景九,N2切换场景中,第一接入网设备(目标接入网设备)可以通过核心网设备(目标核心网设备)的切换请求消息获取安全参数。第一接入网设备再将安全参数通过切换请求响应消息发送至源核心网设备,再由源核心网设备转发至第二接入网设备(源接入网设备),最终由源接入网设备将安全参数发送至终端设备。In the ninth scenario, in the N2 handover scenario, the first access network device (target access network device) may obtain security parameters through a handover request message of the core network device (target core network device). The first access network device sends the security parameter to the source core network device through the handover request response message, and then forwards it to the second access network device (source access network device) by the source core network device, and finally the source access network device. The device sends security parameters to the end device.
另外,在生成安全参数之前,核心网设备还可以判断终端设备是否支持采用256位加密算法进行加密和/或解密,如果确定终端设备支持采用256位加密算法进行加密和/或解密,核心网设备可以生成安全参数。In addition, before generating the security parameters, the core network device can also determine whether the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm. If it is determined that the terminal device supports encryption and/or decryption using a 256-bit encryption algorithm, the core network device Security parameters can be generated.
或者,在生成安全参数之前,核心网设备还可以判断终端设备是否支持采用安全参数进行加密和/或解密,如果确定终端设备支持采用安全参数进行加密和/或解密,核心网设备可以生成安全参数。Alternatively, before generating the security parameters, the core network device may also determine whether the terminal device supports encryption and/or decryption using the security parameters. If it is determined that the terminal device supports encryption and/or decryption using the security parameters, the core network device may generate the security parameters. .
或者,在生成安全参数之前,核心网设备还可以判断终端设备是否支持采用扩展IV进行加密和/或解密,如果确定终端设备支持采用扩展IV进行加密和/或解密,核心网设备可以生成安全参数。其中,采用扩展IV进行加密和/或解密,可以是指采用IV以及IV之外的参数(例如安全参数)进行加密和/或解密。Alternatively, before generating the security parameters, the core network device can also determine whether the terminal device supports encryption and/or decryption using the extended IV, and if it is determined that the terminal device supports encryption and/or decryption using the extended IV, the core network device can generate the security parameters. . Wherein, using the extended IV to perform encryption and/or decryption may refer to using the IV and parameters other than the IV (for example, security parameters) to perform encryption and/or decryption.
本申请实施例中,第一接入网设备具体如何发送安全参数,可以存在多种实现方式。第一接入网设备可以通过配置消息向终端设备发送安全参数。举例来说,该配置消息可以为接入层安全模式命令(security mode command,SMC)流程中的接入层安全模式命令消息,AS安全模式命令消息可以用于指示进行AS安全模式命令,该消息中还可以指示加密所使用的256位加密算法。可以将安全参数、计数值、承载标识、方向信息以及消息的长度等作为输入参数,采用256位加密算法生成用于加密消息或解密消息的密钥流块。256位加密算法包括但不限于SNOW-V 256算法、AES 256算法、祖冲之256算法等。其中,在AS SMC流程中,第一接入网设备可以指示完整性保护和机密性保护算法等信息,从而与终端设备建立AS安全。In the embodiment of the present application, there may be various implementation manners for how the first access network device specifically sends the security parameter. The first access network device may send the security parameter to the terminal device through a configuration message. For example, the configuration message may be an access layer security mode command message in an access layer security mode command (security mode command, SMC) process, and the AS security mode command message may be used to instruct to perform an AS security mode command, the message can also indicate the 256-bit encryption algorithm used for encryption. Security parameters, count values, bearer identifiers, direction information, and message length can be used as input parameters, and a 256-bit encryption algorithm is used to generate a key stream block for encrypting or decrypting messages. 256-bit encryption algorithms include but are not limited to SNOW-V 256 algorithm, AES 256 algorithm, Zu Chongzhi 256 algorithm, etc. Among them, in the AS SMC process, the first access network device can indicate information such as integrity protection and confidentiality protection algorithms, so as to establish AS security with the terminal device.
再举例来说,该配置消息还可以为无线资源控制连接重配置流程中的无线资源控制连接重配置消息,RRC连接重配置消息可以用于指示进行RRC连接重配置;其中,在无线 资源控制连接重配置流程中,第一接入网设备可以指示完整性保护和机密性保护算法等信息,从而与终端设备建立AS安全。RRC连接重配置消息中还可以指示加密所使用的256位加密算法。For another example, the configuration message may also be a RRC connection reconfiguration message in the RRC connection reconfiguration process, and the RRC connection reconfiguration message may be used to instruct to perform RRC connection reconfiguration; In the reconfiguration process, the first access network device may indicate information such as integrity protection and confidentiality protection algorithms, so as to establish AS security with the terminal device. The 256-bit encryption algorithm used for encryption may also be indicated in the RRC connection reconfiguration message.
接入层安全模式命令消息以及无线资源控制连接重配置消息,可以认为是激活用户面安全的消息,通过这些消息发送安全参数,可以使得需要加密和/或解密的消息能够及时进行加密和/或解密。如果在接入层安全模式命令消息以及无线资源控制连接重配置消息之前发安全参数,则之前的消息没有被保护,消息中的安全参数会被篡改。The access layer security mode command message and the radio resource control connection reconfiguration message can be considered as messages for activating user plane security. Sending security parameters through these messages can enable the messages that need to be encrypted and/or decrypted to be encrypted and/or decrypted in time. decrypt. If the security parameter is sent before the access layer security mode command message and the RRC connection reconfiguration message, the previous message is not protected, and the security parameter in the message will be tampered with.
需要说明的是,以上只是示例,第一接入网设备也可以通过NAS SMC流程向终端设备发送用于加密和/或解密AS层消息的安全参数。It should be noted that the above is just an example, and the first access network device may also send security parameters for encrypting and/or decrypting AS layer messages to the terminal device through the NAS SMC process.
另外,第一接入网设备除了发送安全参数之外,还可以发送密钥、下一跳链计数器值和下一跳的信息等参数给终端设备,在此不再逐一举例说明。In addition, in addition to sending the security parameters, the first access network device may also send parameters such as a key, a next-hop chain counter value, and next-hop information to the terminal device, which will not be described one by one here.
S302:终端设备获取安全参数。S302: The terminal device obtains security parameters.
如前所述,终端设备可以从第一接入网设备获取安全参数。例如通过AS SMC流程中的接入层安全模式命令消息获取安全参数,或者通过无线资源控制连接重配置流程中的无线资源控制连接重配置消息获取安全参数。As mentioned above, the terminal device may acquire the security parameters from the first access network device. For example, the security parameters are obtained through the access layer security mode command message in the AS SMC process, or the security parameters are obtained through the RRC connection reconfiguration message in the RRC connection reconfiguration process.
S303:终端设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S303: The terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
S304:第一接入网设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S304: The first access network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second The bearer identifier, the second direction information and the key decrypt the received message.
需要说明的是,S303和S304的执行顺序并不限定,可以先后执行,也可以同时执行。It should be noted that the execution order of S303 and S304 is not limited, and may be executed sequentially or simultaneously.
需要说明的是,安全参数用于加密待发送的消息,可以是指将安全参数等作为输入参数参对待发送的消息进行加密操作。安全参数用于解密待发送的消息,可以是指将安全参数等作为输入参数参对接收的消息进行解密操作。It should be noted that the security parameter is used to encrypt the message to be sent, which may refer to the encryption operation of the message to be sent by using the security parameter and the like as an input parameter. The security parameter is used to decrypt the message to be sent, which may refer to the decryption operation of the received message by using the security parameter and the like as an input parameter parameter.
举例来说,如图4所示,为本申请实施例提供的一种加解密消息示意图。图4中,发送端(第一接入网设备或者终端设备)使用密钥KEY对明文块(其中包括待传输的数据)进行加密时,使用安全参数、第一计数值、第一承载标识、第一方向信息以及长度等作为输入参数,采用加密算法,生成密钥流块。其中长度为待发送的消息的长度。发送端将密钥流块与要发送给接收端(终端设备或者第一接入网设备)的明文块进行异或计算,获得密文块,再将密文块发送至接收端。For example, as shown in FIG. 4 , a schematic diagram of an encryption/decryption message provided by an embodiment of the present application is shown. In FIG. 4 , when the sender (the first access network device or the terminal device) encrypts the plaintext block (including the data to be transmitted) using the key KEY, it uses the security parameters, the first count value, the first bearer identifier, the The first direction information and length are used as input parameters, and an encryption algorithm is used to generate a key stream block. where length is the length of the message to be sent. The sender performs XOR calculation between the key stream block and the plaintext block to be sent to the receiver (terminal device or the first access network device) to obtain the ciphertext block, and then sends the ciphertext block to the receiver.
其中,加密算法可以为256位加密算法,包括但不限于SNOW-V 256算法、AES256算法、祖冲之256算法等。The encryption algorithm may be a 256-bit encryption algorithm, including but not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi 256 algorithm, etc.
相应的,接收端使用参数安全参数、第一计数值、第一承载标识、第一方向信息以及长度等作为输入参数,采用同样的加密算法,生成密钥流块。接收端将密钥流块与来自发送端的密文块进行异或计算,从而恢复出发送端所发送的明文块。Correspondingly, the receiving end uses the parameter security parameter, the first count value, the first bearer identifier, the first direction information, and the length as input parameters, and uses the same encryption algorithm to generate the key stream block. The receiver performs XOR calculation between the key stream block and the ciphertext block from the sender, thereby recovering the plaintext block sent by the sender.
需要说明的是,图4中,发送端发送的消息被接收端接收,因此对于该消息,均使用第一计数值、第一承载标识、第一方向信息作为输入参数。如果图4中的发送端发送的消息和接收端接收的消息不是同一个消息,那么计数值、承载标识以及方向信息可能不同。It should be noted that, in FIG. 4 , the message sent by the sender is received by the receiver, so for this message, the first count value, the first bearer identifier, and the first direction information are all used as input parameters. If the message sent by the sender and the message received by the receiver in FIG. 4 are not the same message, the count value, bearer identifier and direction information may be different.
其中,如果安全参数用来加密和/或解密AS层消息,密钥KEY是AS层的加密密钥, COUNT是PDCP计数器中的值;BEARER为承载标识;DIRECTION表示方向信息,标识数据上下行方向。Among them, if the security parameter is used to encrypt and/or decrypt the AS layer message, the key KEY is the encryption key of the AS layer, COUNT is the value in the PDCP counter; BEARER is the bearer identifier; DIRECTION represents the direction information, which identifies the upstream and downstream directions of the data .
需要说明的是,本申请实施例中,一种可能的实现方式中,安全参数既可以用来对待发送的消息进行加密,也可以用来对接收的消息进行解密。此时发送端加密待发送的消息时使用的安全参数,和接收端加密待发送的消息时使用的安全参数相同。It should be noted that, in the embodiment of the present application, in a possible implementation manner, the security parameter may be used to encrypt the message to be sent, and may also be used to decrypt the received message. In this case, the security parameters used by the sender when encrypting the message to be sent are the same as those used by the receiver when encrypting the message to be sent.
另一种可能的实现方式中,安全参数包括第一安全参数和第二安全参数;第一安全参数用于对待发送的消息进行加密,第二安全参数用于对接收的消息进行解密。此时发送端加密待发送的消息时使用的安全参数,和接收端加密待发送的消息时使用的安全参数不同,例如发送端加密待发送的消息时使用第一安全参数,接收端加密待发送的消息时使用第二安全参数。In another possible implementation manner, the security parameters include a first security parameter and a second security parameter; the first security parameter is used to encrypt the message to be sent, and the second security parameter is used to decrypt the received message. At this time, the security parameter used by the sender to encrypt the message to be sent is different from the security parameter used by the receiver to encrypt the message to be sent. For example, the sender uses the first security parameter when encrypting the message to be sent, and the receiver encrypts the message to be sent. message using the second security parameter.
通过上面的方法,在AS层通过使用安全参数对待发送的消息进行加密,和/或对接收的消息进行解密,从而可以提高AS层消息的安全性,降低被破解的风险。Through the above method, the message to be sent is encrypted by using the security parameter at the AS layer, and/or the received message is decrypted, so that the security of the AS layer message can be improved and the risk of being cracked can be reduced.
实施例二:Embodiment 2:
实施例二中,以网络设备为接入网设备为例,终端设备和接入网设备之间分别按照相同的方法生成安全参数,此时接入网设备不需要将安全参数发送至终端设备,实施例二中,以安全参数可以用于加密和/或解密AS层消息为例进行描述。当然,如果AS层消息和NAS层消息可以采用相同的安全参数加密和/或解密,那么该安全参数也可以用于加密和/或解密NAS层消息。下面将详细描述。In the second embodiment, taking the network device as an access network device as an example, the terminal device and the access network device respectively generate security parameters according to the same method, in this case, the access network device does not need to send the security parameters to the terminal device, In the second embodiment, description is given by taking the example that the security parameter can be used to encrypt and/or decrypt the AS layer message. Of course, if the AS layer message and the NAS layer message can be encrypted and/or decrypted using the same security parameter, then the security parameter can also be used to encrypt and/or decrypt the NAS layer message. It will be described in detail below.
如图5所示,为本申请实施例提供的一种通信方法流程示意图。图5中,以终端设备执行的操作也可以由终端设备内部的芯片或模块执行,接入网设备执行的操作也可以由接入网设备内部的芯片或模块执行。参见图5,该方法包括:As shown in FIG. 5 , a schematic flowchart of a communication method provided by an embodiment of the present application is shown. In FIG. 5 , operations performed by the terminal device may also be performed by a chip or module inside the terminal device, and operations performed by the access network device may also be performed by a chip or module inside the access network device. Referring to Figure 5, the method includes:
可选地,S501:接入网设备向终端设备发送AS安全模式命令消息或者RRC连接重配置消息。Optionally, S501: The access network device sends an AS security mode command message or an RRC connection reconfiguration message to the terminal device.
AS安全模式命令消息可以用于指示进行AS安全模式命令,RRC连接重配置消息可以用于指示进行RRC连接重配置,这两个消息中还可以指示加密所使用的256位加密算法,其中该256位加密算法包括但不限于SNOW-V 256算法、AES256算法、祖冲之(ZUC)256算法等。The AS security mode command message can be used to instruct the AS security mode command, and the RRC connection reconfiguration message can be used to instruct the RRC connection reconfiguration. These two messages can also indicate the 256-bit encryption algorithm used for encryption, where the 256 Bit encryption algorithms include but are not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi (ZUC) 256 algorithm, etc.
S502:接入网设备获取安全参数。S502: The access network device acquires security parameters.
需要说明的是,如果AS层消息和NAS层消息可以采用相同的安全参数加密和/或解密,那么接入网设备还可以将该安全参数发送至核心网设备。It should be noted that, if the AS layer message and the NAS layer message can be encrypted and/or decrypted using the same security parameter, the access network device can also send the security parameter to the core network device.
S503:终端设备获取安全参数。S503: The terminal device obtains security parameters.
需要说明的是,S502和S503的执行顺序并不限定,可以先后执行,也可以同时执行。It should be noted that the execution order of S502 and S503 is not limited, and may be executed sequentially or simultaneously.
S502和S503中,接入网设备可以通过核心网设备获取安全参数,也可以自主生成安全参数。终端设备可以自主生成安全参数。In S502 and S503, the access network device may acquire the security parameters through the core network device, or may generate the security parameters independently. End devices can generate security parameters autonomously.
接入网设备获取来自核心网设备的安全参数时,核心网设备可以根据共享参数确定安全参数,并将安全参数发送至接入网设备。同样的,接入网设备或者终端设备自主生成安全参数时,接入网设备或者终端设备可以根据共享参数确定安全参数,其中,该共享参数为终端设备与核心网设备,或者终端设备与接入网设备均已知的参数。When the access network device obtains the security parameter from the core network device, the core network device may determine the security parameter according to the shared parameter, and send the security parameter to the access network device. Similarly, when the access network device or the terminal device independently generates the security parameter, the access network device or the terminal device can determine the security parameter according to the shared parameter, where the shared parameter is the terminal device and the core network device, or the terminal device and the access network device. parameters known to all network devices.
举例来说,接入网设备和终端设备分别采用相同的共享参数生成相同的安全参数时, 共享参数可以包括以下至少一项:For example, when the access network device and the terminal device respectively use the same shared parameters to generate the same security parameters, the shared parameters may include at least one of the following:
物理小区标识,例如终端设备所处的物理小区的标识;同步信号块索引,例如接入网设备向终端设备发送的同步信号块的索引;终端设备的S-TMSI;资源标识,例如终端设备接收或发送数据的资源标识;接入网密钥,例如接入网密钥可以是指当前的基站密钥Kgnb;接入网密钥的推演秘钥,例如可以是指当前的基站密钥Kgnb的推演秘钥;下一跳链计数器值,例如可以是指当前使用的下一跳链计数器值;下一跳的信息,例如可以是指当前使用的下一跳的信息。Physical cell identification, such as the identification of the physical cell where the terminal equipment is located; synchronization signal block index, such as the index of the synchronization signal block sent by the access network equipment to the terminal equipment; S-TMSI of the terminal equipment; resource identification, such as the terminal equipment receives or the resource identifier for sending data; the access network key, for example, the access network key may refer to the current base station key Kgnb; the derivation secret key of the access network key, for example, may refer to the current base station key Kgnb Derive the secret key; the next hop chain counter value, for example, can refer to the currently used next hop chain counter value; the next hop information, for example, can refer to the currently used next hop information.
举例来说,核心网设备和终端设备分别采用相同的共享参数生成相同的安全参数时,共享参数可以包括以下至少一项:For example, when the core network device and the terminal device respectively use the same shared parameters to generate the same security parameters, the shared parameters may include at least one of the following:
物理小区标识,例如终端设备所处的物理小区的标识;同步信号块索引,例如接入网设备向终端设备发送的同步信号块的索引;上行(uplink,UL)NAS COUNT;下行(downlink,DL)NAS COUNT;终端设备的全球唯一临时UE标识(globally unique temporary UE identity,GUTI);资源标识,例如终端设备接收或发送数据的资源标识;核心网密钥,例如核心网密钥可以是指当前的AMF密钥Kamf,核心网密钥可以用于生成接入网密钥,接入网密钥可以用于生成加密与完整性保护密钥,该加密与完整性保护密钥也就是对待发送的消息加密和/或对接收的消息解密的密钥;核心网密钥的推演秘钥,例如可以是指当前的AMF密钥Kamf的推演秘钥;下一跳链计数器值,例如可以是指当前使用的下一跳链计数器值;下一跳的信息,例如可以是指当前使用的下一跳的信息。Physical cell identification, such as the identification of the physical cell where the terminal equipment is located; synchronization signal block index, such as the index of the synchronization signal block sent by the access network equipment to the terminal equipment; uplink (uplink, UL) NAS COUNT; downlink (downlink, DL) ) NAS COUNT; globally unique temporary UE identity (GUTI) of the terminal device; resource identifier, such as the resource identifier of the terminal device to receive or send data; core network key, such as the core network key can refer to the current The AMF key Kamf, the core network key can be used to generate the access network key, the access network key can be used to generate the encryption and integrity protection key, the encryption and integrity protection key is to be sent The key for message encryption and/or decryption of the received message; the derivation key of the core network key, for example, can refer to the derivation key of the current AMF key Kamf; the next hop chain counter value, for example, can refer to the current The counter value of the next hop chain used; the information of the next hop, for example, may refer to the information of the currently used next hop.
本申请实施例中,当前使用的下一跳链计数器值,当前使用的下一跳的信息,分别可以是指生成当前的接入网密钥的下一跳链计数器值和下一跳的信息。In this embodiment of the present application, the currently used next hop chain counter value and the currently used next hop information may respectively refer to the next hop chain counter value and the next hop information for generating the current access network key. .
另外,生成安全参数时使用的算法,本申请实施例也不限定,例如可以为HMAC-SHA256算法。举例来说,比如共享参数是当前的基站密钥Kgnb和S-TMSI,则可以使用HMAC-SHA256算法,将基站密钥Kgnb和S-TMSI作为输入参数进行运算得到安全参数,具体计算过程不再赘述。In addition, the algorithm used when generating the security parameter is not limited in the embodiment of the present application, and may be, for example, the HMAC-SHA256 algorithm. For example, if the shared parameters are the current base station key Kgnb and S-TMSI, the HMAC-SHA256 algorithm can be used, and the base station key Kgnb and S-TMSI can be used as input parameters to obtain security parameters. The specific calculation process is no longer Repeat.
终端设备生成安全参数的时机,可以包括但不限于以下时机:The timing for the terminal device to generate security parameters may include but is not limited to the following timings:
接收到接入层安全模式命令消息或者RRC连接重配置消息;终端设备在收到上述消息后,生成安全参数,这样可以保证在上述消息之后的消息都能被安全参数加密和/或解密,提高通信安全性能。Receive the access layer security mode command message or the RRC connection reconfiguration message; after receiving the above message, the terminal device generates security parameters, which can ensure that the messages after the above message can be encrypted and/or decrypted by the security parameters, improving the Communication security performance.
生成接入层安全上下文,接入层安全上下文包括下一跳链计数器值、下一跳的信息以及接入网密钥中的至少一项。其中,终端设备可以是在接收到接入层安全模式命令消息或者RRC连接重配置消息时,确定需要生成接入层安全上下文。An access stratum security context is generated, where the access stratum security context includes at least one of a next hop chain counter value, next hop information, and an access network key. The terminal device may determine that the access stratum security context needs to be generated when receiving the access stratum security mode command message or the RRC connection reconfiguration message.
需要说明的是,接入网设备以及核心网设备生成安全参数的时机,可以参考实施例一中的描述,在此不再赘述。另外,终端设备、接入网设备以及核心网设备生成安全参数的时机对应的应用场景,可以为实施例一中的场景一至场景九,在此不再赘述。It should be noted that, for the timing of generating the security parameter by the access network device and the core network device, reference may be made to the description in Embodiment 1, and details are not repeated here. In addition, the application scenarios corresponding to the timing of generating the security parameters by the terminal device, the access network device, and the core network device may be scenarios 1 to 9 in the first embodiment, which will not be repeated here.
需要说明的是,核心网设备或者接入网设备在生成安全参数之前,还可以判断终端设备是否支持256位加密算法采用安全参数进行加密和/或解密,或者是否支持采用安全参数进行加密和/或解密,或者是否支持采用扩展IV进行加密和/或解密,如果确定终端设备支持256位加密算法或者支持采用安全参数或者是否支持采用扩展IV进行加密和/或解密,则可以生成安全参数。It should be noted that, before the core network device or the access network device generates the security parameters, it can also determine whether the terminal device supports the 256-bit encryption algorithm for encryption and/or decryption by using security parameters, or whether it supports encryption and/or decryption by using security parameters. or decryption, or whether to support encryption and/or decryption with extended IV, if it is determined that the terminal device supports 256-bit encryption algorithm or supports the use of security parameters or whether it supports encryption and/or decryption with extended IV, security parameters can be generated.
终端设备在生成安全参数之前,如果确定AS安全模式命令消息或者RRC连接重配置 消息指示了256位加密算法或者确定接入网设备支持采用安全参数进行加密和/或解密,则可以生成安全参数。Before generating the security parameter, the terminal device can generate the security parameter if it is determined that the AS security mode command message or the RRC connection reconfiguration message indicates a 256-bit encryption algorithm or that the access network device supports encryption and/or decryption using the security parameter.
可选地,S504:终端设备向接入网设备发送AS安全模式命令完成消息或者RRC连接重配置完成消息。Optionally, S504: The terminal device sends an AS security mode command completion message or an RRC connection reconfiguration completion message to the access network device.
S505:终端设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S505: The terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
S506:接入网设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S506: The access network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, and the second bearer identifier , the second direction information and the key to decrypt the received message.
需要说明的是,S505和S506的执行顺序并不限定,可以先后执行,也可以同时执行。It should be noted that the execution order of S505 and S506 is not limited, and may be executed sequentially or simultaneously.
S505和S506的具体实现过程,可以参考前面的描述,在此不再赘述。For the specific implementation process of S505 and S506, reference may be made to the foregoing description, which will not be repeated here.
上面的方法中,接入网设备和终端设备可以分别根据相同的参数和方法生成相同的安全参数,因此接入网设备不需要向终端设备发送安全参数,从而避免安全参数暴露,提高系统安全性。In the above method, the access network device and the terminal device can respectively generate the same security parameters according to the same parameters and methods, so the access network device does not need to send security parameters to the terminal device, thereby avoiding security parameter exposure and improving system security. .
实施例三:Embodiment three:
实施例三中,以网络设备为核心网设备为例,终端设备可以从核心网设备获取安全参数,该安全参数可以用于加密和/或解密NAS层消息。当然,如果AS层消息和NAS层消息可以采用相同的安全参数加密和/或解密,那么该安全参数也可以用于加密和/或解密AS层消息。In the third embodiment, taking the network device as the core network device as an example, the terminal device may obtain security parameters from the core network device, and the security parameters may be used to encrypt and/or decrypt NAS layer messages. Of course, if the AS layer message and the NAS layer message can be encrypted and/or decrypted using the same security parameter, then the security parameter can also be used to encrypt and/or decrypt the AS layer message.
如图6所示,为本申请实施例提供的一种通信方法流程示意图。图6中,以终端设备执行的操作也可以由终端设备内部的芯片或模块执行,核心网设备执行的操作也可以由核心网设备内部的芯片或模块执行。参见图6,该方法包括:As shown in FIG. 6 , a schematic flowchart of a communication method provided by an embodiment of the present application is shown. In FIG. 6 , operations performed by the terminal device may also be performed by a chip or module inside the terminal device, and operations performed by the core network device may also be performed by a chip or module inside the core network device. Referring to Figure 6, the method includes:
S601:核心网设备获取安全参数,并发送安全参数。S601: The core network device obtains security parameters and sends the security parameters.
核心网设备可以为AMF或者MME等设备,本申请对此并不限定。The core network equipment may be equipment such as AMF or MME, which is not limited in this application.
一种可能的实现方式中,核心网设备生成安全参数的时机可以包括但不限于以下时机:In a possible implementation manner, the timing for the core network device to generate the security parameter may include but is not limited to the following timings:
确定进行NAS SMC流程;Determine to carry out the NAS SMC process;
确定需要更新密钥,在NAS中,该密钥是指NAS密钥;Determine that the key needs to be updated. In NAS, the key refers to the NAS key;
确定向接入网设备发送新的下一跳链计数器值或者下一跳的信息;Determine to send a new next-hop chain counter value or next-hop information to the access network device;
确定生成核心网密钥,核心网密钥可以是指Kamf等;Determine to generate the core network key, the core network key may refer to Kamf, etc.;
确定进行核心网密钥水平推演。Determine the core network key level derivation.
当满足上述生成安全参数的时机时,可以表示需要为终端设备配置用于加密和/或解密消息的参数和密钥,或者表示需要为终端设备更新用于加密和/或解密消息的参数和密钥。When the above-mentioned timing for generating the security parameters is satisfied, it may indicate that the terminal device needs to be configured with parameters and keys for encrypting and/or decrypting messages, or it may indicate that the terminal device needs to update the parameters and keys for encrypting and/or decrypting messages. key.
核心网设备具体如何生成安全参数,本申请实施例并不限定,可以参考实施例一或实施例二中的描述,在此不再赘述。How the core network device specifically generates the security parameter is not limited in this embodiment of the present application, and reference may be made to the description in Embodiment 1 or Embodiment 2, which will not be repeated here.
需要说明的是,核心网设备在生成安全参数之前,还可以判断终端设备是否支持256位加密算法采用安全参数进行加密和/或解密,或者是否支持采用安全参数进行加密和/或解密,或者是否支持采用扩展IV进行加密和/或解密,如果确定终端设备支持256位加密算法或者支持采用安全参数或者是否支持采用扩展IV进行加密和/或解密,则可以生成安全参数。It should be noted that, before generating the security parameters, the core network device can also determine whether the terminal device supports the 256-bit encryption algorithm for encryption and/or decryption using security parameters, or whether it supports encryption and/or decryption using security parameters, or whether Encryption and/or decryption using extended IV is supported. If it is determined that the terminal device supports a 256-bit encryption algorithm or supports using security parameters or whether it supports encryption and/or decrypting using extended IV, security parameters can be generated.
核心网设备具体如何发送安全参数,可以存在多种实现方式。举例来说,核心网设备可以NAS SMC流程中的NAS安全模式命令消息向终端设备发送安全参数。其中,在NAS SMC流程中,核心网设备还可以指示完整性保护和机密性保护算法等信息,从而与终端设备建立NAS安全。How the core network device sends the security parameters can be implemented in various ways. For example, the core network device may send the security parameters to the terminal device in the NAS security mode command message in the NAS SMC process. Among them, in the NAS SMC process, the core network device can also indicate information such as integrity protection and confidentiality protection algorithms, so as to establish NAS security with the terminal device.
另外,核心网设备可以直接发送安全参数,也可以发送安全参数的标识或者生成安全参数使用的参数以及算法。In addition, the core network device may directly send the security parameters, and may also send the identifiers of the security parameters or the parameters and algorithms used to generate the security parameters.
需要说明的是,以上只是示例,核心网设备也可以通过其它流程向终端设备发送用于加密和/或解密NAS层消息的安全参数。It should be noted that the above is just an example, and the core network device may also send the security parameters for encrypting and/or decrypting the NAS layer message to the terminal device through other processes.
另外,核心网设备除了发送安全参数之外,还可以发送密钥、下一跳链计数器值和下一跳的信息等参数给终端设备,在此不再逐一举例说明。In addition, in addition to sending security parameters, the core network device may also send parameters such as a key, a next-hop chain counter value, and next-hop information to the terminal device, which will not be described one by one here.
S602:终端设备获取安全参数。S602: The terminal device obtains security parameters.
如前所述,终端设备可以从核心网设备获取安全参数,例如通过NAS SMC流程中的NAS安全模式命令消息获取安全参数。可选地,终端设备向核心网设备发送NAS安全模式命令完成消息。As mentioned above, the terminal device can obtain the security parameters from the core network device, for example, obtain the security parameters through the NAS security mode command message in the NAS SMC process. Optionally, the terminal device sends a NAS security mode command completion message to the core network device.
S603:终端设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S603: The terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
S604:核心网设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S604: The core network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer identifier, The second direction information and the key decrypt the received message.
举例来说,对于同一条消息,发送端(核心网设备或者终端设备)使用密钥KEY对明文块(其中包括待传输的消息)进行加密时,使用安全参数,以及该消息对应的计数值、承载标识、方向信息以及长度等作为输入参数,采用加密算法,生成密钥流块。发送端将密钥流块与要发送给接收端(终端设备或者核心网设备)的明文块进行异或计算,获得密文块,再将密文块发送至接收端。For example, for the same message, when the sender (core network device or terminal device) uses the key KEY to encrypt the plaintext block (including the message to be transmitted), it uses the security parameters, and the count value corresponding to the message, The bearer identification, direction information, and length are used as input parameters, and an encryption algorithm is used to generate a key stream block. The sender performs XOR calculation between the key stream block and the plaintext block to be sent to the receiver (terminal device or core network device) to obtain the ciphertext block, and then sends the ciphertext block to the receiver.
相应的,接收端使用参数安全参数,以及该消息对应的计数值、承载标识、方向信息以及长度等作为输入参数,采用同样的加密算法,生成密钥流块。接收端将密钥流块与来自发送端的密文块进行异或计算,从而恢复出发送端所发送的明文块。Correspondingly, the receiving end uses the parameter security parameter, the count value, bearer identifier, direction information and length corresponding to the message as input parameters, and uses the same encryption algorithm to generate a key stream block. The receiver performs XOR calculation between the key stream block and the ciphertext block from the sender, thereby recovering the plaintext block sent by the sender.
其中,加密算法可以为256位加密算法,包括但不限于SNOW-V 256算法、AES256算法、祖冲之256算法等。The encryption algorithm may be a 256-bit encryption algorithm, including but not limited to SNOW-V 256 algorithm, AES256 algorithm, Zu Chongzhi 256 algorithm, etc.
其中,如果安全参数用来加密和/或解密NAS层消息,密钥KEY是NAS层的加密密钥,COUNT=0x00||NAS COUNT;BEARER为NAS链接标识符;DIRECTION表示方向信息,标识数据上下行方向。Among them, if the security parameter is used to encrypt and/or decrypt the NAS layer message, the key KEY is the encryption key of the NAS layer, COUNT=0x00||NAS COUNT; BEARER is the NAS link identifier; DIRECTION indicates the direction information, which identifies the upper and lower parts of the data row direction.
需要说明的是,S604和S605的执行顺序并不限定,可以先后执行,也可以同时执行。It should be noted that the execution order of S604 and S605 is not limited, and may be executed sequentially or simultaneously.
S604和S605的具体实现过程,可以参考前面的描述,在此不再赘述。For the specific implementation process of S604 and S605, reference may be made to the foregoing description, which will not be repeated here.
通过上面的方法,在NAS层通过使用安全参数对待发送的消息进行加密,和/或对接收的消息进行解密,从而可以提高NAS层消息的安全性,降低被破解的风险。Through the above method, the message to be sent is encrypted by using the security parameters at the NAS layer, and/or the received message is decrypted, so that the security of the NAS layer message can be improved and the risk of being cracked can be reduced.
实施例四:Embodiment 4:
实施例四中,以网络设备为核心网设备为例,终端设备和核心网设备之间分别按照相同的方法生成安全参数,此时核心网设备不需要将安全参数发送至终端设备。实施例四中, 以安全参数可以用于加密和/或解密NAS层消息为例进行描述。当然,如果AS层消息和NAS层消息可以采用相同的安全参数加密和/或解密,那么该安全参数也可以用于加密和/或解密AS层消息。下面将详细描述。In the fourth embodiment, taking the network device as the core network device as an example, the terminal device and the core network device respectively generate security parameters according to the same method, in this case, the core network device does not need to send the security parameters to the terminal device. In the fourth embodiment, description is given by taking the example that the security parameter can be used for encrypting and/or decrypting NAS layer messages. Of course, if the AS layer message and the NAS layer message can be encrypted and/or decrypted using the same security parameter, then the security parameter can also be used to encrypt and/or decrypt the AS layer message. It will be described in detail below.
如图7所示,为本申请实施例提供的一种通信方法流程示意图。图7中,以终端设备执行的操作也可以由终端设备内部的芯片或模块执行,核心网设备执行的操作也可以由核心网设备内部的芯片或模块执行。参见图7,该方法包括:As shown in FIG. 7 , a schematic flowchart of a communication method provided by an embodiment of the present application is shown. In FIG. 7 , operations performed by the terminal device may also be performed by a chip or module inside the terminal device, and operations performed by the core network device may also be performed by a chip or module inside the core network device. Referring to Figure 7, the method includes:
可选地,S701:核心网设备向终端设备发送NAS安全模式命令消息。Optionally, S701: The core network device sends a NAS security mode command message to the terminal device.
NAS安全模式命令消息可以用于指示进行NAS安全模式命令流程,其中可以指示256位加密算法。The NAS security mode command message may be used to instruct the NAS security mode command flow, wherein a 256-bit encryption algorithm may be indicated.
S702:核心网设备获取安全参数。S702: The core network device obtains security parameters.
需要说明的是,如果AS层消息和NAS层消息可以采用相同的安全参数加密和/或解密,那么核心网设备还可以将该安全参数发送至接入网设备。It should be noted that, if the AS layer message and the NAS layer message can be encrypted and/or decrypted by using the same security parameter, the core network device can also send the security parameter to the access network device.
S703:终端设备获取安全参数。S703: The terminal device obtains security parameters.
核心网设备和终端设备可以分别根据共享参数生成安全参数,具体过程可以参考前面的描述,在此不再赘述。The core network device and the terminal device can respectively generate security parameters according to the shared parameters, and the specific process can refer to the foregoing description, which will not be repeated here.
可选地,S704:终端设备向核心网设备发送NAS安全模式完成消息。Optionally, S704: The terminal device sends a NAS security mode completion message to the core network device.
S705:终端设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S705: The terminal device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information, and the key, and/or according to the security parameter, the second count value, the second bearer identifier, the first The bidirectional information and the key decrypt the received message.
S706:核心网设备根据安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对待发送的消息进行加密,和/或根据安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对接收的消息进行解密。S706: The core network device encrypts the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer identifier, The second direction information and the key decrypt the received message.
需要说明的是,S705和S706的执行顺序并不限定,可以先后执行,也可以同时执行。It should be noted that the execution order of S705 and S706 is not limited, and may be executed sequentially or simultaneously.
S705和S706的具体实现过程,可以参考前面的描述,在此不再赘述。For the specific implementation process of S705 and S706, reference may be made to the foregoing description, which will not be repeated here.
上面的方法中,核心网设备和终端设备可以分别根据相同的参数和方法生成相同的安全参数,因此核心网设备不需要向终端设备发送安全参数,从而避免安全参数暴露,提高系统安全性。In the above method, the core network device and the terminal device can respectively generate the same security parameters according to the same parameters and methods, so the core network device does not need to send security parameters to the terminal device, thereby avoiding security parameter exposure and improving system security.
上述本申请提供的实施例中,分别从各个设备之间交互的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,核心网设备或接入网设备或终端设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。In the above embodiments provided by the present application, the methods provided by the embodiments of the present application are respectively introduced from the perspective of interaction between various devices. In order to implement the functions in the methods provided in the above embodiments of the present application, the core network device, the access network device, or the terminal device may include a hardware structure and/or a software module, and a hardware structure, a software module, or a hardware structure plus a software module form to achieve the above functions. Whether one of the above functions is performed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into one processor, or may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
与上述构思相同,如图8所示,本申请实施例还提供一种装置800用于实现上述方法中核心网设备或接入网设备或终端设备的功能。例如,该装置可以为软件模块或者芯片系统。本申请实施例中,芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。该装置800可以包括:处理单元801和通信单元802。Similar to the above concept, as shown in FIG. 8 , an embodiment of the present application further provides an apparatus 800 for implementing the functions of the core network device or the access network device or the terminal device in the above method. For example, the apparatus may be a software module or a system-on-chip. In this embodiment of the present application, the chip system may be composed of chips, or may include chips and other discrete devices. The apparatus 800 may include: a processing unit 801 and a communication unit 802 .
本申请实施例中,通信单元也可以称为收发单元,可以包括发送单元和/或接收单元,分别用于执行上文方法实施例中核心网设备或接入网设备或终端设备发送和接收的步骤。In this embodiment of the present application, the communication unit may also be referred to as a transceiver unit, and may include a sending unit and/or a receiving unit, which are respectively configured to execute the data sent and received by the core network device or the access network device or the terminal device in the above method embodiments. step.
以下,结合图8至图9详细说明本申请实施例提供的通信装置。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的内容可以参见上文方法实施例,为了简洁,这里不再赘述。Hereinafter, the communication apparatus provided by the embodiments of the present application will be described in detail with reference to FIG. 8 to FIG. 9 . It should be understood that the description of the apparatus embodiment corresponds to the description of the method embodiment. Therefore, for the content not described in detail, reference may be made to the above method embodiment, which is not repeated here for brevity.
通信单元也可以称为收发器、收发机、收发装置等。处理单元也可以称为处理器,处理单板,处理模块、处理装置等。可选的,可以将通信单元802中用于实现接收功能的器件视为接收单元,将通信单元802中用于实现发送功能的器件视为发送单元,即通信单元802包括接收单元和发送单元。通信单元有时也可以称为收发机、收发器、或收发电路等。接收单元有时也可以称为接收机、接收器、或接收电路等。发送单元有时也可以称为发射机、发射器或者发射电路等。A communication unit may also be referred to as a transceiver, transceiver, transceiver, or the like. The processing unit may also be referred to as a processor, a processing single board, a processing module, a processing device, and the like. Optionally, the device for implementing the receiving function in the communication unit 802 may be regarded as a receiving unit, and the device for implementing the sending function in the communication unit 802 may be regarded as a transmitting unit, that is, the communication unit 802 includes a receiving unit and a transmitting unit. A communication unit may also sometimes be referred to as a transceiver, transceiver, or transceiver circuit, or the like. The receiving unit may also sometimes be referred to as a receiver, receiver, or receiving circuit, or the like. The transmitting unit may also sometimes be referred to as a transmitter, a transmitter, or a transmitting circuit, or the like.
通信装置800执行上面实施例中图5所示的流程中终端设备的功能时:When the communication apparatus 800 performs the function of the terminal device in the process shown in FIG. 5 in the above embodiment:
通信单元,用于获取安全参数;所述安全参数用于加密待发送的消息,和/或用于解密接收的消息;a communication unit, used to obtain security parameters; the security parameters are used to encrypt messages to be sent, and/or to decrypt received messages;
处理单元,用于根据所述安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对所述待发送的消息进行加密,和/或根据所述安全参数、第二计数值、第二承载标识、第二方向信息以及密钥对所述接收的消息进行解密。a processing unit, configured to encrypt the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count The value, the second bearer identification, the second direction information, and the key decrypt the received message.
以上只是示例,处理单元801和通信单元802还可以执行其他功能,更详细的描述可以参考图3至7所示的方法实施例中相关描述,这里不加赘述。The above are just examples, and the processing unit 801 and the communication unit 802 may also perform other functions. For more detailed descriptions, reference may be made to the related descriptions in the method embodiments shown in FIGS. 3 to 7 , which will not be repeated here.
如图9所示为本申请实施例提供的装置900,图9所示的装置可以为图8所示的装置的一种硬件电路的实现方式。该通信装置可适用于前面所示出的流程图中,执行上述方法实施例中终端设备或者网络设备的功能。为了便于说明,图9仅示出了该通信装置的主要部件。FIG. 9 shows an apparatus 900 provided by an embodiment of the present application. The apparatus shown in FIG. 9 may be an implementation of a hardware circuit of the apparatus shown in FIG. 8 . The communication apparatus can be applied to the flow chart shown above to perform the functions of the terminal device or the network device in the above method embodiments. For convenience of explanation, FIG. 9 only shows the main components of the communication device.
如图9所示,通信装置900包括处理器910和接口电路920。处理器910和接口电路920之间相互耦合。可以理解的是,接口电路920可以为收发器或输入输出接口。可选的,通信装置900还可以包括存储器930,用于存储处理器910执行的指令或存储处理器910运行指令所需要的输入数据或存储处理器910运行指令后产生的数据。As shown in FIG. 9 , the communication apparatus 900 includes a processor 910 and an interface circuit 920 . The processor 910 and the interface circuit 920 are coupled to each other. It can be understood that the interface circuit 920 can be a transceiver or an input-output interface. Optionally, the communication device 900 may further include a memory 930 for storing instructions executed by the processor 910 or input data required by the processor 910 to execute the instructions or data generated after the processor 910 executes the instructions.
当通信装置900用于实现图3至7所示的方法时,处理器910用于实现上述处理单元801的功能,接口电路920用于实现上述通信单元802的功能。When the communication apparatus 900 is used to implement the methods shown in FIGS. 3 to 7 , the processor 910 is used to implement the functions of the above-mentioned processing unit 801 , and the interface circuit 920 is used to implement the functions of the above-mentioned communication unit 802 .
当上述通信装置为应用于终端设备的芯片时,该终端设备芯片实现上述方法实施例中终端设备的功能。该终端设备芯片从终端设备中的其它模块(如射频模块或天线)接收信息,该信息是网络设备发送给终端设备的;或者,该终端设备芯片向终端设备中的其它模块(如射频模块或天线)发送信息,该信息是终端设备发送给网络设备的。When the above communication device is a chip applied to a terminal device, the terminal device chip implements the functions of the terminal device in the above method embodiments. The terminal device chip receives information from other modules (such as a radio frequency module or an antenna) in the terminal device, and the information is sent by the network device to the terminal device; or, the terminal device chip sends information to other modules (such as a radio frequency module or an antenna) in the terminal device antenna) to send information, the information is sent by the terminal equipment to the network equipment.
当上述通信装置为应用于网络设备的芯片时,该网络设备芯片实现上述方法实施例中网络设备的功能。该网络设备芯片从网络设备中的其它模块(如射频模块或天线)接收信息,该信息是终端设备发送给网络设备的;或者,该网络设备芯片向网络设备中的其它模块(如射频模块或天线)发送信息,该信息是网络设备发送给终端设备的。When the above communication device is a chip applied to a network device, the network device chip implements the functions of the network device in the above method embodiments. The network device chip receives information from other modules (such as a radio frequency module or an antenna) in the network device, and the information is sent by the terminal device to the network device; or, the network device chip sends information to other modules in the network device (such as a radio frequency module or an antenna). antenna) to send information, the information is sent by the network equipment to the terminal equipment.
可以理解的是,本申请的实施例中的处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其它通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field  Programmable Gate Array,FPGA)或者其它可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。It can be understood that the processor in the embodiments of the present application may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field Programmable Gate Array (Field Programmable Gate Array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.
本申请的实施例中存储器可以是随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于网络设备或终端设备中。处理器和存储介质也可以作为分立组件存在于网络设备或终端设备中。In the embodiment of the present application, the memory may be a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable memory Programmable Read Only Memory (Erasable PROM, EPROM), Electrically Erasable Programmable Read Only Memory (Electrically Erasable Programmable Read Only Memory, EEPROM), registers, hard disks, removable hard disks, CD-ROMs or any other form of storage medium known in the art . An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium may reside in an ASIC. Alternatively, the ASIC may be located in a network device or in an end device. The processor and storage medium may also exist as discrete components in a network device or terminal device.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (22)

  1. 一种通信方法,其特征在于,包括:A communication method, comprising:
    获取安全参数;所述安全参数用于加密待发送的消息,和/或用于解密接收的消息;Obtaining security parameters; the security parameters are used for encrypting the message to be sent, and/or for decrypting the received message;
    根据所述安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对所述待发送的消息进行加密,和/或根据所述安全参数、第二计数值、第二承载标识、第二方向信息以及所述密钥对所述接收的消息进行解密。The message to be sent is encrypted according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer The identification, the second direction information, and the key decrypt the received message.
  2. 根据权利要求1所述的方法,其特征在于,所述安全参数为随机数;The method according to claim 1, wherein the security parameter is a random number;
    或者,所述安全参数与以下至少一项参数相关:Alternatively, the security parameter is related to at least one of the following parameters:
    物理小区标识;同步信号块索引;临时移动用户标识;资源标识;接入网密钥;所述接入网密钥的推演秘钥;下一跳链计数器值;下一跳的信息。Physical cell identifier; synchronization signal block index; temporary mobile user identifier; resource identifier; access network key; derivation secret key of the access network key; next hop chain counter value; next hop information.
  3. 根据权利要求1或2所述的方法,其特征在于,所述获取安全参数,包括:The method according to claim 1 or 2, wherein the acquiring security parameters comprises:
    接收来自网络设备的配置消息,所述配置消息包括所述安全参数,所述网络设备为接入网设备或核心网设备;receiving a configuration message from a network device, where the configuration message includes the security parameter, and the network device is an access network device or a core network device;
    或者,根据共享参数确定所述安全参数,所述共享参数为所述终端设备与所述网络设备均已知的参数。Alternatively, the security parameter is determined according to a shared parameter, where the shared parameter is a parameter known by both the terminal device and the network device.
  4. 根据权利要求3所述的方法,其特征在于,所述共享参数包括以下至少一项:The method according to claim 3, wherein the shared parameters include at least one of the following:
    物理小区标识;同步信号块索引;临时移动用户标识;资源标识;接入网密钥;所述接入网密钥的推演秘钥;下一跳链计数器值;下一跳的信息。Physical cell identifier; synchronization signal block index; temporary mobile user identifier; resource identifier; access network key; derivation secret key of the access network key; next hop chain counter value; next hop information.
  5. 根据权利要求3至4任一所述的方法,其特征在于,所述方法应用于终端设备,所述根据共享参数确定所述安全参数之前,所述方法还包括:The method according to any one of claims 3 to 4, wherein the method is applied to a terminal device, and before the security parameter is determined according to the shared parameter, the method further comprises:
    接收接入层安全模式命令消息或者无线资源控制连接重配置消息。Receive an access stratum security mode command message or a radio resource control connection reconfiguration message.
  6. 根据权利要求1至4任一所述的方法,其特征在于,所述方法应用于核心网设备;The method according to any one of claims 1 to 4, wherein the method is applied to core network equipment;
    所述获取安全参数之前,所述方法还包括:Before obtaining the security parameter, the method further includes:
    确定满足以下至少一项:Make sure at least one of the following is true:
    确定向接入网设备发送新的下一跳链计数器值或者下一跳的信息;Determine to send a new next-hop chain counter value or next-hop information to the access network device;
    确定发送新的接入网密钥;Determine to send a new access network key;
    确定激活/更改用户面安全策略;Determine activation/change user plane security policy;
    确定与所述终端设备之间执行非接入层安全模式命令流程;Determine to execute the non-access stratum security mode command process with the terminal device;
    确定更新非接入层密钥;Determine to update the non-access stratum key;
    确定生成核心网密钥或进行所述核心网密钥水平推演。It is determined to generate a core network key or to perform a level deduction of the core network key.
  7. 根据权利要求1至4任一所述的方法,其特征在于,所述方法应用于接入网设备;The method according to any one of claims 1 to 4, wherein the method is applied to an access network device;
    所述获取安全参数之前,所述方法还包括:Before obtaining the security parameter, the method further includes:
    确定满足以下至少一项:Make sure at least one of the following is true:
    确定进行接入层安全模式命令流程或者无线资源控制连接重配置;Determine to perform the access layer security mode command process or the radio resource control connection reconfiguration;
    接收到新的下一跳链计数器值或者下一跳的信息或者接入网密钥;Receive a new next-hop chain counter value or next-hop information or access network key;
    对接入网密钥进行更新;Update the access network key;
    确定向其它接入网设备发送下一跳链计数器值或者下一跳的信息或者接入网密钥。It is determined to send the next hop chain counter value or the next hop information or the access network key to other access network devices.
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述方法应用于接入网设备或核心网设备,所述方法还包括:The method according to any one of claims 1 to 7, wherein the method is applied to an access network device or a core network device, and the method further comprises:
    向终端设备发送配置消息,所述配置消息包括所述安全参数。A configuration message is sent to the terminal device, the configuration message including the security parameter.
  9. 根据权利要求3、6至8任一所述的方法,其特征在于,所述配置消息为接入层安全模式命令流程中的接入层安全模式命令消息;The method according to any one of claims 3, 6 to 8, wherein the configuration message is an access stratum security mode command message in an access stratum security mode command flow;
    或者,所述配置消息为无线资源控制连接重配置流程中的无线资源控制连接重配置消息;Alternatively, the configuration message is a RRC connection reconfiguration message in the RRC connection reconfiguration process;
    或者,所述配置消息为非接入层安全模式命令流程中的非接入层安全模式命令消息。Alternatively, the configuration message is a non-access stratum security mode command message in the non-access stratum security mode command flow.
  10. 一种通信装置,其特征在于,包括:A communication device, comprising:
    通信单元,用于获取安全参数;所述安全参数用于加密待发送的消息,和/或用于解密接收的消息;a communication unit, used to obtain security parameters; the security parameters are used to encrypt messages to be sent, and/or to decrypt received messages;
    处理单元,用于根据所述安全参数、第一计数值、第一承载标识、第一方向信息以及密钥对所述待发送的消息进行加密,和/或根据所述安全参数、第二计数值、第二承载标识、第二方向信息以及所述密钥对所述接收的消息进行解密。a processing unit, configured to encrypt the message to be sent according to the security parameter, the first count value, the first bearer identifier, the first direction information and the key, and/or according to the security parameter, the second count value, the second bearer identification, the second direction information, and the key to decrypt the received message.
  11. 根据权利要求10所述的装置,其特征在于,所述安全参数为随机数;The device according to claim 10, wherein the security parameter is a random number;
    或者,所述安全参数与以下至少一项参数相关:Alternatively, the security parameter is related to at least one of the following parameters:
    物理小区标识;同步信号块索引;临时移动用户标识;资源标识;接入网密钥;所述接入网密钥的推演秘钥;下一跳链计数器值;下一跳的信息。Physical cell identifier; synchronization signal block index; temporary mobile user identifier; resource identifier; access network key; derivation secret key of the access network key; next hop chain counter value; next hop information.
  12. 根据权利要求10或11所述的装置,其特征在于,The device according to claim 10 or 11, characterized in that,
    所述通信单元具体用于:The communication unit is specifically used for:
    接收来自网络设备的配置消息,所述配置消息包括所述安全参数,所述网络设备为接入网设备或核心网设备;receiving a configuration message from a network device, where the configuration message includes the security parameter, and the network device is an access network device or a core network device;
    或者,所述处理单元具体用于:根据共享参数确定所述安全参数,所述共享参数为所述终端设备与所述网络设备均已知的参数。Alternatively, the processing unit is specifically configured to: determine the security parameter according to a shared parameter, where the shared parameter is a parameter known by both the terminal device and the network device.
  13. 根据权利要求12所述的装置,其特征在于,所述共享参数包括以下至少一项:The apparatus according to claim 12, wherein the shared parameter comprises at least one of the following:
    物理小区标识;同步信号块索引;临时移动用户标识;资源标识;接入网密钥;所述接入网密钥的推演秘钥;下一跳链计数器值;下一跳的信息。Physical cell identifier; synchronization signal block index; temporary mobile user identifier; resource identifier; access network key; derivation secret key of the access network key; next hop chain counter value; next hop information.
  14. 根据权利要求12至13任一所述的装置,其特征在于,所述通信装置为终端设备,所述通信单元还用于:在所述处理单元根据所述共享参数确定所述安全参数之前,接收接入层安全模式命令消息或者无线资源控制连接重配置消息。The device according to any one of claims 12 to 13, wherein the communication device is a terminal device, and the communication unit is further configured to: before the processing unit determines the security parameter according to the shared parameter, Receive an access stratum security mode command message or a radio resource control connection reconfiguration message.
  15. 根据权利要求10至13任一所述的装置,其特征在于,所述通信装置为核心网设备;The device according to any one of claims 10 to 13, wherein the communication device is core network equipment;
    所述处理单元还用于:在所述获取安全参数之前,确定满足以下至少一项:The processing unit is further configured to: before obtaining the security parameter, determine that at least one of the following is satisfied:
    确定向接入网设备发送新的下一跳链计数器值或者下一跳的信息;Determine to send a new next-hop chain counter value or next-hop information to the access network device;
    确定发送新的接入网密钥;Determine to send a new access network key;
    确定激活/更改用户面安全策略;Determine activation/change user plane security policy;
    确定与所述终端设备之间执行非接入层安全模式命令流程;Determine to execute the non-access stratum security mode command process with the terminal device;
    确定更新非接入层密钥;Determine to update the non-access stratum key;
    确定生成核心网密钥或进行所述核心网密钥水平推演。It is determined to generate a core network key or to perform a level deduction of the core network key.
  16. 根据权利要求10至15任一所述的装置,其特征在于,所述通信装置为接入网设备;The device according to any one of claims 10 to 15, wherein the communication device is an access network device;
    所述处理单元还用于:在所述获取安全参数之前,确定满足以下至少一项:The processing unit is further configured to: before obtaining the security parameter, determine that at least one of the following is satisfied:
    确定进行接入层安全模式命令流程或者无线资源控制连接重配置;Determine to perform the access layer security mode command process or the radio resource control connection reconfiguration;
    接收到新的下一跳链计数器值或者下一跳的信息或者接入网密钥;Receive a new next-hop chain counter value or next-hop information or access network key;
    对接入网密钥进行更新;Update the access network key;
    确定向其它接入网设备发送下一跳链计数器值或者下一跳的信息或者接入网密钥。It is determined to send the next hop chain counter value or the next hop information or the access network key to other access network devices.
  17. 根据权利要求10至16任一所述的装置,其特征在于,所述通信装置为接入网设备或核心网设备,所述通信单元还用于:The device according to any one of claims 10 to 16, wherein the communication device is an access network device or a core network device, and the communication unit is further configured to:
    向终端设备发送配置消息,所述配置消息包括所述安全参数。A configuration message is sent to the terminal device, the configuration message including the security parameter.
  18. 根据权利要求12、15至17任一所述的装置,其特征在于,所述配置消息为接入层安全模式命令流程中的接入层安全模式命令消息;The apparatus according to any one of claims 12, 15 to 17, wherein the configuration message is an access stratum security mode command message in an access stratum security mode command flow;
    或者,所述配置消息为无线资源控制连接重配置流程中的无线资源控制连接重配置消息;Alternatively, the configuration message is a RRC connection reconfiguration message in the RRC connection reconfiguration process;
    或者,所述配置消息为非接入层安全模式命令流程中的非接入层安全模式命令消息。Alternatively, the configuration message is a non-access stratum security mode command message in the non-access stratum security mode command flow.
  19. 一种通信装置,其特征在于,包括处理器,接口电路,和存储器;A communication device, comprising a processor, an interface circuit, and a memory;
    所述处理器,用于执行所述存储器中存储的计算机程序或指令,使得所述通信装置实现权利要求1至9中任意一项所述的方法。The processor is configured to execute the computer program or instructions stored in the memory, so that the communication apparatus implements the method of any one of claims 1 to 9.
  20. 一种计算机可读存储介质,其特征在于,存储有计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机实现如权利要求1至9中任意一项所述的方法。A computer-readable storage medium, characterized in that, a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer is made to implement the method described in any one of claims 1 to 9. method.
  21. 一种芯片,其特征在于,包括处理器,所述处理器与存储器耦合,用于执行所述存储器中存储的计算机程序或指令,使得所述芯片实现权利要求1至9中任意一项所述的方法。A chip, characterized in that it includes a processor, which is coupled to a memory and used to execute computer programs or instructions stored in the memory, so that the chip implements any one of claims 1 to 9. Methods.
  22. 一种计算机程序产品,其特征在于,包括计算机可读指令,当所述计算机可读指令在计算机上运行时,使得所述计算机实现如权利要求1至9中任意一项所述的方法。A computer program product, characterized by comprising computer-readable instructions, which, when executed on a computer, cause the computer to implement the method according to any one of claims 1 to 9.
PCT/CN2021/083416 2021-03-26 2021-03-26 Communication method and apparatus WO2022198671A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180095304.9A CN116941263A (en) 2021-03-26 2021-03-26 Communication method and device
PCT/CN2021/083416 WO2022198671A1 (en) 2021-03-26 2021-03-26 Communication method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/083416 WO2022198671A1 (en) 2021-03-26 2021-03-26 Communication method and apparatus

Publications (1)

Publication Number Publication Date
WO2022198671A1 true WO2022198671A1 (en) 2022-09-29

Family

ID=83395116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083416 WO2022198671A1 (en) 2021-03-26 2021-03-26 Communication method and apparatus

Country Status (2)

Country Link
CN (1) CN116941263A (en)
WO (1) WO2022198671A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281535A (en) * 2010-06-10 2011-12-14 华为技术有限公司 Key updating method and apparatus thereof
CN102300210A (en) * 2011-09-01 2011-12-28 重庆中天重邮通信技术有限公司 Method for decrypting cipher text of long term evolution (LTE) non-access stratum and signaling monitoring device
CN104038934A (en) * 2014-06-30 2014-09-10 武汉虹信技术服务有限责任公司 Non-access layer decryption method for LET core network real-time signaling monitoring
CN109286930A (en) * 2018-10-18 2019-01-29 广州市科航通信科技有限公司 A kind of cellular mobile communications networks packet data network protection method
WO2020254302A1 (en) * 2019-06-17 2020-12-24 Telefonaktiebolaget Lm Ericsson (Publ) Home controlled network slice privacy

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281535A (en) * 2010-06-10 2011-12-14 华为技术有限公司 Key updating method and apparatus thereof
CN102300210A (en) * 2011-09-01 2011-12-28 重庆中天重邮通信技术有限公司 Method for decrypting cipher text of long term evolution (LTE) non-access stratum and signaling monitoring device
CN104038934A (en) * 2014-06-30 2014-09-10 武汉虹信技术服务有限责任公司 Non-access layer decryption method for LET core network real-time signaling monitoring
CN109286930A (en) * 2018-10-18 2019-01-29 广州市科航通信科技有限公司 A kind of cellular mobile communications networks packet data network protection method
WO2020254302A1 (en) * 2019-06-17 2020-12-24 Telefonaktiebolaget Lm Ericsson (Publ) Home controlled network slice privacy

Also Published As

Publication number Publication date
CN116941263A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
KR101583234B1 (en) Methods and apparatuses for enabling non-access stratum(nas) security in lte mobile units
CN109246697B (en) Base station, user equipment and execution method thereof
US20170359719A1 (en) Key generation method, device, and system
WO2014134786A1 (en) Key interaction method and device
WO2020052414A1 (en) Data protection method, device and system
JP5774096B2 (en) Air interface key update method, core network node, and radio access system
US11889301B2 (en) Security verification when resuming an RRC connection
WO2013087010A1 (en) Method and device thereof for generating access stratum key in communication system
WO2018166338A1 (en) Key update method and apparatus
US20230179400A1 (en) Key management method and communication apparatus
US11006346B2 (en) X2 service transmission method and network device
WO2022151917A1 (en) Message processing method and apparatus, terminal, and network side device
WO2022198671A1 (en) Communication method and apparatus
WO2021238813A1 (en) Method and apparatus for obtaining key
EP3714573A1 (en) Transfer/cloning of security context
CN113455034B (en) Communication method and device
WO2011127775A1 (en) Update method for air interface key and radio access system
CN114503628A (en) Managing security keys in a communication system
WO2020146661A1 (en) Integrity protection for user plane edt with multiple pdcp pdus
WO2012009981A1 (en) Method, core network node and radio access system for updating air interface keys
WO2015006980A1 (en) Encryption parameter processing method and apparatus
WO2023050373A1 (en) Communication method, apparatus and system
WO2023214199A1 (en) Medium access control layer security in handovers
WO2018176273A1 (en) Communication method, apparatus and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21932291

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180095304.9

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21932291

Country of ref document: EP

Kind code of ref document: A1