CN107567018B - Message processing method and device, terminal and message processing system - Google Patents

Message processing method and device, terminal and message processing system Download PDF

Info

Publication number
CN107567018B
CN107567018B CN201610511664.3A CN201610511664A CN107567018B CN 107567018 B CN107567018 B CN 107567018B CN 201610511664 A CN201610511664 A CN 201610511664A CN 107567018 B CN107567018 B CN 107567018B
Authority
CN
China
Prior art keywords
functional entity
side functional
network side
terminal
message
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201610511664.3A
Other languages
Chinese (zh)
Other versions
CN107567018A (en
Inventor
谢振华
朱进国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610511664.3A priority Critical patent/CN107567018B/en
Publication of CN107567018A publication Critical patent/CN107567018A/en
Application granted granted Critical
Publication of CN107567018B publication Critical patent/CN107567018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a message processing method and device, a terminal and a message processing system; the terminal message processing method comprises the following steps: after the terminal completes the authentication and key agreement process, selecting the value of the related signaling counting parameter when the terminal performs message interaction with the network side functional entity, wherein the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity; and the terminal executes integrity processing and/or confidentiality processing on the message in the message interaction based on the selected value. The invention solves the problem that the terminal can only obtain part of non-access stratum services because the same counting parameter value is used in the related technology.

Description

Message processing method and device, terminal and message processing system
Technical Field
The present invention relates to the field of communications, and in particular, to a message processing method and apparatus, a terminal, and a message processing system.
Background
The mobile network is divided into an Access network and a core network, when the terminal uses the Service of the Access network, signaling needs to be interacted with the Access network through an Access Service (AS) protocol, and when the terminal uses the Service of the core network, signaling needs to be interacted with the core network through a Non-Access Service (NAS) protocol.
Fig. 1 is a diagram of a mobile Network architecture in the related art, where a UE is a terminal, a RAN (Radio Access Network) is a Radio Access Network (RAN), that is, a Network composed of base station systems, an MME (Mobility Management Entity) is a mobile Management Entity, an Entity providing a non-Access stratum service for the final draft, that is, a Network side of an NAS protocol, and GWs is one or more gateways, which provide a transmission service for user data. S106 is the NAS protocol connection between the UE and the MME, and the lower layer transmission actually passes through S102 and S104.
The NAS protocol needs integrity protection and confidentiality protection, the MME and the UE need to negotiate part of information in the security context to ensure that NAS signaling can be handled correctly, and the MME and the UE may negotiate multiple security contexts, but only one security context is currently used.
Fig. 2 is a schematic diagram of a terminal and an MME handling NAS confidentiality protection in the related art, which shows a procedure of handling NAS protocol confidentiality protection by the terminal and the MME through a currently used security context. When a terminal or MME sends or receives an NAS signaling, it needs to use a negotiated EEA (Evolved Packet System Encryption Algorithm) Algorithm (there are multiple EEA algorithms, and specifically which one needs to be negotiated), and inputs the following parameters: confidentiality KEY (KEY-ENC), BEARER number (BEARER), KEY stream LENGTH (LENGTH), DIRECTION flag (DIRECTION), signaling COUNT (COUNT). The COUNT is related to the BEARER (BEARER) and DIRECTION (DIRECTION), that is, the COUNT in the uplink DIRECTION and the COUNT in the downlink DIRECTION of the same BEARER are counted respectively, and the COUNT in different BEARERs is counted respectively. The EEA algorithm computes a keystream block (KEYSTREAM BLOCK). If NAS signaling (needing encryption) is sent, adding a sent plaintext data BLOCK (PLANTEXT BLOCK) and a key stream data BLOCK bit by bit to obtain a CIPHERTEXT data BLOCK (CIPHERTEXT BLOCK); if receiving NAS signaling (needing to be decrypted), adding the sent CIPHERTEXT data BLOCK (CIPHERTEXT BLOCK) and the key stream data BLOCK bit by bit to obtain a plaintext data BLOCK (PLANTEXT BLOCK).
Fig. 3 is a schematic diagram of a terminal and an MME handling NAS integrity protection in the related art, which shows a processing procedure of the terminal and the MME for NAS protocol integrity protection through a currently used security context. When a terminal or MME sends or receives NAS signaling, it needs to use a negotiated EIA (Evolved Packet System Integrity Algorithm) Algorithm (there are multiple EIA algorithms, and specifically which one needs to be negotiated), and inputs the following parameters: integrity KEY (KEY-INT), BEARER number (BEARER), MESSAGE content (MESSAGE), DIRECTION indicator (DIRECTION), signaling COUNT (COUNT). The COUNT is related to the BEARER (BEARER) and the DIRECTION (DIRECTION), that is, the COUNTs in the uplink DIRECTION and the downlink DIRECTION of the same BEARER are counted respectively, and the COUNTs of different BEARERs are counted respectively. If the NAS signaling is sent, the EIA calculates a Message Authentication Code (MAC), and the UE or the MME carries the MAC in the sent NAS signaling; if the NAS signaling is received, the EIA calculates an eXpected Message Authentication Code (XMAC), and the UE or the MME compares the XMAC with the MAC in the received NAS signaling, processes the Message if the XMAC is the same as the MAC in the received NAS signaling, and discards the Message if the XMAC is different from the MAC in the received NAS signaling.
Since NAS signaling only needs to use one BEARER, BEARER is always 0, and thus the security context currently used by the UE and MME includes KEY-ENC, KEY-INT, EEA, EIA, LENGTH, COUNT-UL, COUNT-DL. Wherein, COUNT-UL is the counting of uplink NAS signaling, COUNT-DL is the counting of downlink NAS signaling, the uplink and downlink are determined by the visual angle of UE, namely, COUNT is only related to a DIRECTION sign (DIRECTION). In the security context, COUNT-UL and COUNT-DL do not need to be negotiated, but are cleared when both the UE and the MME initially start security protection, and then 1 is added to the corresponding COUNT when the UE and the MME respectively process one NAS signaling. It is not necessary that both integrity protection and confidentiality protection of the NAS be performed.
In some application scenarios, part of the functions of the MME may be provided by multiple entities, for example, the location-related service and the session-related service are provided by 2 entities, and at this time, the non-access stratum service is no longer provided by only one entity.
In view of the above technical problems in the related art, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a message processing method and device, a terminal and a message processing system, which at least solve the problem that the terminal can only obtain part of non-access stratum services because the same counting parameter value is used in the related technology.
According to an embodiment of the present invention, there is provided a message processing method including: after the terminal completes the authentication and key agreement process, selecting the value of the related signaling counting parameter when the terminal performs message interaction with the network side functional entity, wherein the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity; and the terminal executes integrity processing and/or confidentiality processing on the message in the message interaction based on the selected value.
Optionally, the terminal, based on the selected value, performing integrity processing on the message in the message interaction includes: the terminal uses an integrity algorithm to calculate based on a first designated parameter to obtain a first calculation result, wherein the first designated parameter comprises: integrity keys, said values; and the terminal compares the first calculation result with the content of the corresponding field in the message or adds the first calculation result into the message.
Optionally, the performing, by the terminal, confidentiality processing on the message in the message interaction based on the selected value includes: the terminal calculates by using a confidentiality algorithm based on a second specified parameter to obtain a second calculation result, wherein the second specified parameter comprises: a confidentiality key, said value; and the terminal performs bit-by-bit addition operation or exclusive-or operation on the second calculation result and the content in the message.
Optionally, the network side functional entity includes a first network side functional entity and a second network side functional entity, where the first network side functional entity and the terminal complete an authentication and key agreement process to generate a first security context; the first network side functional entity sends a second security context to the second network side functional entity, the second security context includes part or all of information in the first security context, and the part or all of the information in the second security context is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacted with the terminal.
Optionally, the first network-side functional entity determines a mobile network service to be selected according to the user subscription data, and selects the second network-side functional entity according to the selected mobile network service.
Optionally, the first network side functional entity or the second network side functional entity sends the identifier of the first network side functional entity and the identifier of the second network side functional entity to the terminal.
Optionally, the method further comprises: the first network side functional entity or the second network side functional entity sends a plurality of temporary user identifications aiming at the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
Optionally, the method further comprises: the first network side functional entity receives a temporary user identifier which is sent by the second network side functional entity and is distributed to the terminal by the second network side functional entity; and the first network side functional entity sends the temporary user identifier distributed by the first network side functional entity to the terminal to the second network side functional entity.
According to an embodiment of the present invention, there is provided a message processing method including: the first network side functional entity and the terminal complete the authentication and key agreement process and generate a first security context; the first network side functional entity sends a second security context to a second network side functional entity, wherein the second security context comprises part or all information in the first security context; and when the second network side functional entity performs message interaction with the terminal, the partial or all information in the second security context is used for performing integrity processing and/or confidentiality processing on the message in the message interaction.
Optionally, the first security context or the second security context contains an integrity key and/or a confidentiality key.
Optionally, the integrity processing comprises: calculating by using an integrity algorithm based on a first designated parameter to obtain a third calculation result, wherein the first designated parameter comprises: the value of the integrity key and the signaling counting parameter; comparing the third calculation result with the content of the corresponding field in the message and/or adding the third calculation result to the message.
Optionally, the confidentiality processing comprises: calculating by using a confidentiality algorithm based on a second specified parameter to obtain a fourth calculation result, wherein the second specified parameter comprises: the values of a confidentiality key and a signaling counting parameter are obtained; and carrying out bit-by-bit addition operation or exclusive-or operation on the fourth calculation result and the content in the message.
Optionally, the first network-side functional entity determines a mobile network service to be selected according to the user subscription data, and selects the second network-side functional entity according to the selected mobile network service.
Optionally, the first network side functional entity or the second network side functional entity sends the identifier of the first network side functional entity and the identifier of the second network side functional entity to the terminal.
Optionally, the method further comprises: the first network side functional entity or the second network side functional entity sends a plurality of temporary user identifications aiming at the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
Optionally, the method further comprises: the first network side functional entity receives a temporary user identifier which is sent by the second network side functional entity and is distributed to the terminal by the second network side functional entity; and the first network side functional entity sends the temporary user identifier distributed by the first network side functional entity for the terminal to the second network side functional entity.
According to an embodiment of the present invention, there is provided a message processing apparatus including: the terminal comprises a selection module and a key agreement module, wherein the selection module is used for selecting the value of a related signaling counting parameter when the terminal performs message interaction with a network side functional entity after finishing the authentication and key agreement process, and the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity; and the processing module is used for executing integrity processing and/or confidentiality processing on the messages in the message interaction based on the selected values.
Optionally, the processing module is further configured to perform a calculation using an integrity algorithm based on a first specified parameter to obtain a first calculation result, where the first specified parameter includes: integrity keys, said values; and comparing the first calculation result with the content of the corresponding field in the message, or adding the first calculation result to the message.
Optionally, the processing module is further configured to perform calculation by using a confidentiality algorithm based on a second specified parameter, so as to obtain a second calculation result, where the second specified parameter includes: a confidentiality key, said value; and performing bit-by-bit addition operation on the second calculation result and the content in the message.
According to an embodiment of the present invention, there is provided a message processing apparatus including: the authentication negotiation module is positioned in the first network side functional entity and used for finishing authentication and key negotiation processes with the terminal and generating a first security context; a first sending module, located in the first network side functional entity, configured to send a second security context to a second network side functional entity, where the second security context includes part or all of information in the first security context; and part or all of the information in the second security context is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on the message interacted with the terminal.
Optionally, the first security context or the second security context contains an integrity key and/or a confidentiality key.
Optionally, the method further comprises: and the selection module is positioned in the first network side functional entity and used for determining the mobile network service required to be selected according to the user subscription data and selecting the second network side functional entity according to the selected mobile network service.
Optionally, the method further comprises: and the second sending module is located in the first network side functional entity or the second network side functional entity and is used for sending the identifier of the first network side functional entity and the identifier of the second network side functional entity to the terminal.
Optionally, the second sending module is further configured to send a plurality of temporary user identities for the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
Optionally, the apparatus further comprises: a receiving module, located in the first network side functional entity, configured to receive a temporary user identifier, sent by the second network side functional entity, that is allocated to the terminal by the second network side functional entity; a third sending module, located in the first network side functional entity, configured to send, to the second network side functional entity, the temporary user identifier that is allocated by the first network side functional entity for the terminal.
According to an embodiment of the present invention, there is provided a terminal including: the terminal message processing device.
According to an embodiment of the present invention, there is provided a message processing system including: a terminal and a network side functional entity; after the terminal and the network side functional entity complete the authentication and key agreement process, selecting a value of a related signaling counting parameter when the terminal and the network side functional entity perform message interaction, wherein the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity, the identification of the network side functional entity, and the integrity processing and/or confidentiality processing of the message in the message interaction based on the selected value.
Optionally, the network-side functional entity includes: the first network side functional entity and the terminal complete the authentication and key agreement process to generate a first security context; the first network side functional entity sends a second security context to the second network side functional entity, wherein the second security context comprises part or all of information of the first security context; and part or all of the information in the second security context is used for the input parameters of the second network side functional entity when the second network side functional entity performs integrity processing and/or confidentiality processing on the message interacted with the terminal.
According to the invention, different signaling counters can be selected according to at least one of the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identification of the network side functional entity, and the message in message transmission is operated according to the selected signaling counter, so that the complete non-access stratum service can be obtained under the condition that a plurality of network side functional entities provide the non-access stratum service, and therefore, the problem that the terminal can only obtain part of the non-access stratum service due to the use of the same counter in the related technology can be solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a diagram of a mobile network architecture in the related art;
fig. 2 is a diagram of a terminal and MME handling NAS confidentiality protection in the related art;
fig. 3 is a diagram of a terminal and MME handling NAS integrity protection in the related art;
fig. 4 is a block diagram of a hardware structure of a mobile terminal of a message processing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a network architecture provided in accordance with an embodiment of the present invention;
FIG. 6 is a first flowchart of a message processing method according to an embodiment of the present invention;
fig. 7 is a second flowchart of a message processing method according to an embodiment of the present invention;
fig. 8 is a first flowchart illustrating a message processing method according to a preferred embodiment of the present invention;
fig. 9 is a flowchart illustrating a message processing method according to a preferred embodiment of the present invention;
fig. 10 is a third schematic flowchart of a message processing method according to a preferred embodiment of the present invention;
FIG. 11 is a diagram illustrating a terminal handling NAS confidentiality protection according to the preferred embodiment of the present invention;
FIG. 12 is a diagram illustrating a terminal handling NAS integrity protection according to a preferred embodiment of the present invention;
fig. 13 is a first block diagram of a message processing apparatus according to an embodiment of the present invention;
fig. 14 is a block diagram of a second structure of a message processing apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the embodiment 1 of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking the operation on the mobile terminal as an example, fig. 4 is a hardware structure block diagram of the mobile terminal of a message processing method according to an embodiment of the present invention. As shown in fig. 4, the mobile terminal 40 may include one or more (only one shown) processors 402 (the processor 402 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 404 for storing data, and a transmission device 406 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 4 is only an illustration and is not intended to limit the structure of the electronic device. For example, the mobile terminal 40 may also include more or fewer components than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The memory 404 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the message processing method in the embodiment of the present invention, and the processor 402 executes various functional applications and data processing by executing the software programs and modules stored in the memory 404, so as to implement the method described above. The memory 404 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 404 may further include memory located remotely from the processor 402, which may be connected to the mobile terminal 40 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 406 is used for receiving or sending data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 40. In one example, the transmission device 406 includes a Network adapter (NIC) that can be connected to other Network functional entities through a base station so as to communicate with the internet. In one example, the transmission device 406 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The embodiment of the present application may operate on the network architecture shown in fig. 5, as shown in fig. 5, the network architecture includes: the terminal 52, the base station 54, the first network side functional entity 56 and the second network side functional entity 58, wherein the terminal 52, the base station 54, the first network side functional entity 56 and the second network side functional entity 58 can interact with each other.
In this embodiment, a message processing method operating in the mobile terminal or the network architecture is provided, and fig. 6 is a first flowchart of the message processing method according to the embodiment of the present invention, as shown in fig. 6, the flow includes the following steps:
step S602, after the terminal completes the authentication and key agreement process, when performing message interaction with the network side functional entity, selecting a value of a related signaling counting parameter, where the selected value of the signaling counting parameter is related to at least one of: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity;
step S604, the terminal executes integrity processing and/or confidentiality processing to the message in the message interaction based on the selected value.
According to the invention, because the values of different signaling counting parameters can be selected according to at least one of the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identification of the network side functional entity, and the integrity and/or confidentiality of the message in the message interaction is processed according to the selected value of the signaling counting parameter, the complete non-access stratum service can be obtained under the condition that a plurality of network side functional entities provide the non-access stratum service, and therefore, the problem that the terminal can only obtain part of the non-access stratum service due to the same counting parameter value in the related technology can be solved.
It should be noted that, the network-side functional entity may include at least one of the following entities, but is not limited to this: an AMM functional entity for authentication and mobility management and an SM functional entity for session management.
It should be noted that the service type of the service provided by the network-side functional entity may be a non-access stratum service, and specifically may be a session service or a location-related service, but is not limited thereto.
In an embodiment of the present invention, in step S604, the performing, by the terminal, integrity processing on the message in the message interaction based on the selected value may be represented as: the terminal uses an integrity algorithm to calculate based on a first designated parameter to obtain a first calculation result, wherein the first designated parameter comprises: integrity keys, said values; and the terminal compares the first calculation result with the content of the corresponding field in the message or adds the first calculation result into the message.
It should be noted that, the above-mentioned calculation by using the integrity algorithm may be to calculate data in a message interaction by using the integrity algorithm to obtain a first calculation result, but is not limited thereto.
It should be noted that the first calculation result may be compared with the content of the corresponding field in the message interaction, and if the first calculation result is consistent with the content of the corresponding field in the message interaction, the message may be considered to have integrity, and the message is not tampered; if not, the message is considered to be of no integrity, tampered, and the message needs to be discarded. Or the first calculation result may be calculated and added to the message, so as to set the content of the corresponding field in the message, for example, when configuring the message, the calculated first calculation result may be used as the content of the corresponding field in the message, but is not limited thereto.
In step S604, the performing, by the terminal, confidentiality processing on the message in the message interaction may be represented as: the terminal calculates by using a confidentiality algorithm based on a second specified parameter to obtain a second calculation result, wherein the second specified parameter comprises: a confidentiality key, said value; and the terminal performs bit-by-bit addition operation or exclusive-or operation on the second calculation result and the content in the message.
It should be noted that, the second calculation result and the content in the message may be subjected to bit-by-bit addition or exclusive-or operation, that is, the message may be encrypted or decrypted, for example, decryption is taken as an example. If the original data in the message can be obtained after the second calculation result and the content in the message are subjected to bit-by-bit addition or exclusive-or operation, it is indicated that the message has confidentiality, and if the original data cannot be obtained, the message may not have confidentiality and needs to be discarded, but the method is not limited to this.
Specifically, when the terminal sends a first message to the network side functional entity, the terminal increases the value of a first signaling counting parameter, wherein the selected signaling counting parameter comprises the first signaling counting parameter, and the message comprises the first message; and when the terminal receives a second message from the network side functional entity, the terminal increases the value of a second signaling counting parameter, wherein the selected signaling counting parameter comprises the second signaling counting parameter, and the message comprises the second message.
It should be noted that the first signaling count parameter may be an uplink signaling count parameter for the network side functional entity, and the second signaling counter may be a downlink signaling count parameter for the network side functional entity, but the invention is not limited thereto. When the network side functional entity is an AMM, the first signaling counting parameter may be an uplink signaling counting parameter (COUNT-UL-AMM) of the AMM, the second signaling counting parameter may be a downlink signaling counting parameter (COUNT-DL-AMM) of the AMM, and when the network side functional entity is an SM, the first signaling counting parameter may be an uplink signaling counting parameter (COUNT-UL-SM) of the SM, and the second signaling counting parameter may be a downlink signaling counting parameter (COUNT-DL-SM) of the SM.
When the terminal and the network side functional entity exchange messages, the value of the corresponding signaling counting parameter is correspondingly increased, and the protection of the integrity and/or confidentiality of the messages is realized.
It should be noted that, after completing the above authentication and key agreement procedure, the terminal may further generate a security context for the terminal, where the security context may include at least one of the following: the confidentiality KEY-ENC and the integrity KEY-INT may further include EEA, EIA, a KEY stream LENGTH, COUNT-UL-AMM and COUNT-DL-AMM, and it should be noted that COUNT-UL-AMM and COUNT-DL-AMM are respectively COUNT of uplink and downlink NAS signaling related to AMM.
In an embodiment of the present invention, before the step S602, the method may further include: a terminal receives a first command sent by a network side functional entity; the terminal responds to the first command to generate a security context, wherein the security context comprises the value of the selected signaling counting parameter; and the terminal clears the values of a plurality of signaling counting parameters on the terminal, wherein the plurality of signaling counting parameters comprise the selected values of the signaling counting parameters.
It should be noted that the first command may be a security protection initiation command, but is not limited thereto. It should be noted that the security context generated in response to the first command may further include a confidentiality KEY-ENC, an integrity KEY-INT, EEA, EIA, and a KEY stream LENGTH, but is not limited thereto.
It should be noted that the network side functional entity may include a first network side functional entity and a second network side functional entity, where the first network side functional entity and the terminal complete an authentication and key agreement process to generate a first security context; the first network side functional entity sends a second security context to the second network side functional entity, the second security context includes part or all of information in the first security context, and the part or all of the information in the second security context is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacted with the terminal.
It should be noted that, the first network-side functional entity determines the mobile network service to be selected according to the user subscription data, and selects the second network-side functional entity according to the selected mobile network service. The first network side functional entity or the second network side functional entity sends the identifier of the first network side functional entity and the identifier of the second network side functional entity to the terminal.
In an embodiment of the present invention, the method may further include: the first network side functional entity or the second network side functional entity sends a plurality of temporary user identifications aiming at the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
It should be noted that, the method may further include: the first network side functional entity receives a temporary user identifier which is sent by the second network side functional entity and is distributed to the terminal by the second network side functional entity; and the first network side functional entity sends the temporary user identifier distributed by the first network side functional entity for the terminal to the second network side functional entity.
In an embodiment of the present invention, a message processing method is further provided, and fig. 7 is a second flowchart of the message processing method provided in the embodiment of the present invention, and as shown in fig. 7, the method includes:
step S702, the first network side functional entity and the terminal complete the authentication and key agreement process and generate a first security context;
step S704, the first network side functional entity sends a second security context to a second network side functional entity, where the second security context includes part or all of the information in the first security context; and when the second network side functional entity performs message interaction with the terminal, the partial or all information in the second security context is used for performing integrity processing and/or confidentiality processing on the message in the message interaction.
By the method, the first network side functional entity sends the second context information to the second network side functional entity, so that the interaction between the terminal and the first functional entity and/or the second functional entity can be realized, and the problem that the terminal only acquires part of non-access stratum services can be solved.
It should be noted that the first security context or the second security context includes an integrity key and/or a confidentiality key.
In an embodiment of the present invention, the integrity process includes: calculating by using an integrity algorithm based on a first designated parameter to obtain a third calculation result, wherein the first designated parameter comprises: the value of the integrity key and the signaling counting parameter; comparing the third calculation result with the content of the corresponding field in the message and/or adding the third calculation result to the message.
It should be noted that the third calculation result may be compared with the content of the corresponding field in the message interaction, and if the third calculation result is consistent with the content of the corresponding field in the message interaction, the message may be considered to have integrity, and the message is not tampered; if not, the message is considered to be of no integrity, tampered, and the message needs to be discarded. Or the calculated third calculation result may be added to the message for setting the content of the corresponding field in the message, for example, when configuring the message, the calculated third calculation result may be used as the content of the corresponding field in the message, but is not limited thereto.
It should be noted that, the integrity process may be completed by the second network-side functional entity, or may be completed by the first network-side functional entity, but is not limited thereto.
In one embodiment of the invention, the confidentiality processing includes: : calculating by using a confidentiality algorithm based on a second specified parameter to obtain a fourth calculation result, wherein the second specified parameter comprises: the values of a confidentiality key and a signaling counting parameter are obtained; and carrying out bit-by-bit addition operation or exclusive-or operation on the fourth calculation result and the content in the message.
It should be noted that, the fourth calculation result and the content in the message may be subjected to bit-by-bit addition or exclusive-or operation, that is, the message may be encrypted or decrypted, for example, decryption is taken as an example. If the original data in the message can be obtained after the fourth calculation result and the content in the message are subjected to bit-by-bit addition or exclusive-or operation, it is indicated that the message has confidentiality, and if the original data cannot be obtained, the message may not have confidentiality and needs to be discarded, but the method is not limited to this.
It should be noted that, the value of the signaling counting parameter is a value of the signaling counting parameter related to at least one of the following selected by the terminal when performing message interaction with the network side functional entity: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity; the network side functional entity comprises the first network side functional entity or the second network side functional entity.
In an embodiment of the present invention, the first network-side functional entity determines a mobile network service to be selected according to the user subscription data, and selects the second network-side functional entity according to the selected mobile network service.
It should be noted that, the first network side functional entity may be an authentication and mobility management AMM functional entity and a session management SM functional entity, but is not limited thereto, and the second network side functional entity may be an authentication and mobility management AMM functional entity and a session management SM functional entity, but is not limited thereto. When the first network-side functional entity is an AMM functional entity, the second network-side functional entity may be an SM functional entity, but is not limited thereto.
It should be noted that, both the first network-side functional entity and the second network-side functional entity may allocate temporary identifiers to the terminal, and thus in an embodiment of the present invention, the first network-side functional entity or the second network-side functional entity sends the identifier of the first network-side functional entity and the identifier of the second network-side functional entity to the terminal. The first network side functional entity or the second network side functional entity sends a plurality of temporary user identifications aiming at the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities. The method may further comprise: the first network side functional entity receives a temporary user identifier which is sent by the second network side functional entity and is distributed to the terminal by the second network side functional entity; and the first network side functional entity sends the temporary user identifier distributed by the first network side functional entity to the terminal to the second network side functional entity.
For a better understanding of the present invention, the present invention is further explained below with reference to preferred examples.
The preferred embodiment of the present invention provides a message processing method, which includes: a first functional body which executes an AKA process and provides mobile network service, and after finishing the AKA process with UE, the first functional body sends a security context aiming at the UE to a second functional body; when the UE sends a message to the first or the second functional body or receives the message from the first or the second functional body, the UE selects a signaling count according to the service type, the service provider type or the service provider identification, and executes integrity and/or confidentiality processing on the message based on the signaling count.
The first functional body determines the mobile network service to be selected according to the user subscription data, and selects a second functional body according to the selected mobile network service; the first function body sends the identifications of the first function body and the second function body to the UE; the second functional body sends the temporary user identification distributed for the UE to the first functional body; a first functional body sends a plurality of temporary user identifications aiming at the UE to the UE, and different temporary user identifications are distributed by different functional bodies; the first functional body sends the temporary user identification distributed by the first functional body for the UE to the second functional body.
The first functional unit and the second functional unit may correspond to network-side functional entities in the above-described embodiment, and the service provider may correspond to a network-side functional entity in the above-described embodiment.
Fig. 8 is a flowchart illustrating a first message processing method according to a preferred embodiment of the present invention, which is applied in an initial attach process to enable a UE to access a mobile network and use services provided by the network, wherein a non-access stratum service is provided by two entities, namely an AMM (Authentication and Mobility Management) entity and an SM (Session Management) entity. As shown in fig. 8, the method includes:
step S802, the UE sends an Attach Request, such as an Attach Request message, to the RAN (or specifically, a base station system, such as an eNB);
step S804, RAN (or eNB) forwards the attachment request to AMM;
step S806, the AMM sends an ID Request, such as an Identity Request message, to the terminal UE;
step S808, the terminal UE responds to the ID Response, for example, sends an Identity Response message, where the message carries the UE-ID, i.e. the identifier of the terminal, such as the international mobile subscriber Identity IMSI;
step S810, AMM sends Authentication Data Request, such as Authentication Data Request message, carrying UE-ID to home subscriber service HSS;
step S812, the HSS generates a group of Authentication Vectors AVs (Authentication Vectors), and sends an Authentication Data Response, such as an Authentication Data Response message, to the AMM, where the Authentication Data Response message carries an Authentication vector group and may also carry user subscription Data;
step S814, the AMM and the UE perform mutual Authentication, for example, perform mutual Authentication through an Authentication and Key Agreement (AKA) process;
step S816, after AMM completes AKA process, generating security context for the UE, including KEY-ENC, KEY-INT, EEA, EIA, LENGTH, COUNT-UL-AMM, COUNT-DL-AMM, wherein COUNT-UL-AMM and COUNT-DL-AMM are AMM related uplink and downlink NAS signaling COUNTs;
step S818, the AMM sends a security protection initiation Command to the UE, for example, sends a Secure Mode Command message, because it is an initial attach procedure, at this time, the COUNT-DL-AMM and the COUNT-UL-AMM are cleared for initial initiation of security protection;
step S820, UE receives the security protection starting command and also generates a security context comprising KEY-ENC, KEY-INT, EEA, EIA, LENGTH, COUNT-UL-AMM and COUNT-DL-AMM, and all COUNT are reset because the security protection is initially started at this time;
another embodiment is that, without steps S830 and S832, the security context generated by the UE further includes COUNT-UL-SM and COUNT-DL-SM, where COUNT-UL-SM and COUNT-DL-SM are uplink and downlink NAS signaling COUNTs related to SM, and these COUNTs are also cleared for initial security protection;
step S822, the UE sends a security protection Complete message to the AMM, such as sending a Secure Mode Complete message, which will use integrity and confidentiality protection, because the message is sent to the AMM, the COUNT-UL-AMM in the UE security context will become 1, the AMM receiving the message will also change the COUNT-UL-AMM in the security context for the UE to 1, and subsequently interacts with the AMM again, which will add 1 to the COUNT-UL-AMM or COUNT-DL-AMM unless performing an AKA procedure;
subsequent steps S824-S828 are not related to steps S818-S822;
step S824, after step S816, the AMM selects a suitable SM to provide session service for the UE, and may determine whether to select an SM according to subscription data obtained from the HSS;
at step S826, the AMM may allocate a temporary identity Temp-ID2 to the UE, and send an Insert security Context Request to the selected SM, such as sending an Insert Secure Context Request message, where the message carries a security Context for the UE that needs to be sent to the SM, and includes at least one of: KEY-ENC and KEY-INT, EEA, EIA and LENGTH, AMM identification AMM-ID and Temp-ID2 can be carried;
step S828, the SM generates a security context for the UE, including at least one of: KEY-ENC, KEY-INT, and also include COUNT-UL-SM, COUNT-DL-SM, and may also include EEA, EIA, LENGTH, SM may allocate temporary user identity Temp-ID1 for the UE, if receiving Temp-ID2, may also associate Temp-ID1 with the duplet < AMM-ID, temp-ID2>, then SM sends Insert security Context Response to AMM, such as sending Insert Secure Context Response message, which may carry SM-ID and Temp-ID1, because of the initial attach process, in case there are no steps S830 and S832, both COUNT-UL-SM and COUNT-DL-SM are cleared;
in the case of another embodiment, the following steps S730 and S732 are performed.
Step S830, optionally, the SM sends a security protection initiation Command to the UE, for example, sends a Secure Mode Command message, because it is an initial attach process, at this time, for initially initiating security protection, COUNT-DL-SM and COUNT-UL-SM are cleared;
step S832, the UE receives the safety protection starting command and comprises COUNT-UL-SM and COUNT-DL-SM in the safety context, and the COUNTs are all cleared because the safety protection is initially started at the moment;
in step S834, the AMM may allocate a temporary identity Temp-ID2 to the UE, or associate the Temp-ID2 with a tuple < SM-ID, temp-ID1>, and then send an Attach Accept message to the UE, for example, send an Attach Accept message, where the message carries one or all of the SM-ID, AMM-ID, temp-ID1, and Temp-ID 2.
To this end, the UE may request or receive services provided by the AMM and services provided by the SM.
If the mobile network does not provide other services for the UE, steps S824-S830 are not executed, and in step S834, the AMM sends an attach accept message after receiving the message of step S822, and the message does not carry the SM-ID and Temp-ID1.
In the process of interaction between the AMM or SM and the UE, KEY-ENC and signaling count in the security context are used, the scheme in fig. 2 is adopted to protect the confidentiality of the message, and the input parameters may also include BEARER, DIRECTION (DIRECTION), and LENGTH. Using KEY-INT and signaling count in the security context, the scheme in fig. 3 is adopted to perform integrity protection on the MESSAGE, and the input parameters may further include BEARER (BEARER), DIRECTION (DIRECTION), and MESSAGE.
Fig. 9 is a flowchart illustrating a second message processing method according to a preferred embodiment of the present invention, where the method is applied to a location updating process, and after a certain time of the flowchart illustrated in fig. 8 occurs, the method updates terminal location information, as illustrated in fig. 9, and includes:
step S902, the UE sends a location Update Request, such as a Tracking Area Update Request message, carrying a message peer identifier AMM-ID and a temporary user identifier Temp-ID2 allocated by the AMM, to the RAN (or specifically, a base station system, such as an eNB);
step S904, RAN (or eNB) sends the service request to corresponding AMM according to the opposite end identification AMM-ID, and carries the received temporary user identification Temp-ID2 distributed by the AMM;
step S906, AMM may select, and perform an AKA procedure using a new Authentication Vector (AV) to authenticate the UE with each other;
step S908, AMM generates security context after executing AKA process;
step S910, the AMM optionally sends a security protection initiation Command to the UE, for example, sends a Secure Mode Command message;
step S912-S914, the UE receives the security protection start command, and sends a security protection Complete message to the AMM, for example, sends a Secure Mode Complete message, which will use integrity and confidentiality protection;
step S916, if the AMM performs step S806, selecting a suitable SM to provide session service for the UE, and determining whether to select an SM according to the subscription data obtained from the HSS;
step S918, if the AMM performs step S506, the AMM may allocate a temporary identity Temp-ID2 to the UE, and the AMM sends a Request for inserting a security Context to the selected SM, such as sending an Insert Secure Context Request message, where the message carries a security Context for the UE that needs to be sent to the SM, and includes at least one of: KEY-ENC and KEY-INT, EEA, EIA and LENGTH, AMM identification AMM-ID and Temp-ID2 can be carried;
step S920, the SM generates a security context for the UE, including at least one of: KEY-ENC, KEY-INT, but also COUNT-UL-SM, COUNT-DL-SM, but also EEA, EIA, LENGTH, SM may allocate temporary user identification Temp-ID1 for the UE, if it receives Temp-ID2, it may also associate Temp-ID1 with the binary < AMM-ID, temp-ID2>, SM then sends Insert security Context Response to AMM, such as send Insert Secure Context Response message, the message may carry SM-ID and Temp-ID1, because it is the security Context Insert after AKA, in case there is no steps S922 and S924, both COUNT-UL-SM and COUNT-DL-SM are cleared;
in the case of another embodiment, the following steps S922 and S924 are performed.
Step S922, optionally, the SM sends a security protection start Command to the UE, for example, sends a Secure Mode Command message, because the security protection after AKA is started, the COUNT-DL-SM and the COUNT-UL-SM are cleared;
step S924, the UE receives the security protection starting command, and clears the COUNT-UL-SM and the COUNT-DL-SM in the security context;
in step S926, the AMM may allocate a temporary identity Temp-ID2 to the UE, or associate the Temp-ID2 with a tuple < SM-ID, temp-ID1>, and then send a location Update Accept message to the UE, for example, send a Tracking Area Update Accept message, where the message carries the SM-ID, the AMM-ID, and one or all of Temp-ID1 and Temp-ID2, and the message is forwarded to the UE through the RAN (or eNB).
In the process of interaction between the AMM or SM and the UE, KEY-ENC and signaling count in the security context are used, the scheme in fig. 2 is adopted to protect the confidentiality of the message, and the input parameters may also include BEARER, DIRECTION (DIRECTION), and LENGTH. Using KEY-INT and signaling count in the security context, the scheme in fig. 3 is adopted to perform integrity protection on the MESSAGE, and the input parameters may further include BEARER (BEARER), DIRECTION (DIRECTION), and MESSAGE.
Fig. 10 is a third schematic flowchart of a message processing method according to a preferred embodiment of the present invention, which is applied to a process of initiating a service, and after a certain time of the flow shown in fig. 8, a service data transmission channel is established, so that a terminal can send or receive service data.
Step S1002, a terminal UE sends a Service Request, such as a Service Request message, to a RAN (or specifically a base station system, such as an eNB), where the Service Request message carries a message opposite terminal identifier SM-ID and a temporary user identifier Temp-ID1 allocated by the SM;
step S1004, RAN (or eNB) sends the service request to corresponding SM according to the opposite terminal identification SM-ID, and carries the temporary user identification Temp-ID1 distributed by the received SM;
step S1006, optionally, the SM requests the AMM to re-authenticate the UE, for example, sends an Authentication Request, which carries a temporary identifier Temp-ID2 allocated by the AMM to the UE;
steps S1008 to S1016 are the same as steps S1006 to S1014 in fig. 9;
steps S1018 to S1020 are the same as steps S1018 to S1020 in fig. 9, and because of the process of the authentication request trigger initiated by the SM, the AMM does not select the SM;
steps S1022 to S1024 are the same as steps S922 to S924 in fig. 9;
step S1026, the SM sends a Create Session Request, such as a Create Session Request message, to the gateway (such as the SGW or SGSN);
step S1028, the gateway responds to Create a Session Response, such as sending a Create Session Response message;
step S1030, the SM sends an Initial Context Setup Request, such as an Initial Context Setup Request message, to the RAN (or eNB);
step S1032, the RAN (or eNB) and the UE complete the radio bearer establishment procedure;
step S1034, the RAN (or eNB) sends an Initial Context Setup Response to the SM, for example, sends an Initial Context Setup Response message;
step S1036, the SM sends a Request for modifying the Bearer to the gateway, such as sending a Modify Bearer Request message;
in step S1038, the gateway sends a Modify Bearer Response to the SM, such as sending a Modify Bearer Response message.
In the process of interaction between the AMM or SM and the UE, KEY-ENC and signaling count in the security context are used, the scheme in fig. 2 is adopted to protect the confidentiality of the message, and the input parameters may also include BEARER, DIRECTION (DIRECTION), and LENGTH. Using KEY-INT and signaling count in the security context, the scheme in fig. 3 is adopted to perform integrity protection on the MESSAGE, and the input parameters may further include BEARER (BEARER), DIRECTION (DIRECTION), and MESSAGE.
Fig. 11 is a schematic diagram of the terminal processing NAS confidentiality protection according to the preferred embodiment of the present invention, and as shown in fig. 11, it shows a processing procedure of the terminal performing NAS protocol confidentiality protection through a currently used security context. When the terminal sends or receives the NAS signaling, it needs to use an Encryption Algorithm EEA (Evolved Packet System Encryption Algorithm), and inputs the following parameters: confidentiality KEY (KEY-ENC), signaling COUNT (COUNT), the following parameters may also be entered: BEARER number (BEARER), key stream LENGTH (LENGTH), DIRECTION flag (DIRECTION). Wherein the COUNT is related to a PEER identity or PEER type (PEER), or a service type (servvtype), that is, the COUNT of different PEERs or different service types is counted separately, and may also be related to a BEARER (BEARER) and a DIRECTION (DIRECTION). The EEA algorithm computes a keystream block (KEYSTREAM BLOCK). If NAS signaling (needing encryption) is sent, adding a sent plaintext data BLOCK (PLANTEXT BLOCK) and a key stream data BLOCK bit by bit to obtain a CIPHERTEXT data BLOCK (CIPHERTEXT BLOCK); if receiving NAS signaling (needing to be decrypted), adding the sent CIPHERTEXT data BLOCK (CIPHERTEXT BLOCK) and the key stream data BLOCK bit by bit to obtain a plaintext data BLOCK (PLANTEXT BLOCK).
Fig. 12 is a schematic diagram of the terminal processing NAS integrity protection according to the preferred embodiment of the present invention, and as shown in fig. 12, it shows a processing procedure of the terminal performing NAS protocol integrity protection through a currently used security context. When the terminal sends or receives the NAS signaling, it needs to use an Integrity Algorithm EIA (Evolved Packet System Integrity Algorithm), and inputs the following parameters: integrity KEY (KEY-INT), signaling COUNT (COUNT), the following parameters may also be entered: BEARER number (BEARER), MESSAGE content (MESSAGE), DIRECTION flag (DIRECTION). Wherein the COUNT is related to a PEER identity or PEER type (PEER), or a service type (servvtype), that is, the COUNT of different PEERs or different service types is counted separately, and may also be related to a BEARER (BEARER) and a DIRECTION (DIRECTION). If the NAS signaling is sent, the EIA calculates a Message Authentication Code (MAC), and the UE carries the MAC in the sent NAS signaling; if the NAS signaling is received, the EIA calculates an eXpected Message Authentication Code (XMAC-eXped Message Authentication Code), the UE compares the XMAC with the MAC in the received NAS signaling, processes the Message if the XMAC is the same as the MAC in the received NAS signaling, and discards the Message if the XMAC is different from the MAC in the received NAS signaling.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal functional entity (such as a mobile phone, a computer, a server, or a network functional entity) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a message processing apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 13 is a block diagram of a first structure of a message processing apparatus according to an embodiment of the present invention, as shown in fig. 13, the apparatus includes:
a selecting module 1302, configured to select, after the terminal completes the authentication and key agreement process, a value of a related signaling counting parameter when performing message interaction with the network side function entity, where the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity;
a processing module 1304, connected to the selecting module 1302, configured to perform integrity processing and/or confidentiality processing on the message in the message interaction based on the selected value.
With the above apparatus, because the selection module 1302 may select values of different signaling counting parameters according to at least one of a service type of a service provided by a network side functional entity, a type of the network side functional entity, and an identifier of the network side functional entity, and the processing module 1304 operates a message in message transmission according to the selected signaling counter, it may be further achieved that a complete non-access stratum service can be obtained under a condition that a plurality of network side functional entities provide non-access stratum services, and therefore, a problem that a terminal can only obtain a part of non-access stratum services due to the use of the same counter in related technologies may be solved.
It should be noted that, the network-side functional entity may include at least one of the following entities, but is not limited to the following entities: authentication and mobility management AMM functional entity, session management SM functional entity.
In an embodiment of the present invention, the processing module 1304 may further be configured to perform a calculation using an integrity algorithm based on a first specified parameter, so as to obtain a first calculation result, where the first specified parameter includes: integrity keys, said values; and comparing the first calculation result with the content of the corresponding field in the message, or adding the first calculation result to the message.
In an embodiment of the present invention, the processing module 1304 may be further configured to perform a calculation using a confidentiality algorithm based on a second specified parameter, so as to obtain a second calculation result, where the second specified parameter includes: a confidentiality key, said value; and performing bit-by-bit addition operation on the second calculation result and the content in the message.
It should be noted that the service type of the service provided by the network side functional entity may be a non-access stratum service, and specifically may be a session service or a location-related service, but is not limited thereto.
Specifically, the processing module 1304 may be further configured to increase a value of a first signaling count parameter when the terminal sends a first message to the network side functional entity, where the selected signaling count parameter includes the first signaling count parameter, and the message includes the first message; and when the terminal receives a second message from the network side functional entity, increasing the value of a second signaling counting parameter, wherein the selected signaling counting parameter comprises the second signaling counting parameter, and the message comprises the second message.
It should be noted that the first signaling count parameter may be an uplink signaling count parameter for the network side functional entity, and the second signaling count parameter may be a downlink signaling count parameter for the network side functional entity, but the invention is not limited thereto. When the network side functional entity is an AMM, the first signaling counting parameter may be an uplink signaling counting parameter (COUNT-UL-AMM) of the AMM, the second signaling counting parameter may be a downlink signaling counting parameter (COUNT-DL-AMM) of the AMM, and when the network side functional entity is an SM, the first signaling counting parameter may be an uplink signaling counting parameter (COUNT-UL-SM) of the SM, and the second signaling counting parameter may be a downlink signaling counting parameter (COUNT-DL-SM) of the SM.
When the terminal and the network side functional entity exchange messages, the processing module 1304 correspondingly increases the value of the corresponding signaling counting parameter, thereby realizing the protection of the integrity and/or confidentiality of the messages.
In an embodiment of the present invention, the apparatus may further include: a first receiving module, connected to the selecting module 1302, configured to receive a first command sent by a network-side functional entity; a generating module, connected to the first receiving module, for generating a security context in response to the first command, where the security context includes a value of the selected signaling counting parameter; and the clearing module is used for clearing the values of the plurality of signaling counting parameters on the terminal by the terminal, wherein the values of the plurality of signaling counting parameters comprise the value of the selected signaling counting parameter.
It should be noted that the above apparatus may further include: a generating module, configured to generate a security context for the terminal after the authentication module completes the mutual authentication, where the security context may include at least one of: confidentiality KEY-ENC, integrity KEY-INT, EEA, EIA, KEY stream LENGTH, COUNT-UL-AMM, and COUNT-DL-AMM, it should be noted that COUNT-UL-AMM and COUNT-DL-AMM are respectively the uplink and downlink NAS signaling COUNTs associated with the AMM.
It should be noted that the first command may be a security protection initiation command, but is not limited thereto. It should be noted that the security context generated in response to the first command may further include a confidentiality KEY-ENC, an integrity KEY-INT, EEA, EIA, and a KEY stream LENGTH, but is not limited thereto.
In an embodiment of the present invention, a network side function entity message processing apparatus is further provided, and fig. 14 is a block diagram of a structure of a message processing apparatus according to an embodiment of the present invention, as shown in fig. 14, the apparatus includes: an authentication negotiation module 1402, located in the first network side functional entity, configured to complete an authentication and key negotiation process with the terminal, and generate a first security context; a first sending module 1404, located in the first network side functional entity, configured to send a second security context to a second network side functional entity, where the second security context includes part or all of information in the first security context; and part or all of the information in the second security context is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on the message interacted with the terminal.
It should be noted that the first security context or the second security context includes an integrity key and/or a confidentiality key.
In an embodiment of the present invention, the apparatus further includes: a processing module, connected to the first sending module 1404, configured to perform, when performing message interaction with the terminal, calculation by using an integrity algorithm based on a first specified parameter, so as to obtain a third calculation result, where the first specified parameter includes: values of integrity keys and signaling counting parameters; and comparing the third calculation result with the content of the corresponding field in the message, and/or adding the third calculation result to the message.
The processing module may be further configured to, when performing message interaction with the terminal, perform calculation by using a confidentiality algorithm based on a second specified parameter, to obtain a fourth calculation result, where the second specified parameter includes: the values of confidentiality key and signaling counting parameter; and performing bit-by-bit addition operation on the fourth calculation result and the content in the message.
It should be noted that, the value of the signaling counting parameter is a value of the signaling counting parameter related to at least one of the following selected by the terminal when performing message interaction with the network side functional entity: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identification of the network side functional entity; the network side functional entity comprises the first network side functional entity or the second network side functional entity.
In an embodiment of the present invention, the apparatus may further include: and the selection module is positioned in the first network side functional entity and used for determining the mobile network service required to be selected according to the user subscription data and selecting the second network side functional entity according to the selected mobile network service.
In an embodiment of the present invention, the apparatus may further include: and the second sending module is located in the first network side functional entity or the second network side functional entity and is used for sending the identifier of the first network side functional entity and the identifier of the second network side functional entity to the terminal.
It should be noted that the second sending module is further configured to send a plurality of temporary user identifiers for the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
In an embodiment of the present invention, the apparatus may further include: a receiving module, located in the first network side functional entity, configured to receive a temporary user identifier, sent by the second network side functional entity, that is allocated to the terminal by the second network side functional entity; a third sending module, located in the first network side functional entity, configured to send, to the second network side functional entity, the temporary user identifier that is allocated by the first network side functional entity for the terminal.
The present invention provides a preferred message processing apparatus, comprising: the integrity processing module of UE processing message, the input COUNT parameter is selected according to the service provider identification, or service type, or service provider type of the message; and the UE processes the confidentiality processing module of the message, and the input COUNT parameter is selected according to the service provider identification, the service type or the service provider type of the message.
It should be noted that the integrity processing module for the UE to process the message and the confidentiality processing module for the UE to process the message are equivalent to the selecting module 1302 in the above embodiment.
It should be noted that the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
In this embodiment, a terminal is further provided, including the terminal message processing apparatus in embodiment 2, and it should be noted that details of the explanation of the terminal message processing apparatus are not repeated here.
In this embodiment, a message processing system is further provided, which includes a terminal and a network side functional entity, where after the terminal and the network side functional entity complete an authentication and key agreement process, a value of a related signaling count parameter is selected when performing a message interaction with the network side functional entity, where the selected value of the signaling count parameter is related to at least one of: the service type of the service provided by the network side functional entity, the type of the network side functional entity, the identification of the network side functional entity, and the integrity processing and/or confidentiality processing of the message in the message interaction based on the selected value.
The terminal may be the terminal including the terminal message processing apparatus in embodiment 2, but is not limited thereto.
It should be noted that the network side functional entity includes: the first network side functional entity and the terminal complete the authentication and key agreement process to generate a first security context; the first network side functional entity sends a second security context to the second network side functional entity, wherein the second security context comprises part or all of the first security context information and part or all of the second security context information, and the part or all of the second security context information is used for input parameters when the second network side functional entity performs integrity processing and/or confidentiality processing on messages interacting with the terminal.
It should be noted that, for interaction or functions between the first network-side functional entity and the second network-side functional entity, details may be described in embodiment 1, and details are not described herein again.
An embodiment of the present invention further provides a preferred system, including: the UE processes the integrality processing module of the message, the COUNT parameter input is according to the service provider label of the message, or the service type, or the service provider type choice; and the UE processes the confidentiality processing module of the message, and the input COUNT parameter is selected according to the service provider identification, the service type or the service provider type of the message.
The mobile network function body executing the AKA process comprises an AKA processing module and is used for finishing mutual authentication and key agreement with the UE; and the security context distribution module is used for sending the security context to the second functional body. Determining the mobile network service to be selected according to the user subscription data, and selecting a functional body according to the selected mobile network service; the identification distribution module is used for sending the identifications of the functional body and the other functional bodies to the UE; the identification distribution module sends a plurality of temporary user identifications aiming at the UE to the UE, and different temporary user identifications are distributed by different functional bodies; and the identification distribution module sends the temporary user identification distributed by the function body for the UE to other function bodies.
The integrity processing module for the UE to process the message and the confidentiality processing module for the UE to process the message correspond to the selecting module 1202 in embodiment 2, and are located in the terminal; the mobile network function corresponds to the network-side function entity in embodiment 2.
Example 4
The embodiment of the invention also provides a storage medium. Alternatively, in the present embodiment, the above-mentioned storage medium may be configured to store program codes for executing the steps of the method in embodiment 1.
Optionally, in this embodiment, the storage medium may include but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Alternatively, in the present embodiment, the processor executes the steps of the method in embodiment 1 according to the program code stored in the storage medium.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (26)

1. A message processing method, comprising:
after the terminal completes the authentication and key agreement process, selecting the value of the related signaling counting parameter when the terminal performs message interaction with the network side functional entity, wherein the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity;
the terminal executes integrity processing and/or confidentiality processing on the message in the message interaction based on the selected value;
the network side functional entity comprises a first network side functional entity and a second network side functional entity, wherein the first network side functional entity and the terminal complete an authentication and key agreement process to generate a first security context; the first network side functional entity sends a second security context to a second network side functional entity, wherein the second security context comprises part or all of information in the first security context, and the part or all of information in the second security context is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacted with the terminal; the first security context includes a signaling counting parameter for the first network side functional entity, part or all of information in the second security context is used as the signaling counting parameter for the second network side functional entity, and the signaling counting parameter of the second network side functional entity is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacting with the terminal.
2. The method of claim 1, wherein the terminal performing integrity processing on the message in the message interaction based on the selected value comprises:
the terminal calculates by using an integrity algorithm based on a first designated parameter to obtain a first calculation result, wherein the first designated parameter comprises: integrity keys, said values;
and the terminal compares the first calculation result with the content of the corresponding field in the message or adds the first calculation result into the message.
3. The method of claim 1, wherein the terminal performing confidentiality processing on the message in the message interaction based on the selected value comprises:
the terminal calculates by using a confidentiality algorithm based on a second specified parameter to obtain a second calculation result, wherein the second specified parameter comprises: a confidentiality key, said value;
and the terminal performs bit-by-bit addition operation or exclusive-or operation on the second calculation result and the content in the message.
4. The method of claim 1, wherein the first network-side functional entity determines a mobile network service to be selected according to user subscription data, and selects the second network-side functional entity according to the selected mobile network service.
5. The method according to claim 1, wherein the first network-side functional entity or the second network-side functional entity sends the identifier of the first network-side functional entity and the identifier of the second network-side functional entity to the terminal.
6. The method of claim 5, further comprising: the first network side functional entity or the second network side functional entity sends a plurality of temporary user identifications aiming at the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
7. The method of claim 1, further comprising:
the first network side functional entity receives a temporary user identifier which is sent by the second network side functional entity and is distributed to the terminal by the second network side functional entity;
and the first network side functional entity sends the temporary user identifier distributed by the first network side functional entity for the terminal to the second network side functional entity.
8. A message processing method, comprising:
the first network side functional entity and the terminal complete the authentication and key agreement process and generate a first security context;
the first network side functional entity sends a second security context to a second network side functional entity, wherein the second security context comprises part or all of information in the first security context, and the part or all of information in the second security context is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacted with the terminal;
the first security context includes a signaling counting parameter for the first network side functional entity, part or all of information in the second security context is used as the signaling counting parameter for the second network side functional entity, and the signaling counting parameter for the second network side functional entity is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacting with the terminal.
9. The method of claim 8, wherein the first security context or the second security context comprises an integrity key and/or a confidentiality key.
10. The method of claim 8, wherein the integrity processing comprises:
calculating by using an integrity algorithm based on a first designated parameter to obtain a third calculation result, wherein the first designated parameter comprises: the value of the integrity key and the signaling counting parameter;
comparing the third calculation result with the content of the corresponding field in the message, or adding the third calculation result to the message.
11. The method of claim 8, wherein the confidentiality processing comprises:
calculating by using a confidentiality algorithm based on a second specified parameter to obtain a fourth calculation result, wherein the second specified parameter comprises: the values of a confidentiality key and a signaling counting parameter are obtained;
and carrying out bit-by-bit addition operation or exclusive-or operation on the fourth calculation result and the content in the message.
12. The method of claim 8, wherein the first network-side functional entity determines a mobile network service to be selected according to the subscription data, and selects the second network-side functional entity according to the selected mobile network service.
13. The method according to claim 8, wherein the first network-side functional entity or the second network-side functional entity sends the identifier of the first network-side functional entity and the identifier of the second network-side functional entity to the terminal.
14. The method of claim 13, further comprising: the first network side functional entity or the second network side functional entity sends a plurality of temporary user identifications aiming at the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
15. The method of claim 8, further comprising:
the first network side functional entity receives a temporary user identifier which is sent by the second network side functional entity and is distributed to the terminal by the second network side functional entity;
and the first network side functional entity sends the temporary user identifier distributed by the first network side functional entity for the terminal to the second network side functional entity.
16. A message processing apparatus, comprising:
the terminal comprises a selection module and a key agreement module, wherein the selection module is used for selecting the value of a related signaling counting parameter when the terminal performs message interaction with a network side functional entity after finishing the authentication and key agreement process, and the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity and the identifier of the network side functional entity;
a processing module, configured to perform integrity processing and/or confidentiality processing on the message in the message interaction based on the selected value;
the network side functional entity comprises a first network side functional entity and a second network side functional entity, wherein the first network side functional entity and the terminal complete an authentication and key agreement process to generate a first security context; the first network side functional entity sends a second security context to a second network side functional entity, wherein the second security context comprises part or all of information in the first security context, and the part or all of information in the second security context is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacted with the terminal; the first security context includes a signaling counting parameter for the first network side functional entity, part or all of information in the second security context is used as the signaling counting parameter for the second network side functional entity, and the signaling counting parameter of the second network side functional entity is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacting with the terminal.
17. The apparatus of claim 16, wherein the processing module is further configured to perform a calculation using an integrity algorithm based on a first specified parameter, resulting in a first calculation result, wherein the first specified parameter comprises: integrity keys, said values; and comparing the first calculation result with the content of the corresponding field in the message, or adding the first calculation result to the message.
18. The apparatus of claim 16, wherein the processing module is further configured to perform a calculation using a confidentiality algorithm based on a second specified parameter, and obtain a second calculation result, wherein the second specified parameter comprises: a confidentiality key, said value; and performing bit-by-bit addition operation on the second calculation result and the content in the message.
19. A message processing apparatus, comprising:
the authentication negotiation module is positioned in the first network side functional entity and used for finishing authentication and key negotiation processes with the terminal and generating a first security context;
a first sending module, located in the first network-side functional entity, configured to send a second security context to a second network-side functional entity, where the second security context includes part or all of information in the first security context, and the part or all of the information in the second security context is used as an input parameter when the second network-side functional entity performs integrity processing and/or confidentiality processing on a message interacting with the terminal;
the first security context includes a signaling counting parameter for the first network side functional entity, part or all of the information in the second security context is used as the signaling counting parameter for the second network side functional entity, and the signaling counting parameter of the second network side functional entity is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacting with the terminal.
20. The apparatus of claim 19, wherein the first security context or the second security context comprises an integrity key and/or a confidentiality key.
21. The apparatus of claim 19, further comprising:
and the selection module is positioned in the first network side functional entity and used for determining the mobile network service required to be selected according to the user subscription data and selecting the second network side functional entity according to the selected mobile network service.
22. The apparatus of claim 19, further comprising:
and the second sending module is located in the first network side functional entity or the second network side functional entity and is used for sending the identifier of the first network side functional entity and the identifier of the second network side functional entity to the terminal.
23. The apparatus of claim 22, wherein the second sending module is further configured to send a plurality of temporary user identities for the terminal to the terminal; the plurality of temporary user identifications for the terminal are respectively allocated to the terminal by a plurality of different network side functional entities.
24. The apparatus of claim 19, further comprising:
a receiving module, located in the first network side functional entity, configured to receive a temporary user identifier, sent by the second network side functional entity, that is allocated to the terminal by the second network side functional entity;
a third sending module, located in the first network side functional entity, configured to send, to the second network side functional entity, the temporary user identifier that is allocated by the first network side functional entity for the terminal.
25. A terminal, comprising: the device of any one of claims 16 to 18.
26. A message processing system, comprising: a terminal and a network side functional entity; after the terminal and the network side functional entity complete the authentication and key agreement process, selecting the value of the related signaling counting parameter when the terminal and the network side functional entity perform message interaction, wherein the selected value of the signaling counting parameter is related to at least one of the following: the service type of the service provided by the network side functional entity, the type of the network side functional entity, the identification of the network side functional entity, and the integrity processing and/or confidentiality processing of the message in the message interaction based on the selected value;
the network side functional entity comprises: the first network side functional entity and the terminal complete the authentication and key agreement process to generate a first security context; the first network side functional entity sends a second security context to a second network side functional entity, wherein the second security context comprises part or all information of the first security context, and the part or all information of the second security context is used for input parameters of the second network side functional entity when the second network side functional entity executes integrity processing and/or confidentiality processing on messages interacted with the terminal; the first security context includes a signaling counting parameter for the first network side functional entity, part or all of information in the second security context is used as the signaling counting parameter for the second network side functional entity, and the signaling counting parameter of the second network side functional entity is used as an input parameter when the second network side functional entity performs integrity processing and/or confidentiality processing on a message interacting with the terminal.
CN201610511664.3A 2016-07-01 2016-07-01 Message processing method and device, terminal and message processing system Active CN107567018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610511664.3A CN107567018B (en) 2016-07-01 2016-07-01 Message processing method and device, terminal and message processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610511664.3A CN107567018B (en) 2016-07-01 2016-07-01 Message processing method and device, terminal and message processing system

Publications (2)

Publication Number Publication Date
CN107567018A CN107567018A (en) 2018-01-09
CN107567018B true CN107567018B (en) 2022-10-11

Family

ID=60969776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610511664.3A Active CN107567018B (en) 2016-07-01 2016-07-01 Message processing method and device, terminal and message processing system

Country Status (1)

Country Link
CN (1) CN107567018B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110121168B (en) * 2018-02-06 2021-09-21 华为技术有限公司 Security negotiation method and device
CN110536415B (en) * 2018-05-23 2020-11-20 大唐移动通信设备有限公司 NAS message processing method, cluster terminal and cluster core network
CN114079915A (en) * 2020-08-06 2022-02-22 华为技术有限公司 Method, system and device for determining user plane security algorithm

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873586A (en) * 2009-04-24 2010-10-27 华为技术有限公司 Synchronizing method of safety context of non-access layer and relevant equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072092B (en) * 2006-05-11 2010-12-08 华为技术有限公司 Method for realizing control plane and user plane key synchronization
CN101001252A (en) * 2006-06-25 2007-07-18 华为技术有限公司 Registration method and consultation method and device of user safety algorithmic
CN101237381B (en) * 2007-02-02 2010-07-07 华为技术有限公司 A method and system for transmitting START value
CN101594608B (en) * 2008-05-30 2012-08-22 华为技术有限公司 Method for providing security context, mobile management network element and mobile communication system
US9276909B2 (en) * 2008-08-27 2016-03-01 Qualcomm Incorporated Integrity protection and/or ciphering for UE registration with a wireless network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873586A (en) * 2009-04-24 2010-10-27 华为技术有限公司 Synchronizing method of safety context of non-access layer and relevant equipment

Also Published As

Publication number Publication date
CN107567018A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
US11695742B2 (en) Security implementation method, device, and system
US20200084631A1 (en) Key Configuration Method, Apparatus, and System
US9775028B2 (en) Method and related device for generating group key
US20140237559A1 (en) Method and related device for generating group key
AU2023201713A1 (en) Systems and method for security protection of NAS messages
CN109314638A (en) Cipher key configuration and security strategy determine method, apparatus
US11343673B2 (en) Enhanced aggregated re-authentication for wireless devices
US20200228977A1 (en) Parameter Protection Method And Device, And System
CN110891269B (en) Data protection method, equipment and system
EP2529566B1 (en) Efficient terminal authentication in telecommunication networks
CN107683616B (en) Security improvements in cellular networks
CN104247328B (en) Data transmission method and device
JP2020519157A (en) Key generation method, user equipment, device, computer-readable storage medium, and communication system
CN109788474A (en) A kind of method and device of message protection
JP7174156B2 (en) Ensuring Secure Attachment in Size-Limited Authentication Protocols
KR20210060667A (en) Methods providing security for multiple nas connections using separate counts and related network nodes and wireless terminals
CN107567018B (en) Message processing method and device, terminal and message processing system
CN112039838B (en) Secondary authentication method and system suitable for different application scenes of mobile communication
CN117981371A (en) Communication method, device and system
WO2020146661A1 (en) Integrity protection for user plane edt with multiple pdcp pdus
CN112995993A (en) Wireless network switching method and device
CN107005410B (en) Internet protocol security tunnel establishment method, user equipment and base station
CN109688581A (en) A kind of safe transmission method and device of data
CN115915114A (en) Registration method and device
Rani et al. Study on threats and improvements in LTE Authentication and Key Agreement Protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant