WO2018054144A1 - 对称密钥动态生成方法、装置、设备及*** - Google Patents

对称密钥动态生成方法、装置、设备及*** Download PDF

Info

Publication number
WO2018054144A1
WO2018054144A1 PCT/CN2017/092995 CN2017092995W WO2018054144A1 WO 2018054144 A1 WO2018054144 A1 WO 2018054144A1 CN 2017092995 W CN2017092995 W CN 2017092995W WO 2018054144 A1 WO2018054144 A1 WO 2018054144A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
unique identifier
client
globally unique
symmetric key
Prior art date
Application number
PCT/CN2017/092995
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 北京京东尚科信息技术有限公司
Publication of WO2018054144A1 publication Critical patent/WO2018054144A1/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/40Network security protocols
    • 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
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying
    • 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
    • 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
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use

Definitions

  • the present invention relates to the field of computer network application technologies, and in particular, to a symmetric key dynamic generation method, device, device and system.
  • encryption hides plaintext information so that it is unreadable in the absence of special information.
  • the special information here refers to the key used for encryption.
  • the same symmetric key is used for both cryptographic and decryption operations. Its biggest advantage is that the encryption and decryption speed is fast, suitable for encrypting large amounts of data.
  • the commonly used symmetric encryption algorithm is simple and efficient, the symmetric key used is short and the decoding is difficult, so symmetric encryption is widely used in the system.
  • the security and reliability of the key generation and management process directly determine the security and reliability of the entire system.
  • the symmetric key is generated and does not change during the entire system life cycle. If it is captured by a third party, the entire encryption system has no security at all.
  • the present invention provides a method, a device, a device and a system for dynamically generating a symmetric key, which can dynamically generate a symmetric key used in a life cycle of the system, thereby improving system security and reliability.
  • a method for dynamically generating a symmetric key includes: receiving an initial global unique identifier generated when an interconnect device starts; recording an initial global unique identifier as a key global unique identifier; And performing the authorization, sending a first authorization indication message to the interconnection device, where the first authorization indication message includes: a first global unique identifier and a first key parameter newly generated for the connected device; and receiving a first authorization response message sent by the interconnection device; Determining a symmetric key based on the key global unique identifier and the first key parameter; updating the key global unique identifier as the first global unique identifier; and using the symmetric key pair communication data in subsequent communication with the interconnected device Perform encryption and decryption.
  • the method further includes: authorizing the interconnection device again, and sending a second authorization indication message to the interconnection device, where the second authorization indication message includes: a second global unique identifier newly generated for the connected device And a second key parameter; receiving a second authorization response message sent by the interconnection device; determining a new symmetric key according to the key global unique identifier and the second key parameter; updating the globally unique identifier of the key to the second global A unique identifier; and the communication data is encrypted and decrypted using a new symmetric key in subsequent communications with the interconnected device.
  • determining the symmetric key according to the key global unique identifier and the first key parameter comprises: performing an exclusive OR operation on the key global unique identifier and the first key parameter, and performing an exclusive OR operation The result is a symmetric key; and/or, according to the key global unique identifier and the second key parameter, determining the new symmetric key comprises: performing an exclusive OR operation on the key global unique identifier and the second key parameter The result of the exclusive OR operation is taken as the new symmetric key.
  • a method for dynamically generating a symmetric key comprising: generating an initial global unique identifier at startup; broadcasting an initial global unique identifier to a client; and recording the initial global unique identifier as a key Globally unique identifier; receiving client And sending, by the first authorization indication message, the first authorization indication message includes: a newly generated first global unique identifier and a first key parameter; sending a first authorization response message to the client; A key parameter determines a symmetric key; the update key globally unique identifier is a first globally unique identifier; and the communication data is encrypted and decrypted using a symmetric key in subsequent communication with the client.
  • the method further includes: receiving a second authorization indication message sent by the client, where the second authorization indication message includes: a newly generated second global unique identifier and a second key parameter; Transmitting a second authorization response message; determining a new symmetric key according to the key global unique identifier and the second key parameter; updating the key global unique identifier to the second global unique identifier; and subsequently communicating with the client
  • the communication data is encrypted and decrypted using a new symmetric key.
  • determining the symmetric key according to the key global unique identifier and the first key parameter comprises: performing an exclusive OR operation on the key global unique identifier and the first key parameter, and performing an exclusive OR operation The result is a symmetric key; and/or, according to the key global unique identifier and the second key parameter, determining the new symmetric key comprises: performing an exclusive OR operation on the key global unique identifier and the second key parameter The result of the exclusive OR operation is taken as the new symmetric key.
  • a client device for dynamic generation of symmetric keys comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute via execution
  • the instructions are configured to: receive an initial globally unique identifier generated when the interconnect device starts; record the initial globally unique identifier as a key globally unique identifier; authorize the interconnected device, and send a first authorization indication message to the interconnected device,
  • the first authorization indication message includes: a first global unique identifier and a first key parameter newly generated for the connected device; receiving a first authorization response message sent by the interconnection device; and a globally unique identifier and a first key parameter according to the key Determining a symmetric key; updating the key globally unique identifier to be the first globally unique identifier; and encrypting the communication data using a symmetric key in subsequent communication with the interconnected device.
  • the operation further includes: re-authorizing the interconnection device, and sending a second authorization indication message to the interconnection device, where the second authorization indication message includes: a second global unique identifier newly generated for the connected device and a second key parameter; receiving a second authorization response message sent by the interconnection device; according to the key global unique identifier and the second key parameter, A new symmetric key; the update key globally unique identifier is a second globally unique identifier; and the communication data is encrypted and decrypted using a new symmetric key in subsequent communication with the interconnected device.
  • an interconnect device for dynamic generation of a symmetric key, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instruction The following operations are performed: generating an initial global unique identifier at startup; broadcasting an initial global unique identifier to the client; recording the initial global unique identifier as a key global unique identifier; receiving the first authorization indication message sent by the client The first authorization indication message includes: a first global unique identifier and a first key parameter newly generated for the connected device; and sending a first authorization response message to the client; and the global unique identifier and the first key parameter according to the key Determining a symmetric key; updating the key globally unique identifier to be the first globally unique identifier; and encrypting the communication data using a symmetric key in subsequent communication with the client.
  • the operation further includes: receiving a second authorization indication message sent by the client, where the second authorization indication message includes: a second global unique identifier and a second key parameter newly generated for the connected device;
  • the client sends a second authorization response message; determining a new symmetric key according to the key global unique identifier and the second key parameter; updating the key global unique identifier to the second global unique identifier; and subsequently following the client
  • the communication data is encrypted and decrypted using a new symmetric key.
  • a symmetric key dynamic generation system comprising: any one of the foregoing client devices and any one of the foregoing interconnection devices.
  • a symmetric key dynamic generation apparatus includes: a sending module, an identifier recording module, a receiving module, and a key determining module; wherein the receiving module receives an initial global unique generated when the interconnecting device starts An identifier; the identifier recording module records the initial global unique identifier as a key global unique identifier; the sending module authorizes the interconnected device, and sends a first authorization indication message to the interconnected device, where the first authorization indication message includes: a newly generated first global unique identifier and a first key parameter; the receiving module receives a first authorization response message sent by the interconnection device; and the key determining module determines the symmetric key according to the key global unique identifier and the first key parameter Key; identifier record module update key global unique identifier is the first global unique identifier; and the sending module and the receiving module are The communication data is encrypted and decrypted using a symmetric key in subsequent communication with the interconnected device.
  • the sending module further authorizes the interconnected device, and sends a second authorization indication message to the interconnecting device, where the second authorization indication message includes: a second global unique identifier newly generated for the connected device, and a second a key parameter; the receiving module receives a second authorization response message sent by the interconnection device; the key determination module determines a new symmetric key according to the key global unique identifier and the second key parameter; and the identifier recording module updates the key globally
  • the unique identifier is a second globally unique identifier; and the transmitting module and the receiving module encrypt and decrypt the communication data using a new symmetric key in subsequent communication with the interconnected device.
  • a symmetric key dynamic generating apparatus includes: an identifier generating module, a sending module, a receiving module, an identifier recording module, and a key determining module; wherein the identifier generating module is started Generating an initial globally unique identifier; the sending module broadcasts an initial globally unique identifier to the client; the identifier recording module records the initial globally unique identifier as a key globally unique identifier; and the receiving module receives the first authorization indication sent by the client a message, the first authorization indication message includes: a newly generated first global unique identifier and a first key parameter; the sending module sends a first authorization response message to the client; the key determining module is configured according to the key global unique identifier a key parameter determining a symmetric key; the identifier record module updating the key global unique identifier as the first global unique identifier; and the transmitting module and the receiving module performing the communication data using the symmetric key in subsequent communication with the client Add and decrypt.
  • the receiving module receives a second authorization indication message sent by the client, where the second authorization indication message includes: a newly generated second global unique identifier and a second key parameter; the sending module sends the message to the client a second authorization response message; the key determining module determines a new symmetric key according to the key global unique identifier and the second key parameter; and the identifier recording module updates the key global unique identifier to a second global unique identifier; And the sending module and the receiving module encrypt and decrypt the communication data by using a new symmetric key in subsequent communication with the client.
  • the used local symmetric password can be dynamically updated each time the client device authorizes the connected device. Therefore, it is possible to dynamically update the symmetric key used in the life cycle of the system, thereby greatly improving the security and reliability of the system.
  • replace each time you generate a local symmetric password The key GUID for generating the local symmetric key, and the replaced key GUID is theoretically irreversibly generated, thus further improving the security of the symmetric key.
  • FIG. 1 is a schematic structural diagram of a symmetric key dynamic generation system according to an exemplary embodiment.
  • FIG. 2 is a flowchart of a method for dynamically generating a symmetric key according to an exemplary embodiment.
  • FIG. 3 is a flowchart of another symmetric key dynamic generation method according to an exemplary embodiment.
  • FIG. 4 is a flowchart of still another method for dynamically generating a symmetric key according to an exemplary embodiment.
  • FIG. 5 is a flowchart of still another method for dynamically generating a symmetric key according to an exemplary embodiment.
  • FIG. 6 is a block diagram of a symmetric key dynamic generation apparatus, according to an exemplary embodiment.
  • FIG. 7 is a block diagram of another symmetric key dynamic generation apparatus, according to an exemplary embodiment.
  • FIG. 1 is a schematic structural diagram of a symmetric key dynamic generation system according to an exemplary embodiment.
  • the system 1 includes a client 11 and an interconnect device 12.
  • the client 11 can be, for example, a terminal device loaded with client software, such as a smartphone, a PAD, or the like.
  • the interconnection device 12 can be, for example, a device that is connected to the client 11 and that is controlled by the client 11, such as a smart TV in a smart home, a smart refrigerator, a smart air conditioner, etc., but the invention is not limited thereto.
  • the data is encrypted and transmitted by the client 11 and the connected device 12 during communication.
  • the system 1 may further include: a cloud server 13 communicatively coupled to the client 11.
  • FIG. 2 is a flowchart of a method for dynamically generating a symmetric key according to an exemplary embodiment. The method can be applied to the client 11 shown in FIG. 1. As shown in FIG. 2, the method 10 includes:
  • step S102 an initial global unique identifier (GUID, Globally Unique Identifier) generated when the interconnect device is started is received.
  • GUID Globally Unique Identifier
  • the interconnect device 12 shown in FIG. 1 will generate an initial GUID (for example, can be recorded as GUID_I) for itself when it is first started, and the initial GUID is generated by the interconnect device 12 itself, with uniqueness and randomness.
  • an initial GUID for example, can be recorded as GUID_I
  • a GUID is a binary-length 128-bit numeric identifier generated by an algorithm that is primarily used in networks or systems that have multiple nodes, multiple computers. Ideally, no computer or computer cluster will generate two identical GUIDs. The total number of GUIDs can reach 2 ⁇ 128, and since non-random parameters (such as time) are usually added to the algorithm for generating GUIDs, the possibility of randomly generating two identical GUIDs is very small.
  • the initial GUID will be broadcasted through the network announcement message.
  • the network announcement message can be in addition to the initial GUID. Includes related interface information, etc.
  • step S104 the initial GUID is recorded as a key GUID.
  • the client 11 can locally set a key GUID and, after receiving the initial GUID broadcast by the interconnect device 12, record the value of the initial GUID in the key GUID.
  • step S106 the interconnection device is authorized to send a first authorization indication message to the interconnection device.
  • the client 11 will first authorize the service provided by the connected device 12 before using it.
  • the authorization operation is usually an activity initiated by the user, and the client 11 can perform multiple authorization operations on the connected device 12.
  • the client 11 sends a first authorization indication message to the interconnection device, where the message includes a first GUID and a first key parameter (acKey_1) newly generated by the client 11 for the interconnection device 12.
  • the first key parameter is used to generate a symmetric key.
  • the first GUID and the first key parameter newly generated for the connected device 12 are the newly generated first GUID applied by the client 11 to the cloud server 13 for the connected device 12.
  • the interconnection device 12 writes the new first GUID into its device.
  • step S108 the first authorization response message sent by the interconnection device is received.
  • the interconnection device 12 will correspondingly return an authorization response message to the client 11 to respond to the authorization operation initiated by the authorization client 11.
  • step S110 a local symmetric key is determined based on the recorded key GUID and the first key parameter.
  • the client 11 determines a local symmetric key (localKey) used in subsequent communication according to the currently recorded key GUID and the first key parameter.
  • localKey a local symmetric key
  • step S112 the update key GUID is the first GUID.
  • the initial GUID is overwritten with the first GUID
  • the key GUID is updated to the first GUID. Since the key GUID for generating the local symmetric key is replaced immediately after the local symmetric key is generated, the replaced key GUID is theoretically irreversibly generated, so the generated local symmetric key is safe. , thus improving the security of the system.
  • step S114 the communication data is encrypted and decrypted using the local symmetric key in subsequent communication with the interconnected device.
  • the client 11 After the local symmetric key is generated, the client 11 encrypts the transmitted data using the local symmetric password during subsequent communication with the interconnect device 12, and decrypts the received data using the local symmetric password.
  • FIG. 3 is a flowchart of another symmetric key dynamic generation method according to an exemplary embodiment. The method can be applied to the interconnection device 12 shown in FIG. 1. As shown in FIG. 3, the method 20 includes:
  • step S202 an initial GUID is generated upon startup.
  • the interconnect device 12 shown in FIG. 1 generates an initial GUID (which can be recorded as GUID_I) by itself when it is first started.
  • GUID_I an initial GUID
  • step S204 the initial GUID is broadcast to the client.
  • the interconnection device 12 broadcasts its initial GUID, for example, through a network announcement message, and the network announcement message may also include related interface information and the like.
  • step S206 the initial GUID is recorded as a key GUID.
  • the interconnect device 12 can locally set a key GUID for computing a local symmetric key. First, the interconnect device 12 records the value of the initial GUID as the key GUID.
  • step S208 the first authorization indication message sent by the client is received.
  • the client 11 When the client 11 authorizes the connected device 12, an authorization indication message is sent to the connected device 12.
  • the first authorization indication message includes a first GUID and a first key parameter (acKey_1) newly generated for the interconnection device 12.
  • the first GUID and the first key parameter newly generated for the connected device 12 are the newly generated first GUID applied by the client 11 to the cloud server 13 for the connected device 12.
  • the interconnection device 12 writes the new first GUID into its device.
  • step S210 a first authorization response message is sent to the client.
  • the interconnection device 12 transmits a first authorization response message to the client 11.
  • step S212 a local symmetric key is determined according to the key GUID and the first key parameter.
  • the interconnect device 12 calculates a local symmetric key based on the currently recorded key GUID and the first key parameter.
  • step S214 the update key GUID is the first GUID.
  • the initial GUID is overwritten with the first GUID, ie the key GUID is updated to the first GUID. Since the key GUID for generating the local symmetric key is replaced immediately after the local symmetric key is generated, the replaced key GUID is theoretically irreversibly generated, so the generated local symmetric key is safe. , thus improving the security of the system.
  • step S216 the communication data is encrypted and decrypted using the local symmetric key in subsequent communication with the client.
  • the interconnect device 12 After the local symmetric key is generated, the interconnect device 12 encrypts the transmitted data using the local symmetric password during subsequent communication with the client 11, and decrypts the received data using the local symmetric password.
  • the symmetric key dynamic generation method provided by the embodiment of the present invention can dynamically update the used local symmetric password each time the client device authorizes the connected device. Therefore, it is possible to dynamically update the symmetric key used in the life cycle of the system, thereby greatly improving the security and reliability of the system.
  • the key GUID for generating the local symmetric key is replaced immediately after each generation of the local symmetric password, and the replaced key GUID is theoretically irreversibly generated, thereby further improving the security of the symmetric key. Sex.
  • FIG. 4 is a flowchart of still another method for dynamically generating a symmetric key according to an exemplary embodiment. This method can be applied to the client 11 shown in FIG. This method is used to generate a new local key during the next authorization process. As shown in FIG. 4, the method 30 includes:
  • step S302 the interconnection device is authorized again, and the second authorization indication message is sent to the interconnection device.
  • the second authorization indication message includes a second GUID (which can be recorded as GUID_2) and a second key parameter (which can be recorded as acKey_2) newly generated for the connected device 12.
  • the second GUID and the second key parameter newly generated for the interconnection device 12 are newly generated second GUIDs requested by the client 11 to the cloud server 13 for the interconnection device 12.
  • the interconnection device 12 writes the new second GUID into its device.
  • step S304 a second authorization response message sent by the interconnection device is received.
  • the client 11 receives the second authorization response message sent by the interconnect device 12 in response to the current authorization operation.
  • step S306 a new local symmetric key is determined according to the key GUID and the second key parameter.
  • the client 11 determines a new local symmetric key based on the currently recorded key GUID and the second key parameter.
  • the client 11 may XOR the second key parameter using the currently recorded key GUID and use the result of the exclusive OR operation as a local symmetric key.
  • GUID the first GUID
  • localKey GUIID_1 ⁇ acKey_2.
  • step S308 the update key GUID is the second GUID.
  • the first GUID is overwritten with the second GUID, ie the key GUID is updated to the second GUID. Since the key GUID for generating the local symmetric key is replaced immediately after the local symmetric key is generated, the replaced key GUID is theoretically irreversibly generated, so the generated local symmetric key is safe. , thus improving the security of the system.
  • step S310 the communication data is encrypted and decrypted using the local symmetric key in subsequent communication with the interconnected device.
  • the client 11 After the local symmetric key is generated, the client 11 encrypts the transmitted data using the local symmetric password during subsequent communication with the interconnect device 12, and decrypts the received data using the local symmetric password.
  • FIG. 5 is a flowchart of still another method for dynamically generating a symmetric key according to an exemplary embodiment.
  • the method can be applied to the interconnection device 12 shown in FIG. This method is used to generate a new local key during the next authorization process.
  • the method 40 includes:
  • step S402 a second authorization indication message sent by the client is received.
  • the interconnection device 12 receives the second authorization indication message sent by the client 11.
  • the message includes a second GUID (which can be written as GUID_2) and a second key parameter (acKey_2) that are newly generated for the connected device 12.
  • the second GUID and the second key parameter newly generated for the interconnection device 12 are newly generated second GUIDs requested by the client 11 to the cloud server 13 for the interconnection device 12.
  • the interconnection device 12 writes the new second GUID into its device.
  • step S404 a second authorization response message is sent to the client.
  • the interconnection device 12 transmits a second authorization response message to the client 11.
  • step S406 a new local symmetric key is determined according to the key GUID and the second key parameter.
  • the servant device 12 calculates a new local symmetric key based on the currently recorded GUID and the second key parameter.
  • the interconnect device 12 may XOR the second key parameter using the currently recorded key GUID and use the result of the exclusive OR operation as a new local symmetric key.
  • GUID the first GUID
  • localKey GUIID_1 ⁇ acKey_2.
  • step S408 the update key GUID is the second GUID.
  • the first GUID is overwritten with the second GUID, ie the key GUID is updated to the second GUID.
  • the key GUID used to generate the local symmetric key is replaced immediately after the local symmetric key is generated, and the replaced GUID Theoretically, it is irreversible, so the generated local symmetric key is safe, which improves the security of the system.
  • step S410 the communication data is encrypted and decrypted using the local symmetric key in subsequent communication with the client.
  • the interconnect device 12 After the new local symmetric key is generated, the interconnect device 12 encrypts the transmitted data using the new local symmetric password during subsequent communication with the client 11, and uses the new local symmetric password pair to receive the received data. The data is decrypted.
  • FIG. 6 is a block diagram of a symmetric key dynamic generation apparatus, according to an exemplary embodiment.
  • the symmetric key dynamic generation apparatus can be applied to the client 11 shown in FIG. 1.
  • the apparatus 50 includes a receiving module 502, an identifier recording module 504, a transmitting module 506, and a key determining module 508.
  • the receiving module 502 receives an initial global unique identifier generated when the interconnect device starts.
  • the identifier record module 504 records the initial globally unique identifier as a key globally unique identifier.
  • the sending module 506 authorizes the interconnecting device, and sends a first authorization indication message to the interconnecting device, where the first authorization indication message includes: a first global unique identifier and a first key parameter newly generated for the connected device.
  • the first GUID and the first key parameter newly generated for the connected device 12 are the newly generated first GUID applied by the client 11 to the cloud server 13 for the connected device 12.
  • the interconnection device 12 writes the new first GUID into its device.
  • the receiving module 502 receives the first authorization response message sent by the interconnection device.
  • the key determination module 508 determines the symmetric key based on the key global unique identifier and the first key parameter.
  • the identifier record module 504 updates the key globally unique identifier to the first globally unique identifier.
  • the transmitting module 506 and the receiving module 502 encrypt and decrypt the communication data using a symmetric key in subsequent communication with the interconnected device.
  • the sending module 506 authorizes the interconnect device again, and sends a second authorization indication message to the interconnect device, where the second authorization indication message includes: a second global unique identifier and a second secret newly generated for the connected device. Key parameter.
  • the receiving module 502 receives the second authorization response message sent by the interconnection device.
  • the key determination module 508 determines a new symmetric key based on the key global unique identifier and the second key parameter.
  • the identifier record module 504 updates the key globally unique identifier to a second globally unique identifier.
  • the transmitting module 506 and the receiving module 502 encrypt and decrypt the communication data using a new symmetric key in subsequent communication with the interconnected device.
  • FIG. 7 is a block diagram of another symmetric key dynamic generation apparatus, according to an exemplary embodiment.
  • the symmetric key dynamic generation apparatus can be applied to the interconnection device 12 shown in FIG.
  • the apparatus 60 includes an identifier generating module 602, a transmitting module 604, a receiving module 606, an identifier recording module 608, and a key determining module 610.
  • the identifier generation module 602 generates an initial global unique identifier upon startup.
  • the sending module 604 broadcasts an initial globally unique identifier to the client.
  • the identifier record module 608 records the initial globally unique identifier as a key globally unique identifier.
  • the receiving module 606 receives the first authorization indication message sent by the client, where the first authorization indication message includes: a first global unique identifier and a first key parameter newly generated for the connected device.
  • the first GUID and the first key parameter newly generated for the connected device 12 are the newly generated first GUID applied by the client 11 to the cloud server 13 for the connected device 12.
  • the interconnection device 12 When guest When the client 11 transmits the newly applied first GUID to the interconnection device 12 in the authorization indication message, the interconnection device 12 writes the new first GUID into its device.
  • the sending module 604 sends a first authorization response message to the client.
  • the key determination module 610 determines the symmetric key based on the key global unique identifier and the first key parameter.
  • the identifier record module 608 updates the key globally unique identifier to a first globally unique identifier.
  • the sending module 604 and the receiving module 606 encrypt and decrypt the communication data using a symmetric key in subsequent communication with the client.
  • the receiving module 606 receives the second authorization indication message sent by the client, where the second authorization indication message includes: a second global unique identifier and a second key parameter newly generated for the connected device.
  • the sending module 604 sends a second authorization response message to the client.
  • the key determination module determines a new symmetric key based on the key global unique identifier and the second key parameter.
  • the identifier record module 608 updates the key globally unique identifier to a second globally unique identifier.
  • the sending module 604 and the receiving module 606 encrypt and decrypt the communication data using a new symmetric key in subsequent communication with the client.
  • the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network.
  • a non-volatile storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a number of instructions are included to cause a computing device (which may be a personal computer, server, mobile terminal, or network device, etc.) to perform a method in accordance with an embodiment of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Storage Device Security (AREA)

Abstract

本申请公开一种对称密钥动态生成方法、装置、设备及***。该方法包括:接收互联设备启动时生成的初始全局唯一标识符;将初始全局唯一标识符记录为密钥全局唯一标识符;对互联设备进行授权,向互联设备发送第一授权指示消息,第一授权指示消息包括:为互联设备新生成的第一全局唯一标识符及第一密钥参数;接收互联设备发送的第一授权响应消息;根据密钥全局唯一标识符与第一密钥参数,确定对称密钥;更新密钥全局唯一标识符为第一全局唯一标识符;以及在后续与互联设备的通信中使用对称密钥对通信数据进行加解密。该方法能够在***的生存周期内多次对使用的对称密钥进行动态生成,提高了***的安全性和可靠性。

Description

对称密钥动态生成方法、装置、设备及***
相关申请的交叉引用
本申请要求于2016年9月26日提交的中国专利申请号为“201610849888.5”的优先权,其全部内容作为整体并入本申请中。
技术领域
本发明涉及计算机网络应用技术领域,具体而言,涉及一种对称密钥动态生成方法、装置、设备及***。
背景技术
随着物联网技术的普及,用户可以通过在终端设备(如智能手机、PAD等)上安装相应的客户端软件来实现对各种互联设备的控制。如智能家居技术中,可以通过客户端软件实现对家庭中电视、空调、冰箱等互联设备的控制。为了保证客户端与互联设备之间的通信安全,通常两者之间采用对称加密方式进行加密。
在密码学中,加密是将明文信息隐匿起来,使之在缺少特殊信息时不可读,这里的特殊信息即指用于加密的密钥。对于对称密码学,加密运算与解密运算使用相同的对称密钥。其最大的优势是加解密速度快,适合于对大数据量进行加密。通常使用的对称加密算法较简便高效、使用的对称密钥简短且破译难度大,因此对称加密在***中得到了广泛应用。
由于***的保密性取决于密钥的安全性,所以密钥生成、管理过程中的安全性、可靠性直接决定了整个***的安全性和可靠性。而在现有的对称密钥生成方法中,对称密钥生成后在整个***生存周期内都不会改变,如果一旦被第三方捕获,整个加密***也就没有安全性可言了。
在所述背景技术部分公开的上述信息仅用于加强对本发明的背景的理解,因此它可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
有鉴于此,本发明提供一种对称密钥动态生成方法、装置、设备及***,能够在***的生存周期内多次对使用的对称密钥进行动态生成,提高了***的安全性和可靠性。
本发明的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本发明的实践而习得。
根据本发明的一方面,提供一种对称密钥动态生成方法,包括:接收互联设备启动时生成的初始全局唯一标识符;将初始全局唯一标识符记录为密钥全局唯一标识符;对互联设备进行授权,向互联设备发送第一授权指示消息,第一授权指示消息包括:为互联设备新生成的第一全局唯一标识符及第一密钥参数;接收互联设备发送的第一授权响应消息;根据密钥全局唯一标识符与第一密钥参数,确定对称密钥;更新密钥全局唯一标识符为第一全局唯一标识符;以及在后续与互联设备的通信中使用对称密钥对通信数据进行加解密。
根据本发明的一实施方式,上述方法还包括:再一次对互联设备进行授权,向互联设备发送第二授权指示消息,第二授权指示消息包括:为互联设备新生成的第二全局唯一标识符及第二密钥参数;接收互联设备发送的第二授权响应消息;根据密钥全局唯一标识符与第二密钥参数,确定新的对称密钥;更新密钥全局唯一标识符为第二全局唯一标识符;以及在后续与互联设备的通信中使用新的对称密钥对通信数据进行加解密。
根据本发明的一实施方式,根据密钥全局唯一标识符与第一密钥参数,确定对称密钥包括:对密钥全局唯一标识符与第一密钥参数进行异或运算,将异或运算的结果作为对称密钥;和/或,根据密钥全局唯一标识符与第二密钥参数,确定新的对称密钥包括:对密钥全局唯一标识符与第二密钥参数进行异或运算,将异或运算的结果作为新的对称密钥。
根据本发明的另一个方面,提供一种对称密钥动态生成方法,包括:启动时生成一初始全局唯一标识符;向客户端广播初始全局唯一标识符;将初始全局唯一标识符记录为密钥全局唯一标识符;接收客户端 发送的第一授权指示消息,第一授权指示消息包括:新生成的第一全局唯一标识符及第一密钥参数;向客户端发送第一授权响应消息;根据密钥全局唯一标识符与第一密钥参数,确定对称密钥;更新密钥全局唯一标识符为第一全局唯一标识符;以及在后续与客户端的通信中使用对称密钥对通信数据进行加解密。
根据本发明的一实施方式,上述方法还包括:接收客户端发送的第二授权指示消息,第二授权指示消息包括:新生成的第二全局唯一标识符及第二密钥参数;向客户端发送第二授权响应消息;根据密钥全局唯一标识符与第二密钥参数,确定新的对称密钥;更新密钥全局唯一标识符为第二全局唯一标识符;以及在后续与客户端的通信中使用新的对称密钥对通信数据进行加解密。
根据本发明的一实施方式,根据密钥全局唯一标识符与第一密钥参数,确定对称密钥包括:对密钥全局唯一标识符与第一密钥参数进行异或运算,将异或运算的结果作为对称密钥;和/或,根据密钥全局唯一标识符与第二密钥参数,确定新的对称密钥包括:对密钥全局唯一标识符与第二密钥参数进行异或运算,将异或运算的结果作为新的对称密钥。
根据本发明的再一个方面,提供一种用于对称密钥动态生成的客户端设备,包括:处理器;以及存储器,用于存储处理器的可执行指令;其中处理器配置为经由执行可执行指令来执行以下操作:接收互联设备启动时生成的初始全局唯一标识符;将初始全局唯一标识符记录为密钥全局唯一标识符;对互联设备进行授权,向互联设备发送第一授权指示消息,第一授权指示消息包括:为互联设备新生成的第一全局唯一标识符及第一密钥参数;接收互联设备发送的第一授权响应消息;根据密钥全局唯一标识符与第一密钥参数,确定对称密钥;更新密钥全局唯一标识符为第一全局唯一标识符;以及在后续与互联设备的通信中使用对称密钥对通信数据进行加解密。
根据本发明的一实施方式,操作还包括:再一次对互联设备进行授权,向互联设备发送第二授权指示消息,第二授权指示消息包括:为互联设备新生成的第二全局唯一标识符及第二密钥参数;接收互联设备发送的第二授权响应消息;根据密钥全局唯一标识符与第二密钥参数,确 定新的对称密钥;更新密钥全局唯一标识符为第二全局唯一标识符;以及在后续与互联设备的通信中使用新的对称密钥对通信数据进行加解密。
根据本发明的再一个方面,提供一种用于对称密钥动态生成的互联设备,包括:处理器;以及存储器,用于存储处理器的可执行指令;其中处理器配置为经由执行可执行指令来执行以下操作:启动时生成一初始全局唯一标识符;向客户端广播初始全局唯一标识符;将初始全局唯一标识符记录为密钥全局唯一标识符;接收客户端发送的第一授权指示消息,第一授权指示消息包括:为互联设备新生成的第一全局唯一标识符及第一密钥参数;向客户端发送第一授权响应消息;根据密钥全局唯一标识符与第一密钥参数,确定对称密钥;更新密钥全局唯一标识符为第一全局唯一标识符;以及在后续与客户端的通信中使用对称密钥对通信数据进行加解密。
根据本发明的一实施方式,操作还包括:接收客户端发送的第二授权指示消息,第二授权指示消息包括:为互联设备新生成的第二全局唯一标识符及第二密钥参数;向客户端发送第二授权响应消息;根据密钥全局唯一标识符与第二密钥参数,确定新的对称密钥;更新密钥全局唯一标识符为第二全局唯一标识符;以及在后续与客户端的通信中使用新的对称密钥对通信数据进行加解密。
根据本发明的再一个方面,提供一种对称密钥动态生成***,包括:上述任一种客户端设备及上述任一种互联设备。
根据本发明的再一个方面,提供一种对称密钥动态生成装置,包括:发送模块、标识符记录模块、接收模块及密钥确定模块;其中,接收模块接收互联设备启动时生成的初始全局唯一标识符;标识符记录模块将初始全局唯一标识符记录为密钥全局唯一标识符;发送模块对互联设备进行授权,向互联设备发送第一授权指示消息,第一授权指示消息包括:为互联设备新生成的第一全局唯一标识符及第一密钥参数;接收模块接收互联设备发送的第一授权响应消息;密钥确定模块根据密钥全局唯一标识符与第一密钥参数,确定对称密钥;标识符记录模块更新密钥全局唯一标识符为第一全局唯一标识符;以及发送模块与接收模块在 后续与互联设备的通信中使用对称密钥对通信数据进行加解密。
根据本发明的一实施方式,发送模块再一次对互联设备进行授权,向互联设备发送第二授权指示消息,第二授权指示消息包括:为互联设备新生成的第二全局唯一标识符及第二密钥参数;接收模块接收互联设备发送的第二授权响应消息;密钥确定模块根据密钥全局唯一标识符与第二密钥参数,确定新的对称密钥;标识符记录模块更新密钥全局唯一标识符为第二全局唯一标识符;以及发送模块与接收模块在后续与互联设备的通信中使用新的对称密钥对通信数据进行加解密。
根据本发明的再一个方面,提供一种对称密钥动态生成装置,包括:标识符生成模块、发送模块、接收模块、标识符记录模块及密钥确定模块;其中,标识符生成模块在启动时生成一初始全局唯一标识符;发送模块向客户端广播初始全局唯一标识符;标识符记录模块将初始全局唯一标识符记录为密钥全局唯一标识符;接收模块接收客户端发送的第一授权指示消息,第一授权指示消息包括:新生成的第一全局唯一标识符及第一密钥参数;发送模块向客户端发送第一授权响应消息;密钥确定模块根据密钥全局唯一标识符与第一密钥参数,确定对称密钥;标识符记录模块更新密钥全局唯一标识符为第一全局唯一标识符;以及发送模块与接收模块在后续与客户端的通信中使用对称密钥对通信数据进行加解密。
根据本发明的一实施方式,接收模块接收客户端发送的第二授权指示消息,第二授权指示消息包括:新生成的第二全局唯一标识符及第二密钥参数;发送模块向客户端发送第二授权响应消息;密钥确定模块根据密钥全局唯一标识符与第二密钥参数,确定新的对称密钥;标识符记录模块更新密钥全局唯一标识符为第二全局唯一标识符;以及发送模块与接收模块在后续与客户端的通信中使用新的对称密钥对通信数据进行加解密。
根据本发明的对称密钥动态生成方法,可以在每次由客户端设备向互联设备进行授权时,动态地更新所使用的本地对称密码。因此可以实现在***的生存周期内多次对使用的对称密钥进行动态更新,从而极大地提高了***的安全性和可靠性。此外,在每次生成本地对称密码后,立即替换 了用于生成本地对称密钥的密钥GUID,而被替换掉的密钥GUID理论上是不可逆生成的,因此进一步提高了对称密钥的安全性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本发明。
附图说明
通过参照附图详细描述其示例实施例,本发明的上述和其它目标、特征及优点将变得更加显而易见。
图1是根据一示例性实施方式示出的一种对称密钥动态生成***的结构示意图。
图2是根据一示例性实施方式示出的一种对称密钥动态生成方法的流程图。
图3是根据一示例性实施方式示出的另一种对称密钥动态生成方法的流程图。
图4是根据一示例性实施方式示出的再一种对称密钥动态生成方法的流程图。
图5是根据一示例性实施方式示出的再一种对称密钥动态生成方法的流程图。
图6是根据一示例性实施方式示出的一种对称密钥动态生成装置的框图。
图7是根据一示例性实施方式示出的另一种对称密钥动态生成装置的框图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本发明将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。附图仅为本发明的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本发明的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本发明的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知结构、方法、装置、实现、材料或者操作以避免喧宾夺主而使得本发明的各方面变得模糊。
图1是根据一示例性实施方式示出的一种对称密钥动态生成***的结构示意图。如图1所示,该***1包括:客户端11与互联设备12。客户端11例如可以为装载了客户端软件的终端设备,如智能手机、PAD等。互联设备12例如可以为与客户端11互联的、接受客户端11控制的设备,如智能家居中的智能电视、智能冰箱、智能空调等,但本发明不限于此。其中,客户端11与互联设备12在通信时数据被加密传输。此外,***1还可以包括:与客户端11通信连接的云端服务器13。
图2是根据一示例性实施方式示出的一种对称密钥动态生成方法的流程图。该方法可以应用于图1所示的客户端11,如图2所示,该方法10包括:
在步骤S102中,接收互联设备启动时生成的初始全局唯一标识符(GUID,Globally Unique Identifier)。
例如图1所示的互联设备12在首次启动时,会为其自身生成一个初始GUID(例如可记为GUID_I),该初始GUID由互联设备12自己产生,具有唯一性和随机性。
GUID是一种由算法生成的二进制长度128位的数字标识符,其主要应用于在拥有多个节点、多台计算机的网络或***中。在理想情况下,任何计算机和计算机集群都不会生成两个相同的GUID。GUID的总数可以达到2^128个,并且由于生成GUID的算法中通常都加入了非随机的参数(如时间),所以随机生成两个相同GUID的可能性非常小。
互联设备12在首次生成其初始GUID后,会将该初始GUID进通过网络宣告消息进行广播。该网络宣告消息除了包括初始GUID后,还可以 包括相关接口信息等。
在步骤S104中,将初始GUID记录为密钥GUID。
客户端11可以在本地设置一个密钥GUID,并在接收到互联设备12广播的初始GUID后,将该初始GUID的值记录在密钥GUID中。
在步骤S106中,对互联设备进行授权,向互联设备发送第一授权指示消息。
客户端11在使用互联设备12提供的服务之前,会先对其进行授权操作。授权操作通常是由用户主动发起的行为,并且客户端11可以对互联设备12进行多次授权操作。
在授权操作中,客户端11向互联设备发送第一授权指示消息,该消息中包括有客户端11为互联设备12新生成的第一GUID及第一密钥参数(acKey_1)。其中第一密钥参数用于生成对称密钥。
其中为互联设备12新生成的第一GUID及第一密钥参数是由客户端11向云端服务器13为该互联设备12所申请的新生成的第一GUID。当客户端11将新申请到的第一GUID在授权指示消息中传递给互联设备12时,互联设备12将该新的第一GUID写入其设备中。
在步骤S108中,接收互联设备发送的第一授权响应消息。
在授权过程中,互联设备12在接收到授权指示消息后,会相应地向客户端11返回授权响应消息,以对授权客户端11发起的授权操作进行响应。
在步骤S110中,根据记录的密钥GUID及第一密钥参数,确定本地对称密钥。
客户端11根据当前记录的密钥GUID及第一密钥参数,确定后续通信中使用的本地对称密钥(localKey)。
在一些实施例中,客户端11可以使用密钥GUID与第一密钥参数进行异或运算,并将该异或运算的结果作为本地对称密钥。例如,当前记录在密钥GUID中的是互联设备12生成的初始GUID(GUID_I),因此localKey=GUID_I⊕acKey_1。
在步骤S112中,更新密钥GUID为第一GUID。
在生成了本地对称密钥后,立即使用第一GUID覆盖初始GUID,也 即将密钥GUID更新为第一GUID。由于生成了本地对称密钥之后,立即替换了用于生成本地对称密钥的密钥GUID,而被替换掉的密钥GUID理论上是不可逆生成的,因此所生成的本地对称密钥是安全的,从而提高了***的安全性。
在步骤S114中,在后续与互联设备的通信中使用该本地对称密钥对通信数据进行加解密。
在生成了该本地对称密钥后,客户端11在后续与互联设备12的通信过程中,使用该本地对称密码对发送的数据进行加密,并使用该本地对称密码对接收的数据进行解密。
图3是根据一示例性实施方式示出的另一种对称密钥动态生成方法的流程图。该方法可以应用于图1所示的互联设备12,如图3所示,该方法20包括:
在步骤S202中,启动时生成初始GUID。
例如图1所示的互联设备12在首次启动时,由其自身生成初始GUID(可记为GUID_I)。
在步骤S204中,向客户端广播该初始GUID。
在生成了初始GUID后,互联设备12例如通过网络宣告消息广播其初始GUID,此外该网络宣告消息中还可以包括相关的接口信息等。
在步骤S206中,将初始GUID记录为密钥GUID。
互联设备12可以在本地设置一个密钥GUID,用于计算本地对称密钥。首先,互联设备12将初始GUID的值记录为该密钥GUID。
在步骤S208中,接收客户端发送的第一授权指示消息。
当客户端11向互联设备12进行授权时,会向互联设备12发送授权指示消息。该第一授权指示消息中包括有为互联设备12新生成的第一GUID和第一密钥参数(acKey_1)。
其中为互联设备12新生成的第一GUID及第一密钥参数是由客户端11向云端服务器13为该互联设备12所申请的新生成的第一GUID。当客户端11将新申请到的第一GUID在授权指示消息中传递给互联设备12时,互联设备12将该新的第一GUID写入其设备中。
在步骤S210中,向客户端发送第一授权响应消息。
作为对授权指示消息的响应,互联设备12向客户端11发送第一授权响应消息。
在步骤S212中,根据密钥GUID与第一密钥参数,确定本地对称密钥。
互联设备12根据当前记录的密钥GUID与第一密钥参数,计算本地对称密钥。
在一些实施例中,互联设备12可以使用密钥GUID与第一密钥参数进行异或运算,并将该异或运算的结果作为本地对称密钥。例如,当前记录在密钥GUID中的是互联设备12生成的初始GUID(GUID_I),因此localKey=GUID_I⊕acKey_1。
在步骤S214中,更新密钥GUID为第一GUID。
在生成了本地对称密钥后,立即使用第一GUID覆盖初始GUID,也即将密钥GUID更新为第一GUID。由于生成了本地对称密钥之后,立即替换了用于生成本地对称密钥的密钥GUID,而被替换掉的密钥GUID理论上是不可逆生成的,因此所生成的本地对称密钥是安全的,从而提高了***的安全性。
在步骤S216中,在后续与客户端的通信中使用该本地对称密钥对通信数据进行加解密。
在生成了该本地对称密钥后,互联设备12在后续与客户端11的通信过程中,使用该本地对称密码对发送的数据进行加密,并使用该本地对称密码对接收的数据进行解密。
本发明实施方式提供的对称密钥动态生成方法,可以在每次由客户端设备向互联设备进行授权时,动态地更新所使用的本地对称密码。因此可以实现在***的生存周期内多次对使用的对称密钥进行动态更新,从而极大地提高了***的安全性和可靠性。此外,在每次生成本地对称密码后,立即替换了用于生成本地对称密钥的密钥GUID,而被替换掉的密钥GUID理论上是不可逆生成的,因此进一步提高了对称密钥的安全性。
应清楚地理解,本发明描述了如何形成和使用特定示例,但本发明的原理不限于这些示例的任何细节。相反,基于本发明公开的内容的教导,这些原理能够应用于许多其它实施方式。
图4是根据一示例性实施方式示出的再一种对称密钥动态生成方法的流程图。该方法可以应用于图1所示的客户端11。该方法用于在下一次授权过程中生成新的本地密钥。如图4所示,该方法30包括:
在步骤S302中,再一次对互联设备进行授权,向互联设备发送第二授权指示消息。
该第二授权指示消息包括:为互联设备12新生成的第二GUID(可以记为GUID_2)及第二密钥参数(可以记为acKey_2)。
其中为互联设备12新生成的第二GUID及第二密钥参数是由客户端11向云端服务器13为该互联设备12所申请的新生成的第二GUID。当客户端11将新申请到的第二GUID在授权指示消息中传递给互联设备12时,互联设备12将该新的第二GUID写入其设备中。
在步骤S304中,接收互联设备发送的第二授权响应消息。
客户端11接收互联设备12响应本次授权操作而发送的第二授权响应消息。
在步骤S306中,根据密钥GUID与第二密钥参数,确定新的本地对称密钥。
客户端11根据当前记录的密钥GUID与第二密钥参数,确定新的本地对称密钥。
在一些实施例中,客户端11可以使用当前记录的密钥GUID与第二密钥参数进行异或运算,并将该异或运算的结果作为本地对称密钥。例如,当前记录在密钥GUID中的是客户端11在前次授权操作中为互联设备12生成的第一GUID(GUID_1),因此localKey=GUID_1⊕acKey_2。
在步骤S308中,更新密钥GUID为第二GUID。
在生成了本地对称密钥后,立即使用第二GUID覆盖第一GUID,也即将密钥GUID更新为第二GUID。由于生成了本地对称密钥之后,立即替换了用于生成本地对称密钥的密钥GUID,而被替换掉的密钥GUID理论上是不可逆生成的,因此所生成的本地对称密钥是安全的,从而提高了***的安全性。
在步骤S310中,在后续与互联设备的通信中使用该本地对称密钥对通信数据进行加解密。
在生成了该本地对称密钥后,客户端11在后续与互联设备12的通信过程中,使用该本地对称密码对发送的数据进行加密,并使用该本地对称密码对接收的数据进行解密。
图5是根据一示例性实施方式示出的再一种对称密钥动态生成方法的流程图。该方法可以应用于图1所示的互联设备12。该方法用于在下一次授权过程中生成新的本地密钥。如图5所示,该方法40包括:
在步骤S402中,接收客户端发送的第二授权指示消息。
在新的授权过程中,互联设备12接收客户端11发送的第二授权指示消息。该消息中包括为互联设备12新生成的第二GUID(可记为GUID_2)及第二密钥参数(acKey_2)。
其中为互联设备12新生成的第二GUID及第二密钥参数是由客户端11向云端服务器13为该互联设备12所申请的新生成的第二GUID。当客户端11将新申请到的第二GUID在授权指示消息中传递给互联设备12时,互联设备12将该新的第二GUID写入其设备中。
在步骤S404中,向客户端发送第二授权响应消息。
作为对接收到的第二授权指示消息的响应,互联设备12向客户端11发送第二授权响应消息。
在步骤S406中,根据密钥GUID与第二密钥参数,确定新的本地对称密钥。
服务方设备12根据当前记录的GUID与第二密钥参数,计算新的本地对称密钥。
在一些实施例中,互联设备12可以使用当前记录的密钥GUID与第二密钥参数进行异或运算,并将该异或运算的结果作为新的本地对称密钥。例如,当前记录在密钥GUID中的是客户端11为互联设备12在上一次授权过程中生成的第一GUID(GUID_1),因此localKey=GUID_1⊕acKey_2。
在步骤S408中,更新密钥GUID为第二GUID。
在生成了新的本地对称密钥后,立即使用第二GUID覆盖第一GUID,也即将密钥GUID更新为第二GUID。由于生成了本地对称密钥之后,立即替换了用于生成本地对称密钥的密钥GUID,而被替换掉的密钥GUID 理论上是不可逆生成的,因此所生成的本地对称密钥是安全的,从而提高了***的安全性。
在步骤S410中,在后续与客户端的通信中使用该本地对称密钥对通信数据进行加解密。
在生成了新的本地对称密钥后,互联设备12在后续与客户端11的通信过程中,使用该新的本地对称密码对发送的数据进行加密,并使用该新的本地对称密码对接收的数据进行解密。
本领域技术人员可以理解实现上述实施方式的全部或部分步骤被实现为由CPU执行的计算机程序。在该计算机程序被CPU执行时,执行本发明提供的上述方法所限定的上述功能。所述的程序可以存储于一种计算机可读存储介质中,该存储介质可以是只读存储器,磁盘或光盘等。
此外,需要注意的是,上述附图仅是根据本发明示例性实施方式的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
下述为本发明装置实施例,可以用于执行本发明方法实施例。对于本发明装置实施例中未披露的细节,请参照本发明方法实施例。
图6是根据一示例性实施方式示出的一种对称密钥动态生成装置的框图。该对称密钥动态生成装置可以应用于图1所示的客户端11。如图6所示,该装置50包括:接收模块502、标识符记录模块504、发送模块506及密钥确定模块508。
其中,接收模块502接收互联设备启动时生成的初始全局唯一标识符。
标识符记录模块504将初始全局唯一标识符记录为密钥全局唯一标识符。
发送模块506对互联设备进行授权,向互联设备发送第一授权指示消息,第一授权指示消息包括:为互联设备新生成的第一全局唯一标识符及第一密钥参数。
其中为互联设备12新生成的第一GUID及第一密钥参数是由客户端11向云端服务器13为该互联设备12所申请的新生成的第一GUID。当客户端11将新申请到的第一GUID在授权指示消息中传递给互联设备12时,互联设备12将该新的第一GUID写入其设备中。
接收模块502接收互联设备发送的第一授权响应消息。
密钥确定模块508根据密钥全局唯一标识符与第一密钥参数,确定对称密钥。
标识符记录模块504更新密钥全局唯一标识符为所述第一全局唯一标识符。
发送模块506与接收模块502在后续与互联设备的通信中使用对称密钥对通信数据进行加解密。
在一些实施例中,发送模块506再一次对互联设备进行授权,向互联设备发送第二授权指示消息,第二授权指示消息包括:为互联设备新生成的第二全局唯一标识符及第二密钥参数。接收模块502接收互联设备发送的第二授权响应消息。密钥确定模块508根据密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥。标识符记录模块504更新密钥全局唯一标识符为第二全局唯一标识符。发送模块506与接收模块502在后续与互联设备的通信中使用新的对称密钥对通信数据进行加解密。
图7是根据一示例性实施方式示出的另一种对称密钥动态生成装置的框图。该对称密钥动态生成装置可以应用于图1所示的互联设备12。如图7所示,该装置60包括:标识符生成模块602、发送模块604、接收模块606、标识符记录模块608及密钥确定模块610。
其中,标识符生成模块602在启动时生成一初始全局唯一标识符。
发送模块604向客户端广播初始全局唯一标识符。
标识符记录模块608将初始全局唯一标识符记录为密钥全局唯一标识符。
接收模块606接收客户端发送的第一授权指示消息,第一授权指示消息包括:为互联设备新生成的第一全局唯一标识符及第一密钥参数。
其中为互联设备12新生成的第一GUID及第一密钥参数是由客户端11向云端服务器13为该互联设备12所申请的新生成的第一GUID。当客 户端11将新申请到的第一GUID在授权指示消息中传递给互联设备12时,互联设备12将该新的第一GUID写入其设备中。
发送模块604向客户端发送第一授权响应消息。
密钥确定模块610根据密钥全局唯一标识符与第一密钥参数,确定对称密钥。
标识符记录模块608更新密钥全局唯一标识符为第一全局唯一标识符。
发送模块604与接收模块606在后续与客户端的通信中使用对称密钥对通信数据进行加解密。
在一些实施例中,接收模块606接收客户端发送的第二授权指示消息,第二授权指示消息包括:为互联设备新生成的第二全局唯一标识符及第二密钥参数。发送模块604向客户端发送第二授权响应消息。密钥确定模块根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥。标识符记录模块608更新密钥全局唯一标识符为第二全局唯一标识符。发送模块604与接收模块606在后续与客户端的通信中使用新的对称密钥对通信数据进行加解密。
需要注意的是,上述附图中所示的框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本发明实施方式的方法。
以上具体地示出和描述了本发明的示例性实施方式。应可理解的是,本发明不限于这里描述的详细结构、设置方式或实现方法;相反, 本发明意图涵盖包含在所附权利要求的精神和范围内的各种修改和等效设置。

Claims (16)

  1. 一种对称密钥动态生成方法,其特征在于,包括:
    接收互联设备启动时生成的初始全局唯一标识符;
    将所述初始全局唯一标识符记录为密钥全局唯一标识符;
    对所述互联设备进行授权,向所述互联设备发送第一授权指示消息,所述第一授权指示消息包括:为所述互联设备新生成的第一全局唯一标识符及第一密钥参数;
    接收所述互联设备发送的第一授权响应消息;
    根据所述密钥全局唯一标识符与所述第一密钥参数,确定对称密钥;
    更新所述密钥全局唯一标识符为所述第一全局唯一标识符;以及
    在后续与所述互联设备的通信中使用所述对称密钥对通信数据进行加解密。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    再一次对所述互联设备进行授权,向所述互联设备发送第二授权指示消息,所述第二授权指示消息包括:为所述互联设备新生成的第二全局唯一标识符及第二密钥参数;
    接收所述互联设备发送的第二授权响应消息;
    根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥;
    更新所述密钥全局唯一标识符为所述第二全局唯一标识符;以及
    在后续与所述互联设备的通信中使用所述新的对称密钥对通信数据进行加解密。
  3. 根据权利要求2所述的方法,其特征在于,根据所述密钥全局唯一标识符与所述第一密钥参数,确定对称密钥包括:对所述密钥全局唯一标识符与所述第一密钥参数进行异或运算,将所述异或运算的结果作为所述对称密钥;和/或,
    根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥包括:对所述密钥全局唯一标识符与所述第二密钥参数进行异或运算,将所述异或运算的结果作为所述新的对称密钥。
  4. 一种对称密钥动态生成方法,其特征在于,包括:
    启动时生成一初始全局唯一标识符;
    向客户端广播所述初始全局唯一标识符;
    将所述初始全局唯一标识符记录为密钥全局唯一标识符;
    接收所述客户端发送的第一授权指示消息,所述第一授权指示消息包括:新生成的第一全局唯一标识符及第一密钥参数;
    向所述客户端发送第一授权响应消息;
    根据所述密钥全局唯一标识符与所述第一密钥参数,确定对称密钥;
    更新所述密钥全局唯一标识符为所述第一全局唯一标识符;以及
    在后续与所述客户端的通信中使用所述对称密钥对通信数据进行加解密。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    接收所述客户端发送的第二授权指示消息,所述第二授权指示消息包括:新生成的第二全局唯一标识符及第二密钥参数;
    向所述客户端发送第二授权响应消息;
    根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥;
    更新所述密钥全局唯一标识符为所述第二全局唯一标识符;以及
    在后续与所述客户端的通信中使用所述新的对称密钥对通信数据进行加解密。
  6. 根据权利要求5所述的方法,其特征在于,根据所述密钥全局唯一标识符与所述第一密钥参数,确定对称密钥包括:对所述密钥全局唯一标识符与所述第一密钥参数进行异或运算,将所述异或运算的结果作为所述对称密钥;和/或,
    根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥包括:对所述密钥全局唯一标识符与所述第二密钥参数进行异或运算,将所述异或运算的结果作为所述新的对称密钥。
  7. 一种用于对称密钥动态生成的客户端设备,其特征在于,包括:
    处理器;以及
    存储器,用于存储所述处理器的可执行指令;
    其中所述处理器配置为经由执行所述可执行指令来执行以下操作:
    接收互联设备启动时生成的初始全局唯一标识符;
    将所述初始全局唯一标识符记录为密钥全局唯一标识符;
    对所述互联设备进行授权,向所述互联设备发送第一授权指示消息,所述第一授权指示消息包括:为所述互联设备新生成的第一全局唯一标识符及第一密钥参数;
    接收所述互联设备发送的第一授权响应消息;
    根据所述密钥全局唯一标识符与所述第一密钥参数,确定对称密钥;
    更新所述密钥全局唯一标识符为所述第一全局唯一标识符;以及
    在后续与所述互联设备的通信中使用所述对称密钥对通信数据进行加解密。
  8. 根据权利要求7所述的客户端设备,其特征在于,所述操作还包括:
    再一次对所述互联设备进行授权,向所述互联设备发送第二授权指示消息,所述第二授权指示消息包括:为所述互联设备新生成的第二全局唯一标识符及第二密钥参数;
    接收所述互联设备发送的第二授权响应消息;
    根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥;
    更新所述密钥全局唯一标识符为所述第二全局唯一标识符;以及
    在后续与所述互联设备的通信中使用所述新的对称密钥对通信数据进行加解密。
  9. 一种用于对称密钥动态生成的互联设备,其特征在于,包括:
    处理器;以及
    存储器,用于存储所述处理器的可执行指令;
    其中所述处理器配置为经由执行所述可执行指令来执行以下操作:
    启动时生成一初始全局唯一标识符;
    向客户端广播所述初始全局唯一标识符;
    将所述初始全局唯一标识符记录为密钥全局唯一标识符;
    接收所述客户端发送的第一授权指示消息,所述第一授权指示消 息包括:为所述互联设备新生成的第一全局唯一标识符及第一密钥参数;
    向所述客户端发送第一授权响应消息;
    根据所述密钥全局唯一标识符与所述第一密钥参数,确定对称密钥;
    更新所述密钥全局唯一标识符为所述第一全局唯一标识符;以及
    在后续与所述客户端的通信中使用所述对称密钥对通信数据进行加解密。
  10. 根据权利要求9所述的互联设备,其特征在于,所述操作还包括:
    接收所述客户端发送的第二授权指示消息,所述第二授权指示消息包括:为所述互联设备新生成的第二全局唯一标识符及第二密钥参数;
    向所述客户端发送第二授权响应消息;
    根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥;
    更新所述密钥全局唯一标识符为所述第二全局唯一标识符;以及
    在后续与所述客户端的通信中使用所述新的对称密钥对通信数据进行加解密。
  11. 一种对称密钥动态生成***,其特征在于,包括:根据权利要求7或8所述的客户端设备及根据权利要求9或10所述的互联设备。
  12. 一种对称密钥动态生成装置,其特征在于,包括:发送模块、标识符记录模块、接收模块及密钥确定模块;
    其中,所述接收模块接收互联设备启动时生成的初始全局唯一标识符;
    所述标识符记录模块将所述初始全局唯一标识符记录为密钥全局唯一标识符;
    所述发送模块对所述互联设备进行授权,向所述互联设备发送第一授权指示消息,所述第一授权指示消息包括:为所述互联设备新生成的第一全局唯一标识符及第一密钥参数;
    所述接收模块接收所述互联设备发送的第一授权响应消息;
    所述密钥确定模块根据所述密钥全局唯一标识符与所述第一密钥参 数,确定对称密钥;
    所述标识符记录模块更新所述密钥全局唯一标识符为所述第一全局唯一标识符;以及
    所述发送模块与所述接收模块在后续与所述互联设备的通信中使用所述对称密钥对通信数据进行加解密。
  13. 根据权利要求12所述的装置,其特征在于,
    所述发送模块再一次对所述互联设备进行授权,向所述互联设备发送第二授权指示消息,所述第二授权指示消息包括:为所述互联设备新生成的第二全局唯一标识符及第二密钥参数;
    所述接收模块接收所述互联设备发送的第二授权响应消息;
    所述密钥确定模块根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥;
    所述标识符记录模块更新所述密钥全局唯一标识符为所述第二全局唯一标识符;以及
    所述发送模块与所述接收模块在后续与所述互联设备的通信中使用所述新的对称密钥对通信数据进行加解密。
  14. 一种对称密钥动态生成装置,其特征在于,包括:标识符生成模块、发送模块、接收模块、标识符记录模块及密钥确定模块;
    其中,所述标识符生成模块在启动时生成一初始全局唯一标识符;
    所述发送模块向客户端广播所述初始全局唯一标识符;
    所述标识符记录模块将所述初始全局唯一标识符记录为密钥全局唯一标识符;
    所述接收模块接收所述客户端发送的第一授权指示消息,所述第一授权指示消息包括:新生成的第一全局唯一标识符及第一密钥参数;
    所述发送模块向所述客户端发送第一授权响应消息;
    所述密钥确定模块根据所述密钥全局唯一标识符与所述第一密钥参数,确定对称密钥;
    所述标识符记录模块更新所述密钥全局唯一标识符为所述第一全局唯一标识符;以及
    所述发送模块与所述接收模块在后续与所述客户端的通信中使用所 述对称密钥对通信数据进行加解密。
  15. 根据权利要求14所述的装置,其特征在于,
    所述接收模块接收所述客户端发送的第二授权指示消息,所述第二授权指示消息包括:新生成的第二全局唯一标识符及第二密钥参数;
    所述发送模块向所述客户端发送第二授权响应消息;
    所述密钥确定模块根据所述密钥全局唯一标识符与所述第二密钥参数,确定新的对称密钥;
    所述标识符记录模块更新所述密钥全局唯一标识符为所述第二全局唯一标识符;以及
    所述发送模块与所述接收模块在后续与所述客户端的通信中使用所述新的对称密钥对通信数据进行加解密。
  16. 一种非易失性计算机存储介质,所述计算机存储介质存储有能够被处理器执行的计算机可读指令,当所述计算机可读指令被处理器执行时,所述处理器执行如权利要求1-6中任一项所述的方法。
PCT/CN2017/092995 2016-09-26 2017-07-14 对称密钥动态生成方法、装置、设备及*** WO2018054144A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610849888.5A CN107872312B (zh) 2016-09-26 2016-09-26 对称密钥动态生成方法、装置、设备及***
CN201610849888.5 2016-09-26

Publications (1)

Publication Number Publication Date
WO2018054144A1 true WO2018054144A1 (zh) 2018-03-29

Family

ID=61690111

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/092995 WO2018054144A1 (zh) 2016-09-26 2017-07-14 对称密钥动态生成方法、装置、设备及***

Country Status (2)

Country Link
CN (1) CN107872312B (zh)
WO (1) WO2018054144A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024724B (zh) * 2021-10-25 2023-06-13 四川启睿克科技有限公司 一种基于物联网的对称密钥动态生成方法
WO2023240623A1 (zh) * 2022-06-17 2023-12-21 北京小米移动软件有限公司 数据通信方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110258437A1 (en) * 2010-04-16 2011-10-20 Microsoft Corporation Secure local update of content management software
CN103268456A (zh) * 2013-05-31 2013-08-28 杭州华三通信技术有限公司 一种文件安全控制方法及装置
CN104065652A (zh) * 2014-06-09 2014-09-24 韩晟 一种身份验证方法、装置、***及相关设备
CN105100052A (zh) * 2015-05-29 2015-11-25 北京奇虎科技有限公司 服务器、手机终端及其帐号与设备绑定执行、控制方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110258437A1 (en) * 2010-04-16 2011-10-20 Microsoft Corporation Secure local update of content management software
CN103268456A (zh) * 2013-05-31 2013-08-28 杭州华三通信技术有限公司 一种文件安全控制方法及装置
CN104065652A (zh) * 2014-06-09 2014-09-24 韩晟 一种身份验证方法、装置、***及相关设备
CN105100052A (zh) * 2015-05-29 2015-11-25 北京奇虎科技有限公司 服务器、手机终端及其帐号与设备绑定执行、控制方法

Also Published As

Publication number Publication date
CN107872312A (zh) 2018-04-03
CN107872312B (zh) 2020-02-07

Similar Documents

Publication Publication Date Title
TWI641258B (zh) Data transmission method, device and system
CN109347835B (zh) 信息传输方法、客户端、服务器以及计算机可读存储介质
CN104094267B (zh) 安全共享来自源装置的媒体内容的方法、装置和***
TW201814496A (zh) 資料儲存方法、資料獲取方法、裝置及系統
TW201417546A (zh) 即時通信方法和系統
JP2019514314A (ja) 暗号化メッセージを送受信するために動的公開鍵インフラストラクチャを用いる方法、システム、及び媒体
WO2020155812A1 (zh) 一种数据存储方法、装置及设备
KR20170111022A (ko) 암호화 및 검색 장치 및 그 방법
CN114793184B (zh) 一种基于第三方密钥管理节点的安全芯片通信方法及装置
US8751819B1 (en) Systems and methods for encoding data
TWI827906B (zh) 訊息傳輸系統以及應用其中之使用者裝置與資訊安全硬體模組
WO2018054144A1 (zh) 对称密钥动态生成方法、装置、设备及***
US11216571B2 (en) Credentialed encryption
US20160148002A1 (en) Key storage apparatus, key storage method and program therefor
US10057054B2 (en) Method and system for remotely keyed encrypting/decrypting data with prior checking a token
CN114553557B (zh) 密钥调用方法、装置、计算机设备和存储介质
KR101812311B1 (ko) 사용자 단말 및 속성 재암호 기반의 사용자 단말 데이터 공유 방법
CN115022057A (zh) 安全认证方法、装置和设备及存储介质
KR102539418B1 (ko) Puf 기반 상호 인증 장치 및 방법
CN111431846B (zh) 数据传输的方法、装置和***
CN113874857A (zh) 用于最优信息理论安全的加密密钥管理的方法和设备
TWI828558B (zh) 訊息傳輸系統以及應用其中之使用者裝置與資訊安全硬體模組
US11831756B2 (en) Sharing access to data externally
CN116599771B (zh) 数据分级保护传输方法及装置、存储介质和终端
US11652612B2 (en) Sharing access to data

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: 17852215

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27.08.2019) 2ND TIME.

122 Ep: pct application non-entry in european phase

Ref document number: 17852215

Country of ref document: EP

Kind code of ref document: A1