WO2018076299A1 - 数据传输方法及装置 - Google Patents

数据传输方法及装置 Download PDF

Info

Publication number
WO2018076299A1
WO2018076299A1 PCT/CN2016/103850 CN2016103850W WO2018076299A1 WO 2018076299 A1 WO2018076299 A1 WO 2018076299A1 CN 2016103850 W CN2016103850 W CN 2016103850W WO 2018076299 A1 WO2018076299 A1 WO 2018076299A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
key
terminal device
gateway device
credential
Prior art date
Application number
PCT/CN2016/103850
Other languages
English (en)
French (fr)
Inventor
谢翔
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2016/103850 priority Critical patent/WO2018076299A1/zh
Publication of WO2018076299A1 publication Critical patent/WO2018076299A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to a data transmission method and apparatus.
  • the Internet of Things is one of the fastest growing scenarios in 5G scenes.
  • a large number of terminal devices transmit data to the core network periodically or irregularly, and the amount of data of the data is not large.
  • This data is called small data.
  • water meters and electricity meters report data every month
  • environmental monitoring terminals report monitoring data irregularly.
  • the terminal device has high requirements on power consumption, and how to reduce the power consumption of the terminal device is very important.
  • the network side After the terminal device enters the network for authentication for the first time and the authentication is passed, the network side generates a cache (cookie) for the terminal device and sends the cookie to the terminal device.
  • the cookie includes a security context such as a key generated during network authentication and a negotiated algorithm.
  • the terminal device After receiving the cookie, the terminal device enters the sleep state if there is no small data to be transmitted, that is, it is in a state of no connection with the network side.
  • the terminal device transmits small data next time the small data is protected according to the key in the cookie and the negotiated algorithm, and is sent to the network side together with the cookie and the protected small data.
  • the network side first checks if the cookie is a valid cookie issued by itself. After the check is passed, the network side authenticates the protected small data according to the key and the negotiated algorithm, and restores the small data. The small data is then forwarded out.
  • the cookie contains sensitive data such as a secret key.
  • the terminal device sends the cookie along with the protected small data to the network side. Therefore, in order to transmit data securely, the terminal device must provide additional protection to the cookie when sending the cookie. However, the protection of the cookie will bring additional resource consumption to the terminal device, thereby causing higher power consumption of the terminal device.
  • Embodiments of the present invention provide a data transmission method and apparatus to reduce power consumption of a terminal device.
  • an embodiment of the present invention provides a data transmission method, including: receiving, by a terminal device, credential information from a gateway device; wherein the credential information includes a protection algorithm, a key generation information, and verification information that are pre-agreed by the terminal device and the gateway device; The terminal device generates a first key according to the key generation information; the terminal device generates the protected data according to the protection algorithm, the first key, and the data to be sent; the terminal device sends the protected data and the credential information to the gateway device, and implements
  • the voucher information does not include sensitive information such as a secret key, but includes key generation information.
  • the terminal device After receiving the voucher information, the terminal device generates a message according to the key and generates a secret key to protect the data to be sent.
  • the terminal device When the terminal device sends the protected data and the credential information to the gateway device, the credential information does not need to be additionally protected.
  • the terminal device when the terminal device protects the data to be sent, the symmetric key algorithm is used. Compared with the algorithm of the asymmetric key, the implementation process is simple, thereby reducing Power consumption of the terminal device.
  • the credential information further includes a temporary identifier of the terminal device
  • the verification information includes: expiration date information and signature information. The validity of the credential information can be verified by the verification information, and the security of the communication can be improved by adding the temporary identifier to the credential information.
  • the credential information also includes challenge information.
  • the method further includes: the terminal device generates a second key according to the key generation information; the terminal device generates the challenge response information according to the second key and the challenge information; correspondingly, after the terminal device sends the protection to the gateway device,
  • the data and the credential information include: the terminal device sends the protected data, the credential information, and the challenge response information to the gateway device. This method can verify the identity of the terminal device and improve the security of the communication.
  • the terminal device generates the first key according to the key generation information, including: the terminal device generates the first key according to the key generation information, the main work key, and the first identification string; wherein, the main work The key is pre-agreed by the terminal device and the authentication device; the terminal device generates the second key according to the key generation information, and the terminal device generates the second key according to the key generation information, the main working key and the second identification string. .
  • the method before the terminal device receives the credential information from the gateway device, the method further includes: the terminal device establishes a secure channel with the gateway device; the terminal device sets from the gateway The receiving voucher information includes: the terminal device receives the credential information from the gateway device through the secure channel. This method improves the security of credential information communication.
  • the embodiment of the present invention provides a data transmission method, including: the gateway device sends the credential information to the terminal device, where the credential information includes a protection algorithm, a key generation information, and a verification information that are pre-agreed by the terminal device and the gateway device.
  • the gateway device receives the protected data and the credential information from the terminal device; wherein the protected data is generated by the terminal device according to the protection algorithm, the first key, and the data to be sent; the gateway device verifies the credential information according to the verification information, and After the verification is passed, the first key is obtained according to the key generation information; the gateway device decrypts the protected data according to the first key and the protection algorithm, and obtains the data to be sent.
  • the credential information further includes a temporary identifier of the terminal device
  • the verification information includes: expiration date information and signature information.
  • the gateway device verifies the credential information according to the verification information, including: the gateway device determines whether the credential information is within the validity period according to the validity period information; and if the gateway device determines that the credential information is within the validity period, the credential information is verified according to the signature information. And acquiring the first key according to the key generation information, including: the gateway device acquiring the first key according to the temporary identifier and the key generation information.
  • the credential information further includes challenge information, where the challenge information is used to instruct the terminal device to generate challenge response information according to the second key and the challenge information, where the second key is generated by the terminal device according to the key generation information.
  • the gateway device receives the protected data and the credential information from the terminal device, including: the gateway device receives the protected data, the credential information, and the challenge response information from the terminal device; and the method further includes: the gateway device responds according to the challenge The information determines whether the identity of the terminal device is correct, and when determining that the identity of the terminal device is correct, determining to perform an operation of decrypting the protected data according to the first key and the protection algorithm.
  • the gateway device obtains the first key according to the temporary identifier and the key generation information, including: the gateway device acquires the identifier of the terminal device according to the temporary identifier; and the gateway device sends the secret key request information to the authentication device;
  • the key request information includes the identifier and the key generation information.
  • the key request information is used to instruct the authentication device to determine the primary work key according to the identifier, and generate the first key according to the key generation information, the primary work key, and the first identification string. Generating a second key according to the key generation information, the primary work key, and the second identification string, and sending the first key to the gateway device
  • the secret key and the second key the gateway device receives the first key and the second key from the authentication device.
  • the gateway device determines whether the identity of the terminal device is correct according to the challenge response information, including: the gateway device verifies whether the challenge response information is correct according to the second key and the challenge information; and if the challenge response information is correct, determining the terminal device The identity is correct; if the challenge responds to the information error, it determines the identity of the terminal device.
  • the method further includes: the gateway device establishes a secure channel with the terminal device; and the gateway device sends the credential information to the terminal device, including: the gateway device passes the secure channel Send credential information to the terminal device.
  • an embodiment of the present invention provides a terminal device, including: a receiving module, configured to receive credential information from a gateway device, where the credential information includes a protection algorithm, a key generation information, and a verification that are pre-agreed by the terminal device and the gateway device.
  • the first generation module is configured to generate a first key according to the key generation information
  • the second generation module is configured to generate the protected data according to the protection algorithm, the first key, and the data to be sent; The protected data and credential information are sent to the gateway device.
  • the credential information further includes a temporary identifier of the terminal device
  • the verification information includes: expiration date information and signature information.
  • the credential information also includes challenge information.
  • the terminal device further includes: a third generation module, configured to generate a second key according to the key generation information; and a fourth generation module, configured to generate challenge response information according to the second key and the challenge information;
  • the sending module is specifically configured to: send the protected data, the credential information, and the challenge response information to the gateway device.
  • the first generating module is specifically configured to: generate a first key according to the key generation information, the primary working key, and the first identification string; wherein the primary working key is the terminal device and the authentication device.
  • the third generation module is specifically configured to: generate a second key according to the key generation information, the primary work key, and the second identification string.
  • the terminal device further includes: an establishing module, configured to establish a secure channel with the gateway device; and the receiving module is configured to: receive the credential information from the gateway device through the secure channel.
  • the embodiment of the present invention provides a gateway device, including: a sending module, configured to send credential information to a terminal device, where the credential information includes a terminal device and a gateway device.
  • the receiving module is configured to receive the protected data and the credential information from the terminal device; wherein the protected data is the terminal device according to the protection algorithm, the first key and the to-be-protected
  • the generated module is configured to: verify the credential information according to the verification information, and obtain the first key according to the key generation information after the verification is passed;
  • the decryption module is configured to decrypt and protect according to the first key and the protection algorithm Data, get the data to be sent.
  • the credential information further includes a temporary identifier of the terminal device
  • the verification information includes: expiration date information and signature information.
  • the obtaining module includes: a verification sub-module, configured to determine whether the credential information is within the validity period according to the validity period information; if it is determined that the credential information is within the validity period, verifying whether the credential information is correct according to the signature information; acquiring the sub-module, It is used to obtain the first key according to the temporary identifier and the key generation information.
  • the credential information further includes challenge information, where the challenge information is used to instruct the terminal device to generate challenge response information according to the second key and the challenge information, where the second key is generated by the terminal device according to the key generation information.
  • the receiving module is specifically configured to: receive the protected data, the credential information, and the challenge response information from the terminal device; the gateway device further includes: a determining module, configured to determine, according to the challenge response information, whether the identity of the terminal device is correct And determining that the operation of decrypting the protected data according to the first key and the protection algorithm is performed when determining that the identity of the terminal device is correct.
  • the obtaining sub-module includes: an obtaining unit, configured to acquire an identifier of the terminal device according to the temporary identifier; and a sending unit, configured to send the key request information to the authentication device; wherein the key request information includes the identifier and the secret
  • the key generation information is used to indicate that the authentication device determines the primary working key according to the identifier, generates a first key according to the key generation information, the primary working key, and the first identification string, and generates information according to the key,
  • the primary working key and the second identification string generate a second key, and send the first key and the second key to the gateway device; and the receiving unit is configured to receive the first key and the second key from the authentication device.
  • the determining module is specifically configured to: verify whether the challenge response information is correct according to the second key and the challenge information; if the challenge response information is correct, determine that the identity of the terminal device is correct; if the challenge response information is incorrect, determine The identity of the terminal device is incorrect.
  • the gateway device further includes: an establishing module, configured to establish a secure channel with the terminal device; and the sending module is specifically configured to: send the device to the terminal device through the secure channel Voucher information.
  • an embodiment of the present invention provides a communications system, including:
  • FIG. 1 is a system structural diagram of an application scenario of a data transmission method according to an embodiment of the present disclosure
  • Embodiment 1 of a data transmission method according to an embodiment of the present invention
  • FIG. 3 is a signaling interaction diagram of Embodiment 2 of a data transmission method according to an embodiment of the present disclosure
  • FIG. 4 is a signaling interaction diagram of an implementation manner in which a gateway device obtains a first key in the embodiment shown in FIG. 3;
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of a terminal device according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of Embodiment 2 of a terminal device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of a gateway device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of a gateway device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of Embodiment 1 of a communication system according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of Embodiment 3 of a terminal device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of Embodiment 3 of a gateway device according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of Embodiment 2 of a communication system according to an embodiment of the present invention.
  • FIG. 1 is a system structural diagram of an application scenario of a data transmission method according to an embodiment of the present invention.
  • the data transmission method provided by the embodiment of the present invention can be applied to the following scenario: the terminal device sends data to the gateway device through a radio access network (Radio Access Network; RAN).
  • the data here can be small data.
  • the gateway device may be a user plane gateway (User Plane-GateWay; abbreviated as: UP-GW) in the 5G network.
  • UP-GW User Plane-GateWay
  • the authentication device here may be a Control Plane-Authentication Unit (CP-AU).
  • CP-AU Control Plane-Authentication Unit
  • the RAN only implements data transmitted between the transparent terminal device and the gateway device without processing the transmitted data.
  • the authentication device is responsible for providing the gateway device with the network access information of the terminal device when the terminal device accesses the network.
  • the data transmission method provided by the embodiment of the present invention sends a ticket information to the terminal device by using the gateway device, where the credential information includes a protection algorithm, a key generation information, and a verification information that are pre-agreed by the terminal device and the gateway device, and the terminal device is configured from the gateway.
  • the credential information includes a protection algorithm, a key generation information, and a verification information that are pre-agreed by the terminal device and the gateway device, and the terminal device is configured from the gateway.
  • the device receives the credential information, generates a first key according to the key generation information, generates the protected data according to the protection algorithm, the first key, and the data to be sent, and sends the protected data and the credential information to the gateway device, and the gateway device Receiving the protected data and the credential information from the terminal device, verifying the credential information according to the verification information, and after obtaining the verification, acquiring the first key according to the key generation information, and decrypting the protected according to the first key and the protection algorithm
  • the data, the data to be sent is obtained, and the credential information sent by the gateway device to the terminal device is implemented, and the sensitive information such as the secret key is not included, but the key generation information is included, and the terminal device receives the credential information according to the key.
  • the gateway device Generate information and generate a secret key, protect the data to be sent, and the gateway device is connected. After the data is protected, after the verification is passed, the secret key is obtained online, and the protected data is restored. On the one hand, when the terminal device sends the protected data and the credential information to the gateway device, the certificate is not required. Information for additional protection, on the other hand, terminal equipment When protecting the data to be sent, the algorithm of symmetric key is used. Compared with the algorithm of asymmetric key, the implementation process is simple, thereby reducing the power consumption of the terminal device.
  • the terminal device in the embodiment of the present invention may be a terminal device in the IOT, and may be an industrial device detection terminal, such as a displacement sensor, a position sensor, a liquid level sensor, etc., and may be a facility agricultural detection terminal, such as an air temperature and humidity sensor, and a soil.
  • the temperature sensor and the soil moisture sensor may be a Radio Frequency Identification (RFID) terminal, or may be a power system detection terminal such as an electric meter.
  • RFID Radio Frequency Identification
  • FIG. 2 is a signaling interaction diagram of Embodiment 1 of a data transmission method according to an embodiment of the present invention. As shown in FIG. 2, the data transmission method provided by the embodiment of the present invention includes the following steps:
  • the gateway device sends the credential information to the terminal device.
  • the credential information includes a protection algorithm, a key generation information, and verification information that are pre-agreed by the terminal device and the gateway device.
  • the terminal device may perform an initial network access process.
  • a complete authentication process is performed between the terminal device and the authentication device, for example, a complete authentication and key agreement (AKA) protocol.
  • the specific authentication process may be as follows: the terminal device sends an identifier to the authentication device through the RAN, where the identifier may be a permanent identifier of the terminal device, for example, an International Mobile Subscriber Identification Number (IMSI); the authentication device After receiving the permanent identifier of the terminal device, the permanent identifier is sent to the home subscriber server (Home Subscriber Server; HSS for short), the HSS obtains the root key according to the permanent identifier, generates an authentication vector, and sends the authentication vector to the authentication.
  • IMSI International Mobile Subscriber Identification Number
  • the authentication device After receiving the authentication vector, the authentication device sends a part of the information to the terminal device as the challenge information through the RAN. After receiving the challenge information, the terminal device determines the challenge response information according to the challenge information, and sends the challenge response information to the authentication device through the RAN. The authentication device determines whether the terminal device can access the network according to the challenge response information, and if possible, allows the terminal device to access the network, and the terminal device and the authentication device establish a shared primary work key to complete the authentication process. After the authentication is completed, the authentication device assigns the gateway device its session key to communicate with the terminal device. Gateway device and terminal device Negotiate the protection algorithm. That is to establish a secure channel.
  • the gateway device can send the credential information to the terminal device through the secure channel, and correspondingly, the terminal device receives the credential information through the secure channel. Transmitting and receiving the credential information through the secure channel can improve the security of the transmission credential information.
  • the gateway device may send the credential information to the terminal device immediately after the establishment of the secure channel with the terminal device is completed.
  • the terminal device and the gateway device in the credential information pre-approve the protection algorithm, which may be a protection algorithm negotiated between the terminal device and the gateway device after the initial authentication process is completed.
  • the protection algorithm may be an encryption algorithm, may be an integrity protection algorithm, or may be an encryption algorithm and an integrity protection algorithm.
  • the key generation information may be a sequence of random numbers generated by the gateway device.
  • the credential information is finally sent back to the gateway device by the terminal device.
  • the verification information may be used by the gateway device to verify the terminal device and the credential information. Information on effectiveness.
  • the verification information may be validity period information and signature information.
  • the credential information may further include a temporary identifier of the terminal device.
  • the gateway device may first send the credential information to the RAN. After receiving the credential information, the RAN does not perform any processing on the credential information, and directly transmits the information to the terminal device.
  • S202 The terminal device receives the credential information from the gateway device.
  • the terminal device can receive the credential information from the gateway device through the RAN.
  • S203 The terminal device generates a first key according to the key generation information.
  • the terminal device After receiving the credential information, if the terminal device does not need to send data at this time, the terminal device enters a sleep state. That is, the terminal device releases a secure channel established with the gateway device to save power consumption.
  • the terminal device may send data to the gateway device in a preset period.
  • the power meter sends the power data to the gateway device every 30 days.
  • the terminal device can wake up at a transmission time determined according to a preset period. After the terminal device wakes up, it can send data to the gateway device without connection.
  • the terminal device may wake up when there is data to send.
  • the terminal device After the terminal device wakes up, it first generates a first key to protect the data to be sent.
  • the terminal device may generate the first key according to the key generation information in the credential information.
  • Specific producer The formula can be generated according to a derived function pre-agreed with the gateway device.
  • S204 The terminal device generates the protected data according to the protection algorithm, the first key, and the data to be sent.
  • the terminal device may generate the protected data according to the protection algorithm, the first key, and the data to be sent in the credential information.
  • the specific generation process may be that the terminal device generates the protected data according to another derivative function pre-agreed with the gateway device.
  • S205 The terminal device sends the protected data and the credential information to the gateway device.
  • the gateway device receives the protected data and the credential information from the terminal device.
  • the protected data is generated by the terminal device according to the protection algorithm, the first key, and the data to be sent.
  • the terminal device After the terminal device generates the protected data, the terminal device sends the protected data and the credential information to the gateway device, and the gateway device receives the protected data and the credential information from the terminal device.
  • the key information is included in the voucher information and does not include the secret key. Therefore, the voucher information does not include sensitive information. At this time, when the terminal device sends the credential information to the gateway device, the terminal device may transmit in the form of clear text.
  • the terminal device sends the protected data and the credential information to the gateway device by using the RAN, and the gateway device receives the protected data and the credential information from the terminal device by using the RAN.
  • the gateway device may also release a secure channel established with the gateway device to save resources.
  • the gateway device verifies the credential information according to the verification information, and obtains the first key according to the key generation information after the verification is passed.
  • the gateway device After receiving the protected data and the credential information, the gateway device first verifies the credential information according to the verification information.
  • the gateway device may determine, according to the validity period information, whether the credential information is within the validity period. If the gateway device determines that the credential information is within the validity period, it verifies whether the credential information is correct according to the signature information.
  • the validity period information is the valid time of the credential information set by the gateway device to improve data transmission. Security.
  • the validity period information may be expressed in the form of a time period, for example, 30 days, indicating that the voucher information is valid within 30 days from the date of generation; the validity period information may also be expressed in the form of a date, for example, November 11, 2016, indicating the voucher Information is valid until 2016.11.11.
  • the signature information is formed by the gateway device after signing the protection information, the key generation information, and the validity period information in the generated credential information, and then signing the information with its own private key.
  • the gateway device may decrypt the signature in the received credential information by using the public key corresponding to the private key when the signature information is generated, and verify whether the decrypted information and the generated credential information are generated.
  • the information before the signature is the same. If they are the same, the credential information is correct, which means that the received credential information is the credential information sent by the gateway device; if not, the credential information is incorrect, indicating that the received credential information is not the credential information sent by the gateway device.
  • the verification is determined only when the gateway device determines that the credential information is within the validity period and the credential information is verified according to the signature information.
  • the gateway device may generate the first key according to the key generation information and the pre-agreed derivative function; or the gateway device may send the key generation information to other devices, such as the authentication device, and the authentication.
  • the device generates a first key according to the key generation information and a pre-agreed derivative function, and sends the first key to the gateway device.
  • the embodiments of the present invention do not limit this.
  • the credential information may further include a temporary identifier.
  • the gateway device can obtain the first key according to the temporary identifier and the key generation information. Specifically, the gateway device determines the identifier of the terminal device according to the temporary identifier, and acquires the first key according to the identifier and the key generation information.
  • the temporary identifier here may be a Temporary Mobile Subscriber Identity (TMSI) of the terminal device.
  • TMSI Temporary Mobile Subscriber Identity
  • the identifier here refers to the permanent identity of the terminal device, for example, IMSI.
  • the mapping relationship between the temporary identifier of the terminal device and the identifier of the terminal device is stored in the gateway device. The security of communication can be improved by adding a temporary identifier to the credential information.
  • the gateway device decrypts the protected data according to the first key and the protection algorithm, and acquires data to be sent.
  • the gateway device may decrypt the protected data according to the first key and a protection algorithm agreed in advance with the terminal device, thereby acquiring the data to be sent.
  • the gateway device may send the data to be sent to the server according to the service type performed by the terminal device.
  • the server here may be a server of the power plant.
  • the terminal device generates the protected data according to the protection algorithm, the first key, and the data to be sent, and the gateway device decrypts the protected data according to the first key and the protection algorithm to obtain the data to be sent.
  • the process of encrypting the transmitted data and decrypting the protected data is based on a symmetric key algorithm, and the implementation process of the terminal device for encrypting is simple compared to the algorithm of the asymmetric key, which reduces the terminal device.
  • Power consumption, at the same time, compared with the algorithm of asymmetric key the gateway device does not need to configure the global public key, identity and private key for the terminal device in advance, and does not need to perform private key revocation management.
  • the implementation process of the gateway device is also relatively advanced. Simple, saving resources of the gateway device.
  • the gateway device if the gateway device verifies the credential information and the verification fails, the gateway device sends the response information to the terminal device.
  • the response information may include new credential information generated by the gateway device to attempt to perform data transmission again.
  • the data transmission method provided by the embodiment of the present invention sends the credential information to the terminal device by using the gateway device, where the credential information includes a protection algorithm, a secret key generation information, and verification information that are pre-agreed by the terminal device and the gateway device, and the terminal device receives the credential from the gateway device.
  • the credential information includes a protection algorithm, a secret key generation information, and verification information that are pre-agreed by the terminal device and the gateway device, and the terminal device receives the credential from the gateway device.
  • the information generates a first key according to the key generation information, generates the protected data according to the protection algorithm, the first key, and the data to be sent, and sends the protected data and the credential information to the gateway device, and the gateway device slave terminal device Receiving the protected data and the credential information, verifying the credential information according to the verification information, and after the verification is passed, acquiring the first key according to the key generation information, and decrypting the protected data according to the first key and the protection algorithm, Acquiring the data to be sent, implementing the credential information sent by the gateway device to the terminal device, excluding the sensitive information such as the secret key, but including the key generation information, and after receiving the credential information, the terminal device generates the information according to the secret key.
  • Regenerate the secret key protect the data to be sent, and the gateway device receives it. After the data is protected, after the verification is passed, the secret key is obtained online, and the protected data is restored. On the one hand, when the terminal device sends the protected data and the credential information to the gateway device, the credential information is not needed. For additional protection, on the other hand, when the terminal device protects the data to be sent, it uses a symmetric key algorithm, which is simpler than the algorithm of the asymmetric key, thereby reducing the terminal device. Power consumption.
  • FIG. 3 is a signaling interaction diagram of Embodiment 2 of a data transmission method according to an embodiment of the present disclosure.
  • This hair The embodiment of the present invention provides a detailed description of the case where the credential information includes other information on the basis of the embodiment shown in FIG.
  • the data transmission method provided by the embodiment of the present invention includes the following steps:
  • S301 The gateway device sends the credential information to the terminal device.
  • S302 The terminal device receives the credential information from the gateway device.
  • the credential information in the embodiment of the present invention includes challenge information in addition to the protection algorithm, the key generation information, the verification information, and the temporary identifier of the terminal device.
  • the challenge information is used to instruct the terminal device to generate challenge response information according to the second key and the challenge information, where the second key is generated by the terminal device according to the key generation information.
  • the challenge information is information generated based on a challenge-response authentication mechanism. It can be a sequence of random numbers generated by the gateway device.
  • S303 The terminal device generates a first key according to the key generation information.
  • S304 The terminal device generates a second key according to the key generation information.
  • the terminal device generates the first key according to the key generation information, the primary work key, and the first identification string.
  • the master work key is pre-agreed by the terminal device and the authentication device.
  • the terminal device generates a second key according to the key generation information, the primary work key, and the second identification string.
  • the first key Ksession KDF(Kng, RAND, “SessionKey”), wherein KDF is a derivative function, Kng is a master work key, RAND is a secret key generation information, and “SessionKey” is a first identification string.
  • KDF is a derivative function
  • Kng is a master work key
  • RAND is a secret key generation information
  • SessionKey is a first identification string.
  • the main work key is pre-agreed by the terminal device and the authentication device.
  • the authentication device in the process that the terminal device and the authentication device agree on the primary working key, the authentication device generates the primary working key and sends it to the terminal device in the process of performing the authentication process with the authentication device when the terminal device enters the network. .
  • K MAC KDF (Kng, RAND, "MACKey”), wherein KDF is a derivative function, Kng is a master work key, RAND is a secret key generation information, and "MACKey” is a second identification string.
  • the first identification string and the second identification string may also be other forms of strings.
  • the embodiments of the present invention do not limit this.
  • the first identification string and the second identification string are different strings to ensure that the generated first key and the second key are different keys.
  • S305 The terminal device generates protection according to the protection algorithm, the first key, and the data to be sent. The data.
  • S306 The terminal device generates challenge response information according to the second key and the challenge information.
  • the terminal device may generate a challenge response information by using a hash algorithm, and use the second key and the challenge information as input of the hash algorithm to generate challenge response information.
  • the challenge response information may be the MD5 or SHA1 value of the second key and the challenge information.
  • the terminal device sends the protected data, the credential information, and the challenge response information to the gateway device.
  • the gateway device receives the protected data, the credential information, and the challenge response information from the terminal device.
  • the terminal device sends the protected data, the credential information, and the challenge response information to the gateway device, and the gateway device receives the foregoing information.
  • the terminal device sends the protected data, the credential information, and the challenge response information to the gateway device by using the RAN, and the gateway device receives the protected data, the credential information, and the challenge response information from the terminal device by using the RAN.
  • the gateway device verifies the credential information according to the verification information, and obtains the first key by verifying the information according to the temporary identifier and the key generation information.
  • the method for verifying the credential information by the gateway device according to the verification information is the same as that in the embodiment shown in FIG. 2, and details are not described herein again.
  • the gateway device After the gateway device passes the verification, the first key is obtained according to the temporary identifier and the key generation information.
  • FIG. 4 is a signaling interaction diagram of an implementation manner of the gateway device acquiring the first key in the embodiment shown in FIG.
  • the primary working key is not stored in the gateway device. Therefore, the gateway device cannot generate the first key, and the first key needs to be obtained from the authentication device.
  • This implementation includes the following steps:
  • the gateway device acquires the identifier of the terminal device according to the temporary identifier.
  • the gateway device can search for the identifier of the terminal device from the mapping relationship according to the temporary identifier.
  • the gateway device sends the secret key request information to the authentication device.
  • the secret key request information includes an identifier and a key generation information.
  • the key request information is used to indicate that the authentication device determines the primary work key according to the identifier, generates a first secret key according to the primary work key, the secret key generation information, and the first identification string, and generates information according to the primary work key and the secret key. And generating, by the second identifier string, a second key, and sending the first key and the second key to the gateway device.
  • S3093 The authentication device receives the key request information.
  • the gateway device After obtaining the identifier of the terminal device, the gateway device encapsulates the identifier and the key generation information into the key request information, and sends the information to the authentication device.
  • the authentication device receives the key request information.
  • the authentication device determines the primary work key according to the identifier.
  • the authentication device determines the primary working key according to the identifier in the secret key request information.
  • the mapping between the identifier of the terminal device and the primary working key is stored in the authentication device.
  • the authentication device can find the primary working key of the terminal device from the mapping relationship according to the identifier.
  • the authentication device generates a first key according to the primary work key, the secret key generation information, and the first identification string, and generates a second key according to the primary work key, the secret key generation information, and the second identification string.
  • S3096 The authentication device sends the first key and the second key to the gateway device.
  • the gateway device receives the first key and the second key from the authentication device.
  • the authentication device generates a first key according to the key generation information, the primary work key, and the first identification string, and generates a second key according to the key generation information, the primary work key, and the second identification string. And sent to the gateway device.
  • the first key and the second key may be encapsulated in a response message of the secret key request information and sent to the gateway device.
  • first identifier string and the second identifier string may be pre-agreed by the authentication device and the terminal device, or may be sent by the gateway device to the authentication device in the key request information.
  • the gateway device determines, according to the challenge response information, whether the identity of the terminal device is correct, and When it is determined that the identity of the terminal device is correct, it is determined to perform an operation of decrypting the protected data according to the first key and the protection algorithm.
  • the gateway device may determine, according to the second key and the challenge response information, whether the identity of the terminal device is correct.
  • the gateway device may generate a new challenge response message according to the second key and the challenge information, and compare whether the new challenge response information is the same as the challenge response information received from the terminal device. If the same, it is determined that the challenge response information is correct, that is, the identity of the terminal device is correct; if not, it is determined that the challenge response information is incorrect, that is, the identity of the terminal device is incorrect.
  • This step is to verify the identity of the terminal device to improve the security of data transmission.
  • S311 The gateway device decrypts the protected data according to the first key and the protection algorithm, and obtains data to be sent.
  • the gateway device verifies that the identity of the terminal device is incorrect, new credential information is generated and sent to the terminal device.
  • the new credential information can be sent to the terminal device through the secure channel formed after S307 and S308.
  • the voucher information includes a protection algorithm, a key generation information, a verification information, and a temporary identifier of the terminal device, and includes challenge information, and the terminal device generates a second secret according to the key generation information.
  • the terminal device generates challenge response information according to the second key and the challenge information
  • the terminal device sends the protected data, the credential information, and the challenge response information to the gateway device
  • the gateway device verifies the credential information according to the verification information, and the verification is based on the temporary
  • the identifier and the key generation information acquire the first key and the second key, and after obtaining the second key, verify the identity of the terminal device according to the second key and the challenge response information, and only the identity verification of the terminal device is correct. In this case, the operation of decrypting the protected data is performed, and the reliability and security of the data transmission are improved on the basis of reducing the power consumption of the terminal device.
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of a terminal device according to an embodiment of the present disclosure.
  • the terminal device provided by the embodiment of the present invention includes the following modules:
  • the receiving module 51 is configured to receive credential information from the gateway device.
  • the credential information includes a protection algorithm, key generation information, and verification information that are pre-agreed by the terminal device and the gateway device.
  • the credential information further includes a temporary identifier of the terminal device, where the verification information includes: validity period information and signature information.
  • the first generating module 52 is configured to generate a first key according to the key generation information.
  • the second generating module 53 is configured to generate the protected data according to the protection algorithm, the first key, and the data to be sent.
  • the sending module 54 is configured to send the protected data and the credential information to the gateway device.
  • the terminal device provided by the embodiment of the present invention may further include: an establishing module, configured to establish a secure channel with the gateway device.
  • the receiving module is specifically configured to: receive the credential information from the gateway device through the secure channel. The security of voucher information transmission can be improved by setting up the module.
  • the terminal device provided by the embodiment of the present invention may be specifically used to perform the operations performed by the terminal device in the embodiment shown in FIG. 2, and the implementation process and technical principles are similar, and details are not described herein again.
  • the terminal device configured to receive the credential information from the gateway device by using the receiving module, where the credential information includes a protection algorithm, a key generation information, and verification information that are pre-agreed by the terminal device and the gateway device, and the first generation module,
  • the second generating module is configured to generate the protected data according to the protection algorithm, the first key, and the data to be sent
  • the sending module is configured to send the protection to the gateway device after the first key is generated according to the key generation information.
  • the data and the credential information realize that the credential information received by the receiving module does not include sensitive information such as a secret key, but includes key generation information.
  • the first generating module After receiving the credential information, the first generating module generates information according to the key.
  • the terminal device is When protecting the data to be sent, the algorithm of symmetric key is used, compared to the asymmetric key. Algorithm, its implementation process is simple, thereby reducing the power consumption of the terminal device.
  • FIG. 6 is a schematic structural diagram of Embodiment 2 of a terminal device according to an embodiment of the present disclosure.
  • the embodiment of the present invention details the case where the credential information further includes other information on the basis of the embodiment shown in FIG. 5.
  • the voucher information also includes challenge information in this embodiment.
  • the terminal device provided by the embodiment of the present invention further includes:
  • the third generating module 61 is configured to generate a second key according to the key generation information.
  • the fourth generating module 62 is configured to generate challenge response information according to the second key and the challenge information.
  • the sending module 54 is specifically configured to: send the protected data, the credential information, and the challenge response information to the gateway device.
  • the first generating module 52 is specifically configured to: generate a first key according to the key generation information, the primary working key, and the first identification string.
  • the master work key is pre-agreed by the terminal device and the authentication device.
  • the third generation module 61 is specifically configured to: generate a second key according to the key generation information, the primary work key, and the second identification string.
  • the terminal device provided by the embodiment of the present invention may be specifically used to perform the operations performed by the terminal device in the embodiment shown in FIG. 3, and the implementation process and the technical principle are similar, and details are not described herein again.
  • the terminal device provided by the embodiment of the present invention is configured to generate a second key according to the key generation information by setting a third generation module, where the fourth generation module is configured to generate challenge response information according to the second key and the challenge information, and send The module is specifically configured to send the protected data, the credential information, and the challenge response information to the gateway device.
  • the credential information includes the protection algorithm, the key generation information, the verification information, and the temporary identifier of the terminal device, and the challenge information is implemented. The identity of the terminal device can be verified, and the reliability and security of data transmission are improved on the basis of reducing the power consumption of the terminal device.
  • FIG. 7 is a schematic structural diagram of Embodiment 1 of a gateway device according to an embodiment of the present disclosure.
  • the gateway device provided by the embodiment of the present invention includes the following modules:
  • the sending module 71 is configured to send the credential information to the terminal device.
  • the credential information includes a protection algorithm, a key generation information, and verification information that are pre-agreed by the terminal device and the gateway device.
  • the receiving module 72 is configured to receive the protected data and the credential information from the terminal device.
  • the protected data is generated by the terminal device according to the protection algorithm, the first key, and the data to be sent.
  • the obtaining module 73 is configured to verify the credential information according to the verification information, and obtain the first key according to the key generation information after the verification is passed.
  • the credential information further includes a temporary identifier of the terminal device, where the verification information includes: validity period information and signature information.
  • the obtaining module 73 includes: a verification submodule, configured to determine, according to the validity period information, whether the credential information is within a valid period; if the credential information is determined to be within the validity period, the credential is verified according to the signature information Whether the information is correct; the obtaining sub-module is configured to obtain the first key according to the temporary identifier and the key generation information.
  • the decryption module 74 is configured to decrypt the protected data according to the first key and the protection algorithm to obtain data to be sent.
  • the gateway device further includes: an establishing module, configured to establish a secure channel with the terminal device.
  • the sending module is specifically configured to: send the credential information to the terminal device through the secure channel. The security of voucher information transmission can be improved by setting up the module.
  • the gateway device provided by the embodiment of the present invention may be specifically used to perform the operations performed by the gateway device in the embodiment shown in FIG. 2, and the implementation process and technical principles are similar, and details are not described herein again.
  • the gateway device configured to send the credential information to the terminal device by using a sending module, where the credential information includes a protection algorithm, a key generation information, and a verification information that are pre-agreed by the terminal device and the gateway device, and the receiving module.
  • the method is configured to receive the protected data and the credential information from the terminal device, where the protected data is generated by the terminal device according to the protection algorithm, the first key, and the data to be sent, and the acquiring module is configured to verify the credential according to the verification information.
  • the information is obtained, and after the verification is passed, the first key is obtained according to the key generation information, and the decryption module is configured to decrypt the protected data according to the first key and the protection algorithm, obtain the data to be sent, and implement the gateway device to send to the terminal.
  • the credential information of the device does not include sensitive information such as a secret key, but includes key generation information.
  • the gateway device obtains the secret key online after the verification is passed, and restores the protected data. On the one hand, this causes the terminal device to send the protected data and credential information to the gateway device. There is no need to additionally protect the credential information.
  • the terminal device protects the data to be sent, the symmetric key algorithm is used, and the implementation process is simpler than the asymmetric key algorithm. Thereby, the power consumption of the terminal device is reduced.
  • FIG. 8 is a schematic structural diagram of Embodiment 2 of a gateway device according to an embodiment of the present disclosure.
  • the embodiment of the present invention details the case where the credential information further includes other information on the basis of the embodiment shown in FIG. 7.
  • the voucher information also includes challenge information in this embodiment.
  • the gateway device provided by the embodiment of the present invention further includes the following modules:
  • the challenge information in the credential information is used to instruct the terminal device to generate challenge response information according to the second key and the challenge information, where the second key is generated by the terminal device according to the key generation information.
  • the receiving module 72 is specifically configured to: receive the protected data, the credential information, and the Challenge response information.
  • the gateway device further includes: a determining module 81, configured to determine, according to the challenge response information, whether the identity of the terminal device is correct, and when determining that the identity of the terminal device is correct, determining to perform decryption of the protected data according to the first key and the protection algorithm. operating.
  • a determining module 81 configured to determine, according to the challenge response information, whether the identity of the terminal device is correct, and when determining that the identity of the terminal device is correct, determining to perform decryption of the protected data according to the first key and the protection algorithm. operating.
  • the determining module 81 is specifically configured to: verify that the challenge response information is correct according to the second key and the challenge information; if the challenge response information is correct, determine that the identity of the terminal device is correct; if the challenge response information is incorrect, determine the terminal device. The identity is wrong.
  • the obtaining sub-module includes: an obtaining unit, configured to acquire an identifier of the terminal device according to the temporary identifier; and a sending unit, configured to send the secret key request information to the authentication device, where the secret key request information includes the identifier and the secret key Generating information, the key request information is used to indicate that the authentication device determines the primary working key according to the identifier, generates a first key according to the key generation information, the primary working key, and the first identification string, and generates information according to the key, the main The working secret key and the second identification string generate a second key, and send the first key and the second key to the gateway device; and the receiving unit is configured to receive the first key and the second key from the authentication device.
  • the gateway device provided by the embodiment of the present invention may be specifically used to perform the operations performed by the gateway device in the embodiment shown in FIG. 3, and the implementation process and technical principles are similar, and details are not described herein again.
  • the gateway device provided by the embodiment of the present invention is configured to receive, by the receiving module, the protected data, the credential information, and the challenge response information, and the determining module is configured to determine, according to the challenge response information, whether the identity of the terminal device is correct, and When it is determined that the identity of the terminal device is correct, determining to perform the operation of decrypting the protected data according to the first key and the protection algorithm, implementing the gateway device to verify the credential information according to the verification information, and verifying by generating information according to the temporary identifier and the secret key Obtaining the first key and the second key, and after obtaining the second key, verifying the identity of the terminal device according to the second key and the challenge response information, and performing decryption only if the identity verification of the terminal device is correct.
  • the operation of the protected data improves the reliability and security of data transmission on the basis of reducing the power consumption of the terminal device.
  • FIG. 9 is a schematic structural diagram of Embodiment 1 of a communication system according to an embodiment of the present invention.
  • the communication system provided by the embodiment of the present invention includes: a terminal device 91 and a gateway device 92.
  • the terminal device 91 in the communication system provided by the embodiment of the present invention may be the terminal device in the embodiment shown in FIG. 5 or FIG. 6; the gateway device 92 in the communication system provided by the embodiment of the present invention may be as shown in FIG. 7 or FIG. The gateway device in the embodiment is shown.
  • FIG. 10 is a schematic structural diagram of Embodiment 3 of a terminal device according to an embodiment of the present disclosure.
  • the terminal device 100 provided by the embodiment of the present invention includes:
  • the transceiver 101 is configured to store instructions, and the processor 103 is connected to the memory 102 and the transceiver 101 respectively for executing instructions to perform the following steps when executing the instructions:
  • the credential information includes a protection algorithm, a secret key generation information, and verification information that are pre-agreed by the terminal device and the gateway device; generating a first key according to the key generation information; and according to the protection algorithm, The first key and the data to be transmitted generate the protected data; the protected data and the credential information are sent to the gateway device through the transceiver 101.
  • the credential information further includes a temporary identifier of the terminal device, where the verification information includes: validity period information and signature information.
  • the credential information also includes challenge information.
  • the processor 103 is further configured to: generate a second key according to the key generation information; and generate challenge response information according to the second key and the challenge information.
  • the processor 103 in transmitting the protected data and the credential information to the gateway device, is configured to: send, by the transceiver 101, the protected data, the credential information, and the challenge response information to the gateway device.
  • the processor 103 is configured to: generate a first key according to the key generation information, the primary work key, and the first identification string; wherein, the main work The secret key is pre-agreed by the terminal device and the authentication device.
  • the processor 103 is configured to: generate the second key according to the key generation information, the main work key, and the second identification string.
  • the processor 103 is further configured to establish a secure channel with the gateway device.
  • the processor 103 is configured to: receive credential information from the gateway device over the secure channel.
  • the terminal device provided by the embodiment of the present invention is specifically configured to perform the operations performed by the terminal device in the embodiment shown in FIG. 2 and FIG. 3, and the implementation process and technical effects are similar, and details are not described herein again.
  • FIG. 11 is a schematic structural diagram of Embodiment 3 of a gateway device according to an embodiment of the present disclosure.
  • the gateway device 110 provided by the embodiment of the present invention includes:
  • the transceiver 111 is configured to store instructions.
  • the processor 113 is connected to the memory 112 and the transceiver 111 respectively for executing instructions to perform the following steps when executing the instructions:
  • the credential information is sent to the terminal device by the transceiver 111.
  • the credential information includes a protection algorithm, a secret key generation information, and verification information that are pre-agreed by the terminal device and the gateway device.
  • the protected data and the credential are received from the terminal device by the transceiver 111.
  • the credential information further includes a temporary identifier of the terminal device, where the verification information includes: validity period information and signature information.
  • the processor 113 is configured to: determine whether the credential information is within the validity period according to the validity period information; and if the gateway device determines that the credential information is within the validity period, verify whether the credential information is correct according to the signature information.
  • the processor 113 is configured to: acquire the first key according to the temporary identifier and the key generation information.
  • the credential information further includes challenge information, where the challenge information is used to instruct the terminal device to generate challenge response information according to the second key and the challenge information, where the second key is generated by the terminal device according to the key generation information.
  • the processor 113 is configured to receive the protected data, the credential information, and the challenge response information from the terminal device through the transceiver 111 in terms of receiving the protected data and the credential information from the terminal device.
  • the processor 113 is further configured to: determine, according to the challenge response information, whether the identity of the terminal device is correct, and determine, when determining that the identity of the terminal device is correct, perform an operation of decrypting the protected data according to the first key and the protection algorithm.
  • the processor 113 is configured to: obtain the identifier of the terminal device according to the temporary identifier; and send the key request information to the authentication device by using the transceiver 111;
  • the key request information includes the identifier and the key generation information, and the key request information is used to instruct the authentication device to determine the primary work key according to the identifier, and generate the first according to the key generation information, the main work key, and the first identification string.
  • the secret key generates a second key according to the key generation information, the main working key and the second identification string, and sends the first key and the second key to the gateway device; and receives the first secret from the authentication device by using the transceiver 111. Key and second key.
  • the processor 113 is configured to: verify, according to the second key and the challenge information, whether the challenge response information is correct; if the challenge response information is correct, determine the terminal device. The identity is correct; if the challenge responds to the information error, it determines the identity of the terminal device.
  • the processor 113 is further configured to: establish a secure channel with the terminal device.
  • the processor 113 is configured to: send the credential information to the terminal device through the secure channel.
  • the terminal device provided by the embodiment of the present invention is specifically configured to perform the operations performed by the terminal device in the embodiment shown in FIG. 2 and FIG. 3, and the implementation process and technical effects are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of Embodiment 2 of a communication system according to an embodiment of the present invention.
  • the communication system provided by the embodiment of the present invention includes: a terminal device 121 and a gateway device 122.
  • the terminal device 121 in the communication system provided by the embodiment of the present invention may be the terminal device in the embodiment shown in FIG. 10; the gateway device 122 in the communication system provided by the embodiment of the present invention may be the gateway in the embodiment shown in FIG. device.
  • the disclosed apparatus and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit or module is only a logical function division.
  • there may be another division manner for example, multiple units or modules may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
  • the modules described as separate components may or may not be physically separated.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

本发明实施例提供一种数据传输方法及装置。该方法包括:网关设备向终端设备发送凭证信息,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息,终端设备从网关设备接收凭证信息,根据秘钥生成信息生成第一秘钥,根据保护算法、第一秘钥及待发送的数据生成保护后的数据,向网关设备发送保护后的数据及该凭证信息,网关设备从终端设备接收保护后的数据及凭证信息,根据验证信息验证该凭证信息,并在验证通过后,根据秘钥生成信息,获取第一秘钥,根据第一秘钥及保护算法解密该保护后的数据,获取待发送的数据,从而,降低了终端设备的功耗。

Description

数据传输方法及装置 技术领域
本发明实施例涉及通信技术,尤其涉及一种数据传输方法及装置。
背景技术
随着无线通信技术的飞速发展,第五代(5th Generation;简称:5G)无线通信技术已是目前业界的热点。物联网(Internet of Things;简称:IOT)是5G场景中发展最快的场景之一。IOT场景中海量的终端设备会周期性地或不定期地传送数据至核心网,并且,这些数据的数据量不大。将这些数据称为小数据。举例来说,水表、电表每个月上报数据,环境监测终端不定期上报监控数据。在周期性上传小数据的场景中,因为终端设备经常部署在人力很难触及的位置且没有外接电源,这就要求终端的使用寿命很长。因此,在这种场景中,终端设备对功耗有很高的要求,如何降低终端设备的功耗非常重要。
现有技术中,当终端设备首次入网进行认证并且认证通过之后,网络侧会为终端设备生成缓存(cookie),并发送给该终端设备。该cookie包括入网认证时生成的密钥及协商的算法等安全上下文。终端设备在接收到cookie后,如果没有小数据需要进行传输,会进入休眠状态,即处于与网络侧无连接的状态。当终端设备下次传输小数据时,会根据cookie中的密钥和协商的算法对小数据进行保护,并连同cookie和保护后的小数据一同发送给网络侧。网络侧首先检查cookie是不是自己颁发的有效cookie。在检查通过后,网络侧根据其中的密钥和协商的算法对保护后的小数据进行认证,并恢复该小数据。之后再将该小数据转发出去。
但是,上述过程中,cookie中包含秘钥等敏感数据,在上传小数据时,终端设备会将cookie随同保护后的小数据一同发给网络侧。因此,为了安全地传输数据,终端设备在发送cookie时,必须要给cookie提供额外的保护。但是,对cookie的保护会给终端设备带来额外的资源消耗,从而,导致终端设备的功耗较高。
发明内容
本发明实施例提供一种数据传输方法及装置,以降低终端设备的功耗。
第一方面,本发明实施例提供一种数据传输方法,包括:终端设备从网关设备接收凭证信息;其中,凭证信息包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息;终端设备根据秘钥生成信息生成第一秘钥;终端设备根据保护算法、第一秘钥及待发送的数据生成保护后的数据;终端设备向网关设备发送保护后的数据及凭证信息,实现了凭证信息中不包括秘钥等敏感信息,而是包括秘钥生成信息,终端设备在接收到凭证信息后,根据该秘钥生成信息再生成秘钥,对待发送的数据进行保护,一方面,这使得在终端设备向网关设备发送保护后的数据及凭证信息时,不需要对凭证信息进行额外的保护,另一方面,终端设备在对待发送的数据进行保护时,使用的是对称秘钥的算法,相较于非对称秘钥的算法,其实现过程简单,从而,降低了终端设备的功耗。
在一个可能的设计中,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。通过验证信息可以验证凭证信息的有效性,通过在凭证信息加入临时标识的方式可以提高通信的安全性。
在一个可能的设计中,凭证信息还包括挑战信息。
在一个可能的设计中,方法还包括:终端设备根据秘钥生成信息生成第二秘钥;终端设备根据第二秘钥及挑战信息生成挑战回应信息;相应地,终端设备向网关设备发送保护后的数据及凭证信息包括:终端设备向网关设备发送保护后的数据、凭证信息及挑战回应信息。该方式可以实现验证终端设备的身份,提高了通信的安全性。
在一个可能的设计中,终端设备根据秘钥生成信息生成第一秘钥,包括:终端设备根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥;其中,主工作秘钥为终端设备与认证设备预先约定的;终端设备根据秘钥生成信息生成第二秘钥,包括:终端设备根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥。
在一个可能的设计中,在终端设备从网关设备接收凭证信息之前,方法还包括:终端设备建立与网关设备之间的安全通道;终端设备从网关设 备接收凭证信息,包括:终端设备通过安全通道从网关设备接收凭证信息。该方式提高了凭证信息通信的安全性。
第二方面,本发明实施例提供一种数据传输方法,包括:网关设备向终端设备发送凭证信息;其中,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息;网关设备从终端设备接收保护后的数据及凭证信息;其中,保护后的数据为终端设备根据保护算法、第一秘钥及待发送的数据生成的;网关设备根据验证信息验证凭证信息,并在验证通过后根据秘钥生成信息获取第一秘钥;网关设备根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据。
在一个可能的设计中,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。
在一个可能的设计中,网关设备根据验证信息验证凭证信息,包括:网关设备根据有效期信息判断凭证信息是否在有效期内;若网关设备确定凭证信息在有效期内,则根据签名信息验证凭证信息是否正确;根据秘钥生成信息获取第一秘钥,包括:网关设备根据临时标识及秘钥生成信息获取第一秘钥。
在一个可能的设计中,凭证信息还包括挑战信息;其中,挑战信息用于指示终端设备根据第二秘钥及挑战信息生成挑战回应信息,第二秘钥为终端设备根据秘钥生成信息生成的。
在一个可能的设计中,网关设备从终端设备接收保护后的数据及凭证信息,包括:网关设备从终端设备接收保护后的数据、凭证信息及挑战回应信息;方法还包括:网关设备根据挑战回应信息确定终端设备的身份是否正确,并在确定终端设备的身份正确时,确定执行根据第一秘钥及保护算法解密保护后的数据的操作。
在一个可能的设计中,网关设备根据临时标识及秘钥生成信息获取第一秘钥,包括:网关设备根据临时标识获取终端设备的标识;网关设备向认证设备发送秘钥请求信息;其中,秘钥请求信息包括标识及秘钥生成信息,秘钥请求信息用于指示认证设备根据标识,确定主工作秘钥,根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥,根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥,向网关设备发送第一 秘钥和第二秘钥;网关设备从认证设备接收第一秘钥和第二秘钥。
在一个可能的设计中,网关设备根据挑战回应信息确定终端设备的身份是否正确,包括:网关设备根据第二秘钥及挑战信息验证挑战回应信息是否正确;若挑战回应信息正确,则确定终端设备的身份正确;若挑战回应信息错误,则确定终端设备的身份错误。
在一个可能的设计中,在网关设备向终端设备发送凭证信息之前,方法还包括:网关设备建立与终端设备之间的安全通道;网关设备向终端设备发送凭证信息,包括:网关设备通过安全通道向终端设备发送凭证信息。
第三方面,本发明实施例提供一种终端设备,包括:接收模块,用于从网关设备接收凭证信息;其中,凭证信息包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息;第一生成模块,用于根据秘钥生成信息生成第一秘钥;第二生成模块,用于根据保护算法、第一秘钥及待发送的数据生成保护后的数据;发送模块,用于向网关设备发送保护后的数据及凭证信息。
在一个可能的设计中,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。
在一个可能的设计中,凭证信息还包括挑战信息。
在一个可能的设计中,终端设备还包括:第三生成模块,用于根据秘钥生成信息生成第二秘钥;第四生成模块,用于根据第二秘钥及挑战信息生成挑战回应信息;相应地,发送模块具体用于:向网关设备发送保护后的数据、凭证信息及挑战回应信息。
在一个可能的设计中,第一生成模块具体用于:根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥;其中,主工作秘钥为终端设备与认证设备预先约定的;第三生成模块具体用于:根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥。
在一个可能的设计中,终端设备还包括:建立模块,用于建立与网关设备之间的安全通道;接收模块具体用于:通过安全通道从网关设备接收凭证信息。
第四方面,本发明实施例提供一种网关设备,包括:发送模块,用于向终端设备发送凭证信息;其中,凭证信息中包括终端设备与网关设备预 先约定的保护算法、秘钥生成信息及验证信息;接收模块,用于从终端设备接收保护后的数据及凭证信息;其中,保护后的数据为终端设备根据保护算法、第一秘钥及待发送的数据生成的;获取模块,用于根据验证信息验证凭证信息,并在验证通过后根据秘钥生成信息获取第一秘钥;解密模块,用于根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据。
在一个可能的设计中,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。
在一个可能的设计中,获取模块包括:验证子模块,用于根据有效期信息判断凭证信息是否在有效期内;若确定凭证信息在有效期内,则根据签名信息验证凭证信息是否正确;获取子模块,用于根据临时标识及秘钥生成信息获取第一秘钥。
在一个可能的设计中,凭证信息还包括挑战信息;其中,挑战信息用于指示终端设备根据第二秘钥及挑战信息生成挑战回应信息,第二秘钥为终端设备根据秘钥生成信息生成的。
在一个可能的设计中,接收模块具体用于:从终端设备接收保护后的数据、凭证信息及挑战回应信息;网关设备还包括:确定模块,用于根据挑战回应信息确定终端设备的身份是否正确,并在确定终端设备的身份正确时,确定执行根据第一秘钥及保护算法解密保护后的数据的操作。
在一个可能的设计中,获取子模块包括:获取单元,用于根据临时标识获取终端设备的标识;发送单元,用于向认证设备发送秘钥请求信息;其中,秘钥请求信息包括标识及秘钥生成信息,秘钥请求信息用于指示认证设备根据标识,确定主工作秘钥,根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥,根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥,向网关设备发送第一秘钥和第二秘钥;接收单元,用于从认证设备接收第一秘钥和第二秘钥。
在一个可能的设计中,确定模块具体用于:根据第二秘钥及挑战信息验证挑战回应信息是否正确;若挑战回应信息正确,则确定终端设备的身份正确;若挑战回应信息错误,则确定终端设备的身份错误。
在一个可能的设计中,网关设备还包括:建立模块,用于建立与终端设备之间的安全通道;发送模块具体用于:通过安全通道向终端设备发送 凭证信息。
第五方面,本发明实施例提供一种通信系统,包括:
如第三方面任一种可能的设计中的终端设备及如第四方面任一种可能的设计中的网关设备。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的数据传输方法的应用场景的系统结构图;
图2为本发明实施例提供的数据传输方法实施例一的信令交互图;
图3为本发明实施例提供的数据传输方法实施例二的信令交互图;
图4为图3所示实施例中网关设备获取第一秘钥的一种实现方式的信令交互图;
图5为本发明实施例提供的终端设备实施例一的结构示意图;
图6为本发明实施例提供的终端设备实施例二的结构示意图;
图7为本发明实施例提供的网关设备实施例一的结构示意图;
图8为本发明实施例提供的网关设备实施例二的结构示意图;
图9为本发明实施例提供的通信系统实施例一的结构示意图;
图10为本发明实施例提供的终端设备实施例三的结构示意图;
图11为本发明实施例提供的网关设备实施例三的结构示意图;
图12为本发明实施例提供的通信系统实施例二的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、 “第三”及“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
图1为本发明实施例提供的数据传输方法的应用场景的系统结构图。如图1所示,本发明实施例提供的数据传输方法可以应用于以下场景中:终端设备通过无线接入网(Radio Access Network;简称:RAN)向网关设备发送数据。这里的数据可以是小数据。在本发明实施例中,网关设备可以是5G网络中的用户面网关(User Plane-GateWay;简称:UP-GW)。在该架构中,为了保证传输的数据的安全性,网关设备与认证设备可以进行相互交互。这里的认证设备可以是控制面认证单元(Control Plane-Authentication Unit;简称:CP-AU)。在该架构中,RAN只实现透传终端设备和网关设备之间传输的数据,而不对传输的数据进行处理。认证设备负责在终端设备入网时,向网关设备提供终端设备的入网信息。
本发明实施例提供的数据传输方法,通过网关设备向终端设备发送凭证(ticket)信息,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息,终端设备从网关设备接收凭证信息,根据秘钥生成信息生成第一秘钥,根据保护算法、第一秘钥及待发送的数据生成保护后的数据,向网关设备发送保护后的数据及该凭证信息,网关设备从终端设备接收保护后的数据及凭证信息,根据验证信息验证该凭证信息,并在验证通过后,根据秘钥生成信息获取第一秘钥,根据第一秘钥及保护算法解密该保护后的数据,获取待发送的数据,实现了网关设备发送给终端设备的凭证信息中,不包括秘钥等敏感信息,而是包括秘钥生成信息,终端设备在接收到凭证信息后,根据该秘钥生成信息再生成秘钥,对待发送的数据进行保护,网关设备在接收到保护后的数据后,在验证通过后,在线获取秘钥,对保护后的数据进行恢复,一方面,这使得在终端设备向网关设备发送保护后的数据及凭证信息时,不需要对凭证信息进行额外的保护,另一方面,终端设备 在对待发送的数据进行保护时,使用的是对称秘钥的算法,相较于非对称秘钥的算法,其实现过程简单,从而,降低了终端设备的功耗。
本发明实施例所涉及的终端设备可以是IOT中的终端设备,可以是工业设备检测终端,如位移传感器、位置传感器及液位传感器等,可以是设施农业检测终端,如空气温湿度传感器、土壤温度传感器及土壤水分传感器等,可以是物流射频识别(Radio Frequency Identification;简称:RFID)终端,还可以是电力系统检测终端,如电表等。
下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图2为本发明实施例提供的数据传输方法实施例一的信令交互图。如图2所示,本发明实施例提供的数据传输方法包括如下步骤:
S201:网关设备向终端设备发送凭证信息。
其中,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息。
可选的,在网关设备向终端设备发送凭证信息之前,终端设备可以进行初始入网的流程。终端设备和认证设备之间进行完整的认证流程,比如,进行完整的认证秘钥协商(Authentication and Key Agreement;简称:AKA)协议。具体的认证流程可以表示如下:终端设备通过RAN向认证设备发送标识,这里的标识可以是终端设备的永久标识,例如,国际移动用户识别码(International Mobile Subscriber Identification Number;简称:IMSI);认证设备接收到终端设备的永久标识后,将该永久标识发送给归属用户服务器(Home Subscriber Server;简称:HSS),HSS根据该永久标识获取根秘钥,并生成认证向量,将该认证向量发送给认证设备;认证设备接收到该认证向量后,把其中的一部分信息作为挑战信息通过RAN发送给终端设备;终端设备在接收到该挑战信息后,根据挑战信息确定挑战回应信息,通过RAN发送给认证设备;认证设备根据该挑战回应信息确定终端设备是否可以入网,如果可以,则允许终端设备接入网络,终端设备和认证设备建立共享的主工作秘钥,完成认证流程。在认证完成后,认证设备会为网关设备分配其与终端设备通信的会话秘钥。网关设备会与终端设备 协商保护算法。即建立安全通道。可以理解的是,在安全通道建立完成之后,网关设备可以通过该安全通道向终端设备发送凭证信息,相应地,终端设备通过该安全通道接收凭证信息。通过安全通道收发该凭证信息可以提高传输凭证信息的安全性。
具体地,网关设备可以在与终端设备的安全通道建立完成后,立即向终端设备发送凭证信息。凭证信息中的终端设备与网关设备预先约定保护算法,可以是终端设备与网关设备在初始认证流程完成后协商的保护算法。该保护算法可以是加密算法,可以是完整性保护算法,还可以是加密算法和完整性保护算法。秘钥生成信息可以是网关设备生成的随机数序列。由于本发明实施例中凭证信息最终是要由终端设备发回网关设备的,为了便于网关设备验证终端设备的身份及凭证信息的有效性,验证信息可以是网关设备用于验证终端设备及凭证信息有效性的信息。
在一种可能的实现方式中,验证信息可以是有效期信息及签名信息。
可选的,凭证信息中还可以包括终端设备的临时标识。
需要说明的是,本发明实施例中,网关设备可以先将凭证信息发送给RAN。RAN接收到该凭证信息后,对该凭证信息不做任何处理,直接透传至终端设备。
S202:终端设备从网关设备接收凭证信息。
具体地,终端设备可以通过RAN从网关设备接收凭证信息。
S203:终端设备根据秘钥生成信息生成第一秘钥。
具体地,在接收到凭证信息后,如果此时终端设备没有数据需要发送,则终端设备进入休眠状态。即,终端设备释放与网关设备之间建立的安全通道,以节省功耗。
在一种实现方式中,终端设备可以是以预设的周期向网关设备发送数据,例如,电表每隔30天向网关设备发送电量数据。终端设备可以在根据预设的周期确定的发送时间苏醒。终端设备苏醒后,即可以在无连接的状态下向网关设备发送数据。
在另一种实现方式中,终端设备可以是在有数据需要发送时苏醒。
终端设备苏醒后,首先生成第一秘钥以对待发送的数据进行保护。终端设备可以根据凭证信息中的秘钥生成信息生成第一秘钥。具体的生成方 式可以是根据与网关设备预先约定的派生函数生成。
S204:终端设备根据保护算法、第一秘钥及待发送的数据生成保护后的数据。
具体地,在终端设备生成第一秘钥之后,终端设备可以根据凭证信息中的保护算法、第一秘钥及待发送的数据生成保护后的数据。
具体的生成过程可以是终端设备根据与网关设备预先约定的另一个派生函数生成保护后的数据。
S205:终端设备向网关设备发送保护后的数据及凭证信息。
S206:网关设备从终端设备接收保护后的数据及凭证信息。
其中,保护后的数据为终端设备根据保护算法、第一秘钥及待发送的数据生成的。
具体地,在终端设备生成保护的数据后,终端设备向网关设备发送保护后的数据及凭证信息,网关设备从终端设备接收保护后的数据及凭证信息。
凭证信息中包括了秘钥生成信息,并没有包括秘钥,因此,凭证信息中没有包括敏感信息。此时,在终端设备向网关设备发送该凭证信息时,可以是以明文发送的形式进行发送。
可选的,可以是终端设备通过RAN向网关设备发送保护后的数据及凭证信息,网关设备通过RAN从终端设备接收保护后的数据及凭证信息。
需要说明的是,在网关设备接收终端设备发送的保护后的数据以及凭证信息之前,网关设备也可以释放与网关设备之间建立的安全通道,以节省资源。
S207:网关设备根据验证信息验证凭证信息,并在验证通过后根据秘钥生成信息获取第一秘钥。
具体地,网关设备在接收到保护后的数据及凭证信息后,首先根据验证信息验证凭证信息。
可选的,当验证信息包括有效期信息及签名信息时,网关设备可以根据有效期信息判断凭证信息是否在有效期内。若网关设备确定凭证信息在有效期内,根据签名信息验证凭证信息是否正确。
有效期信息是网关设备设定的凭证信息的有效时间,以提高数据传输 的安全性。有效期信息可以以时间段的形式表示,例如,30天,表示该凭证信息从生成之日起30日内有效;有效期信息还可以以日期的形式表示,例如,2016年11月11日,表示该凭证信息在2016.11.11日之前是有效的。签名信息是网关设备在生成凭证信息中的保护算法、秘钥生成信息及有效期信息后,用自身的私钥给上述信息进行签名后形成的。
网关设备在根据签名信息验证凭证信息是否正确时,可以是以与生成签名信息时的私钥对应的公钥对收到的凭证信息中的签名进行解密,验证解密后的信息是否与生成凭证信息时签名前的信息相同。如果相同,则凭证信息正确,这表示接收到的凭证信息是该网关设备发出的凭证信息;如果不相同,则凭证信息不正确,表示接收到的凭证信息不是该网关设备发出的凭证信息。
只有在网关设备确定凭证信息在有效期内且根据签名信息验证凭证信息正确时,才确定验证通过。
在验证通过后,根据秘钥生成信息获取第一秘钥。在获取第一秘钥时,可以是网关设备根据秘钥生成信息及预先约定的派生函数生成第一秘钥;也可以是网关设备将秘钥生成信息发送给其他的设备,例如认证设备,认证设备根据秘钥生成信息及预先约定的派生函数生成第一秘钥,并发送给网关设备。本发明实施例对此不做限制。
可选的,凭证信息中还可以包括临时标识。网关设备可以根据临时标识及秘钥生成信息获取第一秘钥。具体的可以是网关设备根据临时标识确定终端设备的标识,以根据标识及秘钥生成信息获取第一秘钥。这里的临时标识可以是终端设备的临时识别码(Temporary Mobile Subscriber Identity;简称:TMSI)。这里的标识是指终端设备的永久标识,例如,IMSI。网关设备中存储有终端设备的临时标识与终端设备的标识之间的映射关系。通过在凭证信息加入临时标识的方式可以提高通信的安全性。
S208:网关设备根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据。
具体地,网关设备在获取到第一秘钥后,即可以根据第一秘钥以及预先与终端设备约定的保护算法解密保护后的数据,从而,获取到待发送的数据。
网关设备在获取到待发送的数据后,可以根据终端设备所执行的业务类型,将该待发送的数据发送给服务器。例如,如果该待发送的数据为电量数据,则这里的服务器可以是电厂的服务器。
可以理解的是,终端设备在根据保护算法、第一秘钥及待发送的数据生成保护后的数据,以及,网关设备根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据,对待发送的数据进行加密以及对保护后的数据进行解密的过程是基于对称秘钥的算法,其相较于非对称秘钥的算法,终端设备进行加密的实现过程简单,降低了终端设备的功耗,同时,相较于非对称秘钥的算法,网关设备不需要提前为终端设备配置全局公钥、身份标识和私钥,也不需要进行私钥撤销管理,网关设备的实现过程也较为简单,节省了网关设备的资源。
需要说明的是,若网关设备在验证凭证信息时,验证没有通过,则网关设备向终端设备发送响应信息。该响应信息中可以包括网关设备生成的新的凭证信息,以尝试再次进行数据传输。
本发明实施例提供的数据传输方法,通过网关设备向终端设备发送凭证信息,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息,终端设备从网关设备接收凭证信息,根据秘钥生成信息生成第一秘钥,根据保护算法、第一秘钥及待发送的数据生成保护后的数据,向网关设备发送保护后的数据及该凭证信息,网关设备从终端设备接收保护后的数据及凭证信息,根据验证信息验证该凭证信息,并在验证通过后,根据秘钥生成信息,获取第一秘钥,根据第一秘钥及保护算法解密该保护后的数据,获取待发送的数据,实现了网关设备发送给终端设备的凭证信息中,不包括秘钥等敏感信息,而是包括秘钥生成信息,终端设备在接收到凭证信息后,根据该秘钥生成信息再生成秘钥,对待发送的数据进行保护,网关设备在接收到保护后的数据后,在验证通过后,在线获取秘钥,对保护后的数据进行恢复,一方面,这使得在终端设备向网关设备发送保护后的数据及凭证信息时,不需要对凭证信息进行额外的保护,另一方面,终端设备在对待发送的数据进行保护时,使用的是对称秘钥的算法,相较于非对称秘钥的算法,其实现过程简单,从而,降低了终端设备的功耗。
图3为本发明实施例提供的数据传输方法实施例二的信令交互图。本发 明实施例在图2所示实施例的基础上,对凭证信息中包括其他信息的情况作一详细说明。如图3所示,本发明实施例提供的数据传输方法包括如下步骤:
S301:网关设备向终端设备发送凭证信息。
S302:终端设备从网关设备接收凭证信息。
具体地,本发明实施例中的凭证信息除了包括保护算法、秘钥生成信息、验证信息及终端设备的临时标识之外,还包括挑战(challenge)信息。
挑战信息用于指示终端设备根据第二秘钥及挑战信息生成挑战回应信息,第二秘钥是终端设备根据秘钥生成信息生成的。
挑战信息是基于挑战应答认证机制(challenge-response authentication mechanism)生成的信息。它可以是网关设备生成的随机数序列。
S303:终端设备根据秘钥生成信息生成第一秘钥。
S304:终端设备根据秘钥生成信息生成第二秘钥。
具体地,在一种可能的实现方式中,终端设备根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥。其中,主工作秘钥为终端设备与认证设备预先约定的。终端设备根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥。
即,第一秘钥Ksession=KDF(Kng,RAND,“SessionKey”),其中,KDF为派生函数,Kng为主工作秘钥,RAND为秘钥生成信息,“SessionKey”为第一标识字符串。主工作秘钥是终端设备与认证设备预先约定的。
需要说明的是,终端设备与认证设备约定主工作秘钥的方式,可以是在终端设备在入网时与认证设备进行认证流程的过程中,认证设备生成了主工作秘钥,并发送给终端设备。
第二秘钥KMAC=KDF(Kng,RAND,“MACKey”),其中,KDF为派生函数,Kng为主工作秘钥,RAND为秘钥生成信息,“MACKey”为第二标识字符串。
第一标识字符串和第二标识字符串还可以是其他形式的字符串。本发明实施例对此不做限制。
需要说明的是,在本发明实施例中,第一标识字符串和第二标识字符串是不同的字符串,以确保生成的第一秘钥和第二秘钥是不同的秘钥。
S305:终端设备根据保护算法、第一秘钥及待发送的数据生成保护后 的数据。
S305的实现过程和技术原理与S204的实现过程和技术原理类此,此处不再赘述。
S306:终端设备根据第二秘钥及挑战信息生成挑战回应信息。
具体地,终端设备可以采用哈希算法生成挑战回应信息,将第二秘钥及挑战信息作为哈希算法的输入,生成挑战回应信息。该挑战回应信息可以是第二秘钥及挑战信息的MD5或者SHA1值。
需要说明的是,S303-S306之间没有时序关系。即,这些步骤之间可以是并发执行的,也可以是以任意时序执行的,只要保证S306位于S304之后即可。
S307:终端设备向网关设备发送保护后的数据、凭证信息及挑战回应信息。
S308:网关设备从终端设备接收保护后的数据、凭证信息及挑战回应信息。
具体地,终端设备将保护后的数据、凭证信息及挑战回应信息发送给网关设备,网关设备接收上述信息。
可选的,可以是终端设备通过RAN向网关设备发送保护后的数据、凭证信息及挑战回应信息,网关设备通过RAN从终端设备接收保护后的数据、凭证信息及挑战回应信息。
S309:网关设备根据验证信息验证凭证信息,并在验证通过根据临时标识及秘钥生成信息获取第一秘钥。
具体地,网关设备根据验证信息验证凭证信息的方法,与图2所示实施例中的方式相同,此处不再赘述。
网关设备在验证通过后,根据临时标识及秘钥生成信息获取第一秘钥。
图4为图3所示实施例中网关设备获取第一秘钥的一种实现方式的信令交互图。在该实现方式中,网关设备中没有存储主工作秘钥,所以,网关设备无法生成第一秘钥,其需要从认证设备中获取第一秘钥。
该实现方式包括以下步骤:
S3091:网关设备根据临时标识获取终端设备的标识。
具体地,网关设备中存储有临时标识与标识的映射关系。因此,网关设备可以根据临时标识从该映射关系中查找该终端设备的标识。
S3092:网关设备向认证设备发送秘钥请求信息。
其中,秘钥请求信息包括标识及秘钥生成信息。秘钥请求信息用于指示认证设备根据标识,确定主工作秘钥,根据主工作秘钥、秘钥生成信息及第一标识字符串生成第一秘钥,根据主工作秘钥、秘钥生成信息及第二标识字符串生成第二秘钥,向网关设备发送第一秘钥和第二秘钥。
S3093:认证设备接收秘钥请求信息。
具体地,在获取到终端设备的标识后,网关设备将该标识及秘钥生成信息封装为秘钥请求信息,发送给认证设备。认证设备接收该秘钥请求信息。
S3094:认证设备根据标识确定主工作秘钥。
具体地,认证设备在接收到秘钥请求信息后,根据秘钥请求信息中的标识确定主工作秘钥。认证设备中存储有终端设备的标识与主工作秘钥的映射关系。认证设备根据标识可以从该映射关系中查找到该终端设备的主工作秘钥。
S3095:认证设备根据主工作秘钥、秘钥生成信息及第一标识字符串生成第一秘钥,根据主工作秘钥、秘钥生成信息及第二标识字符串生成第二秘钥。
S3096:认证设备向网关设备发送第一秘钥和第二秘钥。
S3097:网关设备从认证设备接收第一秘钥和第二秘钥。
具体地,认证设备会根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥,根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥,并发送给网关设备。
可选的,第一秘钥和第二秘钥可以是封装在秘钥请求信息的响应消息中,发送给网关设备的。
需要说明的是,第一标识字符串和第二标识字符串可以是认证设备与终端设备预先约定的,也可以是网关设备携带在秘钥请求信息中发送给认证设备的。
S310:网关设备根据挑战回应信息确定终端设备的身份是否正确,并 在确定终端设备的身份正确时,确定执行根据第一秘钥及保护算法解密保护后的数据的操作。
具体地,网关设备可以根据第二秘钥及挑战回应信息确定终端设备的身份是否正确。网关设备可以根据第二秘钥及挑战信息生成一个新的挑战回应信息,再比较该新的挑战回应信息与从终端设备接收到的挑战回应信息是否相同。如果相同,则确定该挑战回应信息正确,即该终端设备的身份正确;如果不相同,则确定该挑战回应信息错误,即该终端设备的身份不正确。
该步骤是为了验证终端设备的身份,以提高数据传输的安全性。
S311:网关设备根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据。
S311的实现过程和技术原理与S208的实现过程和技术原理类似,此处不再赘述。
需要说明的是,如果网关设备验证终端设备的身份不正确,则生成新的凭证信息,并发送给终端设备。该新的凭证信息可以通过S307及S308之后形成的安全通道发送给终端设备。
本发明实施例提供的数据传输方法中,凭证信息除了包括保护算法、秘钥生成信息、验证信息及终端设备的临时标识之外,还包括挑战信息,终端设备根据秘钥生成信息生成第二秘钥,终端设备根据第二秘钥及挑战信息生成挑战回应信息,终端设备向网关设备发送保护后的数据、凭证信息及挑战回应信息,网关设备根据验证信息验证凭证信息,并在验证通过根据临时标识及秘钥生成信息获取第一秘钥和第二秘钥,并在获取第二秘钥后,根据第二秘钥及挑战回应信息验证终端设备的身份,只有在终端设备的身份验证正确的情况下,才执行解密保护后的数据的操作,在降低了终端设备的功耗的基础上,提高了数据传输的可靠性和安全性。
图5为本发明实施例提供的终端设备实施例一的结构示意图。如图5所示,本发明实施例提供的终端设备包括如下模块:
接收模块51,用于从网关设备接收凭证信息。
其中,凭证信息包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息。
可选的,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。
第一生成模块52,用于根据秘钥生成信息生成第一秘钥。
第二生成模块53,用于根据保护算法、第一秘钥及待发送的数据生成保护后的数据。
发送模块54,用于向网关设备发送保护后的数据及凭证信息。
可选的,本发明实施例提供的终端设备还可以包括:建立模块,用于建立与网关设备之间的安全通道。则相应地,接收模块具体用于:通过安全通道从网关设备接收凭证信息。通过设置建立模块可以提高凭证信息传输的安全性。
本发明实施例提供的终端设备具体可以用于执行图2所示实施例中终端设备执行的操作,其实现过程和技术原理类似,此处不再赘述。
本发明实施例提供的终端设备,通过设置接收模块,用于从网关设备接收凭证信息,凭证信息包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息,第一生成模块,用于根据秘钥生成信息生成第一秘钥,第二生成模块,用于根据保护算法、第一秘钥及待发送的数据生成保护后的数据,发送模块,用于向网关设备发送保护后的数据及凭证信息,实现了接收模块接收到的凭证信息中,不包括秘钥等敏感信息,而是包括秘钥生成信息,在接收到凭证信息后,第一生成模块根据该秘钥生成信息再生成秘钥,对待发送的数据进行保护,一方面,这使得在终端设备向网关设备发送保护后的数据及凭证信息时,不需要对凭证信息进行额外的保护,另一方面,终端设备在对待发送的数据进行保护时,使用的是对称秘钥的算法,相较于非对称秘钥的算法,其实现过程简单,从而,降低了终端设备的功耗。
图6为本发明实施例提供的终端设备实施例二的结构示意图。本发明实施例在图5所示实施例的基础上,对凭证信息中还包括其他信息的情况进行详细说明。在本实施例中凭证信息还包括挑战信息。如图6所示,本发明实施例提供的终端设备还包括:
第三生成模块61,用于根据秘钥生成信息生成第二秘钥。
第四生成模块62,用于根据第二秘钥及挑战信息生成挑战回应信息。
发送模块54具体用于:向网关设备发送保护后的数据、凭证信息及挑战回应信息。
第一生成模块52具体用于:根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥。其中,主工作秘钥为终端设备与认证设备预先约定的。
第三生成模块61具体用于:根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥。
本发明实施例提供的终端设备具体可以用于执行图3所示实施例中终端设备执行的操作,其实现过程和技术原理类似,此处不再赘述。
本发明实施例提供的终端设备,通过设置第三生成模块,用于根据秘钥生成信息生成第二秘钥,第四生成模块,用于根据第二秘钥及挑战信息生成挑战回应信息,发送模块具体用于向网关设备发送保护后的数据、凭证信息及挑战回应信息,凭证信息除了包括保护算法、秘钥生成信息、验证信息及终端设备的临时标识之外,还包括挑战信息,实现了可以验证终端设备的身份,在降低了终端设备的功耗的基础上,提高了数据传输的可靠性和安全性。
图7为本发明实施例提供的网关设备实施例一的结构示意图。如图7所示,本发明实施例提供的网关设备包括如下模块:
发送模块71,用于向终端设备发送凭证信息。
其中,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息。
接收模块72,用于从终端设备接收保护后的数据及凭证信息。
其中,保护后的数据为终端设备根据保护算法、第一秘钥及待发送的数据生成的。
获取模块73,用于根据验证信息验证凭证信息,并在验证通过后根据秘钥生成信息获取第一秘钥。
可选的,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。
获取模块73包括:验证子模块,用于根据有效期信息判断凭证信息是否在有效期内;若确定凭证信息在有效期内,则根据签名信息验证凭证 信息是否正确;获取子模块,用于根据临时标识及秘钥生成信息获取第一秘钥。
解密模块74,用于根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据。
可选的,网关设备还包括:建立模块,用于建立与终端设备之间的安全通道。则相应地,发送模块具体用于:通过安全通道向终端设备发送凭证信息。通过设置建立模块可以提高凭证信息传输的安全性。
本发明实施例提供的网关设备具体可以用于执行图2所示实施例中网关设备执行的操作,其实现过程和技术原理类似,此处不再赘述。
本发明实施例提供的网关设备,通过设置发送模块,用于向终端设备发送凭证信息,其中,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息,接收模块,用于从终端设备接收保护后的数据及凭证信息,其中,保护后的数据为终端设备根据保护算法、第一秘钥及待发送的数据生成的,获取模块,用于根据验证信息验证凭证信息,并在验证通过后根据秘钥生成信息获取第一秘钥,解密模块,用于根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据,实现了网关设备发送给终端设备的凭证信息中,不包括秘钥等敏感信息,而是包括秘钥生成信息,网关设备在接收到保护后的数据后,在验证通过后,在线获取秘钥,对保护后的数据进行恢复,一方面,这使得在终端设备向网关设备发送保护后的数据及凭证信息时,不需要对凭证信息进行额外的保护,另一方面,终端设备在对待发送的数据进行保护时,使用的是对称秘钥的算法,相较于非对称秘钥的算法,其实现过程简单,从而,降低了终端设备的功耗。
图8为本发明实施例提供的网关设备实施例二的结构示意图。本发明实施例在图7所示实施例的基础上,对凭证信息中还包括其他信息的情况进行详细说明。在本实施例中凭证信息还包括挑战信息。如图8所示,本发明实施例提供的网关设备还包括如下模块:
本发明实施例中,凭证信息中的挑战信息用于指示终端设备根据第二秘钥及挑战信息生成挑战回应信息,第二秘钥为终端设备根据秘钥生成信息生成的。
接收模块72具体用于:从终端设备接收保护后的数据、凭证信息及 挑战回应信息。
该网关设备还包括:确定模块81,用于根据挑战回应信息确定终端设备的身份是否正确,并在确定终端设备的身份正确时,确定执行根据第一秘钥及保护算法解密保护后的数据的操作。
可选的,确定模块81具体用于:根据第二秘钥及挑战信息验证挑战回应信息是否正确;若挑战回应信息正确,则确定终端设备的身份正确;若挑战回应信息错误,则确定终端设备的身份错误。
本发明实施例中,获取子模块包括:获取单元,用于根据临时标识获取终端设备的标识;发送单元,用于向认证设备发送秘钥请求信息;其中,秘钥请求信息包括标识及秘钥生成信息,秘钥请求信息用于指示认证设备根据标识,确定主工作秘钥,根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥,根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥,向网关设备发送第一秘钥和第二秘钥;接收单元,用于从认证设备接收第一秘钥和第二秘钥。
本发明实施例提供的网关设备具体可以用于执行图3所示实施例中网关设备执行的操作,其实现过程和技术原理类似,此处不再赘述。
本发明实施例提供的网关设备,通过设置接收模块具体用于从终端设备接收保护后的数据、凭证信息及挑战回应信息,确定模块,用于根据挑战回应信息确定终端设备的身份是否正确,并在确定终端设备的身份正确时,确定执行根据第一秘钥及保护算法解密保护后的数据的操作,实现了网关设备根据验证信息验证凭证信息,并在验证通过根据临时标识及秘钥生成信息获取第一秘钥和第二秘钥,并在获取第二秘钥后,根据第二秘钥及挑战回应信息验证终端设备的身份,只有在终端设备的身份验证正确的情况下,才执行解密保护后的数据的操作,在降低了终端设备的功耗的基础上,提高了数据传输的可靠性和安全性。
图9为本发明实施例提供的通信系统实施例一的结构示意图。如图9所示,本发明实施例提供的通信系统包括:终端设备91和网关设备92。
本发明实施例提供的通信系统中的终端设备91可以为图5或图6所示实施例中的终端设备;本发明实施例提供的通信系统中的网关设备92可以为图7或图8所示实施例中的网关设备。
本发明实施例提供的通信提供具体可用于执行图2和图3所示方法实施例,其实现原理和技术效果类似,此处不再赘述。
图10为本发明实施例提供的终端设备实施例三的结构示意图。如图10所示,本发明实施例提供的终端设备100包括:
收发器101;存储器102,用于存储指令;处理器103,与存储器102和收发器101分别相连,用于执行指令,以在执行指令时执行如下步骤:
通过收发器101从网关设备接收凭证信息;其中,凭证信息包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息;根据秘钥生成信息生成第一秘钥;根据保护算法、第一秘钥及待发送的数据生成保护后的数据;通过收发器101向网关设备发送保护后的数据及凭证信息。
可选的,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。
可选的,凭证信息还包括挑战信息。处理器103还用于:根据秘钥生成信息生成第二秘钥;根据第二秘钥及挑战信息生成挑战回应信息。相应地,在向网关设备发送保护后的数据及凭证信息的方面,处理器103用于:通过收发器101向网关设备发送保护后的数据、凭证信息及挑战回应信息。
可选的,在根据秘钥生成信息生成第一秘钥的方面,处理器103用于:根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥;其中,主工作秘钥为终端设备与认证设备预先约定的。在根据秘钥生成信息生成第二秘钥的方面,处理器103用于:根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥。
可选的,处理器103还用于建立与网关设备之间的安全通道。在从网关设备接收凭证信息的方面,处理器103用于:通过安全通道从网关设备接收凭证信息。
本发明实施例提供的终端设备具体可用于执行图2和图3所示实施例中终端设备执行的操作,其实现过程和技术效果类似,此处不再赘述。
图11为本发明实施例提供的网关设备实施例三的结构示意图。如图11,所示,本发明实施例提供的网关设备110包括:
收发器111;存储器112,用于存储指令;处理器113,与存储器112和收发器111分别相连,用于执行指令,以在执行指令时执行如下步骤:
通过收发器111向终端设备发送凭证信息;其中,凭证信息中包括终端设备与网关设备预先约定的保护算法、秘钥生成信息及验证信息;通过收发器111从终端设备接收保护后的数据及凭证信息;其中,保护后的数据为终端设备根据保护算法、第一秘钥及待发送的数据生成的;根据验证信息验证凭证信息,并在验证通过后根据秘钥生成信息获取第一秘钥;根据第一秘钥及保护算法解密保护后的数据,获取待发送的数据。
可选的,凭证信息还包括终端设备的临时标识,验证信息包括:有效期信息及签名信息。在根据验证信息验证凭证信息的方面,处理器113用于:根据有效期信息判断凭证信息是否在有效期内;若网关设备确定凭证信息在有效期内,则根据签名信息验证凭证信息是否正确。在根据秘钥生成信息获取第一秘钥的方面,处理器113用于:根据临时标识及秘钥生成信息获取第一秘钥。
可选的,凭证信息还包括挑战信息;其中,挑战信息用于指示终端设备根据第二秘钥及挑战信息生成挑战回应信息,第二秘钥为终端设备根据秘钥生成信息生成的。在从终端设备接收保护后的数据及凭证信息的方面,处理器113用于:通过收发器111从终端设备接收保护后的数据、凭证信息及挑战回应信息。处理器113还用于:根据挑战回应信息确定终端设备的身份是否正确,并在确定终端设备的身份正确时,确定执行根据第一秘钥及保护算法解密保护后的数据的操作。
可选的,在根据临时标识及秘钥生成信息获取第一秘钥的方面,处理器113用于:根据临时标识获取终端设备的标识;通过收发器111向认证设备发送秘钥请求信息;其中,秘钥请求信息包括标识及秘钥生成信息,秘钥请求信息用于指示认证设备根据标识,确定主工作秘钥,根据秘钥生成信息、主工作秘钥及第一标识字符串生成第一秘钥,根据秘钥生成信息、主工作秘钥及第二标识字符串生成第二秘钥,向网关设备发送第一秘钥和第二秘钥;通过收发器111从认证设备接收第一秘钥和第二秘钥。
可选的,在根据挑战回应信息确定终端设备的身份是否正确的方面,处理器113用于:根据第二秘钥及挑战信息验证挑战回应信息是否正确;若挑战回应信息正确,则确定终端设备的身份正确;若挑战回应信息错误,则确定终端设备的身份错误。
可选的,处理器113还用于:建立与终端设备之间的安全通道。在向终端设备发送凭证信息的方面,处理器113用于:通过安全通道向终端设备发送凭证信息。
本发明实施例提供的终端设备具体可用于执行图2和图3所示实施例中终端设备执行的操作,其实现过程和技术效果类似,此处不再赘述。
图12为本发明实施例提供的通信系统实施例二的结构示意图。如图12所示,本发明实施例提供的通信系统包括:终端设备121和网关设备122。
本发明实施例提供的通信系统中的终端设备121可以为图10所示实施例中的终端设备;本发明实施例提供的通信系统中的网关设备122可以为图11所示实施例中的网关设备。
本发明实施例提供的通信提供具体可用于执行图2和图3所示方法实施例,其实现原理和技术效果类似,此处不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭示的装置和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元或模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (29)

  1. 一种数据传输方法,其特征在于,包括:
    终端设备从网关设备接收凭证信息;其中,所述凭证信息包括所述终端设备与所述网关设备预先约定的保护算法、秘钥生成信息及验证信息;
    所述终端设备根据所述秘钥生成信息生成第一秘钥;
    所述终端设备根据所述保护算法、所述第一秘钥及待发送的数据生成保护后的数据;
    所述终端设备向所述网关设备发送所述保护后的数据及所述凭证信息。
  2. 根据权利要求1所述的方法,其特征在于,所述凭证信息还包括所述终端设备的临时标识,所述验证信息包括:有效期信息及签名信息。
  3. 根据权利要求2所述的方法,其特征在于,所述凭证信息还包括挑战信息。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    所述终端设备根据所述秘钥生成信息生成第二秘钥;
    所述终端设备根据所述第二秘钥及所述挑战信息生成挑战回应信息;
    相应地,所述终端设备向所述网关设备发送所述保护后的数据及所述凭证信息包括:
    所述终端设备向所述网关设备发送所述保护后的数据、所述凭证信息及所述挑战回应信息。
  5. 根据权利要求4所述的方法,其特征在于,
    所述终端设备根据所述秘钥生成信息生成第一秘钥,包括:
    所述终端设备根据所述秘钥生成信息、主工作秘钥及第一标识字符串生成所述第一秘钥;其中,所述主工作秘钥为所述终端设备与认证设备预先约定的;
    所述终端设备根据所述秘钥生成信息生成第二秘钥,包括:
    所述终端设备根据所述秘钥生成信息、所述主工作秘钥及第二标识字符串生成所述第二秘钥。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,在所述终端设备从网关设备接收凭证信息之前,所述方法还包括:
    所述终端设备建立与所述网关设备之间的安全通道;
    所述终端设备从网关设备接收凭证信息,包括:
    所述终端设备通过所述安全通道从所述网关设备接收所述凭证信息。
  7. 一种数据传输方法,其特征在于,包括:
    网关设备向终端设备发送凭证信息;其中,所述凭证信息中包括所述终端设备与所述网关设备预先约定的保护算法、秘钥生成信息及验证信息;
    所述网关设备从所述终端设备接收保护后的数据及所述凭证信息;其中,所述保护后的数据为所述终端设备根据所述保护算法、第一秘钥及待发送的数据生成的;
    所述网关设备根据所述验证信息验证所述凭证信息,并在验证通过后根据所述秘钥生成信息获取所述第一秘钥;
    所述网关设备根据所述第一秘钥及所述保护算法解密所述保护后的数据,获取所述待发送的数据。
  8. 根据权利要求7所述的方法,其特征在于,所述凭证信息还包括所述终端设备的临时标识,所述验证信息包括:有效期信息及签名信息。
  9. 根据权利要求8所述的方法,其特征在于,所述网关设备根据所述验证信息验证所述凭证信息,包括:
    所述网关设备根据所述有效期信息判断所述凭证信息是否在有效期内;
    若所述网关设备确定所述凭证信息在所述有效期内,则根据所述签名信息验证所述凭证信息是否正确;
    所述根据所述秘钥生成信息获取所述第一秘钥,包括:
    所述网关设备根据所述临时标识及所述秘钥生成信息获取所述第一秘钥。
  10. 根据权利要求9所述的方法,其特征在于,所述凭证信息还包括挑战信息;其中,所述挑战信息用于指示所述终端设备根据第二秘钥及所述挑战信息生成挑战回应信息,所述第二秘钥为所述终端设备根据所述秘钥生成信息生成的。
  11. 根据权利要求10所述的方法,其特征在于,所述网关设备从所 述终端设备接收保护后的数据及所述凭证信息,包括:
    所述网关设备从所述终端设备接收所述保护后的数据、所述凭证信息及所述挑战回应信息;
    所述方法还包括:
    所述网关设备根据所述挑战回应信息确定所述终端设备的身份是否正确,并在确定所述终端设备的身份正确时,确定执行根据所述第一秘钥及所述保护算法解密所述保护后的数据的操作。
  12. 根据权利要求11所述的方法,其特征在于,所述网关设备根据所述临时标识及所述秘钥生成信息获取所述第一秘钥,包括:
    所述网关设备根据所述临时标识获取所述终端设备的标识;
    所述网关设备向所述认证设备发送秘钥请求信息;其中,所述秘钥请求信息包括所述标识及所述秘钥生成信息,所述秘钥请求信息用于指示所述认证设备根据所述标识,确定主工作秘钥,根据所述秘钥生成信息、所述主工作秘钥及第一标识字符串生成第一秘钥,根据所述秘钥生成信息、所述主工作秘钥及第二标识字符串生成第二秘钥,向所述网关设备发送所述第一秘钥和所述第二秘钥;
    所述网关设备从所述认证设备接收所述第一秘钥和所述第二秘钥。
  13. 根据权利要求12所述的方法,其特征在于,所述网关设备根据所述挑战回应信息确定所述终端设备的身份是否正确,包括:
    所述网关设备根据所述第二秘钥及所述挑战信息验证所述挑战回应信息是否正确;
    若所述挑战回应信息正确,则确定所述终端设备的身份正确;
    若所述挑战回应信息错误,则确定所述终端设备的身份错误。
  14. 根据权利要求7-13任一项所述的方法,其特征在于,在所述网关设备向所述终端设备发送凭证信息之前,所述方法还包括:
    所述网关设备建立与所述终端设备之间的安全通道;
    所述网关设备向所述终端设备发送凭证信息,包括:
    所述网关设备通过所述安全通道向所述终端设备发送所述凭证信息。
  15. 一种终端设备,其特征在于,包括:
    接收模块,用于从网关设备接收凭证信息;其中,所述凭证信息包括 所述终端设备与所述网关设备预先约定的保护算法、秘钥生成信息及验证信息;
    第一生成模块,用于根据所述秘钥生成信息生成第一秘钥;
    第二生成模块,用于根据所述保护算法、所述第一秘钥及待发送的数据生成保护后的数据;
    发送模块,用于向所述网关设备发送所述保护后的数据及所述凭证信息。
  16. 根据权利要求15所述的终端设备,其特征在于,所述凭证信息还包括所述终端设备的临时标识,所述验证信息包括:有效期信息及签名信息。
  17. 根据权利要求16所述的终端设备,其特征在于,所述凭证信息还包括挑战信息。
  18. 根据权利要求17所述的终端设备,其特征在于,所述终端设备还包括:
    第三生成模块,用于根据所述秘钥生成信息生成第二秘钥;
    第四生成模块,用于根据所述第二秘钥及所述挑战信息生成挑战回应信息;
    相应地,所述发送模块具体用于:
    向所述网关设备发送所述保护后的数据、所述凭证信息及所述挑战回应信息。
  19. 根据权利要求18所述的终端设备,其特征在于,所述第一生成模块具体用于:
    根据所述秘钥生成信息、主工作秘钥及第一标识字符串生成所述第一秘钥;其中,所述主工作秘钥为所述终端设备与认证设备预先约定的;
    所述第三生成模块具体用于:
    根据所述秘钥生成信息、所述主工作秘钥及第二标识字符串生成所述第二秘钥。
  20. 根据权利要求15-19任一项所述的终端设备,其特征在于,所述终端设备还包括:
    建立模块,用于建立与所述网关设备之间的安全通道;
    所述接收模块具体用于:
    通过所述安全通道从所述网关设备接收所述凭证信息。
  21. 一种网关设备,其特征在于,包括:
    发送模块,用于向终端设备发送凭证信息;其中,所述凭证信息中包括所述终端设备与所述网关设备预先约定的保护算法、秘钥生成信息及验证信息;
    接收模块,用于从所述终端设备接收保护后的数据及所述凭证信息;其中,所述保护后的数据为所述终端设备根据所述保护算法、第一秘钥及待发送的数据生成的;
    获取模块,用于根据所述验证信息验证所述凭证信息,并在验证通过后根据所述秘钥生成信息获取所述第一秘钥;
    解密模块,用于根据所述第一秘钥及所述保护算法解密所述保护后的数据,获取所述待发送的数据。
  22. 根据权利要求21所述的网关设备,其特征在于,所述凭证信息还包括所述终端设备的临时标识,所述验证信息包括:有效期信息及签名信息。
  23. 根据权利要求22所述的网关设备,其特征在于,所述获取模块包括:
    验证子模块,用于根据所述有效期信息判断所述凭证信息是否在有效期内;若确定所述凭证信息在所述有效期内,则根据所述签名信息验证所述凭证信息是否正确;
    获取子模块,用于根据所述临时标识及所述秘钥生成信息获取所述第一秘钥。
  24. 根据权利要求23所述的网关设备,其特征在于,所述凭证信息还包括挑战信息;其中,所述挑战信息用于指示所述终端设备根据第二秘钥及所述挑战信息生成挑战回应信息,所述第二秘钥为所述终端设备根据所述秘钥生成信息生成的。
  25. 根据权利要求24所述的网关设备,其特征在于,所述接收模块具体用于:
    从所述终端设备接收所述保护后的数据、所述凭证信息及所述挑战回 应信息;
    所述网关设备还包括:
    确定模块,用于根据所述挑战回应信息确定所述终端设备的身份是否正确,并在确定所述终端设备的身份正确时,确定执行根据所述第一秘钥及所述保护算法解密所述保护后的数据的操作。
  26. 根据权利要求25所述的网关设备,其特征在于,所述获取子模块包括:
    获取单元,用于根据所述临时标识获取所述终端设备的标识;
    发送单元,用于向所述认证设备发送秘钥请求信息;其中,所述秘钥请求信息包括所述标识及所述秘钥生成信息,所述秘钥请求信息用于指示所述认证设备根据所述标识,确定主工作秘钥,根据所述秘钥生成信息、所述主工作秘钥及第一标识字符串生成第一秘钥,根据所述秘钥生成信息、所述主工作秘钥及第二标识字符串生成第二秘钥,向所述网关设备发送所述第一秘钥和所述第二秘钥;
    接收单元,用于从所述认证设备接收所述第一秘钥和所述第二秘钥。
  27. 根据权利要求26所述的网关设备,其特征在于,所述确定模块具体用于:
    根据所述第二秘钥及所述挑战信息验证所述挑战回应信息是否正确;若所述挑战回应信息正确,则确定所述终端设备的身份正确;若所述挑战回应信息错误,则确定所述终端设备的身份错误。
  28. 根据权利要求21-27任一项所述的网关设备,其特征在于,所述网关设备还包括:
    建立模块,用于建立与所述终端设备之间的安全通道;
    所述发送模块具体用于:
    通过所述安全通道向所述终端设备发送所述凭证信息。
  29. 一种通信系统,其特征在于,包括:
    如权利要求15-20任一项所述的终端设备及如权利要求21-28任一项所述的网关设备。
PCT/CN2016/103850 2016-10-28 2016-10-28 数据传输方法及装置 WO2018076299A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/103850 WO2018076299A1 (zh) 2016-10-28 2016-10-28 数据传输方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/103850 WO2018076299A1 (zh) 2016-10-28 2016-10-28 数据传输方法及装置

Publications (1)

Publication Number Publication Date
WO2018076299A1 true WO2018076299A1 (zh) 2018-05-03

Family

ID=62023163

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103850 WO2018076299A1 (zh) 2016-10-28 2016-10-28 数据传输方法及装置

Country Status (1)

Country Link
WO (1) WO2018076299A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149168A (zh) * 2020-10-10 2020-12-29 中育数据(广州)科技有限公司 一种文件数据加密方法、装置及电子设备
WO2022166932A1 (zh) * 2021-02-05 2022-08-11 中国移动通信有限公司研究院 一种通信鉴权方法、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571702A (zh) * 2010-12-22 2012-07-11 中兴通讯股份有限公司 物联网中的密钥生成方法、系统和设备
CN103401678A (zh) * 2013-07-30 2013-11-20 成都卫士通信息产业股份有限公司 一种保障物联网数据传输安全的方法
CN103686717A (zh) * 2013-12-23 2014-03-26 江苏物联网研究发展中心 一种物联网传感系统的密钥管理方法
WO2014059136A2 (en) * 2012-10-12 2014-04-17 Safelylocked, Llc. Techniqued for secure data exchange
US20160028696A1 (en) * 2014-07-28 2016-01-28 The Boeing Company Network Address-Based Encryption

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571702A (zh) * 2010-12-22 2012-07-11 中兴通讯股份有限公司 物联网中的密钥生成方法、系统和设备
WO2014059136A2 (en) * 2012-10-12 2014-04-17 Safelylocked, Llc. Techniqued for secure data exchange
CN103401678A (zh) * 2013-07-30 2013-11-20 成都卫士通信息产业股份有限公司 一种保障物联网数据传输安全的方法
CN103686717A (zh) * 2013-12-23 2014-03-26 江苏物联网研究发展中心 一种物联网传感系统的密钥管理方法
US20160028696A1 (en) * 2014-07-28 2016-01-28 The Boeing Company Network Address-Based Encryption

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149168A (zh) * 2020-10-10 2020-12-29 中育数据(广州)科技有限公司 一种文件数据加密方法、装置及电子设备
CN112149168B (zh) * 2020-10-10 2024-06-04 中育数据(广州)科技有限公司 一种文件数据加密方法、装置及电子设备
WO2022166932A1 (zh) * 2021-02-05 2022-08-11 中国移动通信有限公司研究院 一种通信鉴权方法、设备及存储介质

Similar Documents

Publication Publication Date Title
US11909870B2 (en) ECDHE key exchange for mutual authentication using a key server
CN109923830B (zh) 用于配置无线网络接入设备的系统和方法
US10003582B2 (en) Technologies for synchronizing and restoring reference templates
CN105162772B (zh) 一种物联网设备认证与密钥协商方法和装置
US9467430B2 (en) Device, method, and system for secure trust anchor provisioning and protection using tamper-resistant hardware
US9509502B2 (en) Symmetric keying and chain of trust
CN109479049B (zh) 用于密钥供应委托的系统、设备和方法
US9762567B2 (en) Wireless communication of a user identifier and encrypted time-sensitive data
CN103685323A (zh) 一种基于智能云电视网关的智能家居安全组网实现方法
CN104579679B (zh) 用于农配网通信设备的无线公网数据转发方法
TW201417546A (zh) 即時通信方法和系統
CN105282179A (zh) 一种基于cpk的家庭物联网安全控制的方法
CN110909338B (zh) 一种基于安全芯片的安全认证方法与系统及安全芯片
KR101835640B1 (ko) 통신 연결 인증 방법, 그에 따른 게이트웨이 장치, 및 그에 따른 통신 시스템
CN107155184B (zh) 一种带有安全加密芯片的wifi模块及其通信方法
KR101848300B1 (ko) IoT 디바이스의 통신 클라이언트의 동작 방법 및 상기 통신 클라이언트를 포함하는 IoT 디바이스
Gupta et al. An improved authentication scheme for BLE devices with no I/O capabilities
US20210336781A1 (en) Network device, method for security and computer readable storage medium
WO2021083349A1 (zh) 一种基于安全芯片的安全认证方法与系统、安全芯片及可读存储介质
WO2018076299A1 (zh) 数据传输方法及装置
WO2020216047A1 (zh) 一种认证信息处理方法、终端和网络设备
CN210515295U (zh) 一种基于安全芯片的安全认证系统与信息处理装置
Alkanhal et al. A Distributed Lightweight PUF-Based Mutual Authentication Protocol for IoV
Yoon et al. Security enhancement scheme for mobile device using H/W cryptographic module
KR20200043855A (ko) Dim을 이용한 드론 인증 방법 및 장치

Legal Events

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

Ref document number: 16920015

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16920015

Country of ref document: EP

Kind code of ref document: A1