WO2019148832A1 - 私钥生成的方法和设备 - Google Patents

私钥生成的方法和设备 Download PDF

Info

Publication number
WO2019148832A1
WO2019148832A1 PCT/CN2018/103503 CN2018103503W WO2019148832A1 WO 2019148832 A1 WO2019148832 A1 WO 2019148832A1 CN 2018103503 W CN2018103503 W CN 2018103503W WO 2019148832 A1 WO2019148832 A1 WO 2019148832A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
identifier
entity
message
key
Prior art date
Application number
PCT/CN2018/103503
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 WO2019148832A1 publication Critical patent/WO2019148832A1/zh
Priority to US16/947,497 priority Critical patent/US20200366474A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • 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
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • 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
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • H04L9/0841Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these involving Diffie-Hellman or related key agreement protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • 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
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • 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
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • 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
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • 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
    • H04L9/0852Quantum cryptography
    • 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/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time 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/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
    • 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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • H04L9/3073Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves involving pairings, e.g. identity based encryption [IBE], bilinear mappings or bilinear pairings, e.g. Weil or Tate pairing
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3242Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • H04W12/106Packet or message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/061Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying further key derivation, e.g. deriving traffic keys from a pair-wise master key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/062Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying encryption of the keys

Definitions

  • the present application relates to communication technologies, and in particular, to a method and device for generating a private key.
  • ID oriented network As a new network architecture for future networks, has gradually begun to be applied to network technologies.
  • ION network architecture a social relationship can be established between the network element and the network element, where the network element is a device such as a terminal, for example, the network element is a personal computer, a smart refrigerator, etc., and then the network element needs to be established.
  • Multiple gateways will be built into one group.
  • the access gateway when a group is established for a network element, divides the network element into groups by the strength of the network signal of the network element.
  • the present application provides a method and a device for generating a private key to solve the problem of how a terminal under a group obtains a private key required for subsequent communication under the ION network architecture in the prior art.
  • the application provides a method for generating a private key, including:
  • the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal;
  • the first terminal sends a first half session key parameter corresponding to the second terminal and an identifier of the second terminal to the first terminal Before describing the IKMS entity, it also includes:
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • the first terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity, including:
  • the first message verification code is used to verify that the first message is sent by the first terminal and used to verify the integrity of the first message.
  • the first shared key includes a first key for generating a message verification code, and a third for encrypting data Two keys.
  • the first terminal sends a first message to the IKMS entity, include:
  • the first terminal encrypts the first message according to the first shared key, to obtain an encrypted first message
  • the first terminal sends the encrypted first message to the IKMS entity.
  • the first terminal receives a second that is sent by the IKMS entity and corresponds to the second terminal
  • the semi-session key parameter, the identifier of the second terminal, and the encrypted private key corresponding to the second terminal including:
  • the second message sent by the IKMS entity, where the second message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted a private key corresponding to the second terminal, and a second message verification code, wherein the second message verification code is used to verify that the second message is sent by the IKMS entity and used to verify the The integrity of the second message;
  • the first terminal sends, according to the identifier of the second terminal, a second half session key parameter corresponding to the second terminal, and an encrypted private key corresponding to the second terminal.
  • Giving the second terminal includes:
  • the first terminal verifies the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • the first terminal determines that the second message verification code passes the verification, according to the identifier of the second terminal, the second half session key parameter corresponding to the second terminal, and the encrypted and the first The private key corresponding to the second terminal is sent to the second terminal.
  • the receiving, by the first terminal, the second message sent by the IKMS entity includes:
  • the method further includes:
  • the first terminal decrypts the encrypted second message according to the first shared key to obtain the second message.
  • Receiving, by the IKMS entity, a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted private key corresponding to the second terminal include:
  • the third message sent by the IKMS entity, where the third message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted a private key corresponding to the second terminal, and signature information corresponding to the second terminal, where the signature information corresponding to the second terminal is used to verify the encrypted corresponding to the second terminal
  • the private key is generated by the IKMS entity
  • the first terminal sends, according to the identifier of the second terminal, a second half session key parameter corresponding to the second terminal, and an encrypted private key corresponding to the second terminal.
  • Giving the second terminal includes:
  • the first terminal verifies the signature information corresponding to the second terminal according to the public key of the IKMS entity;
  • the second half session key parameter corresponding to the second terminal is encrypted according to the identifier of the second terminal, and the encrypted The private key corresponding to the second terminal and the signature information corresponding to the second terminal are sent to the second terminal.
  • the receiving, by the first terminal, the third message that is sent by the IKMS entity includes:
  • the method further includes:
  • the number of the second terminals is one or at least two.
  • the first terminal is a master node
  • the second terminal is a slave node
  • the first terminal receives, at the first terminal, a first, corresponding to the second terminal, sent by the second terminal Before the semi-session key parameter and the identifier of the second terminal, the method further includes:
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes an identifier of the group.
  • the group identifier, the identifier of the first terminal, and the Before the identifier of the second terminal is sent to the IDM entity it also includes:
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • the first terminal sends the group identifier, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, including:
  • the second shared key includes a third key for generating a message verification code, and for encrypting data The fourth key.
  • the first terminal sends a fourth message to the IDM entities, including:
  • the first terminal encrypts the fourth message according to the second shared key, to obtain an encrypted fourth message
  • the first terminal sends the encrypted fourth message to the IDM entity.
  • the receiving, by the first terminal, the identifier of the group sent by the IDM entity, and the identifier of the second terminal includes:
  • the fifth message that is sent by the IDM entity, where the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code, where The fourth message verification code is used to verify that the fifth message is sent by the IDM entity and used to verify the integrity of the fifth message;
  • the method further includes:
  • the first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • the first terminal After the first terminal determines that the fourth message verification code is verified, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, And an identifier of the second terminal.
  • the receiving, by the first terminal, the fifth message sent by the IDM entity includes:
  • the method further includes:
  • the first terminal decrypts the encrypted fifth message according to the second shared key to obtain the fifth message.
  • the application provides a method for generating a private key, including:
  • the second terminal sends, to the first terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter corresponding to the second terminal And the identifier of the second terminal is used to generate an encrypted private key corresponding to the second terminal;
  • the second terminal receives a second half session key parameter corresponding to the second terminal that is sent by the first terminal, and an encrypted private key corresponding to the second terminal, where The second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal;
  • the second terminal generates a symmetric key according to the first half session key parameter corresponding to the second terminal and the second half session key parameter corresponding to the second terminal;
  • the second terminal decrypts the encrypted private key corresponding to the second terminal according to the symmetric key pair to obtain a private key corresponding to the second terminal.
  • the second terminal receives, by the first terminal, a second half session key parameter corresponding to the second terminal, and the encrypted
  • the private key corresponding to the second terminal includes:
  • the second terminal generates a symmetric key according to the first half session key parameter corresponding to the second terminal and the second half session key parameter corresponding to the second terminal, including:
  • the second terminal verifies the signature information corresponding to the second terminal
  • the second terminal determines that the signature information corresponding to the second terminal passes the verification, according to the first half session key parameter corresponding to the second terminal, and the second corresponding to the second terminal A semi-session key parameter that generates a symmetric key.
  • the first terminal is a master node
  • the second terminal is a slave node
  • the second terminal sends the first half corresponding to the second terminal to the first terminal before the session key parameter and the identifier of the second terminal, the method further includes:
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first a relationship between a terminal and the second terminal;
  • the second terminal receives the group join response message sent by the first terminal, where the group join response message includes the identifier of the group.
  • the application provides a method for group establishment, including:
  • the IDM entity receives the group identifier bit sent by the first terminal, the identifier of the first terminal, and the identifier of the second terminal, where the group identifier bit represents between the first terminal and the second terminal Relationship, the group identifier bit, the identifier of the first terminal, and the identifier of the second terminal are used to determine an identifier of the group;
  • the IDM entity generates an identifier of the group
  • the IDM entity sends the identifier of the group and the identifier of the second terminal to the first terminal.
  • the IDM entity receives the group identifier bit sent by the first terminal, and the identifier of the second terminal, including:
  • the IDM entity Receiving, by the IDM entity, a fourth message sent by the first terminal, where the fourth message includes the group identifier bit, an identifier of the first terminal, an identifier of the second terminal, and a third a message verification code, wherein the third message verification code is used to verify that the fourth message is sent by the first terminal and used to verify the integrity of the fourth message;
  • the IDM entity generates an identifier of the group, including:
  • the IDM entity verifies the third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • the identifier of the group is generated.
  • the second shared key includes a third key for generating a message verification code, and a third for encrypting data Four keys.
  • the IDM entity receives the fourth message sent by the first terminal, include:
  • the method further includes:
  • the IDM entity decrypts the encrypted fourth message according to the second shared key to obtain the fourth message.
  • the IDM entity sends the identifier of the group and the identifier of the second terminal Giving the first terminal includes:
  • the IDM entity generates a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • the IDM entity sends a fifth message to the first terminal, where the fifth message includes an identifier of the group, an identifier of the second terminal, and the fourth message verification code, and
  • the IDM entity sends the group information to the IKMS entity, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal, where the fourth The message verification code is used to verify that the fifth message is sent by the IDM entity and used to verify the integrity of the fifth message.
  • the sending, by the IDM entity, the fifth message to the first terminal includes:
  • the IDM entity encrypts the fifth message according to the second shared key to generate an encrypted second message
  • the IDM entity sends the encrypted fifth message to the first terminal.
  • the group identifier bit characterizes the first terminal as a master node, and the second terminal Main node
  • the group identifier bit indicates that the first terminal is a master node, and the second terminal is a slave node.
  • the number of the second terminals is one or at least two.
  • the application provides a method for generating a private key, including:
  • the IKMS entity receives the first half session key parameter corresponding to the second terminal and the identifier of the second terminal that are sent by the first terminal, where the first half session key parameter and the corresponding terminal of the second terminal.
  • the identifier of the second terminal is used to generate an encrypted private key corresponding to the second terminal;
  • the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the identifier of the second terminal, and the second terminal
  • the corresponding first half session key parameter and the second half session key parameter corresponding to the second terminal are generated, and the encrypted private key corresponding to the second terminal is generated, including:
  • the IKMS entity encrypts a private key corresponding to the second terminal according to a symmetric key corresponding to the second terminal, and generates an encrypted private key corresponding to the second terminal.
  • the IKMS entity receives a first half session key parameter corresponding to the second terminal that is sent by the first terminal, and the The identifier of the second terminal, including:
  • the IKMS entity Receiving, by the IKMS entity, the first message sent by the first terminal, where the first message includes a first half session key parameter corresponding to the second terminal, an identifier of the second terminal, and a first message verification code
  • the first message verification code is used to verify that the first message is sent by the first terminal and used to verify the integrity of the first message
  • the IKMS entity generates a private key corresponding to the second terminal according to the identifier of the second terminal, including:
  • the IKMS entity verifies the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • the IKMS entity After the IKMS entity determines that the first message verification code passes the verification, generates a private key corresponding to the second terminal according to the identifier of the second terminal.
  • the first shared key includes a third key for generating a message verification code, and a third part for encrypting data Four keys.
  • the receiving, by the IKMS entity, the first message sent by the first terminal includes:
  • the method further includes:
  • the IKMS entity decrypts the encrypted first message according to the first shared key to obtain the first message.
  • the IKMS entity, the second half session key parameter corresponding to the second terminal, the identifier of the second terminal, and the encrypted second terminal is sent to the first terminal, including:
  • the IKMS entity generates a second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • the IKMS entity sends a second message to the first terminal, where the second message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted a private key corresponding to the second terminal, and a second message verification code, wherein the second message verification code is used to verify that the second message is sent by the IKMS entity and used to verify the The integrity of the second message.
  • the sending, by the IKMS entity, the second message to the first terminal includes:
  • the IKMS entity encrypts the second message according to the first shared key to generate an encrypted second message
  • the IKMS entity sends the encrypted second message to the first terminal.
  • the IKMS entity, the second half session key parameter corresponding to the second terminal, the identifier of the second terminal, and the encrypted second terminal is sent to the first terminal, including:
  • the IKMS entity generates, according to the private key of the IKMS entity, signature information corresponding to the second terminal, where the signature information corresponding to the second terminal is used to verify the encrypted corresponding to the second terminal.
  • Private key is generated by the IKMS entity;
  • the IKMS entity sends a third message to the first terminal, where the third message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted a private key corresponding to the second terminal and signature information corresponding to the second terminal.
  • the IKMS entity sends a third message to the first terminal, including:
  • the IKMS entity encrypts the third message according to the first shared key to generate an encrypted third message, where the first shared key is between the first terminal and the IKMS entity Negotiated key;
  • the IKMS entity sends the encrypted third message to the first terminal.
  • the first terminal is a master node
  • the second terminal is a slave node
  • the number of the second terminals is one or at least two.
  • the application provides a first terminal, including:
  • a first receiving unit configured to receive, by the second terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first terminal corresponds to the second terminal
  • the semi-session key parameter and the identifier of the second terminal are used to generate an encrypted private key corresponding to the second terminal;
  • a first sending unit configured to send, to the IKMS entity, the first half session key parameter corresponding to the second terminal and the identifier of the second terminal;
  • a second receiving unit configured to receive, by the IKMS entity, a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted second terminal corresponding to the second terminal a private key, wherein the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal;
  • a second sending unit configured to send, according to the identifier of the second terminal, a second half session key parameter corresponding to the second terminal, and an encrypted private key corresponding to the second terminal to The second terminal.
  • the first terminal further includes:
  • a first generating unit configured to: before the first sending unit sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity, according to the first sharing Generating a first message verification code, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • the first sending unit is specifically configured to:
  • the first message includes a first half session key parameter corresponding to the second terminal, an identifier of the second terminal, and the first message verification And a code, wherein the first message verification code is used to verify that the first message is sent by the first terminal and used to verify the integrity of the first message.
  • the first shared key includes a first key for generating a message verification code, and a third for encrypting data Two keys.
  • the first sending unit includes:
  • a first encryption module configured to encrypt the first message according to the first shared key, to obtain an encrypted first message
  • the first sending module is configured to send the encrypted first message to the IKMS entity.
  • the second receiving unit is specifically configured to:
  • the second message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted a private key corresponding to the second terminal, and a second message verification code, wherein the second message verification code is used to verify that the second message is sent by the IKMS entity and used to verify the integrity of the second message ;
  • the second sending unit includes:
  • a first verification module configured to verify the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • a second sending module configured to determine, after the second message verification code passes the verification, a second half session key parameter corresponding to the second terminal according to the identifier of the second terminal, and an encrypted and The private key corresponding to the second terminal is sent to the second terminal.
  • the second receiving unit is specifically configured to:
  • the second sending unit further includes:
  • a first decrypting module configured to: after the verifying module verifies the second message verification code according to the first shared key, decrypt the encrypted second message according to the first shared key, Obtaining the second message.
  • the second receiving unit is specifically configured to:
  • the third message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted a private key corresponding to the second terminal, and signature information corresponding to the second terminal, where the signature information corresponding to the second terminal is used to verify that the encrypted private key corresponding to the second terminal is Generated by the IKMS entity;
  • the second sending unit includes:
  • a second verification module configured to verify the signature information corresponding to the second terminal according to the public key of the IKMS entity
  • a third sending module configured to determine, after the verification of the signature information corresponding to the second terminal, the second half session key parameter corresponding to the second terminal according to the identifier of the second terminal, and the encryption The private key corresponding to the second terminal and the signature information corresponding to the second terminal are sent to the second terminal.
  • the second receiving unit is specifically configured to:
  • the second sending unit further includes:
  • a second decryption module configured to: after the second verification module verifies the signature information corresponding to the second terminal according to the public key of the IKMS entity, according to the first shared key, after the encrypting The third message is decrypted to obtain the third message, wherein the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the number of the second terminals is one or at least two.
  • the first terminal is a master node
  • the second terminal is a slave node
  • the first terminal further comprising:
  • a third receiving unit configured to receive, before the first receiving unit receives the first half session key parameter corresponding to the second terminal and the identifier of the second terminal sent by the second terminal a group join request sent by the second terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents between the first terminal and the second terminal Relationship;
  • a third sending unit configured to send the group identifier bit, the identifier of the first terminal, and the identifier of the second terminal to an IDM entity, where the group identifier bit and the identifier of the first terminal And the identifier of the second terminal is used to determine an identifier of the group;
  • a fourth receiving unit configured to receive an identifier of a group sent by the IDM entity, and an identifier of the second terminal;
  • a fourth sending unit configured to send a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes an identifier of the group.
  • the first terminal further includes:
  • a first generating unit configured to: before the third sending unit sends the group identifier bit, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, according to the second shared key Generating a third message verification code, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • the third sending unit is specifically configured to:
  • the third message verification code is used to verify that the fourth message is sent by the first terminal and used to verify the integrity of the fourth message.
  • the second shared key includes a third key for generating a message verification code, and for encrypting data The fourth key.
  • the third sending unit includes:
  • a second encryption module configured to encrypt the fourth message according to the second shared key, to obtain an encrypted fourth message
  • a fourth sending module configured to send the encrypted fourth message to the IDM entity.
  • the fourth receiving unit is specifically configured to:
  • the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code, where the fourth message is verified.
  • the code is used to verify that the fifth message is sent by the IDM entity and used to verify the integrity of the fifth message;
  • the first terminal further includes:
  • a verification unit configured to verify the fourth message verification code according to the second shared key after the fourth receiving unit receives the fifth message sent by the IDM entity, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • a saving unit configured to determine, after the fourth message verification code passes the verification, save the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and the second The identity of the terminal.
  • the fourth receiving unit is specifically configured to:
  • the first terminal further includes:
  • a decrypting unit configured to: after the verifying unit verifies the fourth message verification code according to the second shared key, decrypt the encrypted fifth message according to the second shared key, to obtain the Fifth message.
  • a second terminal including:
  • a first sending unit configured to send, to the first terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half corresponding to the second terminal
  • the session key parameter and the identifier of the second terminal are used to generate an encrypted private key corresponding to the second terminal;
  • a first receiving unit configured to receive a second half session key parameter corresponding to the second terminal sent by the first terminal, and an encrypted private key corresponding to the second terminal, where The second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal;
  • a generating unit configured to generate a symmetric key according to the first half session key parameter corresponding to the second terminal and the second half session key parameter corresponding to the second terminal;
  • a decryption unit configured to decrypt the encrypted private key corresponding to the second terminal according to the symmetric key pair, to obtain a private key corresponding to the second terminal.
  • the first receiving unit is specifically configured to:
  • the signature information corresponding to the second terminal is used to verify that the encrypted private key corresponding to the second terminal is generated by an IKMS entity;
  • the generating unit comprises:
  • a verification module configured to verify the signature information corresponding to the second terminal
  • a generating module configured to determine, according to the first half session key parameter corresponding to the second terminal, and a second corresponding to the second terminal, after the verification of the signature information corresponding to the second terminal is verified
  • a semi-session key parameter that generates a symmetric key.
  • the first terminal is a master node
  • the second terminal is a slave node
  • the second terminal further comprising:
  • a second sending unit configured to: before the first sending unit sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the first terminal, to the first The terminal sends a group join request, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents between the first terminal and the second terminal Relationship;
  • a second receiving unit configured to receive a group join response message sent by the first terminal, where the group join response message includes an identifier of the group.
  • an IDM entity including:
  • a receiving unit configured to receive a group identifier bit sent by the first terminal, an identifier of the first terminal, and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal a relationship between the terminals, the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used to determine an identifier of the group;
  • Generating unit for generating an identifier of the group
  • a sending unit configured to send the identifier of the group and the identifier of the second terminal to the first terminal.
  • the receiving unit is specifically configured to:
  • the third message verification code is used to verify that the fourth message is sent by the first terminal and used to verify the integrity of the fourth message.
  • the generating unit comprises:
  • a verification module configured to verify the third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • a first generating module configured to determine, after the third message verification code passes the verification, an identifier of the group.
  • the second shared key includes a third key for generating a message verification code, and a third for encrypting data Four keys.
  • the receiving unit is specifically configured to:
  • the generating unit further includes:
  • a decryption module configured to decrypt the encrypted fourth message according to the second shared key before the verification module verifies the third message verification code according to the second shared key, to obtain a The fourth message.
  • the sending unit includes:
  • a second generating module configured to generate a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity;
  • a sending module configured to send a fifth message to the first terminal, where the fifth message includes an identifier of the group, an identifier of the second terminal, and the fourth message verification code
  • the IDM entity sends the group information to the IKMS entity, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal, where the The four message verification code is used to verify that the fifth message is sent by the IDM entity and used to verify the integrity of the fifth message.
  • the sending module is specifically configured to:
  • the group identifier bit characterizes the first terminal as a master node, and the second terminal Main node
  • the group identifier bit indicates that the first terminal is a master node, and the second terminal is a slave node.
  • the number of the second terminals is one or at least two.
  • an IKMS entity comprising:
  • a receiving unit configured to receive a first half session key parameter corresponding to the second terminal that is sent by the first terminal, and an identifier of the second terminal, where the first half session key corresponding to the second terminal
  • the parameter and the identifier of the second terminal are used to generate an encrypted private key corresponding to the second terminal
  • a generating unit configured to generate a second half session key parameter corresponding to the second terminal, and according to the identifier of the second terminal, the first half session key parameter corresponding to the second terminal, and the second And generating, by the second half session key parameter corresponding to the terminal, an encrypted private key corresponding to the second terminal, where the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted a private key corresponding to the second terminal;
  • a sending unit configured to send, to the first second session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted private key corresponding to the second terminal a terminal.
  • the generating unit includes:
  • a first generating module configured to generate a private key corresponding to the second terminal according to the identifier of the second terminal
  • a second generation module configured to generate a second half session key parameter corresponding to the second terminal, and according to a first half session key parameter corresponding to the second terminal, and a corresponding to the second terminal a second half session key parameter, generating a symmetric key corresponding to the second terminal;
  • the third generation module is configured to encrypt the private key corresponding to the second terminal according to the symmetric key corresponding to the second terminal, and generate the encrypted private key corresponding to the second terminal.
  • the receiving unit is specifically configured to:
  • the first terminal Receiving, by the first terminal, the first message, where the first message includes a first half session key parameter corresponding to the second terminal, an identifier of the second terminal, and a first message verification code, where Determining, by the first terminal, the first message verification code is used to verify the integrity of the first message;
  • the first generating module includes:
  • a verification submodule configured to verify the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • a first generating submodule configured to: after determining that the first message verification code passes the verification, generate a private key corresponding to the second terminal according to the identifier of the second terminal.
  • the first shared key includes a third key for generating a message verification code, and a third part for encrypting data Four keys.
  • the receiving unit is specifically configured to:
  • the first generating module further includes:
  • a decryption submodule configured to decrypt the encrypted first message according to the first shared key before the verification submodule verifies the first message verification code according to the first shared key, The first message is obtained.
  • the sending unit includes:
  • a fourth generation module configured to generate a second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity;
  • a first sending module configured to send a second message to the first terminal, where the second message includes a second half session key parameter corresponding to the second terminal, and an identifier of the second terminal And the encrypted private key corresponding to the second terminal, and the second message verification code, where the second message verification code is used to verify that the second message is sent by the IKMS entity and used for verification. The integrity of the second message.
  • the first sending module includes:
  • a first encryption submodule configured to encrypt the second message according to the first shared key, to generate an encrypted second message
  • the first sending submodule is configured to send the encrypted second message to the first terminal.
  • the sending unit includes:
  • a fifth generation module configured to generate, according to the private key of the IKMS entity, signature information corresponding to the second terminal, where the signature information corresponding to the second terminal is used to verify the encrypted and the first The private key corresponding to the second terminal is generated by the IKMS entity;
  • a second sending module configured to send a third message to the first terminal, where the third message includes a second half session key parameter corresponding to the second terminal, and an identifier of the second terminal And an encrypted private key corresponding to the second terminal and signature information corresponding to the second terminal.
  • the second sending module includes:
  • a second encryption submodule configured to encrypt the third message according to the first shared key, to generate an encrypted third message, where the first shared key is the first terminal and the a key negotiated between IKMS entities;
  • the second sending submodule is configured to send the encrypted third message to the first terminal.
  • the first terminal is a master node
  • the second terminal is a slave node
  • the number of the second terminals is one or at least two.
  • a terminal device comprising means or means for performing the various steps of any of the methods of the above first aspect.
  • a terminal device includes: a processor, a memory, and a transmitter; the transmitter is coupled to the processor, and the processor controls a sending action of the transmitter;
  • the memory is for storing computer executable program code, the program code comprising instructions; when the processor executes the instruction, the instruction causes the terminal device to perform any of the methods of the above first aspect.
  • a terminal device comprising at least one processing element or chip for performing any of the methods of the above first aspect.
  • a thirteenth aspect a computer readable storage medium comprising the program of the twelfth aspect is provided.
  • a terminal device comprising means or means for performing the various steps of any of the methods of the above second aspect.
  • a terminal device includes: a processor, a memory, and a transmitter; the transmitter is coupled to the processor, and the processor controls a sending action of the transmitter;
  • the memory is for storing computer executable program code, the program code comprising instructions; when the processor executes the instruction, the instruction causes the terminal device to perform any of the methods of the above second aspect.
  • a terminal device comprising at least one processing element or chip for performing any of the methods of the above second aspect.
  • a program for performing any of the methods of the second aspect above when executed by a processor.
  • a computer readable storage medium comprising the program of the seventeenth aspect is provided.
  • an IDM entity comprising means or means for performing the various steps of any of the methods of the above third aspect.
  • an IDM entity including a processor, a memory, and a communication interface; the communication interface is coupled to the processor;
  • the memory is for storing computer executable program code, the program code comprising instructions; when the processor executes the instructions, the instructions cause the IDM entity to perform any of the methods of the above third aspect.
  • an IDM entity comprising at least one processing element or chip for performing any of the methods of the above third aspect.
  • a twenty-third aspect a computer readable storage medium comprising the program of the twenty-second aspect is provided.
  • an IKMS entity comprising means or means for performing the various steps of any of the methods of the above fourth aspect.
  • an IKMS entity including a processor, a memory, and a communication interface; the communication interface is coupled to the processor;
  • the memory is for storing computer executable program code, the program code comprising instructions; when the processor executes the instruction, the instruction causes the IDM entity to perform any of the methods of the above fourth aspect.
  • an IKMS entity comprising at least one processing element or chip for performing any of the methods of the above fourth aspect.
  • a twenty-eighth aspect a computer readable storage medium comprising the program of the twenty-seventh aspect is provided.
  • the first half session key parameter corresponding to the second terminal and the identifier of the second terminal, and the first half session key corresponding to the second terminal are sent by the first terminal by using the first terminal.
  • the parameter and the identifier of the second terminal are used to generate the encrypted private key corresponding to the second terminal;
  • the first terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity;
  • the first terminal receives the second half session key parameter corresponding to the second terminal that is sent by the IKMS entity, the identifier of the second terminal, and the encrypted private key corresponding to the second terminal, and the second half corresponding to the second terminal
  • the session key parameter is used to decrypt the encrypted private key corresponding to the second terminal;
  • the first terminal according to the identifier of the second terminal, the second half session key parameter corresponding to the second terminal, and the encrypted The private key corresponding to the second terminal is sent to the second terminal.
  • a private key acquisition method is provided. After a group is established between the terminal and the terminal, the second terminal initiates a request for obtaining a private key, and then the IKMS entity generates an encrypted private key corresponding to the second terminal. The second terminal receives the encrypted private key corresponding to the second terminal that is sent by the IKMS entity by using the first terminal, and the second terminal can obtain the encrypted private key corresponding to the second terminal, so that the private key is not guaranteed. It is stolen to ensure that communication information between groups is not stolen.
  • Figure 1 provides a schematic diagram of a network architecture of an IP network
  • Figure 2 provides a schematic diagram of the network architecture of the ION network
  • FIG. 3 is a schematic diagram of a scenario of a mobile communication network based on an ION network architecture provided by the present application;
  • FIG. 4 is a schematic flowchart diagram of a method for generating a private key according to an embodiment of the present application
  • FIG. 5 is a schematic diagram 1 of a communication method for generating a private key according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram 2 of a communication method for generating a private key according to an embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart diagram of a method for group establishment according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram 1 of communication of a group establishment method according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram 2 of communication of a method for group establishment according to an embodiment of the present disclosure.
  • FIG. 10 is a third schematic diagram of communication of a method for group establishment according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram 4 of communication of a group establishment method according to an embodiment of the present application.
  • FIG. 12 is a schematic flowchart diagram of another method for generating a private key according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic diagram 1 of communication of another method for generating a private key according to an embodiment of the present application.
  • FIG. 14 is a second schematic diagram of communication of another method for generating a private key according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic flowchart diagram of still another method for generating a private key according to an embodiment of the present application.
  • 16 is a schematic diagram of communication of another method for generating a private key according to an embodiment of the present application.
  • FIG. 17 is a second schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure.
  • FIG. 18 is a schematic flowchart diagram of still another method for generating a private key according to an embodiment of the present application.
  • FIG. 19 is a schematic diagram of communication of a method for generating a private key according to an embodiment of the present application.
  • FIG. 20 is a second schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure
  • FIG. 21 is a schematic flowchart of a method for generating a private key according to an embodiment of the present application.
  • FIG. 22 is a schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure
  • FIG. 23 is a second schematic diagram of communication of a method for generating a private key according to an embodiment of the present application.
  • FIG. 24 is a schematic flowchart diagram of another method for generating a private key according to an embodiment of the present application.
  • 25 is a schematic diagram of communication of another method for generating a private key according to an embodiment of the present application.
  • 26 is a second schematic diagram of communication of a method for generating a private key according to an embodiment of the present application.
  • FIG. 27 is a schematic flowchart of a method for generating another population private key according to an embodiment of the present application.
  • FIG. 28 is a schematic flowchart diagram of a method for establishing a group according to an embodiment of the present application.
  • FIG. 29 is a schematic flowchart diagram of a method for group establishment according to an embodiment of the present application.
  • FIG. 30 is a schematic flowchart diagram of another method for generating a private key according to an embodiment of the present application.
  • FIG. 31 is a schematic flowchart diagram of another method for generating a private key according to an embodiment of the present disclosure.
  • FIG. 32 is a schematic structural diagram of a first terminal according to an embodiment of the present application.
  • FIG. 33 is a schematic structural diagram of another first terminal according to an embodiment of the present application.
  • FIG. 34 is a schematic structural diagram of still another first terminal according to an embodiment of the present application.
  • FIG. 35 is a schematic structural diagram of still another first terminal according to an embodiment of the present application.
  • FIG. 36 is a schematic structural diagram of still another first terminal according to an embodiment of the present application.
  • FIG. 37 is a schematic structural diagram of a second terminal according to an embodiment of the present application.
  • FIG. 38 is a schematic structural diagram of another second terminal according to an embodiment of the present application.
  • FIG. 39 is a schematic structural diagram of still another second terminal according to an embodiment of the present application.
  • FIG. 40 is a schematic structural diagram of an IDM entity according to an embodiment of the present application.
  • FIG. 41 is a schematic structural diagram of another IDM entity according to an embodiment of the present disclosure.
  • FIG. 42 is a schematic structural diagram of still another IDM entity according to an embodiment of the present application.
  • FIG. 43 is a schematic structural diagram of an IKMS entity according to an embodiment of the present disclosure.
  • FIG. 44 is a schematic structural diagram of another IKMS entity according to an embodiment of the present disclosure.
  • FIG. 45 is a schematic structural diagram of still another IKMS entity according to an embodiment of the present application.
  • the embodiments of the present application are applied to 4G, 5G communication systems or other systems that may appear in the future. Some of the terms in this application are explained below so as to be understood by those skilled in the art. It should be noted that, when the solution of the embodiment of the present application is applied to a 5G system or other systems that may appear in the future, the names of the network devices and the terminal may change, but this does not affect the implementation of the solution in the embodiment of the present application.
  • FIG. 1 provides a schematic diagram of a network architecture of an IP network.
  • a traditional network protocol (IP) network architecture includes a transport layer, an IP layer, and a link layer, where an IP layer is used for recording. Information such as the identity and location of the terminal.
  • IP network protocol
  • FIG. 2 provides a schematic diagram of a network architecture of an ION network.
  • the ION network architecture includes a transport layer, an ID layer, a Locator layer, and a link layer.
  • the ION network architecture shown in Figure 2 is an ION network architecture with ID/Locator separation.
  • the ION network is a new network architecture for future networks.
  • the ION network architecture and the traditional IP network architecture are mainly due to changes in the IP layer. As shown in FIG.
  • the IP address indicates which host the host communicating with host A is, and the IP address indicates The routing information of the data packet in the network, the routing information is also called location information, so the IP address of the IP layer has dual attributes of identity and location.
  • the ID layer records the identity of the host, and the Locator layer is used to record the routing information of the host, and the ION network architecture separates the dual attributes of the IP address;
  • an ID layer is added.
  • the ID of the 3.5th layer represents the identity of the user
  • the IP of the 3rd layer represents the location of the user, in order to further distinguish the Layer 3 IP layer in the ION network architecture.
  • TCP/IP transmission control protocol/internet protocol
  • the Layer 3 IP layer in the ION network architecture will be called Locator. Floor.
  • the control management layer is used to manage related services, and the management management layer is distributed and deployed in the ION network, and the control management layer can uniformly manage the identity and location of the host.
  • the control management layer mainly includes the following functions: identity management service, identity and location mapping management service (mapping/location service), ID relationship management service (grouping service), metadata management service (metadata) Service).
  • the ION network architecture can be applied to a variety of scenarios, for example, it can be applied to the Internet of Things (IoT); in the Internet of Things, each IoT terminal has a unique identity ID, and, in the Internet of Things. It is possible to establish the relationship between the ID of one IoT terminal and the ID of another IoT terminal.
  • IoT Internet of Things
  • each IoT terminal has a unique identity ID, and, in the Internet of Things. It is possible to establish the relationship between the ID of one IoT terminal and the ID of another IoT terminal.
  • a social internet of things has evolved in the Internet of Things.
  • a social relationship can be established between the terminal and the terminal, wherein the social relationship has the following three relationships: the first is an ownership object relationship, and in this relationship, the terminal can belong to the relationship.
  • the first is an ownership object relationship, and in this relationship, the terminal can belong to the relationship.
  • To establish a cluster for example, in a smart home network, terminals such as personal notebooks, refrigerators, televisions, and electric meters belong to terminals set in the house, and thus these terminals can be constructed as one group; the second is a common area.
  • Co-location object relationship in which the group can be established according to the domain relationship of the terminal.
  • each smart terminal belonging to one warehouse area can be constructed as a group;
  • the third type is the Co-work object relationship, in which the group can be established according to the work done by the terminal.
  • each sensor and irrigation terminal are in the same Work in the irrigation system to build each sensor and irrigation terminal into a group.
  • the control management layer in the ION network architecture needs to establish and manage the group.
  • each terminal in the Internet of Things can be divided into a data collection and control terminal, a wearable terminal, a smart home terminal, a video monitoring terminal, a smart medical terminal, and the like.
  • a large number of intelligent terminals belong to terminals with low power consumption and wide coverage.
  • Typical characteristics of such terminals are poor computing, storage, and network transmission capabilities, and are sensitive to battery consumption; thus, the intelligent terminals are divided into multiple After the group, the distance between a low-power terminal A and another computing terminal in the group is often smaller than the distance from the terminal A to the access gateway; therefore, the terminal A can data.
  • the packet is forwarded to the terminal in the group that is close to the terminal A, thereby reducing power consumption and further saving energy. Therefore, based on the above analysis, a group is established between the terminal and the terminal, which can reduce power consumption of the terminal.
  • the access gateway divides the network element into groups by the strength of the network signal of the network element. For example, when the access gateway determines that the strength difference of the network signal when the two network elements access the gateway within a certain time, and belongs to a certain range, the access gateway divides the two network elements into one A group, where the network element refers to the above terminal, and may include at least one master node in one group, or may include at least one master node and at least one slave node in one group. And further, by group division, the low-power IoT terminal can transmit the data packet to the adjacent device in the near communication without sending the data packet to the remote network element device, thereby reducing the terminal. Power consumption.
  • the strength of the network signal based on the terminal is used to establish a group, because the strength of the network signal of the terminal is based on the location or area where the terminal is located, and thus the existing group.
  • the group establishment method can only divide the group based on the location or area where the terminal is located, regardless of the social attributes between the terminals, the characteristics of the constructed group are single, and the terminals in the group are constructed. It may not be credible and does not reflect the credibility between terminals.
  • the access gateway when establishing a group in the prior art, the access gateway performs group division and establishment, so that the terminals in the constructed group may not be trusted, and thus in the group. Trust and security between terminals will be lower.
  • FIG. 3 is a schematic diagram of a scenario of a mobile communication network based on an ION network architecture provided by the present application.
  • the control layer of the ION network architecture adopts a unified control plane adopting ION, and the data surface displays the terminal in the Internet of Things.
  • the devices in the Internet of Things can be divided into two groups, Group1 and Group2, and each group contains at least one terminal. Taking Group1 as an example, terminal A, terminal B, and terminal C are nodes with strong capabilities.
  • Terminal A, terminal B, and terminal C can be used as the primary node in Group 1, terminal a, terminal b, terminal c, terminal d, and The terminal e node is a weaker node, and terminal a, terminal b, terminal c, terminal d, and terminal e node can be regarded as slave nodes in Group1, so the relationship in Group1 exhibits a master-slave relationship. And a peer-to-peer relationship, for example, terminal C and terminal a are master-slave relationships, and terminal a and terminal e are in a peer-to-peer relationship.
  • terminal X, terminal Y, and terminal Z are regarded as the master nodes in Group 2
  • terminal v, terminal w, terminal x, terminal y, and terminal z nodes are regarded as slave nodes in Group 2.
  • Terminal may include various handheld devices with communication functions, in-vehicle devices, wearable devices, home smart devices, computing devices or other processing devices connected to wireless modems, and various forms of terminals, for example, mobile stations , MS), terminal, user equipment (UE), soft terminal, etc., for example, water meters, electricity meters, sensors, and the like.
  • the terminal may be a terminal in the Internet of Things, or a terminal in another network.
  • Master node Also known as the master terminal.
  • Slave node (slave_UE, S_UE): Also called slave terminal.
  • User Subscriber Server/AAA Authentication, Authorization, Accounting, Accounting, HSS/AAA: A traditional access authentication server, also known as an HSS/AAA entity.
  • IDM Identity management
  • IKMS Identity and key management system
  • IBS identity based signature
  • Each terminal has its own public-private key pair, where the public key is a meaningful string, such as an email address, a phone number, etc.; the private key of the terminal is generated by a key generation center (KGC) based on the user ID. Generated with the master private key of the key generation center; no need to install the package configuration file (PKG) during the signing process. Signature verification only requires signature, message, identity and master public key.
  • KGC key generation center
  • the IBS technology is an identity-based signature technology, a special public key cryptosystem.
  • the IBS technology includes the following two features: The first feature is that the terminal ID is directly used as the public key, so that no digital certificate is required to bind the public key and the username; the second feature is that a trusted private is required.
  • the key generation center is generated for each terminal and corresponds to the private key corresponding to the terminal ID. For example, the terminal uses the email address Alice@123.com as the terminal ID to apply for the private key corresponding to the terminal ID to the KGC, that is, the terminal sends the email address Alice@123.com to the KGC, and then the KGC generates a key algorithm according to the key.
  • the private key corresponding to the email address is generated for the terminal by using a parameter such as a public key.
  • IBS-based identity authentication IBS has the same function as traditional digital signatures. Therefore, IBS-based authentication can refer to the principle and process of authentication based on traditional digital signature. However, the difference between IBS-based authentication and traditional digital signature-based authentication is that when using IBS, the authenticator needs to be authenticated by the authenticator to verify the authenticity of the signature, so no complicated certificate system is needed. For example, after the terminal A obtains the private key and the signature information, the terminal directly uses the signature, the public key and the like to perform verification on the signature information.
  • Diffie-hellman key exchange (DH) protocol A security protocol that allows two devices to create an unsecured channel without any prior information from the other party.
  • the key which can be used as a symmetric key to encrypt the communication content in subsequent communications.
  • the session key parameter XB can be publicly obtained by the terminal A.
  • the parameters that other terminals can utilize are only q, a, XA, and XB, so that other terminals are forced to take discrete logarithms to determine the key, but other terminals are difficult to calculate. Discrete logarithm.
  • the first half session key parameter is the key parameter XA in the D-H protocol
  • the second half session key parameter is the key parameter XB in the D-H protocol.
  • FIG. 4 is a schematic flowchart of a method for generating a private key according to an embodiment of the present application. As shown in FIG. 4, the method is specifically as follows.
  • the first terminal receives the first half session key parameter corresponding to the second terminal and the identifier of the second terminal that are sent by the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal are The identifier of the terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the first terminal is a master node
  • the second terminal is a slave node
  • the second terminal sends a parameter for acquiring the private key to the first terminal, specifically, the second terminal A terminal transmits a first half session key parameter XA corresponding to the second terminal and an identifier of the second terminal, wherein the first half session key parameter XA is used to negotiate a session key.
  • the first terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity.
  • the first terminal sends the first half session key parameter XA corresponding to the second terminal and the identifier of the second terminal to the IKMS entity.
  • the IKMS entity generates the second key corresponding to the identifier of the second terminal by using the identifier of the second terminal as the public key, and the private key SK is the private key corresponding to the second terminal; then, the IKMS entity generates the second a semi-session key parameter XB, and the IKMS entity generates a symmetric key corresponding to the second terminal according to the received first half session key parameter XA and the second half session key parameter XB corresponding to the second terminal.
  • the symmetric key is a symmetric key of the IKMS entity and the second terminal; then, the IKMS entity encrypts the private key SK corresponding to the second terminal by using a symmetric key key corresponding to the second terminal, and generates The encrypted private key (SK) key corresponding to the second terminal.
  • the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key (SK) key corresponding to the second terminal.
  • the first terminal receives the second half session key parameter corresponding to the second terminal, the identifier of the second terminal, and the encrypted private key corresponding to the second terminal, where the first terminal corresponds to the second terminal.
  • the second half session key parameter is used to decrypt the encrypted private key corresponding to the second terminal.
  • the first terminal receives the second half session key parameter XB corresponding to the second terminal that is sent by the IKMS entity, the identifier of the second terminal, and the encrypted corresponding to the second terminal.
  • Private key (SK) key .
  • the first terminal sends the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal to the second terminal according to the identifier of the second terminal.
  • the first terminal sets a second half session key parameter XB corresponding to the second terminal, an identifier of the second terminal, and an encrypted private key corresponding to the second terminal (SK).
  • the key is sent to the second terminal.
  • the second terminal may decrypt the encrypted private key (SK) key corresponding to the second terminal, and further acquire the private key SK corresponding to the second terminal.
  • FIG. 5 is a schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 5, FIG. 5 is a schematic diagram of communication of a method for acquiring a private key between a second terminal and a first terminal. The method is specifically as follows.
  • the second terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the first terminal, where the first half session key parameter corresponding to the second terminal
  • the identifier of the second terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the second terminal S_UE sends the first half session key corresponding to the second terminal S_UE to the first terminal M_UE.
  • the first terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity.
  • the first terminal M_UE sends the first half session key parameter XA corresponding to the second terminal S_UE and the identifier S_UE_ID of the second terminal to the IKMS entity.
  • the IKMS entity generates a private key corresponding to the second terminal according to the identifier of the second terminal.
  • the IKMS entity generates a private key SK corresponding to the identifier S_UE_ID of the second terminal by using the identifier S_UE_ID of the second terminal as the public key, and the private key SK is the second terminal S_UE. Corresponding private key;
  • the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session key parameter corresponding to the second terminal, A symmetric key corresponding to the second terminal is generated.
  • the IKMS entity generates a second half session key parameter XB corresponding to the second terminal S_UE, and then the IKMS entity according to the received first half session key parameter XA corresponding to the second terminal S_UE And a second half session key parameter XB corresponding to the second terminal S_UE, generating a symmetric key key corresponding to the second terminal S_UE, the symmetric key key being a symmetric key of the IKMS entity and the second terminal S_UE.
  • the S15a and the IKMS entity encrypt the private key corresponding to the second terminal according to the symmetric key corresponding to the second terminal, and generate the encrypted private key corresponding to the second terminal, where the second key corresponds to the second terminal.
  • the half session key parameter is used to decrypt the encrypted private key corresponding to the second terminal.
  • the IKMS entity encrypts the private key SK corresponding to the second terminal S_UE by using the symmetric key key corresponding to the second terminal S_UE, and generates an encrypted corresponding to the second terminal S_UE.
  • Private key (SK) key .
  • the IKMS entity sends the second half session key parameter corresponding to the second terminal, the identifier of the second terminal, and the encrypted private key corresponding to the second terminal to the first terminal, where the second terminal
  • the corresponding second half session key parameter is used to decrypt the encrypted private key corresponding to the second terminal.
  • the first terminal M_UE receives the second half session key parameter XB corresponding to the second terminal S_UE sent by the IKMS entity, the identifier S_UE_ID of the second terminal, and the encrypted second The private key (SK) key corresponding to the terminal S_UE.
  • the first terminal sends the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal to the second terminal.
  • the first terminal M_UE sends the second half session key parameter XB corresponding to the second terminal S_UE and the encrypted private key (SK) key corresponding to the second terminal S_UE to the first terminal M_UE.
  • the second terminal S_UE; and the second terminal S_UE decrypts the encrypted private key (SK) key corresponding to the second terminal S_UE, and obtains the private key SK corresponding to the second terminal S_UE.
  • the acquisition of the private key may be completed by referring to steps S11a-S17a above.
  • FIG. 6 is a schematic diagram of communication 2 of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 6 , FIG. 6 is a schematic diagram of communication between private keys obtained by at least two second terminals and a first terminal. The method is specifically as follows.
  • Each second terminal sends a first half session key parameter corresponding to the second terminal and an identifier of the second terminal to the first terminal.
  • each second terminal S_UE sends a first half session key parameter XA corresponding to the second terminal S_UE to the first terminal M_UE, and the second The identifier S_UE_ID of the terminal, wherein the first half session key parameter XA is used to negotiate a session key.
  • the second terminal S_UE1 transmits a first half session key parameter XA1 corresponding to the second terminal S_UE1 and an identifier S_UE_ID1 of the second terminal S_UE1 to the first terminal M_UE; the second terminal S_UE2 sends a message to the first terminal M_UE The first half session key parameter XA2 corresponding to the second terminal S_UE2 and the identifier S_UE_ID2 of the second terminal S_UE2.
  • the first terminal sends the first half session key parameter corresponding to each second terminal and the identifier of each second terminal to the IKMS entity.
  • the first terminal M_UE adds the first half session key parameter and the identifier of all the second terminals S_UE to one message, and then the first terminal M_UE will correspond to each second terminal.
  • the first half session key parameter XA, and the identity S_UE_ID of each second terminal, are sent to the IKMS entity.
  • the first terminal M_UE will have a first half session key parameter XA1 corresponding to the second terminal S_UE1, an identifier S_UE_ID1 of the second terminal S_UE1, a first half session key parameter XA2 corresponding to the second terminal S_UE2, and a second
  • the identifier S_UE_ID2 of the terminal S_UE2 is added to a message and sent to the IKMS entity.
  • the IKMS entity generates a private key corresponding to the second terminal according to the identifier of each second terminal.
  • the IKMS entity generates a second half session key parameter corresponding to each second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session corresponding to the second terminal
  • the key parameter generates a symmetric key corresponding to the second terminal.
  • the S25a and the IKMS entity encrypt the private key corresponding to the second terminal according to the symmetric key corresponding to each second terminal, and generate an encrypted private key corresponding to the second terminal.
  • the IKMS entity performs one pass from S69, S691 to S692 to obtain an encrypted private key (SK) key corresponding to the second terminal.
  • SK private key
  • the IKMS entity generates the private key SK1 corresponding to the second terminal S_UE1 according to the identifier S_UE_ID1 of the second terminal S_UE2, and generates the private key SK2 corresponding to the second terminal S_UE2 according to the identifier S_UE_ID1 of the second terminal S_UE1. Then, the IKMS entity generates a second half session key parameter XB1 corresponding to the second terminal S_UE1, and simultaneously generates and uses the XB1 and XA1 according to the received first half session key parameter XA1 corresponding to the second terminal S_UE1.
  • the symmetric key key1 corresponding to the terminal S_UE1 and then the IKMS entity encrypts the private key SK2 corresponding to the second terminal S_UE1 according to the symmetric key key1 corresponding to the second terminal S_UE1, and generates an encrypted corresponding to the second terminal S_UE1.
  • Private key (SK1) key1 .
  • the IKMS entity generates a second half session key parameter XB2 corresponding to the second terminal S_UE2, and simultaneously generates and uses the XB2 and XA2 according to the received first half session key parameter XA2 corresponding to the second terminal S_UE2.
  • the symmetric key key2 corresponding to the terminal S_UE2 and then the IKMS entity encrypts the private key SK2 corresponding to the second terminal S_UE2 according to the symmetric key key2 corresponding to the second terminal S_UE2, and generates an encrypted corresponding to the second terminal S_UE2.
  • Private key (SK2) key2 .
  • the IKMS entity sends the second half session key parameter corresponding to each second terminal, the identifier of each second terminal, and the encrypted private key corresponding to each second terminal to the first terminal.
  • the IKMS entity sets a second half session key parameter XB corresponding to each second terminal S_UE, an identifier S_UE_ID of each second terminal, and an encrypted private key SK corresponding to each second terminal S_UE.
  • the first terminal M_UE receives the second half session key parameter XB corresponding to each second terminal S_UE, the identifier S_UE_ID of each second terminal, and the encryption sent by the IKMS entity.
  • the subsequent private key (SK) key corresponding to each second terminal S_UE.
  • the IKMS entity transmits XB1, S_UE_ID1, (SK1) key1 , XB2, S_UE_ID2, and (SK2) key2 to the first terminal M_UE.
  • S27a The first terminal sends the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal to the second terminal.
  • the first terminal M_UE sends the second half session key parameter XB corresponding to the second terminal S_UE and the encrypted private key SK corresponding to the second terminal S_UE to the second terminal.
  • the terminal S_UE that is, the first terminal M_UE, sends the second half session key parameter and the private key to the corresponding second terminal S_UE.
  • the first terminal M_UE transmits XB1 and (SK1) key1 to the corresponding second terminal S_UE1 according to S_UE_ID1; the first terminal M_UE transmits XB2 and (SK2) key2 to the corresponding second terminal S_UE2 according to S_UE_ID2.
  • Each of the second terminals S_UE decrypts the encrypted private key SK corresponding to the second terminal S_UE to obtain a private key SK corresponding to the second terminal S_UE.
  • the second terminal S_UE1 decrypts (SK1) key1 to obtain a private key SK1 corresponding to the second terminal S_UE1; the second terminal S_UE2 decrypts (SK2) key2 to obtain a private key corresponding to the second terminal S_UE2 SK2.
  • the first terminal receives the first half session key parameter corresponding to the second terminal and the identifier of the second terminal, and the first half session key parameter corresponding to the second terminal, and the first terminal
  • the identifier of the second terminal is used to generate the encrypted private key corresponding to the second terminal;
  • the first terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity;
  • the first terminal Receiving, by the IKMS entity, a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted private key corresponding to the second terminal, and a second half session key corresponding to the second terminal
  • the parameter is used to decrypt the encrypted private key corresponding to the second terminal;
  • the first terminal according to the identifier of the second terminal, the second half session key parameter corresponding to the second terminal, and the encrypted second terminal corresponding to the second terminal
  • the private key is sent to the second terminal.
  • a private key acquisition method is provided. After a group is established between the terminal and the terminal, the second terminal initiates a request for obtaining a private key, and then the IKMS entity generates an encrypted private key corresponding to the second terminal. The second terminal receives the encrypted private key corresponding to the second terminal that is sent by the IKMS entity by using the first terminal, and the second terminal can obtain the encrypted private key corresponding to the second terminal, so that the private key is not guaranteed. It is stolen to ensure that communication information between groups is not stolen.
  • FIG. 7 is a schematic flowchart of a method for group establishment according to an embodiment of the present application. As shown in FIG. 7, the method is specifically as follows.
  • the first terminal receives a group join request sent by the second terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal.
  • the group identifier bit represents that the first terminal is a master node, and the second terminal is a master node; or the group identifier bit represents that the first terminal is a master node, and the second terminal is a slave terminal. node.
  • the number of the second terminals is one or at least two.
  • the first terminal and the second terminal can access the control plane, and the first terminal negotiates with the network element such as the IDM entity and the IKMS entity.
  • the shared key K IDM_M and the first shared key K IKMS_M Specifically, the first terminal negotiates the second shared key K IDM_M with the IDM entity through the HSS/AAA entity, and the first terminal negotiates the first shared key K IKMS_M with the IKMS entity through the HSS/AAA entity.
  • the second terminal establishes a secure channel with the first terminal, and the second terminal sends a group join request bonding_request to the first terminal in the secure channel, where the group join request bonding_request includes the group identifier bit GROUP_FLAG and the second
  • the identifier of the terminal, the group identifier bit GROUP_FLAG represents the relationship between the first terminal and the second terminal; wherein the secure channel can be based on the layer 2 link layer technology, and the second terminal and the first terminal can pass the pre-shared key manner establish connection.
  • the group identifier bit GROUP_FLAG indicates that the relationship between the first terminal and the second terminal is a Master-Slave relationship, or the group identifier bit GROUP_FLAG represents that the relationship between the first terminal and the second terminal is Peer-to-Peer. relationship.
  • the group identifier bit GROUP_FLAG can be characterized as a group join request.
  • each of the second terminals sends a group join request bonding_request to the first terminal in each of the secure channels, and the group join request sent by each second terminal
  • the bonding_request includes a group identifier bit GROUP_FLAG and an identifier of the second terminal.
  • the first terminal sends the group identifier, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, where the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used to determine the group.
  • logo the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used to determine the group.
  • the first terminal updates the information required to establish the group, and then the first terminal sends the group identifier bit GROUP_FLAG, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity.
  • the IDM entity generates the identifier GROUP_ID of the group, and the IDM entity sends the identifier of the group GROUP_ID, the identifier of the first terminal, and the identifier of the second terminal to the first terminal.
  • the first terminal sends the group identifier bit GROUP_FLAG, the identifier of the first terminal, and the identifier of each second terminal to the IDM entity; then, the IDM entity generates The identifier of the group GROUP_ID, the identifier of the first terminal, and the identifier of each second terminal are sent to the first terminal.
  • the first terminal receives an identifier of a group sent by an IDM entity, and an identifier of the second terminal.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal sends a group join response message to the second terminal corresponding to the identifier of the second terminal in the secure channel according to the identifier of the second terminal, and joins the group in the group.
  • the response message includes the identifier of the group GROUP_ID and the identifier of the second terminal, thereby notifying the second terminal group that the establishment is successful.
  • the first terminal sends a group join response message to each second terminal, and the group join response message received by each second terminal includes the group. Identifies the GROUP_ID and the identity of the second terminal.
  • FIG. 8 is a schematic diagram of communication of a method for group establishment according to an embodiment of the present disclosure. As shown in FIG. 8 , FIG. 8 is a schematic diagram of communication of a method for group establishment between a second terminal and a first terminal. The method is specifically as follows.
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal. .
  • the first terminal and the second terminal can access the control plane, and the first terminal negotiates with the network element such as the IDM entity and the IKMS entity.
  • the shared key K IDM_M and the first shared key K IKMS_M are shared keys K IDM_M and the first shared key K IKMS_M .
  • the second terminal S_UE establishes a secure channel with the first terminal M_UE, and then the second terminal S_UE sends a group join request bonding_request to the first terminal M_UE in the secure channel, where the group join request bonding_request includes the group identifier bit GROUP_FLAG, And the identifier S_UE_ID of the second terminal, the group identifier bit GROUP_FLAG is a master-Slave relationship between the first terminal M_UE and the second terminal S_UE, that is, the first terminal M_UE is a master node, and the second terminal S_UE is a slave node, for example
  • the message content of the group join request bonding_request is ⁇ GROUP_FLAG, S_UE_ID>, and the S_UE_ID is the ID of the second terminal S_UE.
  • the secure channel may be based on the Layer 2 link layer technology, and the second terminal S_UE and the first terminal M_UE establish a connection by means of a pre-shared
  • the first terminal sends the group identifier, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, where the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used to determine The identity of the group.
  • the first terminal M_UE updates information required to establish a group, and then, the first terminal M_UE sets the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal M_UE, and the identifier of the second terminal S_UE.
  • the S_UE_ID is sent to the IDM entity.
  • the IDM entity generates an identifier of the group.
  • the IDM entity confirms information such as a group, a group member, and an inter-node relationship, and the IDM entity generates an identifier of the group GROUP_ID. Further, the IDM entity determines the group information, wherein the group information includes an identifier of the group GROUP_ID, an identifier M_UE_ID of the first terminal M_UE, and an identifier S_UE_ID of the second terminal S_UE.
  • the IDM entity sends the identifier of the group and the identifier of the second terminal to the first terminal.
  • the IDM entity sends the identifier of the group GROUP_ID, the identifier M_UE_ID of the first terminal M_UE, and the identifier S_UE_ID of the second terminal S_UE to the first terminal M_UE.
  • the IDM entity sends the generated group information to the IKMS entity.
  • the IDM entity sends the determined group information to the IKMS entity.
  • the sequence between step S14 and step S15 is not limited.
  • the first terminal M_UE may perform step S14 and step S15 at the same time, or the first terminal M_UE may perform step S15 after performing step S14, or may be the first terminal. After the M_UE performs step S15, step S14 is performed.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal M_UE sends a group join response message to the second terminal S_UE, and the group join response message includes the group identifier GROUP_ID and the identifier S_UE_ID of the second terminal S_UE.
  • FIG. 9 is a schematic diagram of communication of a method for group establishment according to an embodiment of the present disclosure. As shown in FIG. 9, FIG. 9 is a method for group establishment between at least two second terminals and a first terminal. Communication diagram, the method is as follows.
  • Each second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal.
  • the relationship between the terminals includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal.
  • the first terminal and the second terminal can access the control plane, and the first terminal negotiates with the network element such as the IDM entity and the IKMS entity.
  • the shared key K IDM_M and the first shared key K IKMS_M are shared keys.
  • Each second terminal S_UE establishes a secure channel with the first terminal M_UE, and then each second terminal S_UE sends a group join request bonding_request to the first terminal M_UE in the secure channel, where the group join request bonding_request includes the group The identifier bit GROUP_FLAG and the identifier S_UE_ID of the second terminal, the group identifier bit GROUP_FLAG represents a Master-Slave relationship between the first terminal M_UE and the second terminal S_UE, that is, the first terminal M_UE is a master node, and the second terminal The S_UE is a Slave node.
  • the message content of the group join request bonding_request is ⁇ GROUP_FLAG, S_UE_ID>, and the S_UE_ID is the ID of the second terminal S_UE.
  • the second terminal S_UE1 sends a group join request bonding_request to the first terminal M_UE, the message content of the group join request bonding_request is ⁇ GROUP_FLAG, S_UE_ID1>, S_UE_ID1 is the ID of the second terminal S_UE1, and the second terminal S_UE2 is directed to the first terminal.
  • the M_UE sends a group join request bonding_request, and the message content of the group join request bonding_request is ⁇ GROUP_FLAG, S_UE_ID2>, and S_UE_ID2 is the ID of the second terminal S_UE2.
  • the first terminal sends the group identifier bit, the identifier of the first terminal, and the identifier of each second terminal to the IDM entity.
  • the first terminal M_UE updates information required to establish a group, and then, the first terminal M_UE sets the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal M_UE, and each second terminal S_UE The identifier S_UE_ID is sent to the IDM entity.
  • the first terminal M_UE transmits GROUP_FLAG, M_UE_ID, S_UE_ID1, and S_UE_ID2 to the IDM entity.
  • the IDM entity generates an identifier of the group.
  • the IDM entity confirms information such as a group, a group member, and an inter-node relationship, and the IDM entity generates an identifier of the group GROUP_ID. Further, the IDM entity determines the group information, wherein the group information includes an identifier of the group GROUP_ID, an identifier M_UE_ID of the first terminal M_UE, and an identifier S_UE_ID of each second terminal S_UE.
  • the IDM entity sends the identifier of the group and the identifier of the second terminal to the first terminal.
  • the IDM entity sends the identifier of the group GROUP_ID, the identifier M_UE_ID of the first terminal M_UE, and the identifier S_UE_ID of each second terminal S_UE to the first terminal M_UE.
  • the IDM entity sends the generated group information to the IKMS entity.
  • the IDM entity sends the determined group information to the IKMS entity.
  • the order between step S24 and step S25 is not limited.
  • the first terminal sends a group join response message to each second terminal, where the group join response message includes an identifier of the group.
  • the first terminal M_UE sends a group join response message to each second terminal S_UE, and the group join response message received by each second terminal S_UE includes the group identifier GROUP_ID, And an identifier S_UE_ID of the second terminal S_UE.
  • the first terminal M_UE transmits the GROUP_ID and the S_UE_ID1 to the second terminal S_UE1, and the first terminal M_UE transmits the GROUP_ID and the S_UE_ID2 to the second terminal S_UE2.
  • FIG. 10 is a third schematic diagram of communication of a group establishment method according to an embodiment of the present disclosure. As shown in FIG. 10, FIG. 10 is a schematic diagram of communication of a method for group establishment between a second terminal and a first terminal. The method is specifically as follows.
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal. .
  • the first terminal M_UE1 and the second terminal M_UE2 are already accessible to the control plane, and the first terminal M_UE1 is respectively negotiated with the network element such as the IDM entity and the IKMS entity.
  • the second shared key K IDM_M and the first shared key K IKMS_M are respectively negotiated with the network element such as the IDM entity and the IKMS entity.
  • the second terminal M_UE2 establishes a secure channel with the first terminal M_UE1, and then the second terminal M_UE2 sends a group join request bonding_request to the first terminal M_UE1 in the secure channel, where the group join request bonding_request includes the group identifier bit GROUP_FLAG, And the identifier M_UE_ID2 of the second terminal, the group identifier bit GROUP_FLAG is a Peer-to-Peer relationship between the first terminal M_UE1 and the second terminal M_UE2, that is, the first terminal M_UE1 is a master node, and the second terminal M_UE2 is a master node.
  • the message content of the group join request bonding_request is ⁇ GROUP_FLAG, M_UE_ID2>, and M_UE_ID2 is the ID of the second terminal M_UE2.
  • the first terminal sends the group identifier, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, where the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used to determine The identity of the group.
  • the first terminal M_UE1 updates information required to establish a group, and then, the first terminal M_UE1 sets the group identifier bit GROUP_FLAG, the identifier M_UE_ID1 of the first terminal M_UE1, and the identifier of the second terminal M_UE2.
  • M_UE_ID2 is sent to the IDM entity.
  • the IDM entity generates an identifier of the group.
  • the IDM entity confirms information such as a group, a group member, and an inter-node relationship, and the IDM entity generates an identifier of the group GROUP_ID. Further, the IDM entity determines the group information, wherein the group information includes the group identity GROUP_ID of the group, the identifier M_UE_ID1 of the first terminal M_UE1, and the identifier M_UE_ID2 of the second terminal M_UE2.
  • the IDM entity sends the identifier of the group and the identifier of the second terminal to the first terminal.
  • the IDM entity sends the identifier of the group GROUP_ID, the identifier M_UE_ID1 of the first terminal M_UE1, and the identifier M_UE_ID2 of the second terminal M_UE2 to the first terminal M_UE1.
  • the IDM entity sends the generated group information to the IKMS entity.
  • the IDM entity sends the determined group information to the IKMS entity.
  • the order between step S34 and step S35 is not limited.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal M_UE1 sends a group join response message to the second terminal M_UE2, and the group join response message includes the group identifier GROUP_ID and the identifier M_UE_ID2 of the second terminal M_UE2.
  • FIG. 11 is a fourth schematic diagram of communication of a method for group establishment according to an embodiment of the present disclosure. As shown in FIG. 11, FIG. 11 is a method for group establishment between a second terminal and at least two first terminals. Communication diagram, the method is as follows.
  • the second terminal sends a group join request to each of the first terminals, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal. Relationship between.
  • the first terminal and the second terminal have access to the control plane, and the first terminal negotiates with the network element such as the IDM entity and the IKMS entity.
  • the shared key K IDM_M and the first shared key K IKMS_M are shared keys.
  • the second terminal S_UE establishes a secure channel with each first terminal M_UE, and then the second terminal S_UE sends a group join request bonding_request to each first terminal M_UE in the secure channel, wherein each first terminal M_UE receives
  • the group join request binding_request includes a group identifier bit GROUP_FLAG and an identifier S_UE_ID of the second terminal, and the group identifier bit GROUP_FLAG represents a Master-Slave relationship between the first terminal M_UE and the second terminal S_UE, that is, the The first terminal M_UE is a master node, and the second terminal S_UE is a slave node.
  • the message content of the group join request bonding_request is ⁇ GROUP_FLAG, S_UE_ID>, and the S_UE_ID is the ID of the second terminal S_UE.
  • Each first terminal sends the group identifier bit, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity.
  • each first terminal M_UE updates information required to establish a group, and then each first terminal M_UE sets a group identifier bit GROUP_FLAG, an identifier of the first terminal M_UE, M_UE_ID, and The identifier S_UE_ID of the second terminal S_UE is sent to the IDM entity.
  • the first terminal M_UE1 sends the group identifier bit GROUP_FLAG, the identifier M_UE_ID1 of the first terminal M_UE1, and the identifier S_UE_ID of the second terminal S_UE to the IDM entity; the first terminal M_UE2 sets the group identifier bit GROUP_FLAG, the first terminal The identifier M_UE_ID2 of M_UE2 and the identifier S_UE_ID of the second terminal S_UE are sent to the IDM entity.
  • the IDM entity generates an identifier of the group.
  • the IDM entity confirms information such as a group, a group member, and an inter-node relationship, and the IDM entity generates an identifier of the group GROUP_ID. Further, the IDM entity determines the group information, wherein the group information includes an identifier of the group GROUP_ID, an identifier M_UE_ID of each first terminal M_UE, and an identifier S_UE_ID of the second terminal S_UE.
  • the IDM entity sends the identifier of the group and the identifier of the second terminal to the first terminal.
  • the IDM entity sends the identifier of the group GROUP_ID, the identifier M_UE_ID of the first terminal M_UE, and the identifier S_UE_ID of the second terminal S_UE to the first terminal M_UE.
  • the IDM entity sends the GROUP_ID, M_UE_ID1, and S_UE_ID to the first terminal M_UE1; the IDM entity sends the GROUP_ID, M_UE_ID2, and S_UE_ID to the first terminal M_UE2.
  • the IDM entity sends the generated group information to the IKMS entity.
  • the IDM entity sends the determined group information to the IKMS entity.
  • the order between step S4 and step S45 is not limited.
  • Each first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • each of the first terminals M_UE sends a group join response message to the second terminal S_UE, and the group join response message includes the group identifier GROUP_ID and the identifier S_UE_ID of the second terminal S_UE.
  • the identifier GROUP_ID of the group in the group join response message sent by each first terminal M_UE may be the same, and then the first terminal M_UE and the second terminal S_UE are in the same group; or, each The identifier GROUP_ID of the group in the group join response message sent by the terminal M_UE may be different, so that the different first terminals M_UE are in different groups, but the second terminal S_UE may be in these groups.
  • the first terminal receives the group join request sent by the second terminal, where the group join request includes the group identifier bit and the identifier of the second terminal, where the group identifier bit represents between the first terminal and the second terminal.
  • the first terminal sends the group identifier, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, where the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used for Determining an identifier of the group; the first terminal receives the identifier of the group sent by the IDM entity, and the identifier of the second terminal; the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group The group join response message includes the identity of the group.
  • the second terminal triggers the establishment of the group, and the first terminal sends information such as the group identifier to the IDM entity, and then the first terminal determines whether to establish the group, so that the first terminal and the second terminal
  • the relationship between the network elements in the group is improved, and the trust and security between the network elements in the group are improved.
  • the characteristics of the group that can be constructed are diverse.
  • FIG. 12 is a schematic flowchart of another method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 12, the method is specifically as follows.
  • the first terminal receives a group join request sent by the second terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal.
  • the group identifier bit represents that the first terminal is a master node, and the second terminal is a master node; or the group identifier bit represents that the first terminal is a master node, and the second terminal is a slave terminal. node.
  • this step can be referred to step 101 of FIG. 7, and details are not described herein again.
  • the first terminal sends the group identifier, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, where the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used to determine The identity of the group.
  • this step can be referred to step 102 of FIG. 7, and details are not described herein again.
  • the first terminal receives the identifier of the group sent by the IDM entity, and the identifier of the second terminal.
  • this step can be referred to step 103 of FIG. 7, and details are not described herein again.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • this step can be referred to step 104 of FIG. 7, and details are not described herein again.
  • the first terminal receives, by the second terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal are The identifier of the terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the second terminal sends a parameter for acquiring the private key to the first terminal. Specifically, the second terminal sends the second terminal to the first terminal.
  • the first terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity.
  • the first terminal sends the first half session key parameter XA corresponding to the second terminal and the identifier of the second terminal to the IKMS entity.
  • the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the identifier of the second terminal, the first half session key parameter corresponding to the second terminal, and the second corresponding to the second terminal.
  • the semi-session key parameter is used to generate the encrypted private key corresponding to the second terminal, wherein the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal.
  • the step 207 includes: the IKMS entity generates a private key corresponding to the second terminal according to the identifier of the second terminal; and the IKMS entity generates a second half session key parameter corresponding to the second terminal. Generating, according to the first half session key parameter corresponding to the second terminal, and the second half session key parameter corresponding to the second terminal, a symmetric key corresponding to the second terminal; the IKMS entity according to the second terminal Corresponding symmetric key, encrypting the private key corresponding to the second terminal, and generating an encrypted private key corresponding to the second terminal, wherein the second half session key parameter corresponding to the second terminal is used for decrypting and encrypting The subsequent private key corresponding to the second terminal.
  • the IKMS entity is based on the IBS technology, and the private key SK corresponding to the identifier of the second terminal is generated by using the identifier of the second terminal as a public key, and the private key SK is a private address corresponding to the second terminal. Key; then, the IKMS entity generates a second half session key parameter XB, and the IKMS entity generates and generates according to the received first half session key parameter XA and the second half session key parameter XB corresponding to the second terminal.
  • a symmetric key key corresponding to the second terminal the symmetric key key being a symmetric key of the IKMS entity and the second terminal; then, the IKMS entity uses the symmetric key key corresponding to the second terminal to pair with the second terminal
  • the corresponding private key SK is encrypted to generate an encrypted private key (SK) key corresponding to the second terminal.
  • the first terminal receives a second half session key parameter corresponding to the second terminal that is sent by the IKMS entity, an identifier of the second terminal, and an encrypted private key corresponding to the second terminal.
  • the first terminal receives the second half session key parameter XB corresponding to the second terminal that is sent by the IKMS entity, the identifier of the second terminal, and the encrypted corresponding to the second terminal.
  • Private key (SK) key .
  • the first terminal sends the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal to the second terminal.
  • the first terminal sets a second half session key parameter XB corresponding to the second terminal, an identifier of the second terminal, and an encrypted private key corresponding to the second terminal (SK).
  • the key is sent to the second terminal.
  • the second terminal may decrypt the encrypted private key (SK) key corresponding to the second terminal, and further acquire the private key SK corresponding to the second terminal.
  • FIG. 13 is a schematic diagram of communication of another method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 13, FIG. 13 is a schematic diagram of communication between a second terminal and a first terminal for generating a private key. The method is specifically as follows.
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal. .
  • the first terminal M_UE is a master node
  • the second terminal S_UE is a slave node.
  • the first terminal sends the group identifier, the identifier of the first terminal, and the identifier of the second terminal to the IDM entity, where the group identifier, the identifier of the first terminal, and the identifier of the second terminal are used to determine The identity of the group.
  • this step can be referred to step S12 of FIG. 8, and details are not described herein again.
  • the IDM entity generates an identifier of the group.
  • this step can be referred to step S13 of FIG. 8 and will not be described again.
  • the IDM entity sends the identifier of the group and the identifier of the second terminal to the first terminal.
  • this step can be referred to step S14 of FIG. 8, and details are not described herein again.
  • the IDM entity sends the generated group information to the IKMS entity.
  • this step can be referred to step S15 of FIG. 8, and details are not described herein again.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • this step can be referred to step S16 of FIG. 8 and will not be described again.
  • the second terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the first terminal, where the first half session key parameter corresponding to the second terminal is The identifier of the second terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the second terminal S_UE sends the first half session key parameter XA corresponding to the second terminal S_UE and the identifier S_UE_ID of the second terminal to the first terminal M_UE,
  • the first half session key parameter XA is used to negotiate a session key.
  • the first terminal sends the first half session key parameter corresponding to the second terminal and the identifier of the second terminal to the IKMS entity.
  • the first terminal M_UE sends the first half session key parameter XA corresponding to the second terminal S_UE and the identifier S_UE_ID of the second terminal to the IKMS entity.
  • the IKMS entity generates a private key corresponding to the second terminal according to the identifier of the second terminal.
  • the IKMS entity generates a private key SK corresponding to the identifier S_UE_ID of the second terminal by using the identifier S_UE_ID of the second terminal as the public key, and the private key SK is the second terminal S_UE. Corresponding private key;
  • the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session key parameter corresponding to the second terminal. A symmetric key corresponding to the second terminal is generated.
  • the IKMS entity generates a second half session key parameter XB corresponding to the second terminal S_UE, and then the IKMS entity according to the received first half session key parameter XA corresponding to the second terminal S_UE And a second half session key parameter XB corresponding to the second terminal S_UE, generating a symmetric key key corresponding to the second terminal S_UE, the symmetric key key being a symmetric key of the IKMS entity and the second terminal S_UE.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to the second terminal, and generates an encrypted private key corresponding to the second terminal, where the second key corresponds to the second terminal.
  • the half session key parameter is used to decrypt the encrypted private key corresponding to the second terminal.
  • the IKMS entity encrypts the private key SK corresponding to the second terminal S_UE by using the symmetric key key corresponding to the second terminal S_UE, and generates an encrypted corresponding to the second terminal S_UE.
  • Private key (SK) key .
  • the IKMS entity sends the second half session key parameter corresponding to the second terminal, the identifier of the second terminal, and the encrypted private key corresponding to the second terminal to the first terminal, where the second terminal
  • the corresponding second half session key parameter is used to decrypt the encrypted private key corresponding to the second terminal.
  • the first terminal M_UE receives the second half session key parameter XB corresponding to the second terminal S_UE sent by the IKMS entity, the identifier S_UE_ID of the second terminal, and the encrypted second The private key (SK) key corresponding to the terminal S_UE.
  • the first terminal sends the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal to the second terminal.
  • the first terminal M_UE sends the second half session key parameter XB corresponding to the second terminal S_UE and the encrypted private key (SK) key corresponding to the second terminal S_UE to the first terminal M_UE.
  • the second terminal S_UE; and the second terminal S_UE decrypts the encrypted private key (SK) key corresponding to the second terminal S_UE, and obtains the private key SK corresponding to the second terminal S_UE.
  • the acquisition of the private key may be completed by referring to steps S57-S594 above.
  • FIG. 14 is a schematic diagram of communication of another method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 14, FIG. 14 is a communication for generating a private key between at least two second terminals and a first terminal. Schematic, the method is as follows.
  • Each second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal.
  • the relationship between the terminals includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal.
  • the first terminal M_UE is a master node
  • the second terminal S_UE is a slave node.
  • the first terminal sends the group identifier bit, the identifier of the first terminal, and the identifier of each second terminal to the IDM entity.
  • this step can be referred to step S32 of FIG. 10, and details are not described herein again.
  • the IDM entity generates an identifier of the group.
  • this step can be referred to step S33 of FIG. 10, and details are not described herein again.
  • the IDM entity sends the identifier of the group and the identifier of the second terminal to the first terminal.
  • this step can be referred to step S34 of FIG. 10, and details are not described herein again.
  • the IDM entity sends the generated group information to the IKMS entity.
  • this step can be referred to step S35 of FIG. 10, and details are not described herein again.
  • the first terminal sends a group join response message to each second terminal, where the group join response message includes an identifier of the group.
  • this step can be referred to step S36 of FIG. 10, and details are not described herein again.
  • Each second terminal sends a first half session key parameter corresponding to the second terminal and an identifier of the second terminal to the first terminal.
  • each second terminal S_UE sends a first half session key parameter XA corresponding to the second terminal S_UE to the first terminal M_UE, and the second The identifier S_UE_ID of the terminal, wherein the first half session key parameter XA is used to negotiate a session key.
  • the second terminal S_UE1 transmits a first half session key parameter XA1 corresponding to the second terminal S_UE1 and an identifier S_UE_ID1 of the second terminal S_UE1 to the first terminal M_UE; the second terminal S_UE2 sends a message to the first terminal M_UE The first half session key parameter XA2 corresponding to the second terminal S_UE2 and the identifier S_UE_ID2 of the second terminal S_UE2.
  • the first terminal sends, to the IKMS entity, a first half session key parameter corresponding to each second terminal and an identifier of each second terminal.
  • the first terminal M_UE adds the first half session key parameter and the identifier of all the second terminals S_UE to one message, and then the first terminal M_UE will correspond to each second terminal.
  • the first half session key parameter XA, and the identity S_UE_ID of each second terminal, are sent to the IKMS entity.
  • the first terminal M_UE will have a first half session key parameter XA1 corresponding to the second terminal S_UE1, an identifier S_UE_ID1 of the second terminal S_UE1, a first half session key parameter XA2 corresponding to the second terminal S_UE2, and a second
  • the identifier S_UE_ID2 of the terminal S_UE2 is added to a message and sent to the IKMS entity.
  • the IKMS entity generates a private key corresponding to the second terminal according to the identifier of each second terminal.
  • the IKMS entity generates a second half session key parameter corresponding to each second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session corresponding to the second terminal.
  • the key parameter generates a symmetric key corresponding to the second terminal.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to each second terminal, and generates an encrypted private key corresponding to the second terminal.
  • the IKMS entity performs one pass from S69, S691 to S692 to obtain an encrypted private key (SK) key corresponding to the second terminal.
  • SK private key
  • the IKMS entity generates the private key SK1 corresponding to the second terminal S_UE1 according to the identifier S_UE_ID1 of the second terminal S_UE2, and generates the private key SK2 corresponding to the second terminal S_UE2 according to the identifier S_UE_ID1 of the second terminal S_UE1. Then, the IKMS entity generates a second half session key parameter XB1 corresponding to the second terminal S_UE1, and simultaneously generates and uses the XB1 and XA1 according to the received first half session key parameter XA1 corresponding to the second terminal S_UE1.
  • the symmetric key key1 corresponding to the terminal S_UE1 and then the IKMS entity encrypts the private key SK2 corresponding to the second terminal S_UE1 according to the symmetric key key1 corresponding to the second terminal S_UE1, and generates an encrypted corresponding to the second terminal S_UE1.
  • Private key (SK1) key1 .
  • the IKMS entity generates a second half session key parameter XB2 corresponding to the second terminal S_UE2, and simultaneously generates and uses the XB2 and XA2 according to the received first half session key parameter XA2 corresponding to the second terminal S_UE2.
  • the symmetric key key2 corresponding to the terminal S_UE2 and then the IKMS entity encrypts the private key SK2 corresponding to the second terminal S_UE2 according to the symmetric key key2 corresponding to the second terminal S_UE2, and generates an encrypted corresponding to the second terminal S_UE2.
  • Private key (SK2) key2 .
  • the IKMS entity sends the second half session key parameter corresponding to each second terminal, the identifier of each second terminal, and the encrypted private key corresponding to each second terminal to the first terminal.
  • the IKMS entity sets a second half session key parameter XB corresponding to each second terminal S_UE, an identifier S_UE_ID of each second terminal, and an encrypted private key SK corresponding to each second terminal S_UE.
  • the first terminal M_UE receives the second half session key parameter XB corresponding to each second terminal S_UE, the identifier S_UE_ID of each second terminal, and the encryption sent by the IKMS entity.
  • the subsequent private key (SK) key corresponding to each second terminal S_UE.
  • the IKMS entity transmits XB1, S_UE_ID1, (SK1) key1 , XB2, S_UE_ID2, and (SK2) key2 to the first terminal M_UE.
  • the first terminal sends the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal to the second terminal.
  • the first terminal M_UE sends the second half session key parameter XB corresponding to the second terminal S_UE and the encrypted private key SK corresponding to the second terminal S_UE to the second terminal.
  • the terminal S_UE that is, the first terminal M_UE, sends the second half session key parameter and the private key to the corresponding second terminal S_UE.
  • the first terminal M_UE transmits XB1 and (SK1) key1 to the corresponding second terminal S_UE1 according to S_UE_ID1; the first terminal M_UE transmits XB2 and (SK2) key2 to the corresponding second terminal S_UE2 according to S_UE_ID2.
  • Each of the second terminals S_UE decrypts the encrypted private key SK corresponding to the second terminal S_UE to obtain a private key SK corresponding to the second terminal S_UE.
  • the second terminal S_UE1 decrypts (SK1) key1 to obtain a private key SK1 corresponding to the second terminal S_UE1; the second terminal S_UE2 decrypts (SK2) key2 to obtain a private key corresponding to the second terminal S_UE2 SK2.
  • the first terminal receives the first half session key parameter corresponding to the second terminal and the identifier of the second terminal that are sent by the second terminal, where the second terminal corresponds to the second terminal.
  • the first session key parameter and the identifier of the second terminal are used to generate an encrypted private key corresponding to the second terminal; the first terminal uses the first half session key parameter corresponding to the second terminal and the second terminal
  • the identifier is sent to the IKMS entity; the IKMS entity generates a private key corresponding to the second terminal according to the identifier of the second terminal; the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the second terminal corresponding to the second terminal a first session key parameter and a second half session key parameter corresponding to the second terminal, generating a symmetric key corresponding to the second terminal; the IKMS entity according to the symmetric key corresponding to the second terminal,
  • the private key corresponding to the second terminal is encrypted, and the encrypted private key corresponding to the second terminal is
  • the IKMS entity sets the second half session key parameter corresponding to the second terminal, and the identifier of the second terminal.
  • the encrypted private key corresponding to the second terminal is sent to the first terminal, where the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal, first
  • the terminal sends the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal to the second terminal. Therefore, a private key acquisition method is provided. After a group is established between the terminal and the terminal, the second terminal initiates a request for obtaining a private key, and then the IKMS entity generates an encrypted private key corresponding to the second terminal.
  • the second terminal receives the encrypted private key corresponding to the second terminal that is sent by the IKMS entity by using the first terminal, and the second terminal can obtain the encrypted private key corresponding to the second terminal, so that the private key is not guaranteed. It is stolen to ensure that communication information between groups is not stolen.
  • FIG. 15 is a schematic flowchart of still another method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 15, the method is specifically as follows.
  • the first terminal receives a group join request sent by the second terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • the first terminal sends a fourth message to the IDM entity, where the fourth message includes a group identifier, an identifier of the first terminal, an identifier of the second terminal, and a third message verification code, where the third message is verified.
  • the code is used to verify that the fourth message is sent by the first terminal and is used to verify the integrity of the fourth message.
  • the first terminal receives the fifth message sent by the IDM entity, where the fifth message includes the identifier of the group, the identifier of the second terminal, and the fourth message verification code, where the fourth message verification code is used for verification.
  • Five messages are sent by the IDM entity and used to verify the integrity of the fifth message.
  • the first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the first terminal After the first terminal determines that the fourth message verification code is verified, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal receives, by the second terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal are The identifier of the terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • the first terminal sends the first message to the IKMS entity, where the first message includes a first half session key parameter corresponding to the second terminal, an identifier of the second terminal, and a first message verification code, where A message verification code is used to verify that the first message is sent by the first terminal and is used to verify the integrity of the first message.
  • the first terminal receives the second message sent by the IKMS entity, where the second message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted private address corresponding to the second terminal. And a second message verification code, wherein the second message verification code is used to verify that the second message is sent by the IKMS entity and used to verify the integrity of the second message.
  • the first terminal verifies the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal are sent to the second terminal, where And the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal.
  • FIG. 16 is a schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 16, FIG. 16 is a schematic diagram of communication between a second terminal and a first terminal for generating a private key. The method is as follows.
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal. .
  • the first terminal M_UE and the second terminal S_UE are already accessible to the control plane, and the first terminal M_UE is respectively negotiated with the network element such as the IDM entity and the IKMS entity.
  • the second shared key K IDM_M and the first shared key K IKMS_M Specifically, the first terminal M_UE negotiates the second shared key K IDM_M with the IDM entity through the HSS/AAA entity, and the first terminal M_UE negotiates the first shared key K IKMS_M with the IKMS entity through the HSS/AAA entity.
  • the second terminal S_UE establishes a secure channel with the first terminal M_UE, and then the second terminal S_UE sends a group join request bonding_request to the first terminal M_UE in the secure channel, where the group join request bonding_request includes the group identifier bit GROUP_FLAG, And the identifier S_UE_ID of the second terminal, the group identifier bit GROUP_FLAG is a master-Slave relationship between the first terminal M_UE and the second terminal S_UE, that is, the first terminal M_UE is a master node, and the second terminal S_UE is a slave node, for example
  • the message content of the group join request bonding_request is ⁇ GROUP_FLAG, S_UE_ID>, and the S_UE_ID is the ID of the second terminal S_UE.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • the first terminal M_UE updates information required to establish a group; then the first terminal M_UE performs signature processing on the fourth message by using the second shared key K IDM_M , where
  • the fourth message includes the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, and the identifier S_UE_ID of the second terminal, and generates a third message verification code MAC1.
  • the third message verification code MAC1 is the first terminal M_UE, and the first terminal M_UE is used.
  • the symmetric key K IDM_M between the IDM entity and the message verification code generated by the entire fourth message.
  • the first terminal sends a fourth message to the IDM entity, where the fourth message includes a group identifier, an identifier of the first terminal, an identifier of the second terminal, and a third message verification code, where the third message verification code
  • the fourth message is used to verify that the fourth message is sent by the first terminal and used to verify the integrity of the fourth message.
  • the first terminal M_UE sends the fourth message to the IDM entity.
  • the message content of the fourth message includes at least the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of the second terminal, and the third message verification code MAC1, and the first terminal M_UE and the second terminal S_UE
  • the relationship is the Master-Slave relationship.
  • the message content of the fourth message is ⁇ GROUP_FLAG, M_UE_ID, S_UE_ID, MAC1, ...>.
  • the IDM entity verifies the third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the IDM entity verifies the third message verification code MAC1. Specifically, since the IDM entity has negotiated the second shared key K IDM_M with the first terminal M-UE, the IDM entity can verify the third message verification code MAC1 according to the second shared key K IDM_M stored by itself. .
  • the IDM entity determines that the third message verification code passes the verification, and generates an identifier of the group.
  • the IDM entity determines that the third message verification code MAC1 passes the verification, the IDM entity generates a group identity GROUP_ID for the first terminal M-UE and the second terminal S_UE. Moreover, the IDM entity stores the group information, where the group information includes a group identifier bit GROUP_FLAG, a first terminal identifier M_UE_ID, a second terminal identifier S_UE_ID, and a group identifier GROUP_ID.
  • the IDM entity generates a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the IDM entity signs the fifth message according to the second shared key K IDM_M , where the fifth message includes the identifier of the group GROUP_ID, the identifier of the first terminal M_UE_ID, and the first The identifier S_UE_ID of the second terminal generates a fourth message verification code MAC2.
  • the fourth message verification code MAC2 is used by the first terminal M_UE to use the symmetric key K IDM_M between the first terminal M_UE and the IDM entity as the entire fifth message. The generated message verification code.
  • the IDM entity sends a fifth message to the first terminal, where the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code, where the fourth message verification code is used for verification
  • Five messages are sent by the IDM entity and used to verify the integrity of the fifth message.
  • the S77b and the IDM entity send the group information to the IKMS entity, where the group information includes the identifier of the group, the identifier of the first terminal, and the identifier of the second terminal.
  • the IDM entity sends the fifth message to the first terminal, where the fifth message includes at least the identifier of the group GROUP_ID, the identifier of the first terminal M_UE_ID, and the identifier of the second terminal S_UE_ID.
  • the fourth message verification code MAC2 For example, the message content of the fifth message is ⁇ GROUP_ID, M_UE_ID, S_UE_ID, MAC2, ...>.
  • the IDM entity sends the generated group information to the IKMS entity, where the group information includes the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of the second terminal, and the identifier GROUP_ID of the group.
  • the step of sending the fifth message to the first terminal by the IDM entity, and the step of sending the generated group information to the IKMS entity by the IDM entity, the order between the two is not limited.
  • the first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the first terminal M_UE after the first terminal M_UE receives the fifth message, first, the first terminal M_UE needs to verify the fourth message verification code MAC2. Specifically, since the IDM entity has negotiated the second shared key K IDM_M with the first terminal M-UE, the first terminal M-UE can verify the fourth message according to the second shared key K IDM_M stored by itself. Code MAC2 is verified.
  • the first terminal After the first terminal determines that the fourth message verification code is verified, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal.
  • the first terminal M-UE may save the group information.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal M-UE sends a group join response message bonding_acknowledge to the second terminal S_UE in the secure channel, and the group identity GROUP_ID is included in the group join response message bonding_acknowledge. Further, the second terminal S_UE group is notified to be successfully established.
  • the second terminal sends, to the first terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal The identifier is used to generate an encrypted private key corresponding to the second terminal.
  • the private key may be acquired, and the private key acquisition process is based on the improved DH key agreement protocol.
  • the second terminal S_UE sends a first half session key parameter XA corresponding to the second terminal S_UE and an identifier S_UE_ID of the second terminal to the first terminal M_UE, wherein the first half session key parameter XA is used to negotiate a session Key.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • the first terminal M_UE after the first terminal M_UE receives the first half session key parameter XA corresponding to the second terminal S_UE and the identifier S_UE_ID of the second terminal, the first terminal M_UE utilizes the first terminal M_UE.
  • the first shared key K IKMS_M negotiated with the IKMS entity the first message is signed, wherein the first message at this time includes the first half session key parameter XA corresponding to the second terminal S_UE, and
  • the identifier S_UE_ID of the second terminal generates a first message verification code MAC3.
  • the first terminal sends the first message to the IKMS entity, where the first message includes a first half session key parameter corresponding to the second terminal, an identifier of the second terminal, and a first message verification code, where A message verification code is used to verify that the first message is sent by the first terminal and is used to verify the integrity of the first message.
  • the first terminal M_UE sends the first message after the signature to the IKMS entity, where the first message includes the first half session key parameter XA corresponding to the second terminal S_UE.
  • the message content of the first message is ⁇ XA, S_UE_ID, MAC3>.
  • the IKMS entity verifies the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity; and the IKMS entity determines that the first message verification code passes the verification. And generating a private key corresponding to the second terminal according to the identifier of the second terminal.
  • the IKMS entity After the IKMS entity receives the first message sent by the first terminal M_UE, first, the IKMS entity verifies the first message verification code MAC3, specifically, because the first terminal M_UE negotiates with the IKMS entity.
  • the first shared key K IKMS_M so that the IKMS entity can verify the first message verification code MAC3 according to the first shared key K IKMS_M .
  • the IKMS entity After the IKMS entity determines that the first message verification code MAC3 is verified, the IKMS entity generates the private key SK for the identifier S_UE_ID of the second terminal based on the IBS technology with the identifier S_UE_ID of the second terminal as the public key, that is, the private key SK is The private key SK corresponding to the second terminal S_UE.
  • the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session key parameter corresponding to the second terminal, A symmetric key corresponding to the second terminal is generated.
  • the IKMS entity generates a second half session key parameter XB corresponding to the second terminal S_UE; and the IKMS entity according to the first half session key parameter XA corresponding to the second terminal S_UE, and The second half session key parameter XB corresponding to the second terminal S_UE generates a symmetric key key corresponding to the second terminal S_UE, and the symmetric key key is a symmetric key between the second terminal S_UE and the IKMS entity.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to the second terminal, and generates an encrypted private key corresponding to the second terminal.
  • the IKMS entity encrypts the private key SK corresponding to the second terminal S_UE according to the symmetric key key corresponding to the second terminal S_UE, and the generated encrypted corresponding to the second terminal S_UE Private key (SK) key .
  • the IKMS entity generates a second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the IKMS entity uses the first shared key K IKMS_M to sign the second message, and the second message includes the second half session key parameter corresponding to the second terminal S_UE.
  • the XB, the identifier S_UE_ID of the second terminal, and the encrypted private key (SK) key corresponding to the second terminal S_UE generate a second message verification code MAC4.
  • the IKMS entity sends the second message to the first terminal, where the second message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted private address corresponding to the second terminal. And a second message verification code, wherein the second message verification code is used to verify that the second message is sent by the IKMS entity and used to verify the integrity of the second message.
  • the second message that the IKMS entity carries the second message verification code MAC4 is sent to the first terminal M_UE, and the second message at this time includes the second half session corresponding to the second terminal S_UE.
  • the message content of the second message is ⁇ XB, S_UE_ID, (SK) key , MAC4>.
  • the first terminal verifies the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first terminal M_UE after the first terminal M_UE receives the second message, the first terminal M_UE first verifies the second message verification code MAC4. Specifically, the first terminal M_UE negotiates the first sharing with the IKMS entity. The key K IKMS_M , so that the first terminal M_UE can verify the second message verification code MAC4 using the first shared key K IKMS_M .
  • the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal are sent to the second terminal, where And the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal.
  • the first terminal M_UE determines that the second message verification code MAC4 is verified
  • the first terminal M_UE sets the second half session key corresponding to the second terminal S_UE according to the identifier S_UE_ID of the second terminal.
  • the parameter XB and the encrypted private key (SK) key corresponding to the second terminal S_UE are sent to the second terminal S_UE.
  • the first terminal M_UE sends the message content ⁇ XB, (SK) key> to the second terminal S_UE.
  • the second terminal generates a symmetric key according to the first half session key parameter corresponding to the second terminal and the second half session key parameter corresponding to the second terminal.
  • the second terminal S_UE after the second terminal S_UE receives the second half session key parameter XB corresponding to the second terminal S_UE and the encrypted private key (SK) key corresponding to the second terminal S_UE, the second terminal S_UE The second terminal S_UE first calculates a symmetric key key according to the first half session key parameter XA corresponding to the second terminal S_UE generated by the second terminal S_UE and the received second half session key parameter XB corresponding to the second terminal S_UE. .
  • the second terminal decrypts the encrypted private key corresponding to the second terminal according to the symmetric key, to obtain a private key corresponding to the second terminal.
  • the second terminal S_UE decrypts the encrypted private key (SK) key corresponding to the second terminal S_UE according to the calculated symmetric key key, and obtains a corresponding to the second terminal S_UE. Private key SK. Thereby, the initial key acquisition of the second terminal S_UE is completed.
  • SK private key
  • FIG. 17 is a second schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 17, FIG. 17 is a communication for generating a private key between at least two second terminals and a first terminal. Schematic, the method is as follows.
  • Each second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal. Relationship between.
  • the first terminal M_UE and the second terminal S_UE can access the control plane, and the first terminal M_UE negotiates with the network element such as the IDM entity and the IKMS entity.
  • the second shared key K IDM_M and the first shared key K IKMS_M Specifically, the first terminal M_UE negotiates the second shared key K IDM_M with the IDM entity through the HSS/AAA entity, and the first terminal M_UE negotiates the first shared key K IKMS_M with the IKMS entity through the HSS/AAA entity.
  • Each of the second terminals S_UE establishes a secure channel with the first terminal M_UE, and then each second terminal S_UE sends a group join request bonding_request to the first terminal M_UE in the respective secure channel, wherein the group join request bonding_request
  • the group identifier bit GROUP_FLAG and the identifier S_UE_ID of the second terminal are included, and the group identifier bit GROUP_FLAG represents a Master-Slave relationship between the first terminal M_UE and the second terminal S_UE, that is, the first terminal M_UE is the master.
  • the node, the second terminal S_UE is a slave node, for example, the message content of the group join request bonding_request sent by the second terminal S_UE to the first terminal M_UE is ⁇ GROUP_FLAG, S_UE_ID1>, and S_UE_ID1 is the ID of the second terminal S_UE1.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code, and a fourth key for encrypting the data.
  • the first terminal M_UE updates information required to establish a group; then the first terminal M_UE performs signature processing on the fourth message by using the second shared key K IDM_M , where
  • the fourth message includes the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, and the identifier S_UE_ID of each second terminal, and generates a third message verification code MAC1.
  • the third message verification code MAC1 is used by the first terminal M_UE.
  • the symmetric key K IDM_M between the terminal M_UE and the IDM entity is a message verification code generated by the entire fourth message.
  • the first terminal sends a fourth message to the IDM entity, where the fourth message includes a group identifier, an identifier of the first terminal, an identifier of the second terminal, and a third message verification code, where the third message verification code
  • the fourth message is used to verify that the fourth message is sent by the first terminal and used to verify the integrity of the fourth message.
  • the first terminal M_UE sends the fourth message to the IDM entity.
  • the message content of the fourth message includes at least the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of each second terminal, and the third message verification code MAC1, and the first terminal M_UE and the second terminal
  • the relationship of S_UE is the Master-Slave relationship.
  • the message content of the fourth message is ⁇ GROUP_FLAG, M_UE_ID, S_UE_ID1, S_UE_ID2, MAC1 across>, where S_UE_ID1 is the ID of the second terminal S_UE1, and S_UE_ID2 is the ID of the second terminal S_UE2.
  • the IDM entity verifies the third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the IDM entity verifies the third message verification code MAC1. Specifically, since the IDM entity has negotiated the second shared key K IDM_M with the first terminal M-UE, the IDM entity can verify the third message verification code MAC1 according to the second shared key K IDM_M stored by itself. .
  • the IDM entity determines that the third message verification code passes the verification, and generates an identifier of the group.
  • the IDM entity determines that the third message verification code MAC1 passes the verification, the IDM entity generates a group identity GROUP_ID for the first terminal M-UE and each second terminal S_UE. Moreover, the IDM entity stores the group information, where the group information includes a group identifier bit GROUP_FLAG, an identifier M_UE_ID of the first terminal, an identifier S_UE_ID of each second terminal, and an identifier GROUP_ID of the group. For example, the group information includes information such as GROUP_FLAG, M_UE_ID, S_UE_ID1, S_UE_ID2, and GROUP_ID.
  • the IDM entity generates a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the IDM entity signs the fifth message according to the second shared key K IDM_M , where the fifth message includes the identifier of the group GROUP_ID, the identifier of the first terminal M_UE_ID, and each The identifier S_UE_ID of the second terminal generates a fourth message verification code MAC2.
  • the fourth message verification code MAC2 is used by the first terminal M_UE to use the symmetric key K IDM_M between the first terminal M_UE and the IDM entity.
  • the message verification code generated by the five messages.
  • the IDM entity sends the fifth message to the first terminal, where the fifth message includes an identifier of the group, an identifier of the first terminal, an identifier of each second terminal, and a fourth message verification code.
  • the IDM entity sends the group information to the IKMS entity, where the group information includes the identity of the group, the identifier of the first terminal, and the identifier of the second terminal.
  • the IDM entity sends the fifth message to the first terminal, where the fifth message includes at least the identifier of the group GROUP_ID, the identifier of the first terminal M_UE_ID, and the second terminal of each second terminal.
  • the S_UE_ID and the fourth message verification code MAC2 are identified.
  • the message content of the fifth message is ⁇ GROUP_ID, M_UE_ID, S_UE_ID1, S_UE_ID2, MAC27-8>, where S_UE_ID1 is the ID of the second terminal S_UE1, and S_UE_ID2 is the ID of the second terminal S_UE2.
  • the IDM entity sends the generated group information to the IKMS entity, where the group information includes the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of each second terminal, and the identifier of the group. GROUP_ID.
  • the step of sending the fifth message to the first terminal by the IDM entity, and the step of sending the generated group information to the IKMS entity by the IDM entity, the order between the two is not limited.
  • the first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the first terminal M_UE after the first terminal M_UE receives the fifth message, first, the first terminal M_UE needs to verify the fourth message verification code MAC2. Specifically, since the IDM entity has negotiated the second shared key K IDM_M with the first terminal M-UE, the first terminal M-UE can verify the fourth message according to the second shared key K IDM_M stored by itself. Code MAC2 is verified.
  • the first terminal After the first terminal determines that the fourth message verification code passes the verification, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of each second terminal.
  • the first terminal M-UE may save the group information. For example, the first terminal M-UE adds the group members S_UE_ID1, S_UE_ID2.
  • the first terminal sends a group join response message to each second terminal, where the group join response message includes an identifier of the group.
  • the first terminal M-UE sends a group join response message bonding_acknowledge to each second terminal S_UE in the secure channel, where the group join response message bonding_acknowledge includes the group
  • the GROUP_ID is identified, thereby notifying the second terminal that the S_UE group is successfully established.
  • the first terminal M-UE sends a group join response message bonding_acknowledge to the second terminal S_UE1, and the first terminal M-UE sends a group join response message bonding_acknowledge to the second terminal S_UE2.
  • Each second terminal sends a first half session key parameter corresponding to the second terminal and an identifier of the second terminal to the first terminal.
  • the private key may be acquired, and the private key acquisition process is based on the improved DH key agreement protocol. of.
  • each second terminal S_UE sends a first half session key parameter XA corresponding to the second terminal S_UE and an identifier S_UE_ID of the second terminal to the first terminal M_UE, wherein the first half session key parameter XA is used to negotiate session keys.
  • the second terminal S_UE1 sends, to the first terminal M_UE, a half session key parameter XA1 corresponding to the second terminal S_UE1, an identifier S_UE_ID1 of the second terminal, and a second terminal S_UE2.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • the first terminal M_UE adds the first half session key parameter XA corresponding to each second terminal S_UE and the identifier S_UE_ID of each second terminal to a first message. Then, the first terminal M_UE signs the first message by using the first shared key K IKMS_M negotiated between the first terminal M_UE and the IKMS entity, wherein the first message at this time includes each second terminal
  • the first half session key parameter XA corresponding to the S_UE and the identifier S_UE_ID of each second terminal generate a first message verification code MAC3.
  • the first terminal sends the first message to the IKMS entity, where the first message includes a first half session key parameter corresponding to each second terminal, an identifier of each second terminal, and a first message verification code. .
  • the first terminal M_UE sends the first message after the signature to the IKMS entity, where the first message includes the first half session key corresponding to each second terminal S_UE.
  • the message content of the first message is ⁇ XA1, S_UE_ID1, XA2, S_UE_ID2, MAC3>.
  • the IKMS entity verifies the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity; and the IKMS entity determines that the first message verification code passes the verification. And generating, according to the identifier of each second terminal, a private key corresponding to the second terminal.
  • the IKMS entity After the IKMS entity receives the first message sent by the first terminal M_UE, first, the IKMS entity verifies the first message verification code MAC3, specifically, because the first terminal M_UE negotiates with the IKMS entity.
  • the first shared key K IKMS_M so that the IKMS entity can verify the first message verification code MAC3 according to the first shared key K IKMS_M .
  • the IKMS entity After the IKMS entity determines that the first message verification code MAC3 is verified, the IKMS entity generates a private key SK for each second terminal identifier S_UE_ID based on the IBS technology with the identifier S_UE_ID of the second terminal as the public key, ie, each of the The private key SK is a private key SK corresponding to a second terminal S_UE.
  • the IKMS entity when the number of the second terminal is two, the IKMS entity generates the private key SK1 corresponding to the second terminal S_UE1 according to the identifier S_UE_ID1 of the second terminal, and generates the second terminal according to the identifier S_UE_ID2 of the second terminal.
  • the IKMS entity generates a second half session key parameter corresponding to each second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session corresponding to the second terminal.
  • the key parameter generates a symmetric key corresponding to the second terminal.
  • the IKMS entity generates a second half session key parameter XB corresponding to each second terminal S_UE; and the IKMS entity according to the first half session key parameter corresponding to the second terminal S_UE And a symmetric key key corresponding to the second terminal S_UE, where the symmetric key key is between the second terminal S_UE and the IKMS entity, and the second half session key parameter XB corresponding to the second terminal S_UE Symmetric key.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to each second terminal, and generates an encrypted private key corresponding to the second terminal.
  • the IKMS entity encrypts the private key SK corresponding to the second terminal S_UE according to the symmetric key key corresponding to each second terminal S_UE, and generates the encrypted second and the second The private key (SK) key corresponding to the terminal S_UE.
  • the IKMS entity when the number of the second terminals is two, the IKMS entity generates a second half session key parameter XB1 for the second terminal S_UE1, and generates an IKMS and the second terminal S_UE1 by using XA1 and XB1 according to the received XA1.
  • Symmetric key key1 then the IKMS entity encrypts the private key SK1 with the key key1; the IKMS entity generates a second half session key parameter XB2 for the second terminal S_UE2, and generates XA2 and XB2 according to the received XA2
  • the symmetric key key2 between the IKMS and the second terminal S_UE2, and then the IKMS entity encrypts the private key SK2 with this key key2.
  • the IKMS entity generates a second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the IKMS entity sets a second half session key parameter XB corresponding to each second terminal S_UE, an identifier S_UE_ID of each second terminal, and an encrypted second terminal S_UE
  • the corresponding private key (SK) key is placed in a second message.
  • the IKMS entity uses the first shared key K IKMS_M to sign the second message.
  • the second message at this time includes the second half session key parameter XB corresponding to each second terminal S_UE, and each of the first The identifier S_UE_ID of the second terminal and the encrypted private key (SK) key corresponding to each second terminal S_UE generate a second message verification code MAC4.
  • the IKMS entity sends the second message to the first terminal, where the second message includes a second half session key parameter corresponding to each second terminal, an identifier of each second terminal, and an encrypted one and each a private key corresponding to the second terminal, and a second message verification code.
  • the second message that the IKMS entity carries the second message verification code MAC4 is sent to the first terminal M_UE, where the second message includes the second corresponding to each second terminal S_UE.
  • the IKMS entity encrypts the second half session key parameter XB1, the identifier S_UE_ID1 of the second terminal S_UE1, the encrypted private key (SK1) key1 , the second half session key parameter XB2, and the identifier S_UE_ID2 of the second terminal S_UE2.
  • the subsequent private key (SK2) key2 and the message authentication code MAC4 are completely sent to the first terminal M_UE, that is, the message content includes ⁇ XB1, S_UE_ID1, (SK1) key1 , XB2, S_UE_ID2, (SK2) key2 , MAC4>.
  • the first terminal verifies the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first terminal M_UE after the first terminal M_UE receives the second message, the first terminal M_UE first verifies the second message verification code MAC4. Specifically, the first terminal M_UE negotiates the first sharing with the IKMS entity. The key K IKMS_M , so that the first terminal M_UE can verify the second message verification code MAC4 using the first shared key K IKMS_M .
  • the second half session key parameter corresponding to each second terminal and the encrypted private key corresponding to the second terminal are sent to the first Two terminals.
  • the first terminal M_UE determines that the second message verification code MAC4 is verified, the first terminal M_UE sets the second half session secret corresponding to the second terminal S_UE according to the identifier S_UE_ID of the second terminal.
  • the key parameter XB and the encrypted private key (SK) key corresponding to the second terminal S_UE are sent to the second terminal S_UE.
  • the first terminal M_UE sends the second half session key parameter XB1 corresponding to the second terminal S_UE1, and the encrypted private key (SK1) key1 corresponding to the second terminal S_UE1 to the second terminal S_UE1, ie, A terminal M_UE sends a message ⁇ XB1, (SK1) key1 > to the second terminal S_UE1; the first terminal M_UE will use a second half session key parameter XB2 corresponding to the second terminal S_UE2, and the encrypted second terminal S_UE2
  • the corresponding private key (SK2) key2 is sent to the second terminal S_UE2, that is, the first terminal M_UE sends the message ⁇ XB2, (SK2) key2 > to the second terminal S_UE2.
  • Each second terminal generates a symmetric key according to the first half session key parameter corresponding to the second terminal and the second half session key parameter corresponding to the second terminal.
  • each second terminal S_UE receives the second half session key parameter XB corresponding to the second terminal S_UE, and the encrypted private key (SK) corresponding to the second terminal S_UE.
  • the second terminal S_UE firstly generates the first half session key parameter XA corresponding to the second terminal S_UE and the received second half session key parameter XB corresponding to the second terminal S_UE. Calculate a symmetric key key.
  • Each second terminal decrypts the encrypted private key corresponding to the second terminal according to the symmetric key to obtain a private key corresponding to the second terminal.
  • each second terminal S_UE decrypts the encrypted private key (SK) key corresponding to the second terminal S_UE according to the calculated symmetric key key, and obtains the second The private key SK corresponding to the terminal S_UE. Thereby, the initial key acquisition of each of the second terminals S_UE is completed.
  • SK private key
  • the second terminal S_UE1 first generates a symmetric key according to the received second half session key parameter XB1 corresponding to the second terminal S_UE1 and the first half session key parameter XA1 generated by itself. Key 2; then the second terminal S_UE1 decrypts (SK1) key1 with the key key1, thereby obtaining the private key SK1 corresponding to the second terminal S_UE1, and thus completing the initial key acquisition of the second terminal S_UE1.
  • the second terminal S_UE2 first generates a symmetric key key2 according to the received second half session key parameter XB2 corresponding to the second terminal S_UE2 and the first half session key parameter XA2 generated by itself. Then, the second terminal S_UE2 decrypts (SK2) key2 with the key key2, thereby obtaining the private key SK2 corresponding to the second terminal S_UE2, and thus completing the initial key acquisition of the second terminal S_UE2.
  • steps S892-S813 are based on a symmetric key mechanism.
  • the group is triggered by the second terminal, and the first terminal sends information such as the group identifier to the IDM entity, and then the first terminal determines whether to establish the group, so that the first terminal Between the second terminal and the second terminal, the trust and security between the network elements in the group are improved; and the characteristics of the group can be constructed based on the second terminal actively sending the group establishment request. It is diverse. Moreover, a private key acquisition method is provided. After a group is established between the terminal and the terminal, the second terminal initiates a request for obtaining a private key, and then the IKMS entity generates the encrypted private key corresponding to the second terminal.
  • the second terminal receives the encrypted private key corresponding to the second terminal that is sent by the IKMS entity by using the first terminal, and the second terminal can obtain the encrypted private key corresponding to the second terminal, and the private key can be guaranteed. Not stolen, ensuring that communication information between groups is not stolen.
  • FIG. 18 is a schematic flowchart of still another method for generating a private key according to an embodiment of the present application. As shown in FIG. 18, the method is specifically as follows.
  • the first terminal receives a group join request sent by the second terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • the first terminal encrypts the fourth message according to the second shared key, and obtains the encrypted fourth message, where the fourth message includes a group identifier, an identifier of the first terminal, and an identifier of the second terminal. And a third message verification code, wherein the third message verification code is used to verify that the fourth message is sent by the first terminal, and is used to verify the integrity of the fourth message; the first terminal sends the encrypted fourth message to IDM entity.
  • the first terminal receives the encrypted fifth message sent by the IDM entity, where the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code, where the fourth message verification code is used.
  • the fifth message is sent by the IDM entity and used to verify the integrity of the fifth message.
  • the first terminal decrypts the encrypted fifth message according to the second shared key to obtain a fifth message.
  • the first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the first terminal After the first terminal determines that the fourth message verification code is verified, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal receives, by the second terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal are The identifier of the terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • the first terminal encrypts the first message according to the first shared key, and obtains the encrypted first message, where the first message includes a first half session key parameter corresponding to the second terminal, and the second terminal And the first message verification code, wherein the first message verification code is used to verify that the first message is sent by the first terminal, and is used to verify the integrity of the first message; the first terminal will encrypt the first message Send to the IKMS entity.
  • the first terminal receives the encrypted second message sent by the IKMS entity, where the second message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and the encrypted second terminal.
  • the second message verification code is used to verify that the second message is sent by the IKMS entity and used to verify the integrity of the second message; the first terminal is based on the first shared key Decrypting the encrypted second message to obtain a second message.
  • the first terminal verifies the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the second half session key parameter corresponding to the second terminal and the encrypted private key corresponding to the second terminal are sent to the second terminal, where And the second half session key parameter corresponding to the second terminal is used to decrypt the encrypted private key corresponding to the second terminal.
  • FIG. 19 is a schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 19, FIG. 19 is a schematic diagram of communication between a second terminal and a first terminal for generating a private key. The method is as follows.
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal. .
  • this step can be referred to step S71 of FIG. 16 and will not be described again.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • this step can be referred to step S72 of FIG. 16 and will not be described again.
  • the first terminal encrypts the fourth message according to the second shared key, and obtains the encrypted fourth message, where the fourth message includes a group identifier, an identifier of the first terminal, and an identifier of the second terminal. And a third message verification code, wherein the third message verification code is used to verify that the fourth message is sent by the first terminal and used to verify the integrity of the fourth message.
  • the first terminal M_UE puts the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of the second terminal, and the third message verification code MAC1 into a fourth message;
  • the first terminal M_UE encrypts the fourth message according to the second shared key K IDM_M to obtain the encrypted fourth message.
  • the second shared key K IDM_M is a symmetric key.
  • the encrypted fourth message is that the message content is ⁇ (GROUP_FLAG, M_UE_ID, S_UE_ID, MAC1) K IDM_M >, where GROUP_FLAG is a group identifier bit, and the relationship between the first terminal M_UE and the second terminal S_UE is Master-Slave Relationship, M_UE_ID is the ID of the first terminal M_UE, S_UE_ID is the ID of the second terminal S_UE, and MAC1 is the third message verification code generated for the entire fourth message using the second shared key K IDM_M .
  • the first terminal sends the encrypted fourth message to the IDM entity.
  • the IDM entity decrypts the encrypted fourth message according to the second shared key to obtain a fourth message, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the IDM entity after the IDM entity receives the encrypted fourth message, the IDM entity has negotiated the second shared key K IDM_M with the first terminal M-UE, so that the IDM entity is based on the second shared secret.
  • the key K IDM_M decrypts the encrypted fourth message to obtain a fourth message, and the IDM entity can obtain the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of the second terminal, and the third message verification code.
  • the IDM entity verifies the third message verification code according to the second shared key.
  • the IDM entity may obtain the third message verification code MAC1 after decrypting the fourth message, and the IDM entity needs to verify the third message verification code MAC1. Specifically, since the IDM entity has negotiated the second shared key K IDM_M with the first terminal M-UE, the IDM entity can verify the third message verification code MAC1 according to the second shared key K IDM_M stored by itself. .
  • the IDM entity determines that the third message verification code passes the verification, and generates an identifier of the group.
  • this step can be referred to step S75 of FIG. 16 and will not be described again.
  • the IDM entity generates a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S76 of FIG. 16 and will not be described again.
  • the IDM entity encrypts the fifth message according to the second shared key, and generates an encrypted fifth message, where the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code.
  • the fourth message verification code is used to verify that the fifth message is sent by the IDM entity and used to verify the integrity of the fifth message.
  • the IDM entity puts the identifier of the group GROUP_ID, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of the second terminal, and the fourth message verification code MAC2 into a fifth message; then, IDM The entity encrypts the fifth message according to the second shared key K IDM_M to obtain the encrypted fifth message.
  • the fifth message includes ⁇ (GROUP_ID, M_UE_ID, S_UE_ID, MAC2) K IDM_M >.
  • the GROUP_ID is the identifier of the group
  • the M_UE_ID is the ID of the first terminal M_UE
  • the S_UE_ID is the ID of the second terminal S_UE
  • the MAC2 is the second shared key K IDM_M to generate the message verification code for the entire fifth message
  • the entire second information is encrypted using the symmetric key K IDM_M between the first terminal M_UE and the IDM entity.
  • the IDM entity sends the encrypted fifth message to the first terminal.
  • the IDM entity sends the group information to the IKMS entity, where the group information includes the identifier of the group, the identifier of the first terminal, and the identifier of the second terminal.
  • the IDM entity sends the encrypted fifth message to the first terminal, and the IDM entity sends the generated group information to the IKMS entity, where the group information includes the group identifier.
  • the step of sending the encrypted fifth message to the first terminal by the IDM entity and the step of sending the generated group information to the IKMS entity by the IDM entity is not limited.
  • the first terminal decrypts the encrypted fifth message according to the second shared key to obtain a fifth message.
  • the first terminal M_UE decrypts the encrypted fifth message according to the second shared key K IDM_M , and obtains the identifier of the group GROUP_ID, the identifier of the first terminal M_UE_ID, and the identifier of the second terminal. S_UE_ID, and fourth message verification code MAC2.
  • S993 The first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S78 of FIG. 16 and will not be described again.
  • the first terminal After the first terminal determines that the fourth message verification code is verified, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal.
  • this step can be referred to step S79 of FIG. 16 and will not be described again.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • this step can be referred to step S791 of FIG. 16 and will not be described again.
  • the second terminal sends, to the first terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter corresponding to the second terminal and the second terminal The identifier is used to generate an encrypted private key corresponding to the second terminal.
  • this step can refer to step S792 of FIG. 16 and details are not described herein.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • this step can be referred to step S793 of FIG. 16 and will not be described again.
  • the first terminal encrypts the first message according to the first shared key, to obtain the encrypted first message, where the first message includes a first half session key parameter corresponding to the second terminal, and the second terminal And an identifier of the first message, wherein the first message verification code is used to verify that the first message is sent by the first terminal and used to verify the integrity of the first message.
  • the first terminal M_UE puts the first half session key parameter XA corresponding to the second terminal S_UE, the identifier S_UE_ID of the second terminal, and the first message verification code MAC3 into a first In the message, the first terminal M_UE encrypts the first message according to the first shared key K IKMS_M to obtain the encrypted first message.
  • the first shared key K IKMS_M is a symmetric key.
  • the message content of the first message is ⁇ (XA, S_UE_ID, MAC3) K IKMS_M >.
  • S999 The first terminal sends the encrypted first message to the IKMS entity.
  • the S9910 and the IKMS entity decrypt the encrypted first message according to the first shared key to obtain the first message.
  • the IKMS entity decrypts the encrypted first message according to the first shared key K IKMS_M to obtain the first half session key parameter XA and the second terminal corresponding to the second terminal S_UE.
  • the IKMS entity verifies the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity; the IKMS entity determines that the first message verification code passes the verification And generating a private key corresponding to the second terminal according to the identifier of the second terminal.
  • this step can be referred to step S795 of FIG. 16, and details are not described herein again.
  • the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session key parameter corresponding to the second terminal, A symmetric key corresponding to the second terminal is generated.
  • this step can be referred to step S796 of FIG. 16, and details are not described herein again.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to the second terminal, and generates an encrypted private key corresponding to the second terminal.
  • this step can be referred to step S797 of FIG. 16 and will not be described again.
  • the IKMS entity generates a second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • this step can be referred to step S798 of FIG. 16, and details are not described herein again.
  • the IKMS entity encrypts the second message according to the first shared key, and generates an encrypted second message, where the second message includes a second half session key parameter corresponding to the second terminal, and the second terminal.
  • the IKMS entity sets a second half session key parameter XB corresponding to the second terminal S_UE, an identifier S_UE_ID of the second terminal, and an encrypted private key (SK) corresponding to the second terminal S_UE.
  • the key and the second message verification code MAC4 are placed in a second message; then, the IKMS entity encrypts the second message according to the first shared key K IKMS_M to generate an encrypted second message.
  • the encrypted second message is ⁇ (XB, S_UE_ID, (SK) key, MAC4) K IKMS_M >.
  • the S9916 and the IKMS entity send the encrypted second message to the first terminal.
  • S9917 The first terminal decrypts the encrypted second message according to the first shared key to obtain a second message.
  • the first terminal M_UE decrypts the encrypted second message according to the first shared key K IKMS_M , and obtains a second half session key parameter XB corresponding to the second terminal S_UE.
  • the first terminal verifies the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first terminal M_UE may obtain the second message verification code MAC4, and the first terminal M_UE needs to verify the second message verification code MAC4, specifically, Since the first terminal and M_UE IKMS entities of the first shared key K IKMS_M, whereby a first terminal may M_UE second message authentication code MAC4 be verified using the first shared key K IKMS_M.
  • this step can be referred to step S711 of FIG. 16 and will not be described again.
  • the second terminal generates a symmetric key according to the first half session key parameter corresponding to the second terminal and the second half session key parameter corresponding to the second terminal.
  • this step can be referred to step S712 of FIG. 16 and will not be described again.
  • the second terminal decrypts the encrypted private key corresponding to the second terminal according to the symmetric key to obtain a private key corresponding to the second terminal.
  • this step can be referred to step S713 of FIG. 16 and will not be described again.
  • FIG. 20 is a second schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 20, FIG. 20 is a communication for generating a private key between at least two second terminals and a first terminal. Schematic, the method is as follows.
  • Each second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal. Relationship between.
  • this step can be referred to step S81 of FIG. 17, and details are not described herein again.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • this step can be referred to step S82 of FIG. 17, and details are not described herein again.
  • S1103 The first terminal encrypts the fourth message according to the second shared key, to obtain the encrypted fourth message, where the fourth message includes a group identifier, an identifier of the first terminal, and a second terminal. Identification, and third message verification code.
  • the first terminal M_UE puts the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of each second terminal, and the third message verification code MAC1 into a fourth message. Then, the first terminal M_UE encrypts the fourth message according to the second shared key K IDM_M to obtain the encrypted fourth message.
  • the second shared key K IDM_M is a symmetric key.
  • the encrypted fourth message is that the message content is ⁇ (GROUP_FLAG, M_UE_ID, S_UE_ID1, S_UE_ID2, MAC1) K IDM_M ..>, wherein the GROUP_FLAG is a group identifier bit, and the relationship between the first terminal M_UE and the second terminal S_UE For the master-Slave relationship, M_UE_ID is the ID of the first terminal M_UE, S_UE_ID1 is the ID of the second terminal S_UE1, S_UE_ID2 is the ID of the second terminal S_UE2, and MAC1 is the fourth shared message using the second shared key K IDM_M The third message verification code.
  • S1104 The first terminal sends the encrypted fourth message to the IDM entity.
  • S1105 The IDM entity decrypts the encrypted fourth message according to the second shared key to obtain a fourth message, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the IDM entity after the IDM entity receives the encrypted fourth message, the IDM entity has negotiated the second shared key K IDM_M with the first terminal M-UE, so that the IDM entity is based on the second shared secret.
  • the key K IDM_M decrypts the encrypted fourth message to obtain a fourth message, and the IDM entity can obtain the group identifier bit GROUP_FLAG, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of each second terminal, and the third message. Verification code MAC1.
  • the IDM entity verifies the third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can refer to step S84 of FIG. 17, and details are not described herein again.
  • the IDM entity determines that the third message verification code passes the verification, and generates an identifier of the group.
  • this step can be referred to step S85 of FIG. 17, and details are not described herein again.
  • the IDM entity generates a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S86 of FIG. 17, and details are not described herein again.
  • the IDM entity encrypts the fifth message according to the second shared key, and generates an encrypted fifth message, where the fifth message includes an identifier of the group, an identifier of the first terminal, and an identifier of each second terminal. And the fourth message verification code.
  • the IDM entity puts the identifier of the group GROUP_ID, the identifier M_UE_ID of the first terminal, the identifier S_UE_ID of each second terminal, and the fourth message verification code MAC2 into a fifth message;
  • the IDM entity encrypts the fifth message according to the second shared key K IDM_M to obtain the encrypted fifth message.
  • the fifth message includes ⁇ (GROUP_ID, M_UE_ID, S_UE_ID1, S_UE_ID2, MAC2) K IDM_M >.
  • the GROUP_ID is the identifier of the group
  • the M_UE_ID is the ID of the first terminal M_UE
  • the S_UE_ID1 is the ID of the second terminal S_UE1
  • the S_UE_ID2 is the ID of the second terminal S_UE2
  • the MAC2 is the second shared key K IDM_M
  • the five messages generate a message authentication code and are encrypted for the entire second information using the symmetric key K IDM_M between the first terminal M_UE and the IDM entity.
  • the S1110a and the IDM entity send the encrypted fifth message to the first terminal.
  • the S1110b and the IDM entity send the group information to the IKMS entity, where the group information includes the identifier of the group, the identifier of the first terminal, and the identifier of each second terminal.
  • the IDM entity sends the encrypted fifth message to the first terminal, and the IDM entity sends the generated group information to the IKMS entity, where the group information includes the group identifier.
  • the step of sending the encrypted fifth message to the first terminal by the IDM entity and the step of sending the generated group information to the IKMS entity by the IDM entity is not limited.
  • S1111 The first terminal decrypts the encrypted fifth message according to the second shared key to obtain a fifth message.
  • the first terminal M_UE decrypts the encrypted fifth message according to the second shared key K IDM_M , and obtains the identifier of the group GROUP_ID, the identifier of the first terminal M_UE_ID, and each second terminal.
  • S1112 The first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S88 of FIG. 17, and details are not described herein again.
  • the first terminal After the first terminal determines that the fourth message verification code passes the verification, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of each second terminal.
  • this step can be referred to step S89 of FIG. 17, and details are not described herein again.
  • S1114 The first terminal sends a group join response message to each second terminal, where the group join response message includes an identifier of the group.
  • this step can be referred to step S891 of FIG. 17, and details are not described herein again.
  • the above steps S1101-S1114 are a process of completing group establishment for the plurality of second terminals S_UE and the first terminal M-UE.
  • Each second terminal sends a first half session key parameter corresponding to the second terminal and an identifier of the second terminal to the first terminal.
  • this step can be referred to step S892 of FIG. 17, and details are not described herein again.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • this step can be referred to step S893 of FIG. 17, and details are not described herein again.
  • S1117a The first terminal encrypts the first message according to the first shared key, to obtain the encrypted first message, where the first message includes a first half session key parameter corresponding to each second terminal, and each An identifier of the second terminal, and a first message verification code.
  • the first terminal M_UE puts the first half session key parameter XA corresponding to each second terminal S_UE, the identifier S_UE_ID of each second terminal, and the first message verification code MAC3. Go to a first message; then, the first terminal M_UE encrypts the first message according to the first shared key K IKMS_M to obtain the encrypted first message.
  • the first shared key K IKMS_M is a symmetric key.
  • the message content of the first message is ⁇ (XA1, S_UE_ID1, XA2, S_UE_ID2, MAC3) K IKMS_M >, where XA1 is the first half corresponding to the second terminal S_UE1
  • the session key parameter, S_UE_ID1 is the ID of the second terminal S_UE1
  • XA2 is the first half session key parameter corresponding to the second terminal S_UE2
  • S_UE_ID2 is the ID of the second terminal S_UE2
  • MAC3 is the first terminal M_UE using the first share
  • the key K IKMS_M generates a message verification code for the entire first message.
  • S1117b The first terminal sends the encrypted first message to the IKMS entity.
  • the IKMS entity decrypts the encrypted first message according to the first shared key to obtain a first message.
  • the IKMS entity decrypts the encrypted first message according to the first shared key K IKMS_M to obtain a first half session key parameter XA corresponding to each second terminal S_UE, and each The identifier S_UE_ID of a second terminal and the first message verification code MAC3.
  • the IKMS entity verifies the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity; and the IKMS entity determines that the first message verification code passes the verification. And generating, according to the identifier of each second terminal, a private key corresponding to the second terminal.
  • this step can be referred to step S895 of FIG. 17, and details are not described herein again.
  • the IKMS entity generates a second half session key parameter corresponding to each second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session corresponding to the second terminal.
  • the key parameter generates a symmetric key corresponding to the second terminal.
  • this step can be referred to step S896 of FIG. 17, and details are not described herein again.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to each second terminal, and generates an encrypted private key corresponding to the second terminal.
  • this step can be referred to step S897 of FIG. 17, and details are not described herein again.
  • the IKMS entity generates a second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • this step can refer to step S898 of FIG. 17, and details are not described herein again.
  • the IKMS entity encrypts the second message according to the first shared key, and generates an encrypted second message, where the second message includes a second half session key parameter corresponding to each second terminal, and each The identifier of the second terminal, the encrypted private key corresponding to each second terminal, and the second message verification code.
  • the IKMS entity associates the second half session key parameter XB corresponding to each second terminal S_UE, the identifier S_UE_ID of each second terminal, and the encrypted corresponding to each second terminal S_UE.
  • the private key (SK) key and the second message verification code MAC4 are placed in a second message; then, the IKMS entity encrypts the second message according to the first shared key K IKMS_M to generate an encrypted second message. .
  • the encrypted second message is ⁇ (XB1, S_UE_ID1, (SK1) key1, XB2, S_UE_ID2, (SK2) key2, MAC4) K IKMS_M >, where XB1 is The second half session key parameter corresponding to the second terminal S_UE1, S_UE_ID1 is the ID of the second terminal S_UE1, (SK1) key1 is the encrypted private key corresponding to the second terminal S_UE1, and XB2 is corresponding to the second terminal S_UE2 The second half session key parameter, S_UE_ID2 is the ID of the second terminal S_UE2, (SK2) key2 is the encrypted private key corresponding to the second terminal S_UE2, and the MAC4 is the first terminal M_UE using the first shared key K IKMS_M Generate a message verification code for the entire second message.
  • S1125 The first terminal decrypts the encrypted second message according to the first shared key to obtain a second message.
  • the first terminal M_UE decrypts the encrypted second message according to the first shared key K IKMS_M to obtain a second half session key parameter XB corresponding to each second terminal S_UE. And an identifier S_UE_ID of each second terminal, an encrypted private key (SK) key corresponding to each second terminal S_UE, and a second message verification code MAC4.
  • the first terminal verifies the second message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first terminal M_UE may obtain the second message verification code MAC4, and the first terminal M_UE needs to verify the second message verification code MAC4, specifically, Since the first terminal and M_UE IKMS entities of the first shared key K IKMS_M, whereby a first terminal may M_UE second message authentication code MAC4 be verified using the first shared key K IKMS_M.
  • the second half session key parameter corresponding to each second terminal and the encrypted private key corresponding to the second terminal are sent to the first Two terminals.
  • this step can be referred to step S811 of FIG. 17, and details are not described herein again.
  • Each second terminal generates a symmetric key according to the first half session key parameter corresponding to the second terminal and the second half session key parameter corresponding to the second terminal.
  • this step can be referred to step S812 of FIG. 17, and details are not described herein again.
  • Each second terminal decrypts the encrypted private key corresponding to the second terminal according to the symmetric key to obtain a private key corresponding to the second terminal.
  • this step can be referred to step S813 of FIG. 17, and details are not described herein again.
  • steps S1115-S1129 are based on a symmetric key mechanism.
  • the group is triggered by the second terminal, and the first terminal sends information such as the group identifier to the IDM entity, and then the first terminal determines whether to establish the group, so that the first terminal Between the second terminal and the second terminal, the trust and security between the network elements in the group are improved; and the characteristics of the group can be constructed based on the second terminal actively sending the group establishment request. It is diverse. Moreover, a private key acquisition method is provided. After a group is established between the terminal and the terminal, the second terminal initiates a request for obtaining a private key, and then the IKMS entity generates the encrypted private key corresponding to the second terminal.
  • the second terminal receives the encrypted private key corresponding to the second terminal that is sent by the IKMS entity by using the first terminal, and the second terminal can obtain the encrypted private key corresponding to the second terminal, and the private key can be guaranteed. Not stolen, ensuring that communication information between groups is not stolen. And performing encryption processing in the process of transmitting and receiving the fourth message, the fifth message, the first message, and the second message, so as to prevent the above message from being stolen by other illegal devices.
  • FIG. 21 is a schematic flowchart of a method for generating a private key according to an embodiment of the present application. As shown in FIG. 21, the method is specifically as follows.
  • the first terminal receives a group join request sent by the second terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • the first terminal sends a fourth message to the IDM entity, where the fourth message includes a group identifier, an identifier of the first terminal, an identifier of the second terminal, and a third message verification code, where the third message is verified.
  • the code is used to verify that the fourth message is sent by the first terminal and is used to verify the integrity of the fourth message.
  • the first terminal receives a fifth message sent by the IDM entity, where the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code, where the fourth message verification code is used for verification.
  • Five messages are sent by the IDM entity and used to verify the integrity of the fifth message.
  • the first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the first terminal After the first terminal determines that the fourth message verification code is verified, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal receives, by the second terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal are The identifier of the terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • the first terminal sends the first message to the IKMS entity, where the first message includes a first half session key parameter corresponding to the second terminal, an identifier of the second terminal, and a first message verification code, where A message verification code is used to verify that the first message is sent by the first terminal and is used to verify the integrity of the first message.
  • the first terminal receives the third message sent by the IKMS entity, where the third message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted private address corresponding to the second terminal.
  • the first terminal verifies signature information corresponding to the second terminal according to the public key of the IKMS entity.
  • the first terminal After the first terminal determines that the signature information corresponding to the second terminal is verified, the first terminal sets the second half session key parameter corresponding to the second terminal, the encrypted private key corresponding to the second terminal, and The signature information corresponding to the second terminal is sent to the second terminal.
  • FIG. 22 is a schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 22, FIG. 22 is a schematic diagram of communication between a second terminal and a first terminal for generating a private key. The method is as follows.
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal. .
  • this step can be referred to step S71 of FIG. 16 and will not be described again.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • this step can be referred to step S72 of FIG. 16 and will not be described again.
  • the first terminal sends a fourth message to the IDM entity, where the fourth message includes a group identifier, an identifier of the first terminal, an identifier of the second terminal, and a third message verification code, where the third message is verified.
  • the code is used to verify that the fourth message is sent by the first terminal and is used to verify the integrity of the fourth message.
  • this step can be referred to step S73 of FIG. 16, and details are not described herein again.
  • the IDM entity verifies the third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S74 of FIG. 16 and will not be described again.
  • the IDM entity determines that the third message verification code passes the verification, and generates an identifier of the group.
  • this step can be referred to step S75 of FIG. 16 and will not be described again.
  • the IDM entity generates a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S76 of FIG. 16 and will not be described again.
  • the IDM entity sends a fifth message to the first terminal, where the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code, where the fourth message verification code is used to verify the fifth
  • the message is sent by the IDM entity and used to verify the integrity of the fifth message
  • the S1207b and the IDM entity send the group information to the IKMS entity, where the group information includes the identifier of the group, the identifier of the first terminal, and the identifier of the second terminal.
  • this step can be referred to step S77 of FIG. 16 and will not be described again.
  • S1208 The first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S78 of FIG. 16 and will not be described again.
  • the first terminal After the first terminal determines that the fourth message verification code passes the verification, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal.
  • this step can be referred to step S79 of FIG. 16 and will not be described again.
  • S1210 The first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • this step can be referred to step S791 of FIG. 16 and will not be described again.
  • the second terminal sends, to the first terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal The identifier is used to generate an encrypted private key corresponding to the second terminal.
  • this step can refer to step S792 of FIG. 16 and details are not described herein.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • step S793 of FIG. 16 refers to step S793 of FIG. 16 for details, and details are not described herein again.
  • the first terminal sends the first message to the IKMS entity, where the first message includes a first half session key parameter corresponding to the second terminal, an identifier of the second terminal, and a first message verification code, where A message verification code is used to verify that the first message is sent by the first terminal and is used to verify the integrity of the first message.
  • this step can be referred to step S794 of FIG. 16, and details are not described herein again.
  • the IKMS entity verifies the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity; and the IKMS entity determines that the first message verification code passes the verification. And generating a private key corresponding to the second terminal according to the identifier of the second terminal.
  • this step can be referred to step S795 of FIG. 16, and details are not described herein again.
  • the IKMS entity generates a second half session key parameter corresponding to the second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session key parameter corresponding to the second terminal.
  • a symmetric key corresponding to the second terminal is generated.
  • this step can be referred to step S796 of FIG. 16, and details are not described herein again.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to the second terminal, and generates the encrypted private key corresponding to the second terminal.
  • this step can be referred to step S797 of FIG. 16 and will not be described again.
  • the IKMS entity generates signature information corresponding to the second terminal according to the private key of the IKMS entity, where the signature information corresponding to the second terminal is used to verify that the encrypted private key corresponding to the second terminal is generated by the IKMS entity. of.
  • the IKMS entity puts the second half session key parameter XB corresponding to the second terminal S_UE, the identifier S_UE_ID of the second terminal S_UE, and the encrypted private key SK corresponding to the second terminal S_UE. Entering a third message; then the IKMS entity generates the signature information SIG corresponding to the second terminal S_UE by using the private key of the IKMS entity.
  • the IKMS entity sends a third message to the first terminal, where the third message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and an encrypted private address corresponding to the second terminal. a key and signature information corresponding to the second terminal.
  • the third message is sent to the first terminal M_UE, and the third message at this time includes the second message.
  • the content of the third message is ⁇ XB, S_UE_ID, (SK) key, SIG>.
  • S1219 The first terminal verifies the signature information corresponding to the second terminal according to the public key of the IKMS entity.
  • the first terminal M_UE verifies the signature information SIG corresponding to the second terminal S_UE according to the public key of the IKMS entity.
  • S1220 After the first terminal determines that the signature information corresponding to the second terminal is verified, the first terminal sets the second half session key parameter corresponding to the second terminal, the encrypted private key corresponding to the second terminal, and The signature information corresponding to the second terminal is sent to the second terminal.
  • the first terminal M_UE determines that the signature information SIG corresponding to the second terminal S_UE is verified
  • the first terminal M_UE associates with the second terminal S_UE according to the identifier S_UE_ID of the second terminal S_UE.
  • the second half session key parameter XB, the encrypted private key SK corresponding to the second terminal S_UE, and the signature information SIG corresponding to the second terminal S_UE are transmitted to the second terminal S_UE.
  • the first terminal M_UE sends the message ⁇ XB, (SK) key , SIG> to the second terminal S_UE.
  • S1221 The second terminal verifies signature information corresponding to the second terminal.
  • the second terminal S_UE verifies whether the signature information SIG corresponding to the second terminal S_UE is tampered with.
  • the second terminal S_UE determines that the signature information SIG corresponding to the second terminal S_UE is generated by the IKMS entity and has not been tampered with.
  • the second terminal S_UE determines the signature information corresponding to the second terminal S_UE.
  • the SIG passes the verification; then, the second terminal S_UE calculates according to the first half session key parameter XA corresponding to the second terminal S_UE generated by the second terminal S_UE, and the received second half session key parameter XB corresponding to the second terminal S_UE.
  • a symmetric key is issued.
  • S1223 The second terminal decrypts the encrypted private key corresponding to the second terminal according to the symmetric key, to obtain a private key corresponding to the second terminal.
  • the second terminal S_UE decrypts the encrypted private key (SK) key corresponding to the second terminal S_UE according to the calculated symmetric key key, and obtains a corresponding to the second terminal S_UE. Private key SK. Thereby, the initial key acquisition of the second terminal S_UE is completed.
  • SK private key
  • FIG. 23 is a schematic diagram of communication 2 of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 23, FIG. 23 is a communication for generating a private key between at least two second terminals and a first terminal. Schematic, the method is as follows.
  • Each second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents the first terminal and the second terminal. Relationship between.
  • this step can be referred to step S81 of FIG. 17, and details are not described herein again.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • this step can be referred to step S82 of FIG. 17, and details are not described herein again.
  • the first terminal sends a fourth message to the IDM entity, where the fourth message includes a group identifier, an identifier of the first terminal, an identifier of the second terminal, and a third message verification code, where the third message is verified.
  • the code is used to verify that the fourth message is sent by the first terminal and is used to verify the integrity of the fourth message.
  • this step can be referred to step S83 of FIG. 17, and details are not described herein again.
  • the IDM entity verifies the third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can refer to step S84 of FIG. 17, and details are not described herein again.
  • the IDM entity determines that the third message verification code passes the verification, and generates an identifier of the group.
  • this step can be referred to step S85 of FIG. 17, and details are not described herein again.
  • the IDM entity generates a fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S86 of FIG. 17, and details are not described herein again.
  • the IDM entity sends a fifth message to the first terminal, where the fifth message includes an identifier of the group, an identifier of the first terminal, an identifier of each second terminal, and a fourth message verification code;
  • the S1307b and the IDM entity send the group information to the IKMS entity, where the group information includes the identifier of the group, the identifier of the first terminal, and the identifier of the second terminal.
  • this step can be referred to step S87 of FIG. 17, and details are not described herein again.
  • S1308 The first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • this step can be referred to step S88 of FIG. 17, and details are not described herein again.
  • the first terminal After the first terminal determines that the fourth message verification code passes the verification, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of each second terminal.
  • this step can be referred to step S89 of FIG. 17, and details are not described herein again.
  • S1310 The first terminal sends a group join response message to each second terminal, where the group join response message includes an identifier of the group.
  • this step can be referred to step S891 of FIG. 17, and details are not described herein again.
  • Each second terminal sends a first half session key parameter corresponding to the second terminal and an identifier of the second terminal to the first terminal.
  • this step can be referred to step S892 of FIG. 17, and details are not described herein again.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • this step can be referred to step S893 of FIG. 17, and details are not described herein again.
  • the first terminal sends the first message to the IKMS entity, where the first message includes a first half session key parameter corresponding to each second terminal, an identifier of each second terminal, and a first message verification code. .
  • this step can be referred to step S894 of FIG. 17, and details are not described herein again.
  • the IKMS entity verifies the first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity, and the IKMS entity determines that the first message verification code passes the verification. And generating, according to the identifier of each second terminal, a private key corresponding to the second terminal.
  • this step can be referred to step S895 of FIG. 17, and details are not described herein again.
  • the IKMS entity generates a second half session key parameter corresponding to each second terminal, and according to the first half session key parameter corresponding to the second terminal, and the second half session corresponding to the second terminal.
  • the key parameter generates a symmetric key corresponding to the second terminal.
  • this step can be referred to step S896 of FIG. 17, and details are not described herein again.
  • the IKMS entity encrypts the private key corresponding to the second terminal according to the symmetric key corresponding to each second terminal, and generates an encrypted private key corresponding to the second terminal.
  • this step can be referred to step S897 of FIG. 17, and details are not described herein again.
  • the IKMS entity generates signature information corresponding to the second terminal according to the private key of the IKMS entity, where the signature information corresponding to the second terminal is used to verify that the encrypted private key corresponding to the second terminal is generated by the IKMS entity. of.
  • the IKMS entity generates a signature information SIG corresponding to the second terminal S_UE for each second terminal S_UE by using the private key of the IKMS entity, where the related information is the second terminal S_UE.
  • the IKMS entity generates the signature information SIG1 corresponding to the second terminal S_UE1 by using the private key of the IKMS entity as the related information of the second terminal S_UE1, where the related information of the second terminal S_UE1 includes the first corresponding to the second terminal S_UE1.
  • the IKMS entity sends a third message to the first terminal, where the third message includes a second half session key parameter corresponding to each second terminal, an identifier of each second terminal, and an encrypted one and each a private key corresponding to the second terminal, and signature information corresponding to each second terminal.
  • the third message is obtained, and the third message includes the second half session secret corresponding to each second terminal S_UE.
  • the content of the third message is ⁇ XB1, S_UE_ID1, (SK1) key1 > SIG1, ⁇ XB2, S_UE_ID2, (SK2) key2 >SIG2>.
  • the IKMS entity then sends the signed third message to the first terminal M_UE.
  • Each first terminal verifies signature information corresponding to the second terminal according to the public key of the IKMS entity.
  • the first terminal M_UE separately verifies all the signature information SIG according to the public key of the IKMS entity.
  • the first terminal M_UE verifies SIG1, SIG2 using the public key of IKMS, respectively.
  • S1320 After the first terminal determines that the signature information corresponding to the second terminal is verified, the first terminal sets a second half session key parameter corresponding to the second terminal, and the encrypted private key corresponding to the second terminal, and The signature information corresponding to the second terminal is sent to the second terminal.
  • the first terminal M_UE determines that the signature information SIG corresponding to the second terminal S_UE is verified, the first terminal M_UE is determined according to the identifier S_UE_ID of the second terminal S_UE. a second half session key parameter XB corresponding to the second terminal S_UE, an encrypted private key SK corresponding to the second terminal S_UE, an identifier of the second terminal S_UE, and a second terminal S_UE corresponding to the second terminal S_UE
  • the signature information SIG is sent to the second terminal S_UE.
  • the first terminal M_UE sends the message ⁇ XB1, S_UE_ID1, (SK1) key1 > SIG1 to the second terminal S_UE1; the first terminal M_UE sends the message ⁇ XB2, S_UE_ID2, (SK2) key2 > SIG2 to the second terminal S_UE2.
  • Each second terminal verifies signature information corresponding to the second terminal.
  • each second terminal S_UE verifies whether the signature information SIG corresponding to the second terminal S_UE is tampered with.
  • the second terminal S_UE1 verifies whether SIG1 has been tampered with; the second terminal S_UE2 verifies whether SIG2 has been tampered with.
  • the second terminal S_UE determines that the signature information SIG corresponding to the second terminal S_UE is generated by the IKMS entity and has not been tampered with.
  • the second terminal S_UE determines the signature information corresponding to the second terminal S_UE.
  • the SIG passes the verification; then, the second terminal S_UE calculates according to the first half session key parameter XA corresponding to the second terminal S_UE generated by the second terminal S_UE, and the received second half session key parameter XB corresponding to the second terminal S_UE.
  • a symmetric key is issued.
  • Each second terminal decrypts the encrypted private key corresponding to the second terminal according to the symmetric key, to obtain a private key corresponding to the second terminal.
  • the second terminal S_UE decrypts the encrypted private key (SK) key corresponding to the second terminal S_UE according to the calculated symmetric key key, and obtains a corresponding to the second terminal S_UE. Private key SK. Thereby, the initial key acquisition of the second terminal S_UE is completed.
  • SK private key
  • the second terminal S_UE1 determines that the signature information SIG1 corresponding to the second terminal S_UE1 is verified.
  • the second terminal S_UE1 is generated according to the received second half session key parameter XB1 corresponding to the second terminal S_UE1.
  • the first session key parameter XA1 is calculated to generate a symmetric key key1; then the second terminal S_UE1 decrypts (SK1) key1 with the key key1 , thereby obtaining the private key SK1 corresponding to the second terminal S_UE1, and thus completing the second terminal Initial key acquisition for S_UE1.
  • the second terminal S_UE2 determines that the signature information SIG2 corresponding to the second terminal S_UE2 is verified.
  • the second terminal S_UE2 first generates the first half-session key parameter XB2 corresponding to the second terminal S_UE2.
  • the semi-session key parameter XA2 is calculated to generate a symmetric key key2; then the second terminal S_UE2 decrypts (SK2) key2 with the key key2 , thereby obtaining the private key SK2 corresponding to the second terminal S_UE2, and thus completing the second terminal S_UE2 Initial key acquisition.
  • steps S1311-S1323 adopt an asymmetric key mechanism.
  • the group is triggered by the second terminal, and the first terminal sends information such as the group identifier to the IDM entity, and then the first terminal determines whether to establish the group, so that the first terminal Between the second terminal and the second terminal, the trust and security between the network elements in the group are improved; and the characteristics of the group can be constructed based on the second terminal actively sending the group establishment request. It is diverse. Moreover, a private key acquisition method is provided. After a group is established between the terminal and the terminal, the second terminal initiates a request for obtaining a private key, and then the IKMS entity generates the encrypted private key corresponding to the second terminal.
  • the IKMS entity processes the encrypted private key corresponding to the second terminal by using the signature information corresponding to the second terminal, thereby preventing the encrypted private key corresponding to the second terminal from being transmitted during the transmission process.
  • the other terminal tampering can ensure that the encrypted private key corresponding to the second terminal is not tampered and stolen by other terminals, and the communication information between the groups is not stolen.
  • the second terminal can obtain the encrypted private key corresponding to the second terminal quickly.
  • FIG. 24 is a schematic flowchart diagram of another method for generating a private key according to an embodiment of the present application. As shown in FIG. 24, the method is specifically as follows.
  • the first terminal receives a group join request sent by the second terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • the first terminal encrypts the fourth message according to the second shared key, and obtains the encrypted fourth message, where the fourth message includes a group identifier, an identifier of the first terminal, and an identifier of the second terminal. And a third message verification code, wherein the third message verification code is used to verify that the fourth message is sent by the first terminal, and is used to verify the integrity of the fourth message; the first terminal sends the encrypted fourth message to IDM entity.
  • the first terminal receives the encrypted fifth message sent by the IDM entity, where the fifth message includes an identifier of the group, an identifier of the second terminal, and a fourth message verification code, where the fourth message verification code is used.
  • the fifth message is sent by the IDM entity and used to verify the integrity of the fifth message.
  • the first terminal decrypts the encrypted fifth message according to the second shared key to obtain a fifth message.
  • the first terminal verifies the fourth message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the first terminal After the first terminal determines that the fourth message verification code is verified, the first terminal saves the group information, where the group information includes an identifier of the group, an identifier of the first terminal, and an identifier of the second terminal.
  • the first terminal sends a group join response message to the second terminal according to the identifier of the second terminal, where the group join response message includes the identifier of the group.
  • the first terminal receives, by the second terminal, a first half session key parameter corresponding to the second terminal, and an identifier of the second terminal, where the first half session key parameter and the second terminal corresponding to the second terminal are The identifier of the terminal is used to generate an encrypted private key corresponding to the second terminal.
  • the first terminal generates a first message verification code according to the first shared key, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first shared key includes a first key for generating a message verification code and a second key for encrypting the data.
  • the first terminal encrypts the first message according to the first shared key, and obtains the encrypted first message, where the first message includes a first half session key parameter corresponding to the second terminal, and the second terminal And the first message verification code, wherein the first message verification code is used to verify that the first message is sent by the first terminal, and is used to verify the integrity of the first message; the first terminal will encrypt the first message Send to the IKMS entity.
  • the first terminal receives the encrypted third message sent by the IKMS entity, where the third message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and the encrypted second terminal.
  • the third message includes a second half session key parameter corresponding to the second terminal, an identifier of the second terminal, and the encrypted second terminal.
  • Corresponding private key and signature information corresponding to the second terminal wherein the signature information corresponding to the second terminal is used to verify that the encrypted private key corresponding to the second terminal is generated by the IKMS entity.
  • the first terminal decrypts the encrypted third message according to the first shared key to obtain a third message, where the first shared key is a key negotiated between the first terminal and the IKMS entity.
  • the first terminal verifies signature information corresponding to the second terminal according to the public key of the IKMS entity.
  • the first terminal After the first terminal determines that the signature information corresponding to the second terminal is verified, the first terminal sets the second half session key parameter corresponding to the second terminal, the encrypted private key corresponding to the second terminal, and The signature information corresponding to the second terminal is sent to the second terminal.
  • FIG. 25 is a schematic diagram of communication of a method for generating a private key according to an embodiment of the present disclosure. As shown in FIG. 25, FIG. 25 is a schematic diagram of communication between a second terminal and a first terminal for generating a private key. The method is as follows.
  • the second terminal sends a group join request to the first terminal, where the group join request includes a group identifier bit and an identifier of the second terminal, where the group identifier bit represents a relationship between the first terminal and the second terminal. .
  • this step can be referred to step S71 of FIG. 16 and will not be described again.
  • the first terminal generates a third message verification code according to the second shared key, where the second shared key is a key negotiated between the first terminal and the IDM entity.
  • the second shared key includes a third key for generating a message verification code and a fourth key for encrypting the data.
  • this step can be referred to step S72 of FIG. 16 and will not be described again.
  • the first terminal encrypts the fourth message according to the second shared key, and obtains the encrypted fourth message, where the fourth message includes a group identifier, an identifier of the first terminal, and an identifier of the second terminal. And a third message verification code, wherein the third message verification code is used to verify that the fourth message is sent by the first terminal and used to verify the integrity of the fourth message.
  • this step can be referred to step S93 of FIG. 19, and details are not described herein again.

Abstract

本申请提供一种私钥生成的方法和设备,其中,该方法包括:第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、第二终端的标识,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥;第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体;第一终端将IKMS实体发送的与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。提供了一种私钥获取方法,可以保证私钥不被窃取,保证群组之间通信信息不被窃取。

Description

私钥生成的方法和设备
本申请要求于2018年02月05日提交中国专利局、申请号为201810112754.4、申请名称为“私钥生成的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术,尤其涉及一种私钥生成的方法和设备。
背景技术
随着通信技术的不断发展,面向ID(identity)的网络(ID oriented network,ION)作为一种面向未来网络的新型的网络架构,已经开始逐渐应用到网络技术中。在ION网络架构中,网元与网元之间可以建立社交的关系,其中,网元是终端等设备,例如网元为个人电脑、智能冰箱等等;进而需要对网元进行建立群组,即将多个网关构建为一个群组。
现有技术中,在ION网络架构中,对网元建立群组的时候,接入网关通过网元的网络信号的强弱,为网元划分群组。
然而现有技术中,在ION网络架构下,群组下的终端如何获取到用于后续通信所需要的私钥,是一个需要亟需解决的问题。
发明内容
本申请提供一种私钥生成的方法和设备,以解决现有技术中在ION网络架构下,群组下的终端如何获取到用于后续通信所需要的私钥的问题。
第一方面,本申请提供一种私钥生成的方法,包括:
第一终端接收第二终端发送的与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
所述第一终端将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给IKMS实体;
所述第一终端接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
所述第一终端根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
结合第一方面,在第一方面的第一种实施方式中,在所述第一终端将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给所述IKMS实体之前,还包括:
所述第一终端根据第一共享密钥,生成第一消息验证码,其中,所述第一共享密 钥为所述第一终端与所述IKMS实体之间协商的密钥;
相应的,所述第一终端将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给所述IKMS实体,包括:
所述第一终端将第一消息发送给所述IKMS实体,其中,所述第一消息包括与所述第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及所述第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性。
结合第一方面的第一种实施方式,在第一方面的第二种实施方式中,所述第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
结合第一方面的第一种实施方式、或第一方面的第二种实施方式,在第一方面的第三种实施方式中,所述第一终端将第一消息发送给所述IKMS实体,包括:
所述第一终端根据所述第一共享密钥,对所述第一消息进行加密,得到加密后的第一消息;
所述第一终端将所述加密后的第一消息发送给所述IKMS实体。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第四种实施方式中,所述第一终端接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,包括:
所述第一终端接收所述IKMS实体发送的第二消息,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性;
相应的,所述第一终端根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端,包括:
所述第一终端根据第一共享密钥,验证所述第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
所述第一终端确定所述第二消息验证码通过验证之后,根据所述第二终端的标识将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
结合第一方面的第四种实施方式,在第一方面的第五种实施方式中,所述第一终端接收所述IKMS实体发送的第二消息,包括:
所述第一终端接收所述IKMS实体发送的加密后的第二消息;
相应的,在所述第一终端根据第一共享密钥,验证所述第二消息验证码之前,还包括:
所述第一终端根据所述第一共享密钥,对所述加密后的第二消息进行解密,得到所述第二消息。
结合第一方面、或第一方面的第一种实施方式、或第一方面的第二种实施方式、或第一方面的第三种实施方式,在第一方面的第六种实施方式中,所述第一终端接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的 标识、以及加密后的与所述第二终端对应的私钥,包括:
所述第一终端接收所述IKMS实体发送的第三消息,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
相应的,所述第一终端根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端,包括:
所述第一终端根据所述IKMS实体的公钥,验证所述与所述第二终端对应的签名信息;
所述第一终端确定所述与所述第二终端对应的签名信息通过验证之后,根据所述第二终端的标识将与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及所述与所述第二终端对应的签名信息,发送给所述第二终端。
结合第一方面的第六种实施方式,在第一方面的第七种实施方式中,所述第一终端接收所述IKMS实体发送的第三消息,包括:
所述第一终端接收所述IKMS实体发送的加密后的第三消息;
相应的,在所述第一终端根据所述IKMS实体的公钥,验证所述与所述第二终端对应的签名信息之前,还包括:
所述第一终端根据第一共享密钥,对所述加密后的第三消息进行解密,得到所述第三消息,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第八种实施方式中,所述第二终端的个数为一个或至少两个。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第九种实施方式中,所述第一终端为主节点、且所述第二终端为从节点。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第十种实施方式中,在所述第一终端接收第二终端发送的与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识之前,还包括:
所述第一终端接收所述第二终端发送的群组加入请求,所述群组加入请求中包括群组标识位和所述第二终端的标识,所述群组标识位表征所述第一终端与所述第二终端之间的关系;
所述第一终端将所述群组标识位、所述第一终端的标识、以及所述第二终端的标识发送给IDM实体,所述群组标识位、所述第一终端的标识、以及所述第二终端的标识用于确定群组的标识;
所述第一终端接收所述IDM实体发送的群组的标识、以及所述第二终端的标识;
所述第一终端根据所述第二终端的标识,向所述第二终端发送群组加入响应消息,其中,所述群组加入响应消息中包括所述群组的标识。
结合第一方面的第十种实施方式,在第一方面的第十一种实施方式中,在所述第 一终端将所述群组标识位、所述第一终端的标识、以及所述第二终端的标识发送给IDM实体之前,还包括:
所述第一终端根据第二共享密钥,生成第三消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
相应的,所述第一终端将所述群组标识位、所述第一终端的标识、以及所述第二终端的标识发送给IDM实体,包括:
所述第一终端将第四消息发送给所述IDM实体,其中,所述第四消息包括所述群组标识位、所述第一终端的标识、所述第二终端的标识、以及所述第三消息验证码,其中,所述第三消息验证码用于验证所述第四消息由所述第一终端发出、且用于验证所述第四消息的完整性。
结合第一方面的第十一种实施方式,在第一方面的第十二种实施方式中,所述第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
结合第一方面的第十一种实施方式、或第一方面的第十二种实施方式,在第一方面的第十三种实施方式中,所述第一终端将第四消息发送给所述IDM实体,包括:
所述第一终端根据所述第二共享密钥,对所述第四消息进行加密,得到加密后的第四消息;
所述第一终端将所述加密后的第四消息,发送给所述IDM实体。
结合第一方面的第十种实施方式、或第一方面的第十一种实施方式、或第一方面的第十二种实施方式、或第一方面的第十三种实施方式,在第一方面的第十四种实施方式中,所述第一终端接收所述IDM实体发送的群组的标识、以及所述第二终端的标识,包括:
所述第一终端接收所述IDM实体发送的第五消息,其中,所述第五消息中包括所述群组的标识、所述第二终端的标识、以及第四消息验证码,其中,所述第四消息验证码用于验证所述第五消息由所述IDM实体发出、且用于验证所述第五消息的完整性;
相应的,在所述第一终端接收所述IDM实体发送的第五消息之后,还包括:
所述第一终端根据第二共享密钥,验证所述第四消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
所述第一终端确定所述第四消息验证码通过验证之后,所述第一终端保存群组信息,其中,所述群组信息包括所述群组的标识、所述第一终端的标识、以及所述第二终端的标识。
结合第一方面的第十四种实施方式,在第一方面的第十五种实施方式中,所述第一终端接收所述IDM实体发送的第五消息,包括:
所述第一终端接收所述IDM实体发送的加密后的第五消息;
相应的,在所述第一终端根据第二共享密钥,验证所述第四消息验证码之前,还包括:
所述第一终端根据所述第二共享密钥对所述加密后的第五消息进行解密,得到所述第五消息。
第二方面,本申请提供一种私钥生成的方法,包括:
第二终端向第一终端发送与所述第二终端对应的第一半会话密钥参数、以及所述 第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
所述第二终端接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
所述第二终端根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥;
所述第二终端根据所述对称密钥对加密后的与所述第二终端对应的私钥进行解密,得到与所述第二终端对应的私钥。
结合第二方面,在第二方面的第一种实施方式中,所述第二终端接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,包括:
所述第二终端接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由IKMS实体生成的;
相应的,所述第二终端根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥,包括:
所述第二终端验证所述与所述第二终端对应的签名信息;
所述第二终端确定所述与所述第二终端对应的签名信息通过验证之后,根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥。
结合第二方面或第二方面的第一种实施方式,在第二方面的第二种实施方式中,所述第一终端为主节点、且所述第二终端为从节点。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第三种实施方式中,在所述第二终端向第一终端发送与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识之前,还包括:
所述第二终端向所述第一终端发送群组加入请求,其中,所述群组加入请求中包括群组标识位和所述第二终端的标识,所述群组标识位表征所述第一终端与所述第二终端之间的关系;
所述第二终端接收所述第一终端发送的群组加入响应消息,其中,所述群组加入响应消息中包括所述群组的标识。
第三方面,本申请提供一种群组建立的方法,包括:
IDM实体接收第一终端发送的群组标识位、所述第一终端的标识、以及第二终端的标识,其中,所述群组标识位表征所述第一终端与所述第二终端之间的关系,所述群组标识位、所述第一终端的标识、以及所述第二终端的标识用于确定群组的标识;
所述IDM实体生成群组的标识;
所述IDM实体将所述群组的标识、以及所述第二终端的标识,发送给所述第一终端。
结合第三方面,在第三方面的第一种实施方式中,所述IDM实体接收第一终端发送的群组标识位、以及第二终端的标识,包括:
所述IDM实体接收所述第一终端发送的第四消息,其中,所述第四消息包括所述群组标识位、所述第一终端的标识、所述第二终端的标识、以及第三消息验证码,其中,所述第三消息验证码用于验证所述第四消息由所述第一终端发出、且用于验证所述第四消息的完整性;
相应的,所述IDM实体生成群组的标识,包括:
所述IDM实体根据第二共享密钥,验证所述第三消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
所述IDM实体确定所述第三消息验证码通过验证之后,生成所述群组的标识。
结合第三方面的第一种实施方式,在第三方面的第二种实施方式中,所述第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
结合第三方面的第一种实施方式、或第三方面的第二种实施方式,在第三方面的第三种实施方式中,所述IDM实体接收所述第一终端发送的第四消息,包括:
所述IDM实体接收所述第一终端发送的加密后的第四消息;
相应的,在所述IDM实体根据第二共享密钥,验证所述第三消息验证码之前,还包括:
所述IDM实体根据所述第二共享密钥,对所述加密后的第四消息进行解密,得到所述第四消息。
结合第三方面或第三方面的以上任一种实施方式,在第三方面的第四种实施方式中,所述IDM实体将所述群组的标识、以及所述第二终端的标识,发送给所述第一终端,包括:
所述IDM实体根据第二共享密钥,生成第四消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
所述IDM实体将第五消息发送给所述第一终端,其中,所述第五消息包括所述群组的标识、所述第二终端的标识、以及所述第四消息验证码,并且,所述IDM实体将群组信息发送给IKMS实体,其中,所述群组信息中包括所述群组的标识、所述第一终端的标识、以及所述第二终端的标识,所述第四消息验证码用于验证所述第五消息由所述IDM实体发出、且用于验证所述第五消息的完整性。
结合第三方面的第四种实施方式,在第三方面的第五种实施方式中,所述IDM实体将第五消息发送给所述第一终端,包括:
所述IDM实体根据所述第二共享密钥,对所述第五消息进行加密,生成加密后的第二消息;
所述IDM实体将所述加密后的第五消息,发送给所述第一终端。
结合第三方面或第三方面的以上任一种实施方式,在第三方面的第六种实施方式中,所述群组标识位表征所述第一终端为主节点、且所述第二终端为主节点;
或者,所述群组标识位表征所述第一终端为主节点、且所述第二终端为从节点。
结合第三方面或第三方面的以上任一种实施方式,在第三方面的第七种实施方式中,所述第二终端的个数为一个或至少两个。
第四方面,本申请提供一种私钥生成的方法,包括:
IKMS实体接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
所述IKMS实体生成与所述第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
所述IKMS实体将与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端。
结合第四方面,在第四方面的第一种实施方式中,所述IKMS实体生成与所述第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成加密后的与所述第二终端对应的私钥,包括:
所述IKMS实体根据所述第二终端的标识,生成与所述第二终端对应的私钥;
所述IKMS实体生成与所述第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成与所述第二终端对应的对称密钥;
所述IKMS实体根据与所述第二终端对应的对称密钥,对与所述第二终端对应的私钥进行加密,生成加密后的与所述第二终端对应的私钥。
结合第四方面的第一种实施方式,在第四方面的第二种实施方式中,所述IKMS实体接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,包括:
所述IKMS实体接收第一终端发送的第一消息,其中,所述第一消息包括与第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性;
相应的,所述IKMS实体根据所述第二终端的标识,生成与所述第二终端对应的私钥,包括:
所述IKMS实体根据第一共享密钥,验证所述第一消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
所述IKMS实体确定所述第一消息验证码通过验证之后,根据所述第二终端的标识生成与所述第二终端对应的私钥。
结合第四方面的第二种实施方式,在第四方面的第三种实施方式中,所述第一共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
结合第四方面的第二种实施方式、或第四方面的第三种实施方式,在第四方面的第四种实施方式中,所述IKMS实体接收第一终端发送的第一消息,包括:
所述IKMS实体接收第一终端发送的加密后的第一消息;
相应的,在所述IKMS实体根据第一共享密钥,验证所述第一消息验证码之前, 还包括:
所述IKMS实体根据所述第一共享密钥,对所述加密后的第一消息进行解密,得到所述第一消息。
结合第四方面、或第四方面的第一种实施方式、或第四方面的第二种实施方式、或第四方面的第三种实施方式、或第四方面的第四种实施方式、在第四方面的第五种实施方式中,所述IKMS实体将与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端,包括:
所述IKMS实体根据第一共享密钥,生成第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
所述IKMS实体将第二消息发送给所述第一终端,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性。
结合第四方面的第五种实施方式,在第四方面的第六种实施方式中,所述IKMS实体将第二消息发送给所述第一终端,包括:
所述IKMS实体根据所述第一共享密钥,对所述第二消息进行加密,生成加密后的第二消息;
所述IKMS实体将所述加密后的第二消息,发送给所述第一终端。
结合第四方面、或第四方面的第一种实施方式、或第四方面的第二种实施方式、或第四方面的第三种实施方式、或第四方面的第四种实施方式、在第四方面的第七种实施方式中,所述IKMS实体将与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端,包括:
所述IKMS实体根据所述IKMS实体的私钥,生成与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
所述IKMS实体将第三消息发送给所述第一终端,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息。
结合第四方面的第七种实施方式,在第四方面的第八种实施方式中,所述IKMS实体将第三消息发送给所述第一终端,包括:
所述IKMS实体根据第一共享密钥,对所述第三消息进行加密,生成加密后的第三消息,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
所述IKMS实体将所述加密后的第三消息,发送给所述第一终端。
结合第四方面或第四方面的以上任一种实施方式,在第四方面的第九种实施方式中,所述第一终端为主节点、且所述第二终端为从节点。
结合第四方面或第四方面的以上任一种实施方式,在第四方面的第十种实施方式中,所述第二终端的个数为一个或至少两个。
第五方面,本申请提供一种第一终端,包括:
第一接收单元,用于接收第二终端发送的与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
第一发送单元,用于将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给IKMS实体;
第二接收单元,用于接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
第二发送单元,用于根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
结合第一方面,在第一方面的第一种实施方式中,所述第一终端,还包括:
第一生成单元,用于在所述第一发送单元将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给所述IKMS实体之前,根据第一共享密钥,生成第一消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
相应的,所述第一发送单元,具体用于:
将第一消息发送给所述IKMS实体,其中,所述第一消息包括与所述第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及所述第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性。
结合第一方面的第一种实施方式,在第一方面的第二种实施方式中,所述第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
结合第一方面的第一种实施方式、或第一方面的第二种实施方式,在第一方面的第三种实施方式中,所述第一发送单元,包括:
第一加密模块,用于根据所述第一共享密钥,对所述第一消息进行加密,得到加密后的第一消息;
第一发送模块,用于将所述加密后的第一消息发送给所述IKMS实体。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第四种实施方式中,所述第二接收单元,具体用于:
接收所述IKMS实体发送的第二消息,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性;
相应的,所述第二发送单元,包括:
第一验证模块,用于根据第一共享密钥,验证所述第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
第二发送模块,用于确定所述第二消息验证码通过验证之后,根据所述第二终端 的标识将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
结合第一方面的第四种实施方式,在第一方面的第五种实施方式中,所述第二接收单元,具体用于:
接收所述IKMS实体发送的加密后的第二消息;
相应的,所述第二发送单元,还包括:
第一解密模块,用于在所述验证模块根据第一共享密钥,验证所述第二消息验证码之前,根据所述第一共享密钥,对所述加密后的第二消息进行解密,得到所述第二消息。
结合第一方面、或第一方面的第一种实施方式、或第一方面的第二种实施方式、或第一方面的第三种实施方式,在第一方面的第六种实施方式中,所述第二接收单元,具体用于:
接收所述IKMS实体发送的第三消息,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
相应的,所述第二发送单元,包括:
第二验证模块,用于根据所述IKMS实体的公钥,验证所述与所述第二终端对应的签名信息;
第三发送模块,用于确定所述与所述第二终端对应的签名信息通过验证之后,根据所述第二终端的标识将与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及所述与所述第二终端对应的签名信息,发送给所述第二终端。
结合第一方面的第六种实施方式,在第一方面的第七种实施方式中,所述第二接收单元,具体用于:
接收所述IKMS实体发送的加密后的第三消息;
相应的,所述第二发送单元,还包括:
第二解密模块,用于在所述第二验证模块根据所述IKMS实体的公钥,验证所述与所述第二终端对应的签名信息之前,根据第一共享密钥,对所述加密后的第三消息进行解密,得到所述第三消息,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第八种实施方式中,所述第二终端的个数为一个或至少两个。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第九种实施方式中,所述第一终端为主节点、且所述第二终端为从节点。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第十种实施方式中,所述第一终端,还包括:
第三接收单元,用于在所述第一接收单元接收第二终端发送的与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识之前,接收所述第二终端发送的 群组加入请求,所述群组加入请求中包括群组标识位和所述第二终端的标识,所述群组标识位表征所述第一终端与所述第二终端之间的关系;
第三发送单元,用于将所述群组标识位、所述第一终端的标识、以及所述第二终端的标识发送给IDM实体,所述群组标识位、所述第一终端的标识、以及所述第二终端的标识用于确定群组的标识;
第四接收单元,用于接收所述IDM实体发送的群组的标识、以及所述第二终端的标识;
第四发送单元,用于根据所述第二终端的标识,向所述第二终端发送群组加入响应消息,其中,所述群组加入响应消息中包括所述群组的标识。
结合第一方面的第十种实施方式,在第一方面的第十一种实施方式中,所述第一终端,还包括:
第一生成单元,用于在所述第三发送单元将所述群组标识位、所述第一终端的标识、以及所述第二终端的标识发送给IDM实体之前,根据第二共享密钥,生成第三消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
相应的,所述第三发送单元,具体用于:
将第四消息发送给所述IDM实体,其中,所述第四消息包括所述群组标识位、所述第一终端的标识、所述第二终端的标识、以及所述第三消息验证码,其中,所述第三消息验证码用于验证所述第四消息由所述第一终端发出、且用于验证所述第四消息的完整性。
结合第一方面的第十一种实施方式,在第一方面的第十二种实施方式中,所述第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
结合第一方面的第十一种实施方式、或第一方面的第十二种实施方式,在第一方面的第十三种实施方式中,所述第三发送单元,包括:
第二加密模块,用于根据所述第二共享密钥,对所述第四消息进行加密,得到加密后的第四消息;
第四发送模块,用于将所述加密后的第四消息,发送给所述IDM实体。
结合第一方面的第十种实施方式、或第一方面的第十一种实施方式、或第一方面的第十二种实施方式、或第一方面的第十三种实施方式,在第一方面的第十四种实施方式中,所述第四接收单元,具体用于:
接收所述IDM实体发送的第五消息,其中,所述第五消息中包括所述群组的标识、所述第二终端的标识、以及第四消息验证码,其中,所述第四消息验证码用于验证所述第五消息由所述IDM实体发出、且用于验证所述第五消息的完整性;
相应的,所述第一终端,还包括:
验证单元,用于在所述第四接收单元接收所述IDM实体发送的第五消息之后,根据第二共享密钥,验证所述第四消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
保存单元,用于确定所述第四消息验证码通过验证之后,保存群组信息,其中,所述群组信息包括所述群组的标识、所述第一终端的标识、以及所述第二终端的标识。
结合第一方面的第十四种实施方式,在第一方面的第十五种实施方式中,所述第 四接收单元,具体用于:
接收所述IDM实体发送的加密后的第五消息;
相应的,所述第一终端,还包括:
解密单元,用于在所述验证单元根据第二共享密钥,验证所述第四消息验证码之前,根据所述第二共享密钥对所述加密后的第五消息进行解密,得到所述第五消息。
第六方面,提供了一种第二终端,包括:
第一发送单元,用于向第一终端发送与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
第一接收单元,用于接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
生成单元,用于根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥;
解密单元,用于根据所述对称密钥对加密后的与所述第二终端对应的私钥进行解密,得到与所述第二终端对应的私钥。
结合第二方面,在第二方面的第一种实施方式中,所述第一接收单元,具体用于:
接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由IKMS实体生成的;
相应的,所述生成单元,包括:
验证模块,用于验证所述与所述第二终端对应的签名信息;
生成模块,用于确定所述与所述第二终端对应的签名信息通过验证之后,根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥。
结合第二方面或第二方面的第一种实施方式,在第二方面的第二种实施方式中,所述第一终端为主节点、且所述第二终端为从节点。
结合第一方面或第一方面的以上任一种实施方式,在第一方面的第三种实施方式中,所述第二终端,还包括:
第二发送单元,用于在所述第一发送单元向第一终端发送与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识之前,向所述第一终端发送群组加入请求,其中,所述群组加入请求中包括群组标识位和所述第二终端的标识,所述群组标识位表征所述第一终端与所述第二终端之间的关系;
第二接收单元,用于接收所述第一终端发送的群组加入响应消息,其中,所述群组加入响应消息中包括所述群组的标识。
第七方面,提供了一种IDM实体,包括:
接收单元,用于接收第一终端发送的群组标识位、所述第一终端的标识、以及第二终端的标识,其中,所述群组标识位表征所述第一终端与所述第二终端之间的关系, 所述群组标识位、所述第一终端的标识、以及所述第二终端的标识用于确定群组的标识;
生成单元,用于生成群组的标识;
发送单元,用于将所述群组的标识、以及所述第二终端的标识,发送给所述第一终端。
结合第三方面,在第三方面的第一种实施方式中,所述接收单元,具体用于:
接收所述第一终端发送的第四消息,其中,所述第四消息包括所述群组标识位、所述第一终端的标识、所述第二终端的标识、以及第三消息验证码,其中,所述第三消息验证码用于验证所述第四消息由所述第一终端发出、且用于验证所述第四消息的完整性;
相应的,所述生成单元,包括:
验证模块,用于根据第二共享密钥,验证所述第三消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
第一生成模块,用于确定所述第三消息验证码通过验证之后,生成所述群组的标识。
结合第三方面的第一种实施方式,在第三方面的第二种实施方式中,所述第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
结合第三方面的第一种实施方式、或第三方面的第二种实施方式,在第三方面的第三种实施方式中,所述所述接收单元,具体用于:
接收所述第一终端发送的加密后的第四消息;
相应的,所述生成单元,还包括:
解密模块,用于在所述验证模块根据第二共享密钥,验证所述第三消息验证码之前,根据所述第二共享密钥,对所述加密后的第四消息进行解密,得到所述第四消息。
结合第三方面或第三方面的以上任一种实施方式,在第三方面的第四种实施方式中,所述发送单元,包括:
第二生成模块,用于根据第二共享密钥,生成第四消息验证码,其中,所述第二共享密钥为所述第一终端与所述IDM实体之间协商的密钥;
发送模块,用于将第五消息发送给所述第一终端,其中,所述第五消息包括所述群组的标识、所述第二终端的标识、以及所述第四消息验证码,并且,所述IDM实体将群组信息发送给IKMS实体,其中,所述群组信息中包括所述群组的标识、所述第一终端的标识、以及所述第二终端的标识,所述第四消息验证码用于验证所述第五消息由所述IDM实体发出、且用于验证所述第五消息的完整性。
结合第三方面的第四种实施方式,在第三方面的第五种实施方式中,所述发送模块,具体用于:
根据所述第二共享密钥,对所述第五消息进行加密,生成加密后的第二消息;
将所述加密后的第五消息,发送给所述第一终端。
结合第三方面或第三方面的以上任一种实施方式,在第三方面的第六种实施方式中,所述群组标识位表征所述第一终端为主节点、且所述第二终端为主节点;
或者,所述群组标识位表征所述第一终端为主节点、且所述第二终端为从节点。
结合第三方面或第三方面的以上任一种实施方式,在第三方面的第七种实施方式中,所述第二终端的个数为一个或至少两个。
第八方面,提供了一种IKMS实体,包括:
接收单元,用于接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
生成单元,用于生成与所述第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
发送单元,用于将与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端。
结合第四方面,在第四方面的第一种实施方式中,所述生成单元,包括:
第一生成模块,用于根据所述第二终端的标识,生成与所述第二终端对应的私钥;
第二生成模块,用于生成与所述第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成与所述第二终端对应的对称密钥;
第三生成模块,用于根据与所述第二终端对应的对称密钥,对与所述第二终端对应的私钥进行加密,生成加密后的与所述第二终端对应的私钥。
结合第四方面的第一种实施方式,在第四方面的第二种实施方式中,所述接收单元,具体用于:
接收第一终端发送的第一消息,其中,所述第一消息包括与第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性;
相应的,所述第一生成模块,包括:
验证子模块,用于根据第一共享密钥,验证所述第一消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
第一生成子模块,用于确定所述第一消息验证码通过验证之后,根据所述第二终端的标识生成与所述第二终端对应的私钥。
结合第四方面的第二种实施方式,在第四方面的第三种实施方式中,所述第一共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
结合第四方面的第二种实施方式、或第四方面的第三种实施方式,在第四方面的第四种实施方式中,所述接收单元,具体用于:
接收第一终端发送的加密后的第一消息;
相应的,所述第一生成模块,还包括:
解密子模块,用于在所述验证子模块根据第一共享密钥,验证所述第一消息验证码之前,根据所述第一共享密钥,对所述加密后的第一消息进行解密,得到所述第一消息。
结合第四方面、或第四方面的第一种实施方式、或第四方面的第二种实施方式、或第四方面的第三种实施方式、或第四方面的第四种实施方式、在第四方面的第五种实施方式中,所述发送单元,包括:
第四生成模块,用于根据第一共享密钥,生成第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
第一发送模块,用于将第二消息发送给所述第一终端,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性。
结合第四方面的第五种实施方式,在第四方面的第六种实施方式中,所述第一发送模块,包括:
第一加密子模块,用于根据所述第一共享密钥,对所述第二消息进行加密,生成加密后的第二消息;
第一发送子模块,用于将所述加密后的第二消息,发送给所述第一终端。
结合第四方面、或第四方面的第一种实施方式、或第四方面的第二种实施方式、或第四方面的第三种实施方式、或第四方面的第四种实施方式、在第四方面的第七种实施方式中,所述发送单元,包括:
第五生成模块,用于根据所述IKMS实体的私钥,生成与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
第二发送模块,用于将第三消息发送给所述第一终端,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息。
结合第四方面的第七种实施方式,在第四方面的第八种实施方式中,所述第二发送模块,包括:
第二加密子模块,用于根据第一共享密钥,对所述第三消息进行加密,生成加密后的第三消息,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
第二发送子模块,用于将所述加密后的第三消息,发送给所述第一终端。
结合第四方面或第四方面的以上任一种实施方式,在第四方面的第九种实施方式中,所述第一终端为主节点、且所述第二终端为从节点。
结合第四方面或第四方面的以上任一种实施方式,在第四方面的第十种实施方式中,所述第二终端的个数为一个或至少两个。
第九方面,提供了一种终端设备,包括用于执行以上第一方面的任一方法各个步骤的单元或者手段(means)。
第十方面,提供了一种终端设备,包括:处理器、存储器、发送器;所述发送器耦合至所述处理器,所述处理器控制所述发送器的发送动作;
其中,所述存储器用于存储计算机可执行程序代码,所述程序代码包括指令;当所述处理器执行所述指令时,所述指令使所述终端设备执行以上第一方面的任一方法。
第十一方面,提供了一种终端设备,包括用于执行以上第一方面的任一方法的至少一个处理元件或芯片。
第十二方面,提供了一种程序,该程序在被处理器执行时用于执行以上第一方面的任一方法。
第十三方面,提供了一种计算机可读存储介质,包括第十二方面的程序。
第十四方面,提供了一种终端设备,包括用于执行以上第二方面的任一方法各个步骤的单元或者手段(means)。
第十五方面,提供了一种终端设备,包括:处理器、存储器、发送器;所述发送器耦合至所述处理器,所述处理器控制所述发送器的发送动作;
其中,所述存储器用于存储计算机可执行程序代码,所述程序代码包括指令;当所述处理器执行所述指令时,所述指令使所述终端设备执行以上第二方面的任一方法。
第十六方面,提供了一种终端设备,包括用于执行以上第二方面的任一方法的至少一个处理元件或芯片。
第十七方面,提供了一种程序,该程序在被处理器执行时用于执行以上第二方面的任一方法。
第十八方面,提供了一种计算机可读存储介质,包括第第十七方面的程序。
第十九方面,提供了一种IDM实体,包括用于执行以上第三方面的任一方法各个步骤的单元或者手段(means)。
第二十方面,提供了一种IDM实体,包括处理器、存储器、通信接口;所述通信接口耦合至所述处理器;
其中,所述存储器用于存储计算机可执行程序代码,所述程序代码包括指令;当所述处理器执行所述指令时,所述指令使所述IDM实体执行以上第三方面的任一方法。
第二十一方面,提供了一种IDM实体,包括用于执行以上第三方面的任一方法的至少一个处理元件或芯片。
第二十二方面,提供了一种程序,该程序在被处理器执行时用于执行以上第三方面的任一方法。
第二十三方面,提供了一种计算机可读存储介质,包括第二十二方面的程序。
第二十四方面,提供了一种IKMS实体,包括用于执行以上第四方面的任一方法各个步骤的单元或者手段(means)。
第二十五方面,提供了一种IKMS实体,包括处理器、存储器、通信接口;所述通信接口耦合至所述处理器;
其中,所述存储器用于存储计算机可执行程序代码,所述程序代码包括指令;当所述处理器执行所述指令时,所述指令使所述IDM实体执行以上第四方面的任一方法。
第二十六方面,提供了一种IKMS实体,包括用于执行以上第四方面的任一方法的至少一个处理元件或芯片。
第二十七方面,提供了一种程序,该程序在被处理器执行时用于执行以上第四方面的任一方法。
第二十八方面,提供了一种计算机可读存储介质,包括第二十七方面的程序。
可见,在以上各个方面,通过第一终端接收第二终端发送的与第二终端对应的第 一半会话密钥参数、以及第二终端的标识,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥;第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体;第一终端接收IKMS实体发送的与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥;第一终端根据第二终端的标识,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。从而提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,第二终端通过第一终端接收IKMS实体发送的加密后的与第二终端对应的私钥,第二终端可以较快的获取到加密的与该第二终端对应的私钥,可以保证私钥不被窃取,保证群组之间通信信息不被窃取。
附图说明
图1提供了IP网络的网络架构示意图;
图2提供了ION网络的网络架构示意图;
图3为本申请提供的基于ION网络架构的移动通信网络的场景示意图;
图4为本申请实施例提供的一种私钥生成的方法的流程示意图;
图5为本申请实施例提供的一种私钥生成的方法的通信示意图一;
图6为本申请实施例提供的一种私钥生成的方法的通信示意图二;
图7为本申请实施例提供的一种群组建立的方法的流程示意图;
图8为本申请实施例提供的一种群组建立的方法的通信示意图一;
图9为本申请实施例提供的一种群组建立的方法的通信示意图二;
图10为本申请实施例提供的一种群组建立的方法的通信示意图三;
图11为本申请实施例提供的一种群组建立的方法的通信示意图四;
图12为本申请实施例提供的另一种私钥生成的方法的流程示意图;
图13为本申请实施例提供的另一种私钥生成的方法的通信示意图一;
图14为本申请实施例提供的另一种私钥生成的方法的通信示意图二;
图15为本申请实施例提供的又一种私钥生成的方法的流程示意图;
图16为本申请实施例提供的又一种私钥生成的方法的通信示意图;
图17为本申请实施例提供的又一种私钥生成的方法的通信示意图二;
图18为本申请实施例提供的再一种私钥生成的方法的流程示意图;
图19为本申请实施例提供的再一种私钥生成的方法的通信示意图;
图20为本申请实施例提供的再一种私钥生成的方法的通信示意图二;
图21为本申请实施例提供的还一种私钥生成的方法的流程示意图;
图22为本申请实施例提供的还一种私钥生成的方法的通信示意图;
图23为本申请实施例提供的还一种私钥生成的方法的通信示意图二;
图24为本申请实施例提供的另有一种私钥生成的方法的流程示意图;
图25为本申请实施例提供的另有一种私钥生成的方法的通信示意图;
图26为本申请实施例提供的另有一种私钥生成的方法的通信示意图二;
图27为本申请实施例提供的又有一种群私钥生成的方法的流程示意图;
图28为本申请实施例提供的再有一种群组建立的方法的流程示意图;
图29为本申请实施例提供的还有一种群组建立的方法的流程示意图;
图30为本申请实施例提供的另外有一种私钥生成的方法的流程示意图;
图31为本申请实施例提供的其他一种私钥生成的方法的流程示意图;
图32为本申请实施例提供的一种第一终端的结构示意图;
图33为本申请实施例提供的另一种第一终端的结构示意图;
图34为本申请实施例提供的又一种第一终端的结构示意图;
图35为本申请实施例提供的再一种第一终端的结构示意图;
图36为本申请实施例提供的还一种第一终端的结构示意图;
图37为本申请实施例提供的一种第二终端的结构示意图;
图38为本申请实施例提供的另一种第二终端的结构示意图;
图39为本申请实施例提供的又一种第二终端的结构示意图;
图40为本申请实施例提供的一种IDM实体的结构示意图;
图41为本申请实施例提供的另一种IDM实体的结构示意图;
图42为本申请实施例提供的又一种IDM实体的结构示意图;
图43为本申请实施例提供的一种IKMS实体的结构示意图;
图44为本申请实施例提供的另一种IKMS实体的结构示意图;
图45为本申请实施例提供的又一种IKMS实体的结构示意图。
具体实施方式
本申请实施例应用于4G、5G通信系统或未来可能出现的其他系统,以下对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。需要说明的是,当本申请实施例的方案应用于5G系统或未来可能出现的其他系统时,网络设备和终端的名称可能发生变化,但这并不影响本申请实施例方案的实施。
图1提供了IP网络的网络架构示意图,如图1所示,传统的网络协议(internet protocol,IP)网络架构中包括了传输层、IP层、以及链路层,其中,IP层用于记录终端的身份和位置等信息。
图2提供了ION网络的网络架构示意图,如图2所示,ION网络架构中包括了传输层、ID层、位置(Locator)层、以及链路层。图2所示的ION网络架构是ID/Locator分离的ION网络架构,ION网络是一种面向未来网络的新型的网络架构。ION网络架构与传统的IP网络架构的主要在于IP层的改变。如图1所示,在传统的IP网络架构中,当主机A与主机B建立通信时,针对主机A来说,IP地址既表示了与主机A通信的终端为哪一个主机,IP地址又表示了数据包在网络中的路由信息,该路由信息也称作位置信息,因此IP层的IP地址中具有了身份和位置的双重属性。图2所示,在ION网络架构中,提供了ID层和Locator层,ID层记录主机的身份,使用Locator层记录主机的路由信息,进而ION网络架构分离了IP地址的双重属性;在ION网络架构中,增加了一个ID层,对于ION的网络架构,第3.5层的ID代表用户的身份标识,第3层的IP代表用户的位置,为了后续区分ION网络架构中的第3层IP层与传统的传输控制协议/因特网互联协议(transmission control protocol/internet protocol,TCP/IP) 协议栈中的IP层,在本申请中,将ION网络架构中的第3层IP层将被称之为Locator层。
基于上述分析可知,在ION的网络架构中,分离了主机的身份属性和位置属性,并建立了一个统一的控制管理层。控制管理层用于管理相关的服务,将控制管理层分布式的部署在ION网络中,控制管理层可以对主机的身份、位置等信息进行统一管理。控制管理层主要包括以下几个功能:身份的管理服务(identity service)、身份与位置映射的管理服务(mapping/location service)、ID关系的管理服务(grouping service)、元数据的管理服务(metadata service)。
ION网络架构可以应用到多种场景中,例如,可以将应用到物联网(internet of things,IoT)中;在物联网中,每个IoT终端有唯一不变的身份ID,并且,在物联网中可以去建立一个IoT终端的ID与另一个IoT终端的ID之间的关系。
随着物联网的发展,物联网中演进出一种社交物联网(social internet of things,SIoT)。在社交物联网中,终端与终端之间可以建立社交关系,其中,社交关系有如以下三种关系:第一种是物所属关系(ownership object relationship),在这种关系中,可以根据终端所属关系去建立群组(cluster),例如在智慧家庭网络中,个人笔记本、冰箱、电视、电表等终端都属于屋内设置的终端,进而可以将这些终端构建为一个群组;第二种是共同地域物物关系(Co-location object relationship),在这种关系中,可以根据终端所在地域关系去建立群组,例如在智慧仓库网络中,可以将属于一个仓库地域的各智能终端构建为一个群组;第三种是同工物物关系(Co-work object relationship),在这种关系中,可以根据终端所做工作去建立群组,例如在智能灌溉系统中,各感知器、灌溉终端在同一个灌溉系统中进行工作,进而可以将各感知器、以及灌溉终端构建为一个群组。ION网络架构中的控制管理层需要对群组进行建立工作、以及管理工作。
在物联网中,终端与终端之间需要建立起群组,其中,这里终端也可以称作节点。按照业务类型,可以将物联网中的各终端分为数据收集和控制类终端、可穿戴终端、智能家庭终端、视频监控终端、智慧医疗终端等等。在物联网终端中,大量的智能终端属于低功耗广覆盖的终端,此类终端的典型特征为计算、存储、网络传输能力都较差,并且对电池消耗敏感;从而将智能终端划分多多个群组之后,一个低功耗的终端A与群组中的另一个计算能力较强的终端的距离,相对于该终端A到接入网关的距离,往往更加小;因此该终端A可以将数据包,转发至群组中的与终端A距离较近的终端,进而可以减少耗电,进一步的节约能源。从而基于以上分析,为终端与终端之间建立起群组,可以减少终端的功耗。
在现有的群组划分方案中,接入网关通过网元的网络信号的强弱,为网元划分群组。例如,接入网关在确定在一定的时间之内,两个网元接入至网关时的网络信号的强度差值,归属于一定范围的时候,接入网关将该两个网元划分为一个群组,这里的网元指的是上述的终端,并且在一个群组中可以包括至少一个主(Master)节点,或者在一个群组中可以包括至少一个主节点和至少一个从(Slave)节点;进而通过群组的划分,使得低功耗的IoT终端在通信中,可以就近的将数据包发送至相邻的设备,而无需将数据包发送至较远的网元设备,以此降低终端的功耗。然而,由于现有技术 中建立群组的时候,是基于终端的网络信号的强弱,去建立群组,因为终端的网络信号的强度是基于终端所处于的位置或区域的,进而现有群组建立的方式只能基于终端所处于的位置或区域进行群组的划分,不考虑终端之间的社交属性,构建出的群组的特征单一,并且构建出的群组中的各终端之间可能并不是可信的,不能够体现出终端之间可信性。并且,现有技术中建立群组的时候,是由接入网关进行群组的划分和建立,从而构建出的群组中的各终端之间可能并不是可信的,进而对群组中的终端之间的信任度和安全性会较低。
为了解决现有技术中的上述问题,本申请基于ION网络架构,提供了为IoT终端构建群组、以及获取初始密钥的方法和设备。图3为本申请提供的基于ION网络架构的移动通信网络的场景示意图,如图3所示,在ION网络架构的控制管理层采用采用ION的统一控制面,数据面展示了物联网中终端的群组划分示例,可以将物联网中的设备划分为两个群组,分别为Group1和Group2,每个群组中包含至少一个终端。以Group1为例,终端A、终端B和终端C为具有较强能力的节点,可以将终端A、终端B和终端C作为Group1中的主节点,终端a、终端b、终端c、终端d和终端e节点为能力较弱的节点,可以将终端a、终端b、终端c、终端d和终端e节点作为Group1中的从节点,因此Group1中的关系呈现出主-从(Master-Slave)关系、以及对等(Peer-to-Peer)关系,例如终端C与终端a为主从关系,终端a与终端e为对等关系。在Group2中,将终端X、终端Y和终端Z作为Group2中的主节点,将终端v、终端w、终端x、终端y和终端z节点作为Group2中的从节点。
下面,对于对本申请所涉及的名词进行解释:
终端:可以包括各种具有通信功能的手持设备、车载设备、可穿戴设备、家庭智能设备、计算设备或连接到无线调制解调器的其它处理设备,以及各种形式的终端,例如,移动台(mobile station,MS),终端(terminal),用户设备(user equipment,UE),软终端等等,举例来说有水表、电表、传感器等。在本申请中,终端可以为物联网中的终端、或者其他网络中的终端。
主节点(master_UE,M_UE):也称作主终端。
从节点(slave_UE,S_UE):也称作从终端。
用户归属服务器/AAA(验证、授权和记账)服务器(Home Subscriber Server/Authentication、Authorization、Accounting,HSS/AAA):传统的接入认证服务器,也称作HSS/AAA实体。
身份管理(identity management,IDM)实体:即ION管理控制层的Identity service,提供节点ID管理及ID群组关系管理。
身份密钥管理中心(identity and key management system,IKMS)实体:是身份与密钥管理中心,即是私钥生成中心;IKMS实体可以基于基于身份的签名技术(identity based signature,IBS)技术为每个节点生成以该节点ID为公钥的私钥。
IBS:每个终端拥有自己的公私钥对,其中公钥为有意义的字符串,例如Email地址、电话号码等;终端的私钥是由私钥生成中心(key generation center,KGC)根据用户ID和密钥生成中心的主私钥而生成的;在签名过程中无需安装包配置文件(PKG)参与,签名验证只需要签名、消息、身份和主公钥。
对于本申请所涉及的算法进行解释:
IBS技术:是一种基于身份的签名技术,是特殊的公钥密码系统。IBS技术包含有下述两个特征:第一个特征是,利用终端ID直接做为公钥,从而不需要数字证书来绑定公钥和用户名;第二个特征是,需要可信任的私钥生成中心为每个终端生成,对应于终端ID对应的的私钥。举例来说,终端将邮箱地址Alice@123.com做为终端ID去向KGC申请该终端ID对应的私钥,即终端将邮箱地址Alice@123.com发送给KGC,然后,KGC根据密钥生成算法以公钥等参数,为该终端生成与邮箱地址对应的私钥。
基于IBS的身份认证:IBS与传统数字签名的功能相同,因此基于IBS的认证可以参见基于传统数字签名的认证的原理和流程。但是基于IBS的认证与基于传统数字签名的认证的不同处在于,使用IBS时,认证方需要被认证方的身份标识来验证签名的真伪,因此不需要复杂的证书体系。举例来说,终端A获取到私钥和签名信息之后,终端直接利用签名、公钥等参数进行对签名信息进行验证。
迪菲-赫尔曼密钥交换(diffie–hellman key exchange,D-H)协议:是一种安全协议,它可以让两个设备在完全没有对方任何预先信息的条件下,通过不安全信道创建起一个密钥,这个密钥可以在后续的通信中作为对称密钥来加密通信内容。在D-H协议中有两个全局公开的参数,一个素数q和一个整数a,a是q的一个原根。
具体来说,假设终端A和终端B需要交换一个密钥,终端A选择一个作为私有密钥的随机数YA,其中YA小于素数q,并计算半会话密钥参数XA=a^YA mod q;终端A对YA的值进行保密存放,但是终端A使得半会话密钥参数XA能够被终端B公开获得。相应的,终端B选择一个私有的随机数YB,其中,YB小于素数q,并计算半会话密钥参数XB=a^YB mod q;终端B对YB的值进行保密存放,但是终端B使得半会话密钥参数XB能够被终端A公开获得。然后,终端A计算共享密钥的计算方式是共享密钥K=(XB)^YA mod q,相应的,终端B计算共享密钥的计算是共享密钥K=(XA)^YB mod q,终端A和终端B计算出的共享密钥K的结果是相同的;由于半会话密钥参数XB=a^YB mod q,从而终端A可以根据一系列的计算得到共享密钥K=(XB)^YA mod q=(a^YB mod q)^YA mod q=(a^YB)^YA mod q=a^(YBYA)mod q=(a^YA)^YB mod q=(a^YA mod q)^YB mod q=(XA)^YB mod q,对于终端B来说已经获知了共享密钥K=(XA)^YB mod q,从而终端A与终端B之间已经交换了一个相同的密钥。并且,在上述过程中,参数YA和参数YB是保密的,从而终端A与终端B之间的共享密钥是不会被其他终端或设备所计算出来的。
举例来说,由于参数YA和参数YB是保密的,其他终端可以利用的参数只有q、a、XA和XB,从而其他终端被迫采取离散对数来确定密钥,但是其他终端是很难计算出离散对数的。例如:素数q=97,参数a=5,终端A采用的随机数YA=36,终端B采用的随机数YB=58,进而终端A计算半会话密钥参数XA=5^36=50 mod 97,终端B计算公开半会话密钥参数XB=5^58=44 mod 97,然后在终端A计算得到共享密钥K=(XB)^YA mod 97=44^36=75 mod 97,终端A计算得到共享密钥K=(XA)^YB mod 97=50^58=75 mod 97;而其他终端是不易计算出共享密钥的。
本实施例中的,第一半会话密钥参数为上述D-H协议中的密钥参数XA,第二半会话密钥参数为上述D-H协议中的密钥参数XB。通信双方为了生成一个共享密钥, 需要交换半会话密钥参数。
需要指出的是,本申请实施例中涉及的名词或术语可以相互参考,不再赘述。
图4为本申请实施例提供的一种私钥生成的方法的流程示意图,如图4所示,该方法具体如下。
101a、第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在可选的一种实施方式中,第一终端为主节点、且第二终端为从节点。
在本实施例中,具体的,在第一终端与第二终端之间建立了群组之后,第二终端向第一终端发送用于获取私钥的参数,具体来说,第二终端向第一终端发送与第二终端对应的第一半会话密钥参数XA、以及第二终端的标识,其中,第一半会话密钥参数XA用于协商会话密钥。
102a、第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体。
在本实施例中,具体的,第一终端将与第二终端对应的第一半会话密钥参数XA、以及第二终端的标识,发送给IKMS实体。
IKMS实体基于IBS技术,以第二终端的标识为公钥,生成与第二终端的标识对应的私钥SK,该私钥SK为与第二终端对应的私钥;然后,IKMS实体生成第二半会话密钥参数XB,进而IKMS实体根据接收到的与第二终端对应的第一半会话密钥参数XA、以及第二半会话密钥参数XB,生成与该第二终端对应的对称密钥key,该对称密钥key为IKMS实体与第二终端的对称密钥;然后,IKMS实体利用与该第二终端对应的对称密钥key,对与第二终端对应的私钥SK进行加密,生成加密后的与该第二终端对应的私钥(SK) key。,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥(SK) key
103a、第一终端接收IKMS实体发送的与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在本实施例中,具体的,第一终端接收IKMS实体发送的与第二终端对应的第二半会话密钥参数XB、该第二终端的标识、以及加密后的与该第二终端对应的私钥(SK) key
104a、第一终端根据第二终端的标识,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。
在本实施例中,具体的,第一终端将与第二终端对应的第二半会话密钥参数XB、该第二终端的标识、以及加密后的与该第二终端对应的私钥(SK) key发送给第二终端。进而,第二终端可以对加密后的与该第二终端对应的私钥(SK) key进行解密,进而获取到与该第二终端对应的私钥SK。
图5为本申请实施例提供的一种私钥生成的方法的通信示意图一,如图5所示,图5为一个第二终端与一个第一终端之间进行私钥获取的方法的通信示意图,该方法具体如下。
S11a、第二终端将与第二终端对应的第一半会话密钥参数、以及第二终端的标识,发送给第一终端,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,在第一终端M_UE与第二终端S_UE之间建立了群组之后,第二终端S_UE向第一终端M_UE发送与第二终端S_UE对应的第一半会话密钥参数XA、以及第二终端的标识S_UE_ID,其中,第一半会话密钥参数XA用于协商会话密钥。
S12a、第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体。
在本实施例中,具体的,第一终端M_UE将与第二终端S_UE对应的第一半会话密钥参数XA、以及第二终端的标识S_UE_ID,发送给IKMS实体。
S13a、IKMS实体根据第二终端的标识,生成与第二终端对应的私钥。
在本实施例中,具体的,IKMS实体基于IBS技术,以第二终端的标识S_UE_ID为公钥,生成与第二终端的标识S_UE_ID对应的私钥SK,该私钥SK为与第二终端S_UE对应的私钥;
S14a、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥。
在本实施例中,具体的,IKMS实体生成与第二终端S_UE对应的第二半会话密钥参数XB,进而IKMS实体根据接收到的与第二终端S_UE对应的第一半会话密钥参数XA、以及与第二终端S_UE对应的第二半会话密钥参数XB,生成与该第二终端S_UE对应的对称密钥key,该对称密钥key为IKMS实体与第二终端S_UE的对称密钥。
S15a、IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在本实施例中,具体的,IKMS实体利用与该第二终端S_UE对应的对称密钥key,对与第二终端S_UE对应的私钥SK进行加密,生成加密后的与该第二终端S_UE对应的私钥(SK) key
S16a、IKMS实体将与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,发送给第一终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
具体来说,在步骤208之后,第一终端M_UE接收IKMS实体发送的与第二终端S_UE对应的第二半会话密钥参数XB、该第二终端的标识S_UE_ID、以及加密后的与该第二终端S_UE对应的私钥(SK) key
S17a、第一终端将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。
在本实施例中,具体的,第一终端M_UE将与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥(SK) key,发送给第二终端S_UE;进而第二终端S_UE对加密后的与该第二终端S_UE对应的私钥(SK) key进行解密,得 到与该第二终端S_UE对应的私钥SK。
在一个第二终端与至少两个第一终端之间进行建立群组之后,可以参照如上步骤S11a-S17a完成私钥的获取。
图6为本申请实施例提供的一种私钥生成的方法的通信示意图二,如图6所示,图6为至少两个第二终端与一个第一终端之间进行私钥获取的通信示意图,该方法具体如下。
S21a、每一个第二终端分别向第一终端发送与该第二终端对应的第一半会话密钥参数、以及该第二终端的标识。
在本实施例中,具体的,在建立了群组之后,每一个第二终端S_UE分别向第一终端M_UE发送与该第二终端S_UE对应的第一半会话密钥参数XA、以及该第二终端的标识S_UE_ID,其中,第一半会话密钥参数XA用于协商会话密钥。
例如,第二终端S_UE1向第一终端M_UE发送与该第二终端S_UE1对应的第一半会话密钥参数XA1、以及该第二终端S_UE1的标识S_UE_ID1;第二终端S_UE2向第一终端M_UE发送与该第二终端S_UE2对应的第一半会话密钥参数XA2、以及该第二终端S_UE2的标识S_UE_ID2。
S22a、第一终端将与每一个第二终端对应的第一半会话密钥参数、和每一个第二终端的标识发送给IKMS实体。
在本实施例中,具体的,第一终端M_UE将所有第二终端S_UE的第一半会话密钥参数和标识都添加到一条消息中,然后第一终端M_UE将与每一个第二终端对应的第一半会话密钥参数XA、以及每一个第二终端的标识S_UE_ID,发送给IKMS实体。
例如,第一终端M_UE将与第二终端S_UE1对应的第一半会话密钥参数XA1、第二终端S_UE1的标识S_UE_ID1、与第二终端S_UE2对应的第一半会话密钥参数XA2、以及第二终端S_UE2的标识S_UE_ID2,添加到一条消息中发送给IKMS实体。
S23a、IKMS实体根据每一个第二终端的标识,生成与该第二终端对应的私钥。
S24a、IKMS实体生成与每一个第二终端对应的第二半会话密钥参数,并根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成与该第二终端对应的对称密钥。
S25a、IKMS实体根据与每一个第二终端对应的对称密钥,对与该第二终端对应的私钥进行加密,生成加密后的与该第二终端对应的私钥。
在本实施例中,具体的,针对于每一个第二终端S_UE,IKMS实体从S69、S691到S692执行一遍,得到加密后的与该第二终端对应的私钥(SK) key
例如,IKMS实体基于IBS技术,根据第二终端S_UE1的标识S_UE_ID1生成与第二终端S_UE1对应的私钥SK1,根据第二终端S_UE2的标识S_UE_ID2生成与第二终端S_UE2对应的私钥SK2。然后,IKMS实体生成与第二终端S_UE1对应的第二半会话密钥参数XB1,同时根据接收到的与第二终端S_UE1对应的第一半会话密钥参数XA1,利用XB1和XA1生成与第二终端S_UE1对应的对称密钥key1,然后,IKMS实体根据与第二终端S_UE1对应的对称密钥key1,对与第二终端S_UE1对应的私钥SK2进行加密,生成加密后的与第二终端S_UE1对应的私钥(SK1) key1。并且,IKMS实体生成与第二终端S_UE2对应的第二半会话密钥参数XB2,同时根据接收到的与第 二终端S_UE2对应的第一半会话密钥参数XA2,利用XB2和XA2生成与第二终端S_UE2对应的对称密钥key2,然后,IKMS实体根据与第二终端S_UE2对应的对称密钥key2,对与第二终端S_UE2对应的私钥SK2进行加密,生成加密后的与第二终端S_UE2对应的私钥(SK2) key2
S26a、IKMS实体将与每一个第二终端对应的第二半会话密钥参数、每一个第二终端的标识、以及加密后的与每一个第二终端对应的私钥,发送给第一终端。
具体来说,IKMS实体将与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、以及加密后的与每一个第二终端S_UE对应的私钥SK放到一条消息中发送给第一终端,进而第一终端M_UE接收IKMS实体发送的与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、以及加密后的与每一个第二终端S_UE对应的私钥(SK) key
例如,IKMS实体将XB1、S_UE_ID1、(SK1) key1、XB2、S_UE_ID2、以及(SK2) key2,发送给第一终端M_UE。
S27a、第一终端将与第二终端对应的第二半会话密钥参数、以及加密后的与该第二终端对应的私钥,发送给该第二终端。
在本实施例中,具体的,第一终端M_UE将与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥SK,发送给该第二终端S_UE,即第一终端M_UE将第二半会话密钥参数和私钥,分别发送给对应的第二终端S_UE。
例如,第一终端M_UE根据S_UE_ID1,将XB1和(SK1) key1发送给对应的第二终端S_UE1;第一终端M_UE根据S_UE_ID2,将XB2和(SK2) key2发送给对应的第二终端S_UE2。
进而每一个第二终端S_UE对加密后的与该第二终端S_UE对应的私钥SK进行解密,得到与该第二终端S_UE对应的私钥SK。例如,第二终端S_UE1对(SK1) key1进行解密,得到与该第二终端S_UE1对应的私钥SK1;第二终端S_UE2对(SK2) key2进行解密,得到与该第二终端S_UE2对应的私钥SK2。
本实施例,通过第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥;第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体;第一终端接收IKMS实体发送的与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥;第一终端根据第二终端的标识,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。从而提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,第二终端通过第一终端接收IKMS实体发送的加密后的与第二终端对应的私钥,第二终端可以较快的获取到加密的与该第二终端对应的私钥,可以保证私钥不被窃取,保证群组之间通信信息不被窃取。
图7为本申请实施例提供的一种群组建立的方法的流程示意图,如图7所示,该 方法具体如下。
101、第一终端接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在可选的一种实施方式中,群组标识位表征第一终端为主节点、且第二终端为主节点;或者,群组标识位表征第一终端为主节点、且第二终端为从节点。
在可选的一种实施方式中,第二终端的个数为一个或至少两个。
在本实施例中,具体的,在步骤101之前,通过初始化工作,第一终端和第二终端已经可以接入控制平面,并且第一终端分别与IDM实体、IKMS实体等网元协商了第二共享密钥K IDM_M、以及第一共享密钥K IKMS_M。具体来说,第一终端通过HSS/AAA实体与IDM实体协商了第二共享密钥K IDM_M,第一终端通过HSS/AAA实体与IKMS实体协商了第一共享密钥K IKMS_M
在步骤101中,第二终端与第一终端建立安全通道,并且第二终端在安全通道内向第一终端发送群组加入请求bonding_request,群组加入请求bonding_request中包括了群组标识位GROUP_FLAG和第二终端的标识,群组标识位GROUP_FLAG表征第一终端与第二终端之间的关系;其中,安全通道可基于二层链路层技术,第二终端和第一终端可以通过预共享密钥的方式建立连接。例如,群组标识位GROUP_FLAG表征第一终端与第二终端之间的关系为Master-Slave关系,或者,群组标识位GROUP_FLAG表征第一终端与第二终端之间的关系为Peer-to-Peer关系。其中,群组标识位GROUP_FLAG就可以表征为一个群组加入请求。
在第二终端的个数是至少两个的时候,每一个第二终端在各自的安全通道内,分别向第一终端发送群组加入请求bonding_request,每一个第二终端所发送的群组加入请求bonding_request中包括了群组标识位GROUP_FLAG和该第二终端的标识。
102、第一终端将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
在本实施例中,具体的,第一终端更新建立群组所需的信息,然后第一终端将群组标识位GROUP_FLAG、第一终端的标识、以及第二终端的标识发送给IDM实体。
然后,IDM实体生成群组的标识GROUP_ID,IDM实体再将群组的标识GROUP_ID、第一终端的标识、以及第二终端的标识,发送给第一终端。
在第二终端的个数是至少两个的时候,第一终端将群组标识位GROUP_FLAG、第一终端的标识、以及每一个第二终端的标识发送给IDM实体;然后,IDM实体再将生成的群组的标识GROUP_ID、第一终端的标识、以及每一个第二终端的标识,发送给第一终端。
103、第一终端接收IDM实体发送的群组的标识、以及第二终端的标识。
104、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,在步骤103之后,第一终端根据第二终端的标识,在安全通道内向与第二终端的标识对应的第二终端发送群组加入响应消息,在群组加入响应消息中包括群组的标识GROUP_ID、以及第二终端的标识,进而通知第二终端群组建立成功。
在第二终端的个数是至少两个的时候,第一终端分别向每一个第二终端发送一个群组加入响应消息;每一个第二终端接收到的群组加入响应消息中包括群组的标识GROUP_ID、以及该第二终端的标识。
图8为本申请实施例提供的一种群组建立的方法的通信示意图一,如图8所示,图8为一个第二终端与一个第一终端之间进行群组建立的方法的通信示意图,该方法具体如下。
S11、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,在步骤S11之前,通过初始化工作,第一终端和第二终端已经可以接入控制平面,并且第一终端分别与IDM实体、IKMS实体等网元协商了第二共享密钥K IDM_M、以及第一共享密钥K IKMS_M
第二终端S_UE与第一终端M_UE建立安全通道,然后,第二终端S_UE在安全通道内向第一终端M_UE发送群组加入请求bonding_request,其中,群组加入请求bonding_request中包括了群组标识位GROUP_FLAG、以及第二终端的标识S_UE_ID,群组标识位GROUP_FLAG表征了第一终端M_UE与第二终端S_UE之间为Master-Slave关系,即第一终端M_UE为Master节点,第二终端S_UE为Slave节点,例如,群组加入请求bonding_request的消息内容为<GROUP_FLAG,S_UE_ID>,S_UE_ID为第二终端S_UE的ID。其中,安全通道可基于二层链路层技术,第二终端S_UE和第一终端M_UE通过预共享密钥的方式建立连接。
S12、第一终端将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体,其中,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
在本实施例中,具体的,第一终端M_UE更新建立群组所需的信息,然后,第一终端M_UE将群组标识位GROUP_FLAG、第一终端M_UE的标识M_UE_ID、以及第二终端S_UE的标识S_UE_ID发送给IDM实体。
S13、IDM实体生成群组的标识。
在本实施例中,具体的,IDM实体确认群组、群组成员、群组内节点间关系等信息,并且,IDM实体生成群组的标识GROUP_ID。进而,IDM实体确定出群组信息,其中,群组信息包括群组的标识GROUP_ID、第一终端M_UE的标识M_UE_ID、以及第二终端S_UE的标识S_UE_ID。
S14、IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。
在本实施例中,具体的,IDM实体将群组的标识GROUP_ID、第一终端M_UE的标识M_UE_ID、以及第二终端S_UE的标识S_UE_ID发送给第一终端M_UE。
S15、IDM实体将生成的群组信息,发送给IKMS实体。
在本实施例中,具体的,IDM实体将确定出的群组信息,发送给IKMS实体。其中,步骤S14和步骤S15之间的次序不做限定,可以是第一终端M_UE同时执行步骤S14和步骤S15,也可以是第一终端M_UE执行步骤S14之后执行步骤S15,也可以是第一终端M_UE执行步骤S15之后执行步骤S14。
S16、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中, 群组加入响应消息中包括群组的标识。
在本实施例中,具体的,第一终端M_UE向第二终端S_UE发送群组加入响应消息,在群组加入响应消息中包括群组的标识GROUP_ID、以及第二终端S_UE的标识S_UE_ID。
图9为本申请实施例提供的一种群组建立的方法的通信示意图二,如图9所示,图9为至少两个第二终端与一个第一终端之间进行群组建立的方法的通信示意图,该方法具体如下。
S21、每一个第二终端分别向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和该第二终端的标识,群组标识位表征第一终端与该第二终端之间的关系。
在本实施例中,具体的,在步骤S21之前,通过初始化工作,第一终端和第二终端已经可以接入控制平面,并且第一终端分别与IDM实体、IKMS实体等网元协商了第二共享密钥K IDM_M、以及第一共享密钥K IKMS_M
每一个第二终端S_UE与第一终端M_UE建立安全通道,然后,每一个第二终端S_UE在安全通道内向第一终端M_UE发送群组加入请求bonding_request,其中,群组加入请求bonding_request中包括了群组标识位GROUP_FLAG、以及该第二终端的标识S_UE_ID,群组标识位GROUP_FLAG表征了第一终端M_UE与该第二终端S_UE之间为Master-Slave关系,即第一终端M_UE为Master节点,第二终端S_UE为Slave节点,例如,群组加入请求bonding_request的消息内容为<GROUP_FLAG,S_UE_ID>,S_UE_ID为该第二终端S_UE的ID。
例如,第二终端S_UE1向第一终端M_UE发送群组加入请求bonding_request,群组加入请求bonding_request的消息内容为<GROUP_FLAG,S_UE_ID1>,S_UE_ID1为第二终端S_UE1的ID;第二终端S_UE2向第一终端M_UE发送群组加入请求bonding_request,群组加入请求bonding_request的消息内容为<GROUP_FLAG,S_UE_ID2>,S_UE_ID2第二终端S_UE2的ID。
S22、第一终端将群组标识位、第一终端的标识、以及每一个第二终端的标识发送给IDM实体。
在本实施例中,具体的,第一终端M_UE更新建立群组所需的信息,然后,第一终端M_UE将群组标识位GROUP_FLAG、第一终端M_UE的标识M_UE_ID、以及每一个第二终端S_UE的标识S_UE_ID发送给IDM实体。
例如,第一终端M_UE将GROUP_FLAG、M_UE_ID、S_UE_ID1、以及S_UE_ID2发送给IDM实体。
S23、IDM实体生成群组的标识。
在本实施例中,具体的,IDM实体确认群组、群组成员、群组内节点间关系等信息,并且,IDM实体生成群组的标识GROUP_ID。进而,IDM实体确定出群组信息,其中,群组信息包括群组的标识GROUP_ID、第一终端M_UE的标识M_UE_ID、以及每一个第二终端S_UE的标识S_UE_ID。
S24、IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。
在本实施例中,具体的,IDM实体将群组的标识GROUP_ID、第一终端M_UE的 标识M_UE_ID、以及每一个第二终端S_UE的标识S_UE_ID发送给第一终端M_UE。
S25、IDM实体将生成的群组信息,发送给IKMS实体。
在本实施例中,具体的,IDM实体将确定出的群组信息,发送给IKMS实体。其中,步骤S24和步骤S25之间的次序不做限定。
S26、第一终端分别向每一个第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,第一终端M_UE分别向每一个第二终端S_UE发送群组加入响应消息,每一个第二终端S_UE接收到的群组加入响应消息中包括群组的标识GROUP_ID、以及该第二终端S_UE的标识S_UE_ID。
例如,第一终端M_UE将GROUP_ID和S_UE_ID1发送给第二终端S_UE1,第一终端M_UE将GROUP_ID和S_UE_ID2发送给第二终端S_UE2。
图10为本申请实施例提供的一种群组建立的方法的通信示意图三,如图10所示,图10为一个第二终端与一个第一终端之间进行群组建立的方法的通信示意图,该方法具体如下。
S31、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,在步骤S31之前,通过初始化工作,第一终端M_UE1和第二终端M_UE2已经可以接入控制平面,并且第一终端M_UE1分别与IDM实体、IKMS实体等网元协商了第二共享密钥K IDM_M、以及第一共享密钥K IKMS_M
第二终端M_UE2与第一终端M_UE1建立安全通道,然后,第二终端M_UE2在安全通道内向第一终端M_UE1发送群组加入请求bonding_request,其中,群组加入请求bonding_request中包括了群组标识位GROUP_FLAG、以及第二终端的标识M_UE_ID2,群组标识位GROUP_FLAG表征了第一终端M_UE1与第二终端M_UE2之间为Peer-to-Peer关系,即第一终端M_UE1为Master节点,第二终端M_UE2为Master节点,例如,群组加入请求bonding_request的消息内容为<GROUP_FLAG,M_UE_ID2>,M_UE_ID2为第二终端M_UE2的ID。
S32、第一终端将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体,其中,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
在本实施例中,具体的,第一终端M_UE1更新建立群组所需的信息,然后,第一终端M_UE1将群组标识位GROUP_FLAG、第一终端M_UE1的标识M_UE_ID1、以及第二终端M_UE2的标识M_UE_ID2发送给IDM实体。
S33、IDM实体生成群组的标识。
在本实施例中,具体的,IDM实体确认群组、群组成员、群组内节点间关系等信息,并且,IDM实体生成群组的标识GROUP_ID。进而,IDM实体确定出群组信息,其中,群组信息包括群组的标识GROUP_ID、第一终端M_UE1的标识M_UE_ID1、以及第二终端M_UE2的标识M_UE_ID2。
S34、IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。
在本实施例中,具体的,IDM实体将群组的标识GROUP_ID、第一终端M_UE1 的标识M_UE_ID1、以及第二终端M_UE2的标识M_UE_ID2发送给第一终端M_UE1。
S35、IDM实体将生成的群组信息,发送给IKMS实体。
在本实施例中,具体的,IDM实体将确定出的群组信息,发送给IKMS实体。其中,步骤S34和步骤S35之间的次序不做限定。
S36、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,第一终端M_UE1向第二终端M_UE2发送群组加入响应消息,在群组加入响应消息中包括群组的标识GROUP_ID、以及第二终端M_UE2的标识M_UE_ID2。
图11为本申请实施例提供的一种群组建立的方法的通信示意图四,如图11所示,图11为一个第二终端与至少两个第一终端之间进行群组建立的方法的通信示意图,该方法具体如下。
S41、第二终端分别向每一个第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,在步骤S41之前,通过初始化工作,第一终端和第二终端已经可以接入控制平面,并且第一终端分别与IDM实体、IKMS实体等网元协商了第二共享密钥K IDM_M、以及第一共享密钥K IKMS_M
第二终端S_UE与每一个第一终端M_UE建立安全通道,然后,第二终端S_UE在安全通道内向分别向每一个第一终端M_UE发送群组加入请求bonding_request,其中,每一个第一终端M_UE接收到的群组加入请求bonding_request中包括了群组标识位GROUP_FLAG、以及该第二终端的标识S_UE_ID,群组标识位GROUP_FLAG表征了第一终端M_UE与第二终端S_UE之间为Master-Slave关系,即该第一终端M_UE为Master节点,第二终端S_UE为Slave节点,例如,群组加入请求bonding_request的消息内容为<GROUP_FLAG,S_UE_ID>,S_UE_ID为第二终端S_UE的ID。
S42、每一个第一终端将群组标识位、该第一终端的标识、以及第二终端的标识发送给IDM实体。
在本实施例中,具体的,每一个第一终端M_UE更新建立群组所需的信息,然后,每一个第一终端M_UE将群组标识位GROUP_FLAG、该第一终端M_UE的标识M_UE_ID、以及第二终端S_UE的标识S_UE_ID发送给IDM实体。
例如,第一终端M_UE1将群组标识位GROUP_FLAG、该第一终端M_UE1的标识M_UE_ID1、以及第二终端S_UE的标识S_UE_ID发送给IDM实体;第一终端M_UE2将群组标识位GROUP_FLAG、该第一终端M_UE2的标识M_UE_ID2、以及第二终端S_UE的标识S_UE_ID发送给IDM实体。
S43、IDM实体生成群组的标识。
在本实施例中,具体的,IDM实体确认群组、群组成员、群组内节点间关系等信息,并且,IDM实体生成群组的标识GROUP_ID。进而,IDM实体确定出群组信息,其中,群组信息包括群组的标识GROUP_ID、每一个第一终端M_UE的标识M_UE_ID、以及第二终端S_UE的标识S_UE_ID。
S44、IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。
在本实施例中,具体的,IDM实体将群组的标识GROUP_ID、第一终端M_UE的标识M_UE_ID、以及第二终端S_UE的标识S_UE_ID发送给该第一终端M_UE。
例如,IDM实体将GROUP_ID、M_UE_ID1、S_UE_ID发送给该第一终端M_UE1;IDM实体将GROUP_ID、M_UE_ID2、S_UE_ID发送给该第一终端M_UE2。
S45、IDM实体将生成的群组信息,发送给IKMS实体。
在本实施例中,具体的,IDM实体将确定出的群组信息,发送给IKMS实体。其中,步骤S4和步骤S45之间的次序不做限定。
S46、每一个第一终端根据第二终端的标识,分别向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,每一个第一终端M_UE分别向第二终端S_UE发送群组加入响应消息,在群组加入响应消息中包括群组的标识GROUP_ID、以及第二终端S_UE的标识S_UE_ID。其中,每一个第一终端M_UE所发送的群组加入响应消息中的群组的标识GROUP_ID可以相同,进而表征各第一终端M_UE、以及第二终端S_UE在同一群组中;或者,每一个第一终端M_UE所发送的群组加入响应消息中的群组的标识GROUP_ID,可以不同,进而表征不同的第一终端M_UE在不同的群组中,但是第二终端S_UE可以在这些群组中。
本实施例,通过第一终端接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系;第一终端将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体,其中,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识;第一终端接收IDM实体发送的群组的标识、以及第二终端的标识;第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。进而由第二终端触发去进行群组的建立,并且由第一终端向IDM实体发送群组标识位等信息,进而由第一终端确定是否进行群组的建立,从而第一终端与第二终端之间是可信的,提高了对群组中的网元之间的信任度和安全性;进而基于第二终端主动发送群组建立请求,从而可以构建出的群组的特征是多样的。
图12为本申请实施例提供的另一种私钥生成的方法的流程示意图,如图12所示,该方法具体如下。
201、第一终端接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在可选的一种实施方式中,群组标识位表征第一终端为主节点、且第二终端为主节点;或者,群组标识位表征第一终端为主节点、且第二终端为从节点。
在本实施例中,具体的,本步骤可以参见图7的步骤101,不再赘述。
202、第一终端将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体,其中,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
在本实施例中,具体的,本步骤可以参见图7的步骤102,不再赘述。
203、第一终端接收IDM实体发送的群组的标识、以及第二终端的标识。
在本实施例中,具体的,本步骤可以参见图7的步骤103,不再赘述。
204、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图7的步骤104,不再赘述。
205、第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,在建立了群组之后,第二终端向第一终端发送用于获取私钥的参数,具体来说,第二终端向第一终端发送与第二终端对应的第一半会话密钥参数XA、以及第二终端的标识,其中,第一半会话密钥参数XA用于协商会话密钥。206、第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体。
在本实施例中,具体的,第一终端将与第二终端对应的第一半会话密钥参数XA、以及第二终端的标识,发送给IKMS实体。
207、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在可选的一种实施方式中,步骤207具体包括:IKMS实体根据第二终端的标识,生成与第二终端对应的私钥;IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥;IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在本实施例中,具体的,IKMS实体基于IBS技术,以第二终端的标识为公钥,生成与第二终端的标识对应的私钥SK,该私钥SK为与第二终端对应的私钥;然后,IKMS实体生成第二半会话密钥参数XB,进而IKMS实体根据接收到的与第二终端对应的第一半会话密钥参数XA、以及第二半会话密钥参数XB,生成与该第二终端对应的对称密钥key,该对称密钥key为IKMS实体与第二终端的对称密钥;然后,IKMS实体利用与该第二终端对应的对称密钥key,对与第二终端对应的私钥SK进行加密,生成加密后的与该第二终端对应的私钥(SK) key
208、第一终端接收IKMS实体发送的与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥。
具体来说,在步骤208之后,第一终端接收IKMS实体发送的与第二终端对应的第二半会话密钥参数XB、该第二终端的标识、以及加密后的与该第二终端对应的私钥(SK) key
209、第一终端将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。
在本实施例中,具体的,第一终端将与第二终端对应的第二半会话密钥参数XB、 该第二终端的标识、以及加密后的与该第二终端对应的私钥(SK) key发送给第二终端。进而,第二终端可以对加密后的与该第二终端对应的私钥(SK) key进行解密,进而获取到与该第二终端对应的私钥SK。
图13为本申请实施例提供的另一种私钥生成的方法的通信示意图一,如图13所示,图13为一个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S51、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,本步骤可以参见图8的步骤S11,不再赘述。其中,第一终端M_UE为Master节点,第二终端S_UE为Slave节点。
S52、第一终端将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体,其中,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
在本实施例中,具体的,本步骤可以参见图8的步骤S12,不再赘述。
S53、IDM实体生成群组的标识。
在本实施例中,具体的,本步骤可以参见图8的步骤S13,不再赘述。
S54、IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。
在本实施例中,具体的,本步骤可以参见图8的步骤S14,不再赘述。
S55、IDM实体将生成的群组信息,发送给IKMS实体。
在本实施例中,具体的,本步骤可以参见图8的步骤S15,不再赘述。
S56、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图8的步骤S16,不再赘述。
S57、第二终端将与第二终端对应的第一半会话密钥参数、以及第二终端的标识,发送给第一终端,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,在建立了群组之后,第二终端S_UE向第一终端M_UE发送与第二终端S_UE对应的第一半会话密钥参数XA、以及第二终端的标识S_UE_ID,其中,第一半会话密钥参数XA用于协商会话密钥。
S58、第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体。
在本实施例中,具体的,第一终端M_UE将与第二终端S_UE对应的第一半会话密钥参数XA、以及第二终端的标识S_UE_ID,发送给IKMS实体。
S59、IKMS实体根据第二终端的标识,生成与第二终端对应的私钥。
在本实施例中,具体的,IKMS实体基于IBS技术,以第二终端的标识S_UE_ID为公钥,生成与第二终端的标识S_UE_ID对应的私钥SK,该私钥SK为与第二终端S_UE对应的私钥;
S591、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与 第二终端对应的对称密钥。
在本实施例中,具体的,IKMS实体生成与第二终端S_UE对应的第二半会话密钥参数XB,进而IKMS实体根据接收到的与第二终端S_UE对应的第一半会话密钥参数XA、以及与第二终端S_UE对应的第二半会话密钥参数XB,生成与该第二终端S_UE对应的对称密钥key,该对称密钥key为IKMS实体与第二终端S_UE的对称密钥。
S592、IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在本实施例中,具体的,IKMS实体利用与该第二终端S_UE对应的对称密钥key,对与第二终端S_UE对应的私钥SK进行加密,生成加密后的与该第二终端S_UE对应的私钥(SK) key
S593、IKMS实体将与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,发送给第一终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
具体来说,在步骤208之后,第一终端M_UE接收IKMS实体发送的与第二终端S_UE对应的第二半会话密钥参数XB、该第二终端的标识S_UE_ID、以及加密后的与该第二终端S_UE对应的私钥(SK) key
S594、第一终端将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。
在本实施例中,具体的,第一终端M_UE将与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥(SK) key,发送给第二终端S_UE;进而第二终端S_UE对加密后的与该第二终端S_UE对应的私钥(SK) key进行解密,得到与该第二终端S_UE对应的私钥SK。
在一个第二终端与至少两个第一终端之间进行建立群组之后,可以参照如上步骤S57-S594完成私钥的获取。
图14为本申请实施例提供的另一种私钥生成的方法的通信示意图二,如图14所示,图14为至少两个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S61、每一个第二终端分别向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和该第二终端的标识,群组标识位表征第一终端与该第二终端之间的关系。
在本实施例中,具体的,第一终端M_UE为Master节点,第二终端S_UE为Slave节点。本步骤可以参见图10的步骤S31,不再赘述。
S62、第一终端将群组标识位、第一终端的标识、以及每一个第二终端的标识发送给IDM实体。
在本实施例中,具体的,本步骤可以参见图10的步骤S32,不再赘述。
S63、IDM实体生成群组的标识。
在本实施例中,具体的,本步骤可以参见图10的步骤S33,不再赘述。
S64、IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。
在本实施例中,具体的,本步骤可以参见图10的步骤S34,不再赘述。
S65、IDM实体将生成的群组信息,发送给IKMS实体。
在本实施例中,具体的,本步骤可以参见图10的步骤S35,不再赘述。
S66、第一终端分别向每一个第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图10的步骤S36,不再赘述。
S67、每一个第二终端分别向第一终端发送与该第二终端对应的第一半会话密钥参数、以及该第二终端的标识。
在本实施例中,具体的,在建立了群组之后,每一个第二终端S_UE分别向第一终端M_UE发送与该第二终端S_UE对应的第一半会话密钥参数XA、以及该第二终端的标识S_UE_ID,其中,第一半会话密钥参数XA用于协商会话密钥。
例如,第二终端S_UE1向第一终端M_UE发送与该第二终端S_UE1对应的第一半会话密钥参数XA1、以及该第二终端S_UE1的标识S_UE_ID1;第二终端S_UE2向第一终端M_UE发送与该第二终端S_UE2对应的第一半会话密钥参数XA2、以及该第二终端S_UE2的标识S_UE_ID2。
S68、第一终端将与每一个第二终端对应的第一半会话密钥参数、和每一个第二终端的标识发送给IKMS实体。
在本实施例中,具体的,第一终端M_UE将所有第二终端S_UE的第一半会话密钥参数和标识都添加到一条消息中,然后第一终端M_UE将与每一个第二终端对应的第一半会话密钥参数XA、以及每一个第二终端的标识S_UE_ID,发送给IKMS实体。
例如,第一终端M_UE将与第二终端S_UE1对应的第一半会话密钥参数XA1、第二终端S_UE1的标识S_UE_ID1、与第二终端S_UE2对应的第一半会话密钥参数XA2、以及第二终端S_UE2的标识S_UE_ID2,添加到一条消息中发送给IKMS实体。
S69、IKMS实体根据每一个第二终端的标识,生成与该第二终端对应的私钥。
S691、IKMS实体生成与每一个第二终端对应的第二半会话密钥参数,并根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成与该第二终端对应的对称密钥。
S692、IKMS实体根据与每一个第二终端对应的对称密钥,对与该第二终端对应的私钥进行加密,生成加密后的与该第二终端对应的私钥。
在本实施例中,具体的,针对于每一个第二终端S_UE,IKMS实体从S69、S691到S692执行一遍,得到加密后的与该第二终端对应的私钥(SK) key
例如,IKMS实体基于IBS技术,根据第二终端S_UE1的标识S_UE_ID1生成与第二终端S_UE1对应的私钥SK1,根据第二终端S_UE2的标识S_UE_ID2生成与第二终端S_UE2对应的私钥SK2。然后,IKMS实体生成与第二终端S_UE1对应的第二半会话密钥参数XB1,同时根据接收到的与第二终端S_UE1对应的第一半会话密钥参数XA1,利用XB1和XA1生成与第二终端S_UE1对应的对称密钥key1,然后,IKMS实体根据与第二终端S_UE1对应的对称密钥key1,对与第二终端S_UE1对应的私钥SK2进行加密,生成加密后的与第二终端S_UE1对应的私钥(SK1) key1。并且,IKMS实体生成与第二终端S_UE2对应的第二半会话密钥参数XB2,同时根据接收到的与第 二终端S_UE2对应的第一半会话密钥参数XA2,利用XB2和XA2生成与第二终端S_UE2对应的对称密钥key2,然后,IKMS实体根据与第二终端S_UE2对应的对称密钥key2,对与第二终端S_UE2对应的私钥SK2进行加密,生成加密后的与第二终端S_UE2对应的私钥(SK2) key2
S693、IKMS实体将与每一个第二终端对应的第二半会话密钥参数、每一个第二终端的标识、以及加密后的与每一个第二终端对应的私钥,发送给第一终端。
具体来说,IKMS实体将与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、以及加密后的与每一个第二终端S_UE对应的私钥SK放到一条消息中发送给第一终端,进而第一终端M_UE接收IKMS实体发送的与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、以及加密后的与每一个第二终端S_UE对应的私钥(SK) key
例如,IKMS实体将XB1、S_UE_ID1、(SK1) key1、XB2、S_UE_ID2、以及(SK2) key2,发送给第一终端M_UE。
S694、第一终端将与第二终端对应的第二半会话密钥参数、以及加密后的与该第二终端对应的私钥,发送给该第二终端。
在本实施例中,具体的,第一终端M_UE将与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥SK,发送给该第二终端S_UE,即第一终端M_UE将第二半会话密钥参数和私钥,分别发送给对应的第二终端S_UE。
例如,第一终端M_UE根据S_UE_ID1,将XB1和(SK1) key1发送给对应的第二终端S_UE1;第一终端M_UE根据S_UE_ID2,将XB2和(SK2) key2发送给对应的第二终端S_UE2。
进而每一个第二终端S_UE对加密后的与该第二终端S_UE对应的私钥SK进行解密,得到与该第二终端S_UE对应的私钥SK。例如,第二终端S_UE1对(SK1) key1进行解密,得到与该第二终端S_UE1对应的私钥SK1;第二终端S_UE2对(SK2) key2进行解密,得到与该第二终端S_UE2对应的私钥SK2。
本实施例,通过在建立了群组之后,第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥;第一终端将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体;IKMS实体根据第二终端的标识,生成与第二终端对应的私钥;IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥;IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥;然后,IKMS实体将与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,发送给第一终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥,第一终端再将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。从而提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端 对应的私钥,第二终端通过第一终端接收IKMS实体发送的加密后的与第二终端对应的私钥,第二终端可以较快的获取到加密的与该第二终端对应的私钥,可以保证私钥不被窃取,保证群组之间通信信息不被窃取。
图15为本申请实施例提供的又一种私钥生成的方法的流程示意图,如图15所示,该方法具体如下。
301、第一终端接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
302、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
303、第一终端将第四消息发送给IDM实体,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
304、第一终端接收IDM实体发送的第五消息,其中,第五消息中包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性。
305、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
306、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
307、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
308、第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
309、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
3010、第一终端将第一消息发送给IKMS实体,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。
3011、第一终端接收IKMS实体发送的第二消息,其中,第二消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及第二消息验证码,其中,第二消息验证码用于验证第二消息由IKMS实体发出、且用于验证第二消息的完整性。
3012、第一终端根据第一共享密钥,验证第二消息验证码,其中,第一共享密钥 为第一终端与IKMS实体之间协商的密钥。
3013、第一终端确定第二消息验证码通过验证之后,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
对于图15中的方法,下面采用通信示意图进行介绍。
图16为本申请实施例提供的又一种私钥生成的方法的通信示意图,如图16所示,图16为一个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S71、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,在步骤S71之前,通过初始化工作,第一终端M_UE和第二终端S_UE已经可以接入控制平面,并且第一终端M_UE分别与IDM实体、IKMS实体等网元协商了第二共享密钥K IDM_M、以及第一共享密钥K IKMS_M。具体来说,第一终端M_UE通过HSS/AAA实体与IDM实体协商了第二共享密钥K IDM_M,第一终端M_UE通过HSS/AAA实体与IKMS实体协商了第一共享密钥K IKMS_M
第二终端S_UE与第一终端M_UE建立安全通道,然后,第二终端S_UE在安全通道内向第一终端M_UE发送群组加入请求bonding_request,其中,群组加入请求bonding_request中包括了群组标识位GROUP_FLAG、以及第二终端的标识S_UE_ID,群组标识位GROUP_FLAG表征了第一终端M_UE与第二终端S_UE之间为Master-Slave关系,即第一终端M_UE为Master节点,第二终端S_UE为Slave节点,例如,群组加入请求bonding_request的消息内容为<GROUP_FLAG,S_UE_ID>,S_UE_ID为第二终端S_UE的ID。
S72、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在本实施例中,具体的,第一终端M_UE更新建立群组所需的信息;然后第一终端M_UE利用第二共享密钥K IDM_M,对第四消息进行签名处理,其中,此时的第四消息中包括群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID,生成第三消息验证码MAC1,可知,第三消息验证码MAC1为第一终端M_UE利用第一终端M_UE与IDM实体之间的对称密钥K IDM_M,为整条第四消息所生成的消息验证码。
S73、第一终端将第四消息发送给IDM实体,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
在本实施例中,具体的,第一终端M_UE将第四消息发送给IDM实体。可知第四消息的消息内容中至少包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及第三消息验证码MAC1,且第一终端M_UE与第二终端S_UE的关系为Master-Slave关系。例如,第四消息的消息内容中为<GROUP_FLAG, M_UE_ID,S_UE_ID,MAC1,…>。
S74、IDM实体根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,IDM实体收到第四消息后,验证第三消息验证码MAC1。具体来说,由于IDM实体与第一终端M-UE已经协商了第二共享密钥K IDM_M,进而IDM实体可以根据自身存储的第二共享密钥K IDM_M,对第三消息验证码MAC1进行验证。
S75、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,IDM实体确定第三消息验证码MAC1通过验证之后,IDM实体为第一终端M-UE和第二终端S_UE生成一个群组的标识GROUP_ID。并且,IDM实体保存群组信息,群组信息中包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及群组的标识GROUP_ID。
S76、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,IDM实体根据第二共享密钥K IDM_M,对第五消息进行签名,其中,第五消息中包括了群组的标识GROUP_ID、第一终端的标识M_UE_ID、以及第二终端的标识S_UE_ID,生成第四消息验证码MAC2,可知,第四消息验证码MAC2为第一终端M_UE利用第一终端M_UE与IDM实体之间的对称密钥K IDM_M,为整条第五消息所生成的消息验证码。
S77a、IDM实体将第五消息发送给第一终端,其中,第五消息包括群组的标识、第第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性。
S77b、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,IDM实体将第五消息发送给第一终端,此时的第五消息中至少包括了群组的标识GROUP_ID、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及第四消息验证码MAC2。例如,第五消息的消息内容为<GROUP_ID,M_UE_ID,S_UE_ID,MAC2,…>。
并且,IDM实体将生成的群组信息发送给IKMS实体,其中,群组信息中包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及群组的标识GROUP_ID。
其中,IDM实体将第五消息发送给第一终端的步骤,IDM实体将生成的群组信息发送给IKMS实体的步骤,两者之间的次序不做限定。
S78、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,第一终端M_UE接收到第五消息之后,首先,第一终端M_UE需要验证第四消息验证码MAC2。具体来说,由于IDM实体与第一终端M-UE已经协商了第二共享密钥K IDM_M,进而第一终端M-UE可以根据自身存储的第二共享密钥K IDM_M,对第四消息验证码MAC2进行验证。
S79、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,第一终端M-UE在确定第四消息验证码MAC2通过验证之后,第一终端M-UE可以保存上述群组信息。
S791、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,第一终端M-UE在安全通道内,向第二终端S_UE发送群组加入响应消息bonding_acknowledge,在该群组加入响应消息bonding_acknowledge中包含了群组的标识GROUP_ID,进而通知第二终端S_UE群组建立成功。
以上步骤S71-S791,为一个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S792、第二终端向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,在第二终端S_UE与第一终端M-UE完成群组建立之后,可以可以进行私钥的获取,私钥的获取过程是基于改进的D-H密钥协商协议的。
首先,第二终端S_UE向第一终端M_UE发送与第二终端S_UE对应的第一半会话密钥参数XA、以及第二终端的标识S_UE_ID,其中,第一半会话密钥参数XA用于协商会话密钥。
S793、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在本实施例中,具体的,第一终端M_UE在接收到与第二终端S_UE对应的第一半会话密钥参数XA、以及第二终端的标识S_UE_ID之后,第一终端M_UE利用第一终端M_UE与IKMS实体之间协商的第一共享密钥K IKMS_M,对第一消息进行签名,其中,此时的第一消息中包括了与第二终端S_UE对应的第一半会话密钥参数XA、以及第二终端的标识S_UE_ID,生成第一消息验证码MAC3。
S794、第一终端将第一消息发送给IKMS实体,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。
在本实施例中,具体的,第一终端M_UE将签名后的第一消息,发送给IKMS实体,此时的第一消息中包括了与第二终端S_UE对应的第一半会话密钥参数XA、第二终端的标识S_UE_ID、以及第一消息验证码MAC3。例如,第一消息的消息内容为<XA,S_UE_ID,MAC3>。
S795、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据第二终端的标识,生成与第二终端对应的私钥。
在本实施例中,具体的,IKMS实体接收到第一终端M_UE发送的第一消息之后, 首先,IKMS实体验证第一消息验证码MAC3,具体来说,由于第一终端M_UE与IKMS实体协商了第一共享密钥K IKMS_M,从而IKMS实体可以根据第一共享密钥K IKMS_M对第一消息验证码MAC3进行验证。
IKMS实体在确定第一消息验证码MAC3通过验证之后,IKMS实体基于IBS技术以第二终端的标识S_UE_ID为公钥,为第二终端的标识S_UE_ID生成私钥SK,即该私钥SK为与第二终端S_UE对应的私钥SK。
S796、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥。
在本实施例中,具体的,IKMS实体生成与第二终端S_UE对应的第二半会话密钥参数XB;并且,IKMS实体根据与第二终端S_UE对应的第一半会话密钥参数XA、以及与第二终端S_UE对应的第二半会话密钥参数XB,生成与第二终端S_UE对应的对称密钥key,该对称密钥key为第二终端S_UE与IKMS实体之间的对称密钥。
S797、IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,IKMS实体根据与第二终端S_UE对应的对称密钥key,对与第二终端S_UE对应的私钥SK进行加密,生成的加密后的与第二终端S_UE对应的私钥(SK) key
S798、IKMS实体根据第一共享密钥,生成第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,IKMS实体利用第一共享密钥K IKMS_M,对第二消息进行签名,此时的第二消息中包括了与第二终端S_UE对应的第二半会话密钥参数XB、第二终端的标识S_UE_ID、以及加密后的与第二终端S_UE对应的私钥(SK) key,生成第二消息验证码MAC4。
S799、IKMS实体将第二消息发送给第一终端,其中,第二消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及第二消息验证码,其中,第二消息验证码用于验证第二消息由IKMS实体发出、且用于验证第二消息的完整性。
在本实施例中,具体的,IKMS实体携带了第二消息验证码MAC4的第二消息发送给第一终端M_UE,此时的第二消息中包括了与第二终端S_UE对应的第二半会话密钥参数XB、第二终端的标识S_UE_ID、加密后的与第二终端S_UE对应的私钥(SK) key、以及第二消息验证码MAC4。例如,第二消息的消息内容为<XB,S_UE_ID,(SK) key,MAC4>。
S710、第一终端根据第一共享密钥,验证第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,第一终端M_UE接收到第二消息之后,首先第一终端M_UE验证第二消息验证码MAC4,具体来说,由于第一终端M_UE与IKMS实体协商了第一共享密钥K IKMS_M,从而第一终端M_UE可以利用第一共享密钥K IKMS_M对第二消息验证码MAC4进行验证。
S711、第一终端确定第二消息验证码通过验证之后,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在本实施例中,具体的,第一终端M_UE确定第二消息验证码MAC4通过验证之后,第一终端M_UE根据第二终端的标识S_UE_ID,将与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与第二终端S_UE对应的私钥(SK) key发送给第二终端S_UE。例如,第一终端M_UE将消息内容<XB,(SK)key>发送给第二终端S_UE。
S712、第二终端根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,第二终端S_UE接收到与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与第二终端S_UE对应的私钥(SK) key之后,第二终端S_UE首先根据自身产生的第二终端S_UE对应的第一半会话密钥参数XA、以及接收到的与第二终端S_UE对应的第二半会话密钥参数XB,计算出一个对称密钥key。
S713、第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在本实施例中,具体的,第二终端S_UE根据计算出的对称密钥key,对加密后的与第二终端S_UE对应的私钥(SK) key进行解密,得到与第二终端S_UE对应的私钥SK。从而,完成了第二终端S_UE的初始密钥获取。
图17为本申请实施例提供的又一种私钥生成的方法的通信示意图二,如图17所示,图17为至少两个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S81、每一个第二终端分别向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,在步骤S81之前,通过初始化工作,第一终端M_UE和第二终端S_UE已经可以接入控制平面,并且第一终端M_UE与IDM实体、IKMS实体等网元协商了第二共享密钥K IDM_M、以及第一共享密钥K IKMS_M。具体来说,第一终端M_UE通过HSS/AAA实体与IDM实体协商了第二共享密钥K IDM_M,第一终端M_UE通过HSS/AAA实体与IKMS实体协商了第一共享密钥K IKMS_M
每一个第二终端S_UE分别与第一终端M_UE建立安全通道,然后,每一个第二终端S_UE在各自的安全通道内分别向第一终端M_UE发送群组加入请求bonding_request,其中,群组加入请求bonding_request中包括了群组标识位GROUP_FLAG、以及该第二终端的标识S_UE_ID,群组标识位GROUP_FLAG表征了第一终端M_UE与该第二终端S_UE之间为Master-Slave关系,即第一终端M_UE为Master节点,该第二终端S_UE为Slave节点,例如,第二终端S_UE向第一终端M_UE发送的群组加入请求bonding_request的消息内容为<GROUP_FLAG,S_UE_ID1>,S_UE_ID1为第二终端S_UE1的ID。
S82、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、 以及用于加密数据的第四密钥。
在本实施例中,具体的,第一终端M_UE更新建立群组所需的信息;然后第一终端M_UE利用第二共享密钥K IDM_M,对第四消息进行签名处理,其中,此时的第四消息中包括群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID,生成第三消息验证码MAC1,可知,第三消息验证码MAC1为第一终端M_UE利用第一终端M_UE与IDM实体之间的对称密钥K IDM_M,为整条第四消息所生成的消息验证码。
S83、第一终端将第四消息发送给IDM实体,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
在本实施例中,具体的,第一终端M_UE将第四消息发送给IDM实体。可知第四消息的消息内容中至少包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及第三消息验证码MAC1,且第一终端M_UE与第二终端S_UE的关系为Master-Slave关系。例如,第四消息的消息内容中为<GROUP_FLAG,M_UE_ID,S_UE_ID1,S_UE_ID2,MAC1…..>,其中,S_UE_ID1为第二终端S_UE1的ID,S_UE_ID2第二终端S_UE2的ID。
S84、IDM实体根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,IDM实体收到第四消息后,验证第三消息验证码MAC1。具体来说,由于IDM实体与第一终端M-UE已经协商了第二共享密钥K IDM_M,进而IDM实体可以根据自身存储的第二共享密钥K IDM_M,对第三消息验证码MAC1进行验证。
S85、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,IDM实体确定第三消息验证码MAC1通过验证之后,IDM实体为第一终端M-UE和各第二终端S_UE生成一个群组的标识GROUP_ID。并且,IDM实体保存群组信息,群组信息中包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及群组的标识GROUP_ID。例如,群组信息中包括了GROUP_FLAG、M_UE_ID、S_UE_ID1、S_UE_ID2、GROUP_ID等信息。
S86、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,IDM实体根据第二共享密钥K IDM_M,对第五消息进行签名,其中,第五消息中包括了群组的标识GROUP_ID、第一终端的标识M_UE_ID、以及每一个第二终端的标识S_UE_ID,生成第四消息验证码MAC2,可知,第四消息验证码MAC2为第一终端M_UE利用第一终端M_UE与IDM实体之间的对称密钥K IDM_M,为整条第五消息所生成的消息验证码。
S87a、IDM实体将第五消息发送给第一终端,其中,第五消息包括群组的标识、第一终端的标识、每一个第二终端的标识、以及第四消息验证码。
S87b、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标 识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,IDM实体将第五消息发送给第一终端,此时的第五消息中至少包括了群组的标识GROUP_ID、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及第四消息验证码MAC2。例如,第五消息的消息内容为<GROUP_ID,M_UE_ID,S_UE_ID1,S_UE_ID2,MAC2…..>,其中,S_UE_ID1为第二终端S_UE1的ID,S_UE_ID2第二终端S_UE2的ID。
并且,IDM实体将生成的群组信息发送给IKMS实体,其中,群组信息中包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及群组的标识GROUP_ID。
其中,IDM实体将第五消息发送给第一终端的步骤,IDM实体将生成的群组信息发送给IKMS实体的步骤,两者之间的次序不做限定。
S88、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,第一终端M_UE接收到第五消息之后,首先,第一终端M_UE需要验证第四消息验证码MAC2。具体来说,由于IDM实体与第一终端M-UE已经协商了第二共享密钥K IDM_M,进而第一终端M-UE可以根据自身存储的第二共享密钥K IDM_M,对第四消息验证码MAC2进行验证。
S89、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及每一个第二终端的标识。
在本实施例中,具体的,第一终端M-UE在确定第四消息验证码MAC2通过验证之后,第一终端M-UE可以保存上述群组信息。例如,第一终端M-UE添加群组成员S_UE_ID1,S_UE_ID2。
S891、第一终端分别向每一个第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,第一终端M-UE在安全通道内,分别向每一个第二终端S_UE发送群组加入响应消息bonding_acknowledge,在该群组加入响应消息bonding_acknowledge中包含了群组的标识GROUP_ID,进而通知第二终端S_UE群组建立成功。例如,第一终端M-UE向第二终端S_UE1发送群组加入响应消息bonding_acknowledge,同时,第一终端M-UE向第二终端S_UE2发送群组加入响应消息bonding_acknowledge。
以上步骤S81-S891,为多个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S892、每一个第二终端分别向第一终端发送与该第二终端对应的第一半会话密钥参数、以及该第二终端的标识。
在本实施例中,具体的,在各第二终端S_UE与第一终端M-UE完成群组建立之后,可以可以进行私钥的获取,私钥的获取过程是基于改进的D-H密钥协商协议的。
首先,每一个第二终端S_UE分别向第一终端M_UE发送与该第二终端S_UE对应的第一半会话密钥参数XA、以及该第二终端的标识S_UE_ID,其中,第一半会话密钥参数XA用于协商会话密钥。
例如,第二终端的个数为两个时候,第二终端S_UE1向第一终端M_UE发送获取与第二终端S_UE1对应的半会话密钥参数XA1、该第二终端的标识S_UE_ID1;第二终端S_UE2向第一终端M_UE发送获取与第二终端S_UE2对应的半会话密钥参数XA2、该第二终端的标识S_UE_ID2。
S893、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在本实施例中,具体的,第一终端M_UE将与每一个第二终端S_UE对应的第一半会话密钥参数XA、以及每一个第二终端的标识S_UE_ID添加到一条第一消息中。然后,第一终端M_UE利用第一终端M_UE与IKMS实体之间协商的第一共享密钥K IKMS_M,对第一消息进行签名,其中,此时的第一消息中包括了与每一个第二终端S_UE对应的第一半会话密钥参数XA、以及每一个第二终端的标识S_UE_ID,生成第一消息验证码MAC3。
S894、第一终端将第一消息发送给IKMS实体,其中,第一消息包括与每一个第二终端对应的第一半会话密钥参数、每一个第二终端的标识、以及第一消息验证码。
在本实施例中,具体的,第一终端M_UE将签名后的第一消息,发送给IKMS实体,此时的第一消息中包括了与每一个第二终端S_UE对应的第一半会话密钥参数XA、每一个第二终端的标识S_UE_ID、以及第一消息验证码MAC3。
例如,第二终端的个数为两个时候,第一消息的消息内容为<XA1,S_UE_ID1,XA2,S_UE_ID2,MAC3>。
S895、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据每一个第二终端的标识,生成与该第二终端对应的私钥。
在本实施例中,具体的,IKMS实体接收到第一终端M_UE发送的第一消息之后,首先,IKMS实体验证第一消息验证码MAC3,具体来说,由于第一终端M_UE与IKMS实体协商了第一共享密钥K IKMS_M,从而IKMS实体可以根据第一共享密钥K IKMS_M对第一消息验证码MAC3进行验证。
IKMS实体在确定第一消息验证码MAC3通过验证之后,IKMS实体基于IBS技术以第二终端的标识S_UE_ID为公钥,为每一个第二终端的标识S_UE_ID分别生成一个私钥SK,即该每一个私钥SK为与一个第二终端S_UE对应的私钥SK。
例如,第二终端的个数为两个时候,IKMS实体基于IBS技术,根据第二终端的标识S_UE_ID1为其生成与第二终端S_UE1对应的私钥SK1,根据第二终端的标识S_UE_ID2为其生成与第二终端S_UE2对应的私钥SK2。
S896、IKMS实体生成与每一个第二终端对应的第二半会话密钥参数,并根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成与该第二终端对应的对称密钥。
在本实施例中,具体的,IKMS实体生成与每一个第二终端S_UE对应的第二半会话密钥参数XB;并且,IKMS实体根据与该第二终端S_UE对应的第一半会话密钥参 数XA、以及与该第二终端S_UE对应的第二半会话密钥参数XB,生成与该第二终端S_UE对应的对称密钥key,该对称密钥key为该第二终端S_UE与IKMS实体之间的对称密钥。
S897、IKMS实体根据与每一个第二终端对应的对称密钥,对与该第二终端对应的私钥进行加密,生成加密后的与该第二终端对应的私钥。
在本实施例中,具体的,IKMS实体根据与每一个第二终端S_UE对应的对称密钥key,对与该第二终端S_UE对应的私钥SK进行加密,生成的加密后的与该第二终端S_UE对应的私钥(SK) key
例如,第二终端的个数为两个时候,IKMS实体为第二终端S_UE1生成第二半会话密钥参数XB1,同时根据收到的XA1,利用XA1和XB1生成IKMS与第二终端S_UE1之间的对称密钥key1,然后,IKMS实体采用此密钥key1加密该私钥SK1;IKMS实体为第二终端S_UE2生成第二半会话密钥参数XB2,同时根据收到的XA2,利用XA2和XB2生成IKMS与第二终端S_UE2之间的对称密钥key2,然后,IKMS实体采用此密钥key2加密该私钥SK2。
S898、IKMS实体根据第一共享密钥,生成第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,IKMS实体将与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、以及加密后的与每一个第二终端S_UE对应的私钥(SK) key放入到一条第二消息中。然后,IKMS实体利用第一共享密钥K IKMS_M,对第二消息进行签名,此时的第二消息中包括了与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、以及加密后的与每一个第二终端S_UE对应的私钥(SK) key,生成第二消息验证码MAC4。
S899、IKMS实体将第二消息发送给第一终端,其中,第二消息包括与每一个第二终端对应的第二半会话密钥参数、每一个第二终端的标识、加密后的与每一个第二终端对应的私钥、以及第二消息验证码。
在本实施例中,具体的,IKMS实体携带了第二消息验证码MAC4的第二消息发送给第一终端M_UE,此时的第二消息中包括了与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、加密后的与每一个第二终端S_UE对应的私钥(SK) key、以及第二消息验证码MAC4。
例如,IKMS实体将第二半会话密钥参数XB1、第二终端S_UE1的标识S_UE_ID1、加密后的私钥(SK1) key1、第二半会话密钥参数XB2、第二终端S_UE2的标识S_UE_ID2、加密后的私钥(SK2) key2、以及消息验证码MAC4,完整的发送给第一终端M_UE,即消息内容包括<XB1,S_UE_ID1,(SK1) key1,XB2,S_UE_ID2,(SK2) key2,MAC4>。
S810、第一终端根据第一共享密钥,验证第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,第一终端M_UE接收到第二消息之后,首先第一终端M_UE验证第二消息验证码MAC4,具体来说,由于第一终端M_UE与IKMS实体协商了第一共享密钥K IKMS_M,从而第一终端M_UE可以利用第一共享密钥K IKMS_M对第二消息验证码MAC4进行验证。
S811、第一终端确定第二消息验证码通过验证之后,将与每一个第二终端对应的第二半会话密钥参数、以及加密后的与该第二终端对应的私钥,发送给该第二终端。
在本实施例中,具体的,第一终端M_UE确定第二消息验证码MAC4通过验证之后,第一终端M_UE根据第二终端的标识S_UE_ID,将与该第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥(SK) key发送给该第二终端S_UE。
例如,第一终端M_UE将与第二终端S_UE1对应的第二半会话密钥参数XB1、加密后的与该第二终端S_UE1对应的私钥(SK1) key1发送给该第二终端S_UE1,即第一终端M_UE将消息<XB1,(SK1) key1>发送给第二终端S_UE1;第一终端M_UE将与第二终端S_UE2对应的第二半会话密钥参数XB2、加密后的与该第二终端S_UE2对应的私钥(SK2) key2发送给该第二终端S_UE2,即第一终端M_UE将消息<XB2,(SK2) key2>发送给第二终端S_UE2。
S812、每一个第二终端根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,每一个第二终端S_UE接收到与该第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥(SK) key之后,该第二终端S_UE首先根据自身产生的该第二终端S_UE对应的第一半会话密钥参数XA、以及接收到的与该第二终端S_UE对应的第二半会话密钥参数XB,计算出一个对称密钥key。
S813、每一个第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在本实施例中,具体的,每一个第二终端S_UE根据计算出的对称密钥key,对加密后的与该第二终端S_UE对应的私钥(SK) key进行解密,得到与该第二终端S_UE对应的私钥SK。从而,完成了每一个第二终端S_UE的初始密钥获取。
例如,第二终端S_UE1收到消息后,首先根据收到的与该第二终端S_UE1对应的第二半会话密钥参数XB1、与自身产生的第一半会话密钥参数XA1计算生成一个对称密钥key1;然后第二终端S_UE1利用密钥key1解密(SK1) key1,进而获得与第二终端S_UE1对应的私钥SK1,至此,完成第二终端S_UE1的初始密钥获取。第二终端S_UE2收到消息后,首先根据收到的与该第二终端S_UE2对应的第二半会话密钥参数XB2、与自身产生的第一半会话密钥参数XA2计算生成一个对称密钥key2;然后第二终端S_UE2利用密钥key2解密(SK2) key2,进而获得与第二终端S_UE2对应的私钥SK2,至此,完成第二终端S_UE2的初始密钥获取。
可知,步骤S892-S813是基于对称密钥机制的。
本实施例,通过由第二终端触发去进行群组的建立,并且由第一终端向IDM实体发送群组标识位等信息,进而由第一终端确定是否进行群组的建立,从而第一终端与第二终端之间是可信的,提高了对群组中的网元之间的信任度和安全性;进而基于第二终端主动发送群组建立请求,从而可以构建出的群组的特征是多样的。并且,提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,第二终端通过第一 终端接收IKMS实体发送的加密后的与第二终端对应的私钥,第二终端可以较快的获取到加密的与该第二终端对应的私钥,可以保证私钥不被窃取,保证群组之间通信信息不被窃取。
图18为本申请实施例提供的再一种私钥生成的方法的流程示意图,如图18所示,该方法具体如下。
401、第一终端接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
402、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
403、第一终端根据第二共享密钥,对第四消息进行加密,得到加密后的第四消息,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性;第一终端将加密后的第四消息,发送给IDM实体。
404、第一终端接收IDM实体发送的加密后的第五消息,其中,第五消息中包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性;第一终端根据第二共享密钥对加密后的第五消息进行解密,得到第五消息。
405、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
406、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
407、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
408、第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
409、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
4010、第一终端根据第一共享密钥,对第一消息进行加密,得到加密后的第一消息,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性;第一终端将加密后的第一消息发送给IKMS实体。
4011、第一终端接收IKMS实体发送的加密后的第二消息,其中,第二消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应 的私钥、以及第二消息验证码,其中,第二消息验证码用于验证第二消息由IKMS实体发出、且用于验证第二消息的完整性;第一终端根据第一共享密钥,对加密后的第二消息进行解密,得到第二消息。
4012、第一终端根据第一共享密钥,验证第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
4013、第一终端确定第二消息验证码通过验证之后,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
对于图18中的方法,下面采用通信示意图进行介绍。
图19为本申请实施例提供的再一种私钥生成的方法的通信示意图,如图19所示,图19为一个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S91、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,本步骤可以参见图16的步骤S71,不再赘述。
S92、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S72,不再赘述。
S93、第一终端根据第二共享密钥,对第四消息进行加密,得到加密后的第四消息,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
在本实施例中,具体的,第一终端M_UE将群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及第三消息验证码MAC1放到一条第四消息中;然后,第一终端M_UE根据第二共享密钥K IDM_M,对第四消息进行加密,得到加密后的第四消息。第二共享密钥K IDM_M是一种对称密钥。
例如,加密后的第四消息为消息内容为<(GROUP_FLAG,M_UE_ID,S_UE_ID,MAC1)K IDM_M>,其中,GROUP_FLAG为群组标识位,第一终端M_UE与第二终端S_UE的关系为Master-Slave关系,M_UE_ID为第一终端M_UE的ID,S_UE_ID为第二终端S_UE的ID,MAC1为使用第二共享密钥K IDM_M为整条第四消息产生第三消息验证码。
S94、第一终端将加密后的第四消息,发送给IDM实体。
S95、IDM实体根据第二共享密钥,对加密后的第四消息进行解密,得到第四消息,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,IDM实体接收到加密后的第四消息之后,由于IDM实体与第一终端M-UE已经协商了第二共享密钥K IDM_M,从而IDM实体根据第二共享密钥K IDM_M对加密后的第四消息进行解密,得到第四消息,进而IDM实体可以获取到 群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及第三消息验证码MAC1。
S96、IDM实体根据第二共享密钥,验证第三消息验证码。
在本实施例中,具体的,IDM实体在解密了第四消息之后可以获取到第三消息验证码MAC1,IDM实体需要验证第三消息验证码MAC1。具体来说,由于IDM实体与第一终端M-UE已经协商了第二共享密钥K IDM_M,进而IDM实体可以根据自身存储的第二共享密钥K IDM_M,对第三消息验证码MAC1进行验证。
S97、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S75,不再赘述。
S98、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S76,不再赘述。
S99、IDM实体根据第二共享密钥,对第五消息进行加密,生成加密后的第五消息,其中,第五消息包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性。
在本实施例中,具体的,IDM实体将群组的标识GROUP_ID、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及第四消息验证码MAC2放到一条第五消息中;然后,IDM实体根据第二共享密钥K IDM_M,对第五消息进行加密,得到加密后的第五消息。
例如,第五消息中包括<(GROUP_ID,M_UE_ID,S_UE_ID,MAC2)K IDM_M>。其中,GROUP_ID为群组的标识,M_UE_ID为第一终端M_UE的ID,S_UE_ID为第二终端S_UE的ID,MAC2为使用第二共享密钥K IDM_M为整条第五消息产生消息验证码,并且为整条第二信息使用第一终端M_UE与IDM实体之间的对称密钥K IDM_M加密。
S991a、IDM实体将加密后的第五消息,发送给第一终端。
S991b、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,IDM实体将加密后的第五消息发送给第一终端,并且,IDM实体将生成的群组信息发送给IKMS实体,其中,群组信息中包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及群组的标识GROUP_ID。
其中,IDM实体将加密后的第五消息发送给第一终端的步骤,IDM实体将生成的群组信息发送给IKMS实体的步骤,两者之间的次序不做限定。
S992、第一终端根据第二共享密钥对加密后的第五消息进行解密,得到第五消息。
在本实施例中,具体的,第一终端M_UE根据第二共享密钥K IDM_M对加密后的第五消息进行解密,得到群组的标识GROUP_ID、第一终端的标识M_UE_ID、第二终端的标识S_UE_ID、以及第四消息验证码MAC2。
S993、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S78,不再赘述。
S994、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S79,不再赘述。
S995、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S791,不再赘述。
以上步骤S91-S995,为一个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S996、第二终端向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S792,不再赘述。
S997、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S793,不再赘述。
S998、第一终端根据第一共享密钥,对第一消息进行加密,得到加密后的第一消息,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。
在本实施例中,具体的,第一终端M_UE将与第二终端S_UE对应的第一半会话密钥参数XA、第二终端的标识S_UE_ID、以及第一消息验证码MAC3放入到一条第一消息中;然后,第一终端M_UE根据第一共享密钥K IKMS_M对第一消息进行加密,得到加密后的第一消息。其中,第一共享密钥K IKMS_M是一种对称密钥。
例如,第一消息的消息内容为<(XA,S_UE_ID,MAC3)K IKMS_M>。
S999、第一终端将加密后的第一消息发送给IKMS实体。
S9910、IKMS实体根据第一共享密钥,对加密后的第一消息进行解密,得到第一消息。
在本实施例中,具体的,IKMS实体根据第一共享密钥K IKMS_M,对加密后的第一消息进行解密,得到与第二终端S_UE对应的第一半会话密钥参数XA、第二终端的标识S_UE_ID、以及第一消息验证码MAC3。
S9911、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据第二终端的标识,生成与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S795,不再赘述。
S9912、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S796,不再赘述。
S9913、IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S797,不再赘述。
S9914、IKMS实体根据第一共享密钥,生成第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S798,不再赘述。
S9915、IKMS实体根据第一共享密钥,对第二消息进行加密,生成加密后的第二消息,其中,第二消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及第二消息验证码,其中,第二消息验证码用于验证第二消息由IKMS实体发出、且用于验证第二消息的完整性。
在本实施例中,具体的,IKMS实体将与第二终端S_UE对应的第二半会话密钥参数XB、第二终端的标识S_UE_ID、加密后的与第二终端S_UE对应的私钥(SK) key、以及第二消息验证码MAC4放到一条第二消息中;然后,IKMS实体根据第一共享密钥K IKMS_M,对第二消息进行加密,生成加密后的第二消息。
例如,加密后的第二消息为<(XB,S_UE_ID,(SK)key,MAC4)K IKMS_M>。
S9916、IKMS实体将加密后的第二消息,发送给第一终端。
S9917、第一终端根据第一共享密钥,对加密后的第二消息进行解密,得到第二消息。
在本实施例中,具体的,第一终端M_UE根据第一共享密钥K IKMS_M,对加密后的第二消息进行解密,得到与第二终端S_UE对应的第二半会话密钥参数XB、第二终端的标识S_UE_ID、加密后的与第二终端S_UE对应的私钥(SK) key、以及第二消息验证码MAC4。
S9918、第一终端根据第一共享密钥,验证第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,第一终端M_UE对加密后的第二消息进行解密之后可以获取到第二消息验证码MAC4,第一终端M_UE需要验证第二消息验证码MAC4,具体来说,由于第一终端M_UE与IKMS实体协商了第一共享密钥K IKMS_M,从而第一终端M_UE可以利用第一共享密钥K IKMS_M对第二消息验证码MAC4进行验证。
S9919、第一终端确定第二消息验证码通过验证之后,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S711,不再赘述。
S9920、第二终端根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S712,不再赘述。
S9921、第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S713,不再赘述。
图20为本申请实施例提供的再一种私钥生成的方法的通信示意图二,如图20所示,图20为至少两个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S1101、每一个第二终端分别向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,本步骤可以参见图17的步骤S81,不再赘述。
S1102、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S82,不再赘述。
S1103、第一终端根据第二共享密钥,对第四消息进行加密,得到加密后的第四消息,其中,第四消息包括群组标识位、第一终端的标识、每一个第二终端的标识、以及第三消息验证码。
在本实施例中,具体的,第一终端M_UE将群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及第三消息验证码MAC1放到一条第四消息中;然后,第一终端M_UE根据第二共享密钥K IDM_M,对第四消息进行加密,得到加密后的第四消息。第二共享密钥K IDM_M是一种对称密钥。
例如,加密后的第四消息为消息内容为<(GROUP_FLAG,M_UE_ID,S_UE_ID1,S_UE_ID2,MAC1)K IDM_M..>,其中,GROUP_FLAG为群组标识位,第一终端M_UE与第二终端S_UE的关系为Master-Slave关系,M_UE_ID为第一终端M_UE的ID,S_UE_ID1为第二终端S_UE1的ID,S_UE_ID2为第二终端S_UE2的ID,MAC1为使用第二共享密钥K IDM_M为整条第四消息产生第三消息验证码。
S1104、第一终端将加密后的第四消息,发送给IDM实体。
S1105、IDM实体根据第二共享密钥,对加密后的第四消息进行解密,得到第四消息,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,IDM实体接收到加密后的第四消息之后,由于IDM实体与第一终端M-UE已经协商了第二共享密钥K IDM_M,从而IDM实体根据第二共享密钥K IDM_M对加密后的第四消息进行解密,得到第四消息,进而IDM实体可以获取到群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及第三消息验证码MAC1。
S1106、IDM实体根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S84,不再赘述。
S1107、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S85,不再赘述。
S1108、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S86,不再赘述。
S1109、IDM实体根据第二共享密钥,对第五消息进行加密,生成加密后的第五消息,其中,第五消息包括群组的标识、第一终端的标识、每一个第二终端的标识、以及第四消息验证码。
在本实施例中,具体的,IDM实体将群组的标识GROUP_ID、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及第四消息验证码MAC2放到一条第五消息中;然后,IDM实体根据第二共享密钥K IDM_M,对第五消息进行加密,得到加密后的第五消息。
例如,第五消息中包括<(GROUP_ID,M_UE_ID,S_UE_ID1,S_UE_ID2,MAC2)K IDM_M>。其中,GROUP_ID为群组的标识,M_UE_ID为第一终端M_UE的ID,S_UE_ID1为第二终端S_UE1的ID,S_UE_ID2为第二终端S_UE2的ID,MAC2为使用第二共享密钥K IDM_M为整条第五消息产生消息验证码,并且为整条第二信息使用第一终端M_UE与IDM实体之间的对称密钥K IDM_M加密。
S1110a、IDM实体将加密后的第五消息,发送给第一终端。
S1110b、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及每一个第二终端的标识。
在本实施例中,具体的,IDM实体将加密后的第五消息发送给第一终端,并且,IDM实体将生成的群组信息发送给IKMS实体,其中,群组信息中包括了群组标识位GROUP_FLAG、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及群组的标识GROUP_ID。
其中,IDM实体将加密后的第五消息发送给第一终端的步骤,IDM实体将生成的群组信息发送给IKMS实体的步骤,两者之间的次序不做限定。
S1111、第一终端根据第二共享密钥对加密后的第五消息进行解密,得到第五消息。
在本实施例中,具体的,第一终端M_UE根据第二共享密钥K IDM_M对加密后的第五消息进行解密,得到群组的标识GROUP_ID、第一终端的标识M_UE_ID、每一个第二终端的标识S_UE_ID、以及第四消息验证码MAC2。
S1112、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S88,不再赘述。
S1113、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及每一个第二终端的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S89,不再赘述。
S1114、第一终端分别向每一个第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S891,不再赘述。
以上步骤S1101-S1114,为多个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S1115、每一个第二终端分别向第一终端发送与该第二终端对应的第一半会话密钥参数、以及该第二终端的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S892,不再赘述。
S1116、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S893,不再赘述。
S1117a、第一终端根据第一共享密钥,对第一消息进行加密,得到加密后的第一消息,其中,第一消息包括与每一个第二终端对应的第一半会话密钥参数、每一个第二终端的标识、以及第一消息验证码。
在本实施例中,具体的,第一终端M_UE将与每一个第二终端S_UE对应的第一半会话密钥参数XA、每一个第二终端的标识S_UE_ID、以及第一消息验证码MAC3放入到一条第一消息中;然后,第一终端M_UE根据第一共享密钥K IKMS_M对第一消息进行加密,得到加密后的第一消息。其中,第一共享密钥K IKMS_M是一种对称密钥。
例如,第二终端的个数为两个时候,第一消息的消息内容为<(XA1,S_UE_ID1,XA2,S_UE_ID2,MAC3)K IKMS_M>,其中,XA1为与第二终端S_UE1对应的第一半会话密钥参数,S_UE_ID1为第二终端S_UE1的ID,XA2为与第二终端S_UE2对应的第一半会话密钥参数,S_UE_ID2为第二终端S_UE2的ID,MAC3为第一终端M_UE利用第一共享密钥K IKMS_M为整条第一消息生成消息验证码。
S1117b、第一终端将加密后的第一消息,发送给IKMS实体。
S1118、IKMS实体根据第一共享密钥,对加密后的第一消息进行解密,得到第一消息。
在本实施例中,具体的,IKMS实体根据第一共享密钥K IKMS_M,对加密后的第一消息进行解密,得到与每一个第二终端S_UE对应的第一半会话密钥参数XA、每一个第二终端的标识S_UE_ID、以及第一消息验证码MAC3。
S1119、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据每一个第二终端的标识,生成与该第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S895,不再赘述。
S1120、IKMS实体生成与每一个第二终端对应的第二半会话密钥参数,并根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成与该第二终端对应的对称密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S896,不再赘述。
S1121、IKMS实体根据与每一个第二终端对应的对称密钥,对与该第二终端对应的私钥进行加密,生成加密后的与该第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S897,不再赘述。
S1122、IKMS实体根据第一共享密钥,生成第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S898,不再赘述。
S1123、IKMS实体根据第一共享密钥,对第二消息进行加密,生成加密后的第二 消息,其中,第二消息包括与每一个第二终端对应的第二半会话密钥参数、每一个第二终端的标识、加密后的与每一个第二终端对应的私钥、以及第二消息验证码。
在本实施例中,具体的,IKMS实体将与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、加密后的与每一个第二终端S_UE对应的私钥(SK) key、以及第二消息验证码MAC4放到一条第二消息中;然后,IKMS实体根据第一共享密钥K IKMS_M,对第二消息进行加密,生成加密后的第二消息。
例如,第二终端的个数为两个时候,加密后的第二消息为<(XB1,S_UE_ID1,(SK1) key1,XB2,S_UE_ID2,(SK2) key2,MAC4)K IKMS_M>,其中,XB1为与第二终端S_UE1对应的第二半会话密钥参数,S_UE_ID1为第二终端S_UE1的ID,(SK1) key1为加密后的与第二终端S_UE1对应的私钥,XB2为与第二终端S_UE2对应的第二半会话密钥参数,S_UE_ID2为第二终端S_UE2的ID,(SK2) key2为加密后的与第二终端S_UE2对应的私钥,MAC4为第一终端M_UE利用第一共享密钥K IKMS_M为整条第二消息生成消息验证码。
S1124、IKMS实体将加密后的第二消息,发送给第一终端。
S1125、第一终端根据第一共享密钥,对加密后的第二消息进行解密,得到第二消息。
在本实施例中,具体的,第一终端M_UE根据第一共享密钥K IKMS_M,对加密后的第二消息进行解密,得到与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、加密后的与每一个第二终端S_UE对应的私钥(SK) key、以及第二消息验证码MAC4。
S1126、第一终端根据第一共享密钥,验证第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,第一终端M_UE对加密后的第二消息进行解密之后可以获取到第二消息验证码MAC4,第一终端M_UE需要验证第二消息验证码MAC4,具体来说,由于第一终端M_UE与IKMS实体协商了第一共享密钥K IKMS_M,从而第一终端M_UE可以利用第一共享密钥K IKMS_M对第二消息验证码MAC4进行验证。
S1127、第一终端确定第二消息验证码通过验证之后,将与每一个第二终端对应的第二半会话密钥参数、以及加密后的与该第二终端对应的私钥,发送给该第二终端。
在本实施例中,具体的,本步骤可以参见图17的步骤S811,不再赘述。
S1128、每一个第二终端根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S812,不再赘述。
S1129、每一个第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S813,不再赘述。
可知,步骤S1115-S1129是基于对称密钥机制的。
本实施例,通过由第二终端触发去进行群组的建立,并且由第一终端向IDM实体发送群组标识位等信息,进而由第一终端确定是否进行群组的建立,从而第一终端与第二终端之间是可信的,提高了对群组中的网元之间的信任度和安全性;进而基于第 二终端主动发送群组建立请求,从而可以构建出的群组的特征是多样的。并且,提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,第二终端通过第一终端接收IKMS实体发送的加密后的与第二终端对应的私钥,第二终端可以较快的获取到加密的与该第二终端对应的私钥,可以保证私钥不被窃取,保证群组之间通信信息不被窃取。并且在第四消息、第五消息、第一消息、第二消息的收发过程中进行加密处理,以避免以上消息被其他非法设备所窃取。
图21为本申请实施例提供的还一种私钥生成的方法的流程示意图,如图21所示,该方法具体如下。
501、第一终端接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
502、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
503、第一终端将第四消息发送给IDM实体,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
504、第一终端接收IDM实体发送的第五消息,其中,第五消息中包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性。
505、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
506、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
507、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
508、第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
509、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
5010、第一终端将第一消息发送给IKMS实体,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。
5011、第一终端接收IKMS实体发送的第三消息,其中,第三消息包括与第二终 端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。
5012、第一终端根据IKMS实体的公钥,验证与第二终端对应的签名信息。
5013、第一终端确定与第二终端对应的签名信息通过验证之后,第一终端将与第二终端对应的第二半会话密钥参数、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,发送给第二终端。
对于图21中的方法,下面采用通信示意图进行介绍。
图22为本申请实施例提供的还一种私钥生成的方法的通信示意图,如图22所示,图22为一个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S1201、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,本步骤可以参见图16的步骤S71,不再赘述。
S1202、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S72,不再赘述。
S1203、第一终端将第四消息发送给IDM实体,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
在本实施例中,具体的,本步骤可以参见图16的步骤S73,不再赘述。
S1204、IDM实体根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S74,不再赘述。
S1205、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S75,不再赘述。
S1206、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S76,不再赘述。
S1207a、IDM实体将第五消息发送给第一终端,其中,第五消息包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性;
S1207b、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S77,不再赘述。
S1208、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S78,不再赘述。
S1209、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S79,不再赘述。
S1210、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S791,不再赘述。
以上步骤S1201-S1210,为一个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S1211、第二终端向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S792,不再赘述。
S1212、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,本步骤可以参见图16的步骤S793,不再赘述。
S1213、第一终端将第一消息发送给IKMS实体,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。
在本实施例中,具体的,本步骤可以参见图16的步骤S794,不再赘述。
S1214、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据第二终端的标识,生成与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S795,不再赘述。
S1215、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S796,不再赘述。
S1216、IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S797,不再赘述。
S1217、IKMS实体根据IKMS实体的私钥,生成与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。
在本实施例中,具体的,IKMS实体将与第二终端S_UE对应的第二半会话密钥参数XB、第二终端S_UE的标识S_UE_ID、加密后的与第二终端S_UE对应的私钥SK放入一条第三消息中;然后IKMS实体利用IKMS实体的私钥,生成与第二终端S_UE对应的签名信息SIG。
S1218、IKMS实体将第三消息发送给第一终端,其中,第三消息包括与第二终端 对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息。
在本实施例中,具体的,IKMS实体在生成了与第二终端S_UE对应的签名信息SIG之后,将被签名的第三消息发送给第一终端M_UE,此时的第三消息包括与第二终端S_UE对应的第二半会话密钥参数XB、第二终端S_UE的标识S_UE_ID、加密后的与第二终端S_UE对应的私钥SK、与第二终端S_UE对应的签名信息SIG。
例如,第三消息的内容为<XB,S_UE_ID,(SK)key,SIG>。
S1219、第一终端根据IKMS实体的公钥,验证与第二终端对应的签名信息。
在本实施例中,具体的,第一终端M_UE根据IKMS实体的公钥,验证与第二终端S_UE对应的签名信息SIG。
S1220、第一终端确定与第二终端对应的签名信息通过验证之后,第一终端将与第二终端对应的第二半会话密钥参数、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,发送给第二终端。
在本实施例中,具体的,第一终端M_UE确定与第二终端S_UE对应的签名信息SIG通过验证之后,第一终端M_UE根据第二终端S_UE的标识S_UE_ID,将与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与第二终端S_UE对应的私钥SK、以及与第二终端S_UE对应的签名信息SIG,发送给第二终端S_UE。
例如,第一终端M_UE将消息<XB,(SK) key,SIG>发送给第二终端S_UE。
S1221、第二终端验证与第二终端对应的签名信息。
在本实施例中,具体的,第二终端S_UE,验证与第二终端S_UE对应的签名信息SIG是否被篡改。
S1222、第二终端确定与第二终端对应的签名信息通过验证之后,根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,第二终端S_UE若确定与第二终端S_UE对应的签名信息SIG是由IKMS实体产生且没有被篡改,则第二终端S_UE确定与第二终端S_UE对应的签名信息SIG通过验证;然后,第二终端S_UE根据自身产生的第二终端S_UE对应的第一半会话密钥参数XA、以及接收到的与第二终端S_UE对应的第二半会话密钥参数XB,计算出一个对称密钥key。
S1223、第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在本实施例中,具体的,第二终端S_UE根据计算出的对称密钥key,对加密后的与第二终端S_UE对应的私钥(SK) key进行解密,得到与第二终端S_UE对应的私钥SK。从而,完成了第二终端S_UE的初始密钥获取。
图23为本申请实施例提供的还一种私钥生成的方法的通信示意图二,如图23所示,图23为至少两个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S1301、每一个第二终端分别向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关 系。
在本实施例中,具体的,本步骤可以参见图17的步骤S81,不再赘述。
S1302、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S82,不再赘述。
S1303、第一终端将第四消息发送给IDM实体,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
在本实施例中,具体的,本步骤可以参见图17的步骤S83,不再赘述。
S1304、IDM实体根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S84,不再赘述。
S1305、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S85,不再赘述。
S1306、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S86,不再赘述。
S1307a、IDM实体将第五消息发送给第一终端,其中,第五消息包括群组的标识、第一终端的标识、每一个第二终端的标识、以及第四消息验证码;
S1307b、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S87,不再赘述。
S1308、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S88,不再赘述。
S1309、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及每一个第二终端的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S89,不再赘述。
S1310、第一终端分别向每一个第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S891,不再赘述。
以上步骤S1301-S1310,为多个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S1311、每一个第二终端分别向第一终端发送与该第二终端对应的第一半会话密钥参数、以及该第二终端的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S892,不再赘述。
S1312、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥 为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S893,不再赘述。
S1313、第一终端将第一消息发送给IKMS实体,其中,第一消息包括与每一个第二终端对应的第一半会话密钥参数、每一个第二终端的标识、以及第一消息验证码。
在本实施例中,具体的,本步骤可以参见图17的步骤S894,不再赘述。
S1314、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据每一个第二终端的标识,生成与该第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S895,不再赘述。
S1315、IKMS实体生成与每一个第二终端对应的第二半会话密钥参数,并根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成与该第二终端对应的对称密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S896,不再赘述。
S1316、IKMS实体根据与每一个第二终端对应的对称密钥,对与该第二终端对应的私钥进行加密,生成加密后的与该第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S897,不再赘述。
S1317、IKMS实体根据IKMS实体的私钥,生成与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。
在本实施例中,具体的,IKMS实体利用IKMS实体的私钥为每一个第二终端S_UE的相关信息生成一个与第二终端S_UE对应的签名信息SIG,其中,相关信息为与第二终端S_UE对应的第二半会话密钥参数XB、该第二终端S_UE的标识S_UE_ID、加密后的与该第二终端S_UE对应的私钥SK。
例如,IKMS实体利用IKMS实体的私钥为第二终端S_UE1的相关信息,生成与第二终端S_UE1对应的签名信息SIG1,其中,第二终端S_UE1的相关信息包括了与第二终端S_UE1对应的第二半会话密钥参数XB1、第二终端的标识S_UE_ID1、以及加密后的与第二终端S_UE1对应的私钥(SK1) key1;IKMS实体利用IKMS实体的私钥为第二终端S_UE2的相关信息,生成与第二终端S_UE2对应的签名信息SIG2,其中,第二终端S_UE2的相关信息包括了与第二终端S_UE2对应的第二半会话密钥参数XB2、第二终端的标识S_UE_ID2、以及加密后的与第二终端S_UE12对应的私钥(SK2) key2
S1318、IKMS实体将第三消息发送给第一终端,其中,第三消息包括与每一个第二终端对应的第二半会话密钥参数、每一个第二终端的标识、加密后的与每一个第二终端对应的私钥、以及与每一个第二终端对应的签名信息。
在本实施例中,具体的,IKMS实体在为每一个第二终端生成了签名信息SIG之后,得到第三消息,第三消息中包括了与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端S_UE的标识S_UE_ID、加密后的与每一个第二终端S_UE 对应的私钥SK、以及与每一个第二终端每一个对应的签名信息SIG。
例如,第三消息的内容为<<XB1,S_UE_ID1,(SK1) key1>SIG1,<XB2,S_UE_ID2,(SK2) key2>SIG2>。
然后IKMS实体将被签名的第三消息发送给第一终端M_UE。
S1319、每一个第一终端根据IKMS实体的公钥,验证各与第二终端对应的签名信息。
在本实施例中,具体的,第一终端M_UE根据IKMS实体的公钥,对所有的签名信息SIG分别进行验证。
例如,第一终端M_UE利用IKMS的公钥分别验证SIG1、SIG2。
S1320、第一终端确定与第二终端对应的签名信息通过验证之后,第一终端将与第二终端对应的第二半会话密钥参数、加密后的与该第二终端对应的私钥、以及与该第二终端对应的签名信息,发送给该第二终端。
在本实施例中,具体的,对于每一个第二终端S_UE,第一终端M_UE确定与该第二终端S_UE对应的签名信息SIG通过验证之后,第一终端M_UE根据该第二终端S_UE的标识S_UE_ID,将与该第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥SK、第二终端S_UE的标识、以及与该第二终端S_UE对应的签名信息SIG,发送给该第二终端S_UE。
例如,第一终端M_UE将消息<XB1,S_UE_ID1,(SK1) key1>SIG1给第二终端S_UE1;第一终端M_UE将消息<XB2,S_UE_ID2,(SK2) key2>SIG2给第二终端S_UE2。
S1321、每一个第二终端验证与第二终端对应的签名信息。
在本实施例中,具体的,每一个第二终端S_UE,验证与第二终端S_UE对应的签名信息SIG是否被篡改。
例如,第二终端S_UE1验证SIG1是否被篡改;第二终端S_UE2验证SIG2是否被篡改。
S1322、每一个第二终端确定与第二终端对应的签名信息通过验证之后,根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,第二终端S_UE若确定与第二终端S_UE对应的签名信息SIG是由IKMS实体产生且没有被篡改,则第二终端S_UE确定与第二终端S_UE对应的签名信息SIG通过验证;然后,第二终端S_UE根据自身产生的第二终端S_UE对应的第一半会话密钥参数XA、以及接收到的与第二终端S_UE对应的第二半会话密钥参数XB,计算出一个对称密钥key。
S1323、每一个第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在本实施例中,具体的,第二终端S_UE根据计算出的对称密钥key,对加密后的与第二终端S_UE对应的私钥(SK) key进行解密,得到与第二终端S_UE对应的私钥SK。从而,完成了第二终端S_UE的初始密钥获取。
例如,第二终端S_UE1确定与第二终端S_UE1对应的签名信息SIG1通验证,首先第二终端S_UE1根据收到的与该第二终端S_UE1对应的第二半会话密钥参数XB1、 与自身产生的第一半会话密钥参数XA1计算生成一个对称密钥key1;然后第二终端S_UE1利用密钥key1解密(SK1) key1,进而获得与第二终端S_UE1对应的私钥SK1,至此,完成第二终端S_UE1的初始密钥获取。第二终端S_UE2确定与第二终端S_UE2应的签名信息SIG2通验证,首先第二终端S_UE2根据收到的与该第二终端S_UE2对应的第二半会话密钥参数XB2、与自身产生的第一半会话密钥参数XA2计算生成一个对称密钥key2;然后第二终端S_UE2利用密钥key2解密(SK2) key2,进而获得与第二终端S_UE2对应的私钥SK2,至此,完成第二终端S_UE2的初始密钥获取。
可知,步骤S1311-S1323采用的是非对称密钥机制。
本实施例,通过由第二终端触发去进行群组的建立,并且由第一终端向IDM实体发送群组标识位等信息,进而由第一终端确定是否进行群组的建立,从而第一终端与第二终端之间是可信的,提高了对群组中的网元之间的信任度和安全性;进而基于第二终端主动发送群组建立请求,从而可以构建出的群组的特征是多样的。并且,提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,并且,由于IKMS实体采用与第二终端对应的签名信息对加密后的与第二终端对应的私钥进行处理,进而防止了加密后的与第二终端对应的私钥在传输的过程中被其他终端篡改,可以保证加密后的与第二终端对应的私钥不被其他终端篡改和窃取,保证群组之间通信信息不被窃取。同时,第二终端可以较快的获取到加密的与该第二终端对应的私钥。
图24为本申请实施例提供的另有一种私钥生成的方法的流程示意图,如图24所示,该方法具体如下。
601、第一终端接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
602、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
603、第一终端根据第二共享密钥,对第四消息进行加密,得到加密后的第四消息,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性;第一终端将加密后的第四消息,发送给IDM实体。
604、第一终端接收IDM实体发送的加密后的第五消息,其中,第五消息中包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性;第一终端根据第二共享密钥对加密后的第五消息进行解密,得到第五消息。
605、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
606、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
607、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
608、第一终端接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
609、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
6010、第一终端根据第一共享密钥,对第一消息进行加密,得到加密后的第一消息,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性;第一终端将加密后的第一消息发送给IKMS实体。
6011、第一终端接收IKMS实体发送的加密后的第三消息,其中,第三消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。
6012、第一终端根据第一共享密钥,对加密后的第三消息进行解密,得到第三消息,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
6013、第一终端根据IKMS实体的公钥,验证与第二终端对应的签名信息。
6014、第一终端确定与第二终端对应的签名信息通过验证之后,第一终端将与第二终端对应的第二半会话密钥参数、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,发送给第二终端。
对于图24中的方法,下面采用通信示意图进行介绍。
图25为本申请实施例提供的另有一种私钥生成的方法的通信示意图,如图25所示,图25为一个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S1401、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,本步骤可以参见图16的步骤S71,不再赘述。
S1402、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S72,不再赘述。
S1403、第一终端根据第二共享密钥,对第四消息进行加密,得到加密后的第四消息,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
在本实施例中,具体的,本步骤可以参见图19的步骤S93,不再赘述。
S1404、第一终端将加密后的第四消息,发送给IDM实体。
S1405、IDM实体根据第二共享密钥,对加密后的第四消息进行解密,得到第四消息,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图19的步骤S95,不再赘述。
S1406、IDM实体根据第二共享密钥,验证第三消息验证码。
在本实施例中,具体的,I本步骤可以参见图19的步骤S96,不再赘述。
S1407、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S75,不再赘述。
S1408、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S76,不再赘述。
S1409、IDM实体根据第二共享密钥,对第五消息进行加密,生成加密后的第五消息,其中,第五消息包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性。
在本实施例中,具体的,本步骤可以参见图19的步骤S99,不再赘述。
S1410、IDM实体将加密后的第五消息,发送给第一终端。
S1411、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,本步骤可以参见图19的步骤S991b,不再赘述。
其中,IDM实体将加密后的第五消息发送给第一终端的步骤,IDM实体将生成的群组信息发送给IKMS实体的步骤,两者之间的次序不做限定。
S1412、第一终端根据第二共享密钥对加密后的第五消息进行解密,得到第五消息。
在本实施例中,具体的,本步骤可以参见图19的步骤S992,不再赘述。
S1413、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S78,不再赘述。
S1414、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S79,不再赘述。
S1415、第一终端根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图16的步骤S791,不再赘述。
以上步骤S1401-S1415,为一个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S1416、第二终端向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S792,不再赘述。
S1417、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S793,不再赘述。
S1418、第一终端根据第一共享密钥,对第一消息进行加密,得到加密后的第一消息,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。
在本实施例中,具体的,本步骤可以参见图19的步骤S998,不再赘述。
S1419、第一终端将加密后的第一消息发送给IKMS实体。
S1420、IKMS实体根据第一共享密钥,对加密后的第一消息进行解密,得到第一消息。
在本实施例中,具体的,本步骤可以参见图19的步骤S9910,不再赘述。
S1421、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据第二终端的标识,生成与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S795,不再赘述。
S1422、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S796,不再赘述。
S1423、IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图16的步骤S797,不再赘述。
S1424、IKMS实体根据IKMS实体的私钥,生成与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。
在本实施例中,具体的,IKMS实体将与第二终端S_UE对应的第二半会话密钥参数XB、第二终端S_UE的标识S_UE_ID、加密后的与第二终端S_UE对应的私钥SK放入一条第三消息中;然后IKMS实体利用IKMS实体的私钥,生成与第二终端S_UE对应的签名信息SIG。
S1425、IKMS实体根据第一共享密钥,对第三消息进行加密,生成加密后的第三消息,其中,第三消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在本实施例中,具体的,IKMS实体根据第一共享密钥K IKMS_M,对第三消息进行加密,生成加密后的第三消息。
例如,加密后的第三消息为<(XB,S_UE_ID,(SK) key,SIG)K IKMS_M>,其中,XB为与第二终端S_UE对应的第二半会话密钥参数,S_UE_ID为第二终端S_UE的ID、(SK) key为加密后的与第二终端S_UE对应的私钥,SIG为与第二终端S_UE对应的签名信息。
S1426、IKMS实体将加密后的第三消息,发送给第一终端。
S1427、第一终端根据第一共享密钥,对加密后的第三消息进行解密,得到第三消息。
在本实施例中,具体的,第一终端M_UE根据第一共享密钥K IKMS_M,对加密后的第三消息进行解密,可以得到与第二终端S_UE对应的第二半会话密钥参数XB、第二终端的标识S_UE_ID、加密后的与第二终端S_UE对应的私钥(SK) key、与第二终端S_UE对应的签名信息SIG。
S1428、第一终端根据IKMS实体的公钥,验证与第二终端对应的签名信息。
在本实施例中,具体的,第一终端M_UE根据IKMS实体的公钥,验证与第二终端S_UE对应的签名信息SIG。
S1429、第一终端确定与第二终端对应的签名信息通过验证之后,第一终端将与第二终端对应的第二半会话密钥参数、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,发送给第二终端。
在本实施例中,具体的,第一终端M_UE确定与第二终端S_UE对应的签名信息SIG通过验证之后,第一终端M_UE根据第二终端S_UE的标识S_UE_ID,将与第二终端S_UE对应的第二半会话密钥参数XB、加密后的与第二终端S_UE对应的私钥SK、以及与第二终端S_UE对应的签名信息SIG,发送给第二终端S_UE。
例如,第一终端M_UE将消息<XB,(SK) key,SIG>发送给第二终端S_UE。
S1430、第二终端验证与第二终端对应的签名信息。
在本实施例中,具体的,第二终端S_UE验证与第二终端S_UE对应的签名信息SIG是否被篡改。
S1431、第二终端确定与第二终端对应的签名信息通过验证之后,根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,第二终端S_UE若确定与第二终端S_UE对应的签名信息SIG是由IKMS实体产生且没有被篡改,则第二终端S_UE确定与第二终端S_UE对应的签名信息SIG通过验证;然后,第二终端S_UE根据自身产生的第二终端S_UE对应的第一半会话密钥参数XA、以及接收到的与第二终端S_UE对应的第二半会话密钥参数XB,计算出一个对称密钥key。
S1432、第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在本实施例中,具体的,第二终端S_UE根据计算出的对称密钥key,对加密后的与第二终端S_UE对应的私钥(SK) key进行解密,得到与第二终端S_UE对应的私钥SK。从而,完成了第二终端S_UE的初始密钥获取。
图26为本申请实施例提供的另有一种私钥生成的方法的通信示意图二,如图26 所示,图26为至少两个第二终端与一个第一终端之间进行私钥生成的通信示意图,该方法具体如下。
S1501、每一个第二终端分别向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
在本实施例中,具体的,本步骤可以参见图17的步骤S81,不再赘述。
S1502、第一终端根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S82,不再赘述。
S1503、第一终端根据第二共享密钥,对第四消息进行加密,得到加密后的第四消息,其中,第四消息包括群组标识位、第一终端的标识、每一个第二终端的标识、以及第三消息验证码。
在本实施例中,具体的,本步骤可以参见图20的步骤S1103,不再赘述。
S1504、第一终端将加密后的第四消息,发送给IDM实体。
S1505、IDM实体根据第二共享密钥,对加密后的第四消息进行解密,得到第四消息,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图20的步骤S1105,不再赘述。
S1506、IDM实体根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S84,不再赘述。
S1507、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S85,不再赘述。
S1508、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S86,不再赘述。
S1509、IDM实体根据第二共享密钥,对第五消息进行加密,生成加密后的第五消息,其中,第五消息包括群组的标识、第一终端的标识、每一个第二终端的标识、以及第四消息验证码。
在本实施例中,具体的,本步骤可以参见图20的步骤S1109,不再赘述。
S1510、IDM实体将加密后的第五消息,发送给第一终端。
S1511、IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及每一个第二终端的标识。
在本实施例中,具体的,本步骤可以参见图20的步骤S1110b,不再赘述。
S1512、第一终端根据第二共享密钥对加密后的第五消息进行解密,得到第五消息。
在本实施例中,具体的,本步骤可以参见图20的步骤S1111,不再赘述。
S1513、第一终端根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S88,不再赘述。
S1514、第一终端确定第四消息验证码通过验证之后,第一终端保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及每一个第二终端的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S89,不再赘述。
S1515、第一终端分别向每一个第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S891,不再赘述。
以上步骤S1501-S1515,为多个第二终端S_UE与第一终端M-UE完成群组建立的过程。
S1516、每一个第二终端分别向第一终端发送与该第二终端对应的第一半会话密钥参数、以及该第二终端的标识。
在本实施例中,具体的,本步骤可以参见图17的步骤S892,不再赘述。
S1517、第一终端根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S893,不再赘述。
S1518、第一终端根据第一共享密钥,对第一消息进行加密,得到加密后的第一消息,其中,第一消息包括与每一个第二终端对应的第一半会话密钥参数、每一个第二终端的标识、以及第一消息验证码。
在本实施例中,具体的,本步骤可以参见图20的步骤S1117,不再赘述。
S1519、第一终端将加密后的第一消息发送给IKMS实体。
S1520、IKMS实体根据第一共享密钥,对加密后的第一消息进行解密,得到第一消息。
在本实施例中,具体的,本步骤可以参见图20的步骤S1118,不再赘述。
S1521、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体确定第一消息验证码通过验证之后,根据每一个第二终端的标识,生成与该第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S895,不再赘述。
S1522、IKMS实体生成与每一个第二终端对应的第二半会话密钥参数,并根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成与该第二终端对应的对称密钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S896,不再赘述。
S1523、IKMS实体根据与每一个第二终端对应的对称密钥,对与该第二终端对应的私钥进行加密,生成加密后的与该第二终端对应的私钥。
在本实施例中,具体的,本步骤可以参见图17的步骤S897,不再赘述。
S1524、IKMS实体根据IKMS实体的私钥,生成与每一个第二终端对应的签名信息。
在本实施例中,IKMS实体利用IKMS实体的私钥为每一个第二终端S_UE的相关 信息生成一个与第二终端S_UE对应的签名信息SIG,其中,相关信息为与第二终端S_UE对应的第二半会话密钥参数XB、该第二终端S_UE的标识S_UE_ID、加密后的与该第二终端S_UE对应的私钥SK。
例如,IKMS实体利用IKMS实体的私钥为第二终端S_UE1的相关信息,生成与第二终端S_UE1对应的签名信息SIG1,其中,第二终端S_UE1的相关信息包括了与第二终端S_UE1对应的第二半会话密钥参数XB1、第二终端的标识S_UE_ID1、以及加密后的与第二终端S_UE1对应的私钥(SK1) key1;IKMS实体利用IKMS实体的私钥为第二终端S_UE2的相关信息,生成与第二终端S_UE2对应的签名信息SIG2,其中,第二终端S_UE2的相关信息包括了与第二终端S_UE2对应的第二半会话密钥参数XB2、第二终端的标识S_UE_ID2、以及加密后的与第二终端S_UE12对应的私钥(SK2) key2
S1525、IKMS实体根据第一共享密钥,对第三消息进行加密,生成加密后的第三消息,其中,第三消息包括与每一个第二终端对应的第二半会话密钥参数、每一个第二终端的标识、加密后的与每一个第二终端对应的私钥、以及与每一个第二终端对应的签名信息,第一共享密钥为第一终端与IKMS实体之间协商的密钥;
在本实施例中,具体的,IKMS实体根据第一共享密钥K IKMS_M,为第三消息生成一个消息验证码MAC4,然后IKMS实体利用第一共享密钥K IKMS_M对第三消息进行加密,生成加密后的第三消息。
例如,第三消息的内容为(<<XB1,S_UE_ID1,(SK1) key1>SIG1,<XB2,S_UE_ID2,(SK2) key2>SIG2,MAC4>)K IKMS_M,其中,XB1为与第二终端S_UE1对应的第二半会话密钥参数,S_UE_ID1为第二终端S_UE1的ID、(SK1) key1为加密后的与第二终端S_UE1对应的私钥,SIG1为与第二终端S_UE1对应的签名信息,XB2为与第二终端S_UE2对应的第二半会话密钥参数,S_UE_ID2为第二终端S_UE2的ID、(SK2) key2为加密后的与第二终端S_UE2对应的私钥,SIG2为与第二终端S_UE2对应的签名信息,MAC4为IKMS实体根据第一共享密钥K IKMS_M为第三消息生成的消息验证码。
S1526、IKMS实体将加密后的第三消息,发送给第一终端。
S1527、第一终端根据第一共享密钥,对加密后的第三消息进行解密,得到第三消息。
在本实施例中,具体的,第一终端M_UE根据第一共享密钥K IKMS_M,对加密后的第三消息进行解密,可以得到与每一个第二终端S_UE对应的第二半会话密钥参数XB、每一个第二终端的标识S_UE_ID、加密后的与每一个第二终端S_UE对应的私钥(SK) key、与每一个第二终端S_UE对应的签名信息SIG、以及消息验证码MAC4。
第一终端M_UE可以验证消息验证码MAC4,在确定消息验证码MAC4通过验证之后,执行步骤S1518。
S1528、第一终端根据IKMS实体的公钥,验证与每一个第二终端对应的签名信息。
在本实施例中,具体的,第一终端M_UE根据IKMS实体的公钥,验证与每一个第二终端S_UE对应的签名信息SIG。
例如,第一终端M_UE利用IKMS实体的公钥,分别验证与第二终端S_UE1对应 的签名信息SIG1、与第二终端S_UE2对应的签名信息SIG2。
S1529、第一终端确定与每一个第二终端对应的签名信息通过验证之后,第一终端将与该第二终端对应的第二半会话密钥参数、加密后的与该第二终端对应的私钥、以及与该第二终端对应的签名信息,发送给该第二终端。
在本实施例中,具体的,第一终端M_UE确定与某一个第二终端S_UE对应的签名信息SIG通过验证之后,第一终端M_UE根据该第二终端S_UE的标识S_UE_ID,将与该第二终端S_UE对应的第二半会话密钥参数XB、加密后的与该第二终端S_UE对应的私钥SK、以及与该第二终端S_UE对应的签名信息SIG,发送给该第二终端S_UE。
例如,第一终端M_UE将消息<XB1,(SK1) key1,SIG1>发送给第二终端S_UE1,第一终端M_UE将消息<XB,2,(SK2) key2,SIG2>发送给第二终端S_UE2。
S1530、每一个第二终端验证与该第二终端对应的签名信息。
在本实施例中,具体的,每一个第二终端S_UE分别验证与该第二终端S_UE对应的签名信息SIG是否被篡改。
S1531、每一个第二终端确定与该第二终端对应的签名信息通过验证之后,根据与该第二终端对应的第一半会话密钥参数、以及与该第二终端对应的第二半会话密钥参数,生成对称密钥。
在本实施例中,具体的,第二终端S_UE若确定与某一个第二终端S_UE对应的签名信息SIG是由IKMS实体产生且没有被篡改,则第二终端S_UE确定与该第二终端S_UE对应的签名信息SIG通过验证;然后,该第二终端S_UE根据自身产生的该第二终端S_UE对应的第一半会话密钥参数XA、以及接收到的与该第二终端S_UE对应的第二半会话密钥参数XB,计算出一个对称密钥key。
S1532、每一个第二终端根据对称密钥对加密后的与该第二终端对应的私钥进行解密,得到与该第二终端对应的私钥。
在本实施例中,具体的,每一个第二终端S_UE根据计算出的对称密钥key,对加密后的与该第二终端S_UE对应的私钥(SK) key进行解密,得到与该第二终端S_UE对应的私钥SK。从而,完成了第二终端S_UE的初始密钥获取。
例如,第二终端S_UE1验证与第二终端S_UE1对应的签名信息SIG1,确定该SIG1验证通过后,第二终端S_UE1根据收到的与第二终端S_UE1对应的第二半会话密钥参数XB1、以及自身产生的第一半会话密钥参数XA1计算生成对称密钥key1,进而第二终端S_UE1获得与控制面IKMS实体对应的对称密钥;然后,第二终端S_UE1利用对称密钥key1解密加密后的与第二终端S_UE2对应的私钥(SK1) key1,进而获得与第二终端S_UE2对应的签名信息对应的私钥SK1。第二终端S_UE2验证与第二终端S_UE2对应的签名信息SIG2,确定该SIG2验证通过后,第二终端S_UE2根据收到的与第二终端S_UE2对应的第二半会话密钥参数XB2、以及自身产生的第一半会话密钥参数XA2计算生成对称密钥key2,进而第二终端S_UE2获得与控制面IKMS实体对应的对称密钥;然后,第二终端S_UE2利用对称密钥key2解密加密后的与第二终端S_UE2对应的私钥(SK2) key2,进而获得与第二终端S_UE2对应的签名信息对应的私钥SK2。
可知,步骤S1516-S1532中采用的是非对称密钥机制。
本实施例,通过由第二终端触发去进行群组的建立,并且由第一终端向IDM实体发送群组标识位等信息,进而由第一终端确定是否进行群组的建立,从而第一终端与第二终端之间是可信的,提高了对群组中的网元之间的信任度和安全性;进而基于第二终端主动发送群组建立请求,从而可以构建出的群组的特征是多样的。并且,提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,并且,由于IKMS实体采用与第二终端对应的签名信息对加密后的与第二终端对应的私钥进行处理,进而防止了加密后的与第二终端对应的私钥在传输的过程中被其他终端篡改,可以保证加密后的与第二终端对应的私钥不被其他终端篡改和窃取,保证群组之间通信信息不被窃取。同时,第二终端可以较快的获取到加密的与该第二终端对应的私钥。并且在第四消息、第五消息、第一消息、第二消息的收发过程中进行加密处理,以避免以上消息被其他非法设备所窃取。
图27为本申请实施例提供的又有一种群私钥生成的方法的流程示意图,如图27所示,该方法具体如下。
701、第二终端向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
702、第二终端接收第一终端发送的与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
703、第二终端根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。
704、第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。
在可选的一种实施方式中,步骤702,具体包括:
第二终端接收第一终端发送的与第二终端对应的第二半会话密钥参数、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。
相应的,步骤703,具体包括:
第二终端验证与第二终端对应的签名信息;第二终端确定与第二终端对应的签名信息通过验证之后,根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。
在可选的一种实施方式中,第一终端为主节点、且第二终端为从节点。
在可选的一种实施方式中,在步骤701之前,还可以包括以下各步骤:
705、第二终端向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
706、第二终端接收第一终端发送的群组加入响应消息,其中,群组加入响应消息 中包括群组的标识。
在可选的一种实施方式中,只执行步骤705和706的时候,第一终端为主节点、且第二终端为主节点;或者,第一终端为主节点、且第二终端为从节点。
本实施例的各步骤可以参见图4-图26的各步骤,不再赘述。
本实施例,通过第二终端向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥;第二终端接收第一终端发送的与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥;第二终端根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥;第二终端根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥。从而提供了一种私钥获取方法,在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,第二终端通过第一终端接收IKMS实体发送的加密后的与第二终端对应的私钥,第二终端可以较快的获取到加密的与该第二终端对应的私钥,可以保证私钥不被窃取,保证群组之间通信信息不被窃取。
图28为本申请实施例提供的再有一种群组建立的方法的流程示意图,如图28所示,该方法具体如下。
801、IDM实体接收第一终端发送的群组标识位、第一终端的标识、以及第二终端的标识,其中,群组标识位表征第一终端与第二终端之间的关系,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
802、IDM实体生成群组的标识。
803、IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。
在可选的一种实施方式中,群组标识位表征第一终端为主节点、且第二终端为主节点;或者,群组标识位表征第一终端为主节点、且第二终端为从节点。
在可选的一种实施方式中,第二终端的个数为一个或至少两个。
本实施例的各步骤可以参见图7-图11的各步骤,不再赘述。
本实施例,通过IDM实体接收第一终端发送的群组标识位、第一终端的标识、以及第二终端的标识,其中,群组标识位表征第一终端与第二终端之间的关系,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识;IDM实体生成群组的标识;IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。进而由第二终端触发去进行群组的建立,并且由第一终端向IDM实体发送群组标识位等信息,进而由第一终端确定是否进行群组的建立,从而第一终端与第二终端之间是可信的,提高了对群组中的网元之间的信任度和安全性;进而基于第二终端主动发送群组建立请求,从而可以构建出的群组的特征是多样的。
图29为本申请实施例提供的还有一种群组建立的方法的流程示意图,如图29所示,该方法具体如下。
901、IDM实体接收第一终端发送的第四消息,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,群组标识位表征第一终端与第二终端之间的关系,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。
在可选的一种实施方式中,步骤901具体包括:IDM实体接收第一终端发送的加密后的第四消息。
902、IDM实体根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
在可选的一种实施方式中,在步骤902之前还包括:IDM实体根据第二共享密钥,对加密后的第四消息进行解密,得到第四消息。
903、IDM实体确定第三消息验证码通过验证之后,生成群组的标识。
904、IDM实体根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。
905、IDM实体将第五消息发送给第一终端,其中,第五消息包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性,并且,IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及第二终端的标识。
在可选的一种实施方式中,步骤905具体包括:IDM实体根据第二共享密钥,对第五消息进行加密,生成加密后的第五消息;IDM实体将加密后的第五消息,发送给第一终端。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
本实施例的各步骤可以参见图12-图26的各步骤,不再赘述。
本实施例,通过IDM实体接收第一终端发送的群组标识位、第一终端的标识、以及第二终端的标识,其中,群组标识位表征第一终端与第二终端之间的关系,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识;IDM实体生成群组的标识;IDM实体将群组的标识、以及第二终端的标识,发送给第一终端。进而由第二终端触发去进行群组的建立,并且由第一终端向IDM实体发送群组标识位等信息,进而由第一终端确定是否进行群组的建立,从而第一终端与第二终端之间是可信的,提高了对群组中的网元之间的信任度和安全性;进而基于第二终端主动发送群组建立请求,从而可以构建出的群组的特征是多样的。并且在消息的收发过程中进行加密处理,以避免以上消息被其他非法设备所窃取。
图30为本申请实施例提供的另外有一种私钥生成的方法的流程示意图,如图30所示,该方法具体如下。
2701、IKMS实体接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
2702、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在可选的一种实施方式中,步骤2702具体包括:
IKMS实体根据第二终端的标识,生成与第二终端对应的私钥;
IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥;
IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥。
2703、IKMS实体将与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,发送给第一终端。
本实施例的各步骤可以参见图4-图6、以及图12-图14的各步骤,不再赘述。
本实施例,通过在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,第二终端通过第一终端接收IKMS实体发送的加密后的与第二终端对应的私钥,第二终端可以较快的获取到加密的与该第二终端对应的私钥,可以保证私钥不被窃取,保证群组之间通信信息不被窃取,提供了一种私钥获取方法。
图31为本申请实施例提供的其他一种私钥生成的方法的流程示意图,如图31所示,该方法具体如下。
2801、IKMS实体接收第一终端发送的第一消息,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。
在可选的一种实施方式中,步骤2801具体包括:IKMS实体接收第一终端发送的加密后的第一消息。
2802、IKMS实体根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
在可选的一种实施方式中,在步骤2802之前还包括:IKMS实体根据第一共享密钥,对加密后的第一消息进行解密,得到第一消息。
2803、IKMS实体确定第一消息验证码通过验证之后,根据第二终端的标识生成与第二终端对应的私钥。
2804、IKMS实体生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥;
2805、IKMS实体根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥。
2806、IKMS实体将与第二终端对应的第二半会话密钥参数、第二终端的标识、 以及加密后的与第二终端对应的私钥,发送给第一终端,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
在可选的一种实施方式中,第二终端的个数为一个或至少两个。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在可选的一种实施方式中,步骤2806包括以下步骤:
28061a、IKMS实体根据第一共享密钥,生成第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;
28062a、IKMS实体将第二消息发送给第一终端,其中,第二消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及第二消息验证码,其中,第二消息验证码用于验证第二消息由IKMS实体发出、且用于验证第二消息的完整性。
其中,步骤28062a包括:IKMS实体根据第一共享密钥,对第二消息进行加密,生成加密后的第二消息;IKMS实体将加密后的第二消息,发送给第一终端。
或者,在可选的一种实施方式中,步骤2806包括以下步骤:
28061b、IKMS实体根据IKMS实体的私钥,生成与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。
28062b、IKMS实体将第三消息发送给第一终端,其中,第三消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息。
其中,步骤28062b包括:IKMS实体根据第一共享密钥,对第三消息进行加密,生成加密后的第三消息,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;IKMS实体将加密后的第三消息,发送给第一终端。
本实施例的各步骤可以参见图15-图26的各步骤,不再赘述。
本实施例,通过在终端与终端之间建立了群组之后,由第二终端发起私钥获取的请求,然后由IKMS实体生成加密后的与第二终端对应的私钥,并且,由于IKMS实体采用与第二终端对应的签名信息对加密后的与第二终端对应的私钥进行处理,进而防止了加密后的与第二终端对应的私钥在传输的过程中被其他终端篡改,可以保证加密后的与第二终端对应的私钥不被其他终端篡改和窃取,保证群组之间通信信息不被窃取,提供了一种私钥获取方法。同时,第二终端可以较快的获取到加密的与该第二终端对应的私钥。
图32为本申请实施例提供的一种第一终端的结构示意图。如图32所示,该第一终端包括:
第一接收单元2901,用于接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥。
第一发送单元2902,用于将与第二终端对应的第一半会话密钥参数和第二终端的 标识发送给IKMS实体。
第二接收单元2903,用于接收IKMS实体发送的与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥。
第二发送单元2904,用于根据第二终端的标识,将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。
在可选的一种实施方式中,群组标识位表征第一终端为主节点、且第二终端为从节点。
在可选的一种实施方式中,第二终端的个数为一个或至少两个。
其中,第一接收单元2901可以执行图4所示方法的步骤101a;第一发送单元2902可以执行图4所示方法的步骤102a;第二接收单元2903可以执行图4所示方法的步骤103a;第二发送单元2904可以执行图4所示方法的步骤104a。
并且本实施的各单元模块,可以参见图5-图11的各步骤,或者,可以参见图12-图14的各步骤。
在本实施例中,图32所示实施例的终端设备可用于执行上述方法中图4所示实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图33为本申请实施例提供的另一种第一终端的结构示意图。在图32所示实施例的基础上,如图33所示,第一终端,还包括:
第三接收单元3001,用于在第一接收单元2901接收第二终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识之前,接收第二终端发送的群组加入请求,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系。
第三发送单元3002,用于将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
第四接收单元3003,用于接收IDM实体发送的群组的标识、以及第二终端的标识。
第四发送单元3004,用于根据第二终端的标识,向第二终端发送群组加入响应消息,其中,群组加入响应消息中包括群组的标识。
在可选的一种实施方式中,若只执行以上四个单元,则群组标识位表征第一终端为主节点、且第二终端为主节点,或者群组标识位表征第一终端为主节点、且第二终端为从节点。
其中,第三接收单元3001可以执行图7所示方法的步骤101,或者,可以执行图8所示方法的步骤201;第三发送单元3002可以执行图7所示方法的步骤102,或者,可以执行图8所示方法的步骤202;第四接收单元3003可以执行图7所示方法的步骤103,或者,可以执行图8所示方法的步骤203;第四发送单元3004可以执行图7所示方法的步骤104,或者,可以执行图8所示方法的步骤204。
并且,本实施的各单元模块,可以参见图13-图14的各步骤。
图34为本申请实施例提供的又一种第一终端的结构示意图。在图33所示实施例的基础上,如图34所示,该第一终端,还包括:
第一生成单元3101,用于在第一发送单元2902将与第二终端对应的第一半会话密钥参数和第二终端的标识发送给IKMS实体之前,根据第一共享密钥,生成第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。此时,第一生成单元3101可以执行图15所示方法的步骤309。
相应的,第一发送单元2902,具体用于:
将第一消息发送给IKMS实体,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性。此时,第一发送单元2902可以执行图15所示方法的步骤3010。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
第一发送单元2902,包括:
第一加密模块29021,用于根据第一共享密钥,对第一消息进行加密,得到加密后的第一消息。
第一发送模块29022,用于将加密后的第一消息发送给IKMS实体。
关于第二接收单元2903和第二发送单元2904包括以下两种实施方式:
在可选的第一种实施方式中,第二接收单元2903,具体用于:
接收IKMS实体发送的第二消息,其中,第二消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及第二消息验证码,其中,第二消息验证码用于验证第二消息由IKMS实体发出、且用于验证第二消息的完整性。此时,第二接收单元2903可以执行图15的步骤3011。
相应的,第二发送单元2904,包括:
第一验证模块,用于根据第一共享密钥,验证第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;
第二发送模块,用于确定第二消息验证码通过验证之后,根据第二终端的标识将与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,发送给第二终端。此时,第二发送单元2904可以执行图15的步骤3012-3013。
可选的,第二接收单元2903,具体用于:接收IKMS实体发送的加密后的第二消息。此时,第二接收单元2903可以执行图18的步骤4011。相应的,第二发送单元2904,还包括:第一解密模块,用于在验证模块根据第一共享密钥,验证第二消息验证码之前,根据第一共享密钥,对加密后的第二消息进行解密,得到第二消息。此时,第二发送单元2904可以执行图18的步骤4011。
并且,以上第二接收单元2903和第二发送单元2904,可以参见图16-图17的各步骤,或者可以参见图19-图20的各步骤。
在可选的第二种实施方式中,第二接收单元2903,具体用于:
接收IKMS实体发送的第三消息,其中,第三消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的。此时,第二接收单元2903可以执行图21的步骤6011。
相应的,第二发送单元2904,包括:
第二验证模块,用于根据IKMS实体的公钥,验证与第二终端对应的签名信息;
第三发送模块,用于确定与第二终端对应的签名信息通过验证之后,根据第二终端的标识将与第二终端对应的第二半会话密钥参数、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,发送给第二终端。此时,第二发送单元2904可以执行图21的步骤5012-5013。
可选的,第二接收单元2903,具体用于:接收IKMS实体发送的加密后的第三消息。此时,第二接收单元2903,可以执行图24的步骤6011。相应的,第二发送单元2904,还包括:第二解密模块,用于在第二验证模块根据IKMS实体的公钥,验证与第二终端对应的签名信息之前,根据第一共享密钥,对加密后的第三消息进行解密,得到第三消息,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。此时,第二发送单元2904可以执行图18的步骤6012。
并且,以上第二接收单元2903和第二发送单元2904,可以参见图22-图23的各步骤,或者可以参见图25-图26的各步骤。
图35为本申请实施例提供的再一种第一终端的结构示意图。在图34所示实施例的基础上,如图35所示,该第一终端中,还包括:
第一生成单元3201,用于在第三发送单元3002将群组标识位、第一终端的标识、以及第二终端的标识发送给IDM实体之前,根据第二共享密钥,生成第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥;此时,第一生成单元3201可以执行图15所示方法的步骤302。
相应的,第三发送单元3002,具体用于:
将第四消息发送给IDM实体,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。此时,第三发送单元3002可以执行图15所示方法的步骤303。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在可选的一种实施方式中,第三发送单元3002,包括:第二加密模块,用于根据第二共享密钥,对第四消息进行加密,得到加密后的第四消息;第四发送模块,用于将加密后的第四消息,发送给IDM实体。此时,第三发送单元3002可以执行图18所示方法的步骤403。
在可选的一种实施方式中,第四接收单元3003,具体用于:
接收IDM实体发送的第五消息,其中,第五消息中包括群组的标识、第二终端的标识、以及第四消息验证码,其中,第四消息验证码用于验证第五消息由IDM实体发 出、且用于验证第五消息的完整性;此时,第四接收单元3003可以执行图15所示方法的步骤304。
相应的,第一终端,还包括:
验证单元3202,用于在第四接收单元3003接收IDM实体发送的第五消息之后,根据第二共享密钥,验证第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥;此时验证单元3202可以执行图15所示方法的步骤305。
保存单元3203,用于确定第四消息验证码通过验证之后,保存群组信息,其中,群组信息包括群组的标识、第一终端的标识、以及第二终端的标识。此时,保存单元3203可以执行图15所示方法的步骤306。
在可选的一种实施方式中,第四接收单元3003,具体用于:接收IDM实体发送的加密后的第五消息;此时,第四接收单元3003可以执行图18所示方法的步骤404。
相应的,第一终端,还包括:
解密单元3204,用于在验证单元3202根据第二共享密钥,验证第四消息验证码之前,根据第二共享密钥对加密后的第五消息进行解密,得到第五消息。此时,解密单元可以执行图18所示方法的步骤404。
并且,本实施的各单元模块,可以参见图16-图17的各步骤,以及参见图19-图20的各步骤。
图36为本申请实施例提供的还一种第一终端的结构示意图,可以用于执行图4-图26所示实施例中第一终端的动作或步骤,具体包括:接收器3201a、发送器3202a、处理器3203a、存储器3204a。
第一终端中的各部件,用于实现图4-图26所示实施例中的动作,不再赘述。并且,第一终端中的各部件,用于实现图32-图35所示实施例中的单元和模块的功能,不再赘述。
在本申请实施例中,上述各实施例之间可以相互参考和借鉴,相同或相似的步骤以及名词均不再一一赘述。
或者,以上各个模块的部分或全部也可以通过集成电路的形式内嵌于该用设备的某一个芯片上来实现。且它们可以单独实现,也可以集成在一起。即以上这些模块可以被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。
图37为本申请实施例提供的一种第二终端的结构示意图。如图37所示,该第二终端,包括:
第一发送单元3301,用于向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥;其中,第一发送单元3301可以执行图27所示方法的步骤703a。
第一接收单元3302,用于接收第一终端发送的与第二终端对应的第二半会话密钥参数、以及加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥;其中,第一接收单元3302可以执行图27所示方法的步骤704a。
生成单元3303,用于根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥;其中,生成单元3303可以执行图27所示方法的步骤705a。
解密单元3304,用于根据对称密钥对加密后的与第二终端对应的私钥进行解密,得到与第二终端对应的私钥;其中,解密单元3304可以执行图27所示方法的步骤706a。
并且,本实施的各单元模块,可以参见图27的各步骤。
图38为本申请实施例提供的另一种第二终端的结构示意图。在图37所示实施例的基础上,如图38所示,第一接收单元3302,具体用于:
接收第一终端发送的与第二终端对应的第二半会话密钥参数、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的;此时,第一接收单元3302可以执行图27所示方法的步骤704b。
相应的,生成单元3303,包括:
验证模块33031,用于验证与第二终端对应的签名信息;其中,验证模块33031可以执行图27所示方法的步骤705b。
生成模块33032,用于确定与第二终端对应的签名信息通过验证之后,根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成对称密钥。其中,生成模块33032可以执行图27所示方法的步骤706b。
在可选的一种实施方式中,第一终端为主节点、且第二终端为从节点。
在可选的一种实施方式中,第二终端,还包括:
第二发送单元3401,用于在第一发送单元3301向第一终端发送与第二终端对应的第一半会话密钥参数、以及第二终端的标识之前,向第一终端发送群组加入请求,其中,群组加入请求中包括群组标识位和第二终端的标识,群组标识位表征第一终端与第二终端之间的关系;第二发送单元3401可以执行图27所示方法的步骤701。
第二接收单元3402,用于接收第一终端发送的群组加入响应消息,其中,群组加入响应消息中包括群组的标识。第二接收单元3402可以执行图27所示方法的步骤702。
并且,本实施的各单元模块,可以参见图27的各步骤。
图39为本申请实施例提供的又一种第二终端的结构示意图,可以用于执行图27所示实施例中第二终端的动作或步骤,具体包括:接收器3401a、发送器3402a、处理器3403a、存储器3404a。
第二终端中的各部件,用于实现图27所示实施例中的动作,不再赘述。并且,第二终端中的各部件,用于实现图37-图38所示实施例中的单元和模块的功能,不再赘述。
在本申请实施例中,上述各实施例之间可以相互参考和借鉴,相同或相似的步骤以及名词均不再一一赘述。
或者,以上各个模块的部分或全部也可以通过集成电路的形式内嵌于该用设备的某一个芯片上来实现。且它们可以单独实现,也可以集成在一起。即以上这些模块可以被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA等。
图40为本申请实施例提供的一种IDM实体的结构示意图。如图40所示,该IDM实体,包括:
接收单元3501,用于接收第一终端发送的群组标识位、第一终端的标识、以及第二终端的标识,其中,群组标识位表征第一终端与第二终端之间的关系,群组标识位、第一终端的标识、以及第二终端的标识用于确定群组的标识。
生成单元3502,用于生成群组的标识。
发送单元3503,用于将群组的标识、以及第二终端的标识,发送给第一终端。
在可选的一种实施方式中,群组标识位表征第一终端为主节点、且第二终端为主节点;或者,群组标识位表征第一终端为主节点、且第二终端为从节点。
在可选的一种实施方式中,第二终端的个数为一个或至少两个。
其中,接收单元3501可以执行图28所示方法的步骤801,生成单元3502可以执行图28所示方法的步骤802,发送单元3503可以执行图28所示方法的步骤803。
图41为本申请实施例提供的另一种IDM实体的结构示意图。在图40所示实施例的基础上,如图41所示,该IDM实体中,接收单元3501,具体用于:
接收第一终端发送的第四消息,其中,第四消息包括群组标识位、第一终端的标识、第二终端的标识、以及第三消息验证码,其中,第三消息验证码用于验证第四消息由第一终端发出、且用于验证第四消息的完整性。此时,接收单元3501可以执行图29所示方法的步骤901。
相应的,生成单元3502,包括:
验证模块35021,用于根据第二共享密钥,验证第三消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。此时,验证模块35021可以执行图29所示方法的步骤902。
第一生成模块35022,用于确定第三消息验证码通过验证之后,生成群组的标识。此时,第一生成模块35022可以执行图29所示方法的步骤903。
发送单元3503,包括:
第二生成模块35031,用于根据第二共享密钥,生成第四消息验证码,其中,第二共享密钥为第一终端与IDM实体之间协商的密钥。此时,第二生成模块35031可以执行图29所示方法的步骤904。
发送模块35032,用于将第五消息发送给第一终端,其中,第五消息包括群组的标识、第二终端的标识、以及第四消息验证码,并且,IDM实体将群组信息发送给IKMS实体,其中,群组信息中包括群组的标识、第一终端的标识、以及第二终端的标识, 第四消息验证码用于验证第五消息由IDM实体发出、且用于验证第五消息的完整性。此时,发送模块35032可以执行图29所示方法的步骤905。
在可选的一种实施方式中,第二共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
在可选的一种实施方式中,接收单元3501,具体用于:接收第一终端发送的加密后的第四消息;此时,接收单元3501可以执行图29所示方法的步骤901。相应的,生成单元3502,还包括:解密模块,用于在验证模块根据第二共享密钥,验证第三消息验证码之前,根据第二共享密钥,对加密后的第四消息进行解密,得到第四消息;此时,解密模块可以执行图29所示方法的步骤902。
在可选的一种实施方式中,发送模块35032,具体用于:根据第二共享密钥,对第五消息进行加密,生成加密后的第五消息;将加密后的第五消息,发送给第一终端;此时,发送模块35032可以执行图29所示方法的步骤905。
可知,本实施例的各单元模块可以参见图28-图29。
图42为本申请实施例提供的又一种IDM实体的结构示意图,可以用于执行图28-图29所示实施例中IDM实体的动作或步骤,具体包括:处理器3601a、通信接口3602a、存储器3603a。
IDM实体中的各部件,用于实现图28-图29所示实施例中的动作,不再赘述。并且,IDM实体中的各部件,用于实现图40-图41所示实施例中的单元和模块的功能,不再赘述。
可选的,IDM实体还可以包括总线3604a。其中,处理器3601a、通信接口3602a、以及存储器3603a可以通过总线3604a相互连接;总线3604a可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。上述总线3604a可以分为地址总线、数据总线和控制总线等。为便于表示,图42中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在本申请实施例中,上述各实施例之间可以相互参考和借鉴,相同或相似的步骤以及名词均不再一一赘述。
或者,以上各个模块的部分或全部也可以通过集成电路的形式内嵌于该用设备的某一个芯片上来实现。且它们可以单独实现,也可以集成在一起。即以上这些模块可以被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA等。
图43为本申请实施例提供的一种IKMS实体的结构示意图。如图43所示,该IKMS实体中,包括:
接收单元3701,用于接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及第二终端的标识,其中,与第二终端对应的第一半会话密钥参数和第二终端的标识用于生成加密后的与第二终端对应的私钥;
生成单元3702,用于生成与第二终端对应的第二半会话密钥参数,并根据第二终 端的标识、与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成加密后的与第二终端对应的私钥,其中,与第二终端对应的第二半会话密钥参数用于解密加密后的与第二终端对应的私钥;
发送单元3703,用用于将与第二终端对应的第二半会话密钥参数、第二终端的标识、以及加密后的与第二终端对应的私钥,发送给第一终端。
在可选的一种实施方式中,第二终端的个数为一个或至少两个。
在可选的一种实施方式中,生成单元3702,包括:
第一生成模块37021,用于根据第二终端的标识,生成与第二终端对应的私钥;
第二生成模块37022,用于生成与第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与第二终端对应的第二半会话密钥参数,生成与第二终端对应的对称密钥;
第三生成模块37023,用于根据与第二终端对应的对称密钥,对与第二终端对应的私钥进行加密,生成加密后的与第二终端对应的私钥。
其中,接收单元3701可以执行图30所示方法的步骤2701,生成单元3702可以执行图30所示方法的步骤2702,发送单元3703可以执行图30所示方法的步骤2703。
图44为本申请实施例提供的另一种IKMS实体的结构示意图。在图43实施实施例的基础上,如图44所示,该IKMS实体中,接收单元3701,具体用于:
接收第一终端发送的第一消息,其中,第一消息包括与第二终端对应的第一半会话密钥参数、第二终端的标识、以及第一消息验证码,其中,第一消息验证码用于验证第一消息由第一终端发出、且用于验证第一消息的完整性;此时,接收单元3701可以执行图31所示方法的步骤2801。
相应的,第一生成模块37021,包括:
验证子模块370211,用于根据第一共享密钥,验证第一消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥。
生成子模块370212,用于确定第一消息验证码通过验证之后,根据第二终端的标识生成与第二终端对应的私钥。此时,第一生成模块37021可以执行图31所示方法的步骤2802-2803。
在可选的一种实施方式中,第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
在可选的一种实施方式中,接收单元3701,具体用于:接收第一终端发送的加密后的第一消息;此时,接收单元3701可以执行图31所示方法的步骤2801。相应的,第一生成模块37021,还包括:解密子模块370212,用于在验证子模块370211根据第一共享密钥,验证第一消息验证码之前,根据第一共享密钥,对加密后的第一消息进行解密,得到第一消息。此时,第一生成模块37021可以执行图31所示方法的步骤2802。
在可选的一种实施方式中,发送单元3703,包括:
第四生成模块,用于根据第一共享密钥,生成第二消息验证码,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;第一发送模块,用于将第二消息发送 给第一终端,其中,第二消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及第二消息验证码,其中,第二消息验证码用于验证第二消息由IKMS实体发出、且用于验证第二消息的完整性。
其中,第一发送模块,包括:第一加密子模块,用于根据第一共享密钥,对第二消息进行加密,生成加密后的第二消息;第一发送子模块,用于将加密后的第二消息,发送给第一终端。
或者,在可选的一种实施方式中,发送单元3703,包括:
第五生成模块,用于根据IKMS实体的私钥,生成与第二终端对应的签名信息,其中,与第二终端对应的签名信息用于验证加密后的与第二终端对应的私钥是由IKMS实体生成的;第二发送模块,用于将第三消息发送给第一终端,其中,第三消息包括与第二终端对应的第二半会话密钥参数、第二终端的标识、加密后的与第二终端对应的私钥、以及与第二终端对应的签名信息。
其中,第二发送模块,包括:第二加密子模块,用于根据第一共享密钥,对第三消息进行加密,生成加密后的第三消息,其中,第一共享密钥为第一终端与IKMS实体之间协商的密钥;第二发送子模块,用于将加密后的第三消息,发送给第一终端。
其中,发送单元3703可以执行图31所示方法的步骤2806。
图45为本申请实施例提供的又一种IKMS实体的结构示意图,可以用于执行图30-图31所示实施例中IKMS实体的动作或步骤,具体包括:处理器3801a、通信接口3802a、存储器3803a。
IKMS实体中的各部件,用于实现图30-图31所示实施例中的动作,不再赘述。并且,IKMS实体中的各部件,用于实现图43-图44所示实施例中的单元和模块的功能,不再赘述。
可选的,IKMS实体还可以包括总线3804a。其中,处理器3801a、通信接口3802a、以及存储器3803a可以通过总线3804a相互连接;总线总线3804a可以是PCI总线或EISA总线等。上述总线3804a可以分为地址总线、数据总线和控制总线等。为便于表示,图45中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在本申请实施例中,上述各实施例之间可以相互参考和借鉴,相同或相似的步骤以及名词均不再一一赘述。
或者,以上各个模块的部分或全部也可以通过集成电路的形式内嵌于该用设备的某一个芯片上来实现。且它们可以单独实现,也可以集成在一起。即以上这些模块可以被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA等。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质 中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如,同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如,红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (29)

  1. 一种私钥生成的方法,其特征在于,包括:
    第一终端接收第二终端发送的与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
    所述第一终端将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给身份密钥管理中心IKMS实体;
    所述第一终端接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
    所述第一终端根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
  2. 根据权利要求1所述的方法,其特征在于,在所述第一终端将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给所述IKMS实体之前,还包括:
    所述第一终端根据第一共享密钥,生成第一消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
    相应的,所述第一终端将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给所述IKMS实体,包括:
    所述第一终端将第一消息发送给所述IKMS实体,其中,所述第一消息包括与所述第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及所述第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性。
  3. 根据权利要求2所述的方法,其特征在于,所述第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一终端接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,包括:
    所述第一终端接收所述IKMS实体发送的第二消息,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性;
    相应的,所述第一终端根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端,包括:
    所述第一终端根据第一共享密钥,验证所述第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
    所述第一终端确定所述第二消息验证码通过验证之后,根据所述第二终端的标识将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一终端接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,包括:
    所述第一终端接收所述IKMS实体发送的第三消息,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
    相应的,所述第一终端根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端,包括:
    所述第一终端根据所述IKMS实体的公钥,验证所述与所述第二终端对应的签名信息;
    所述第一终端确定所述与所述第二终端对应的签名信息通过验证之后,根据所述第二终端的标识将与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及所述与所述第二终端对应的签名信息,发送给所述第二终端。
  6. 一种私钥生成的方法,其特征在于,包括:
    第二终端向第一终端发送与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
    所述第二终端接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
    所述第二终端根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥;
    所述第二终端根据所述对称密钥对加密后的与所述第二终端对应的私钥进行解密,得到与所述第二终端对应的私钥。
  7. 根据权利要求6所述的方法,其特征在于,所述第二终端接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,包括:
    所述第二终端接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由身份密钥管理中心IKMS实体生成的;
    相应的,所述第二终端根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥,包括:
    所述第二终端验证所述与所述第二终端对应的签名信息;
    所述第二终端确定所述与所述第二终端对应的签名信息通过验证之后,根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥。
  8. 一种私钥生成的方法,其特征在于,包括:
    身份密钥管理中心IKMS实体接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
    所述IKMS实体生成与所述第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
    所述IKMS实体将与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端。
  9. 根据权利要求8所述的方法,其特征在于,所述IKMS实体生成与所述第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成加密后的与所述第二终端对应的私钥,包括:
    所述IKMS实体根据所述第二终端的标识,生成与所述第二终端对应的私钥;
    所述IKMS实体生成与所述第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成与所述第二终端对应的对称密钥;
    所述IKMS实体根据与所述第二终端对应的对称密钥,对与所述第二终端对应的私钥进行加密,生成加密后的与所述第二终端对应的私钥。
  10. 根据权利要求9所述的方法,其特征在于,所述IKMS实体接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,包括:
    所述IKMS实体接收第一终端发送的第一消息,其中,所述第一消息包括与第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性;
    相应的,所述IKMS实体根据所述第二终端的标识,生成与所述第二终端对应的私钥,包括:
    所述IKMS实体根据第一共享密钥,验证所述第一消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
    所述IKMS实体确定所述第一消息验证码通过验证之后,根据所述第二终端的标识生成与所述第二终端对应的私钥。
  11. 根据权利要求10所述的方法,其特征在于,所述第一共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
  12. 根据权利要求8-11任一项所述的方法,其特征在于,所述IKMS实体将与所 述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端,包括:
    所述IKMS实体根据第一共享密钥,生成第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
    所述IKMS实体将第二消息发送给所述第一终端,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性。
  13. 根据权利要求8-11任一项所述的方法,其特征在于,所述IKMS实体将与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端,包括:
    所述IKMS实体根据所述IKMS实体的私钥,生成与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
    所述IKMS实体将第三消息发送给所述第一终端,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息。
  14. 一种第一终端,其特征在于,包括:
    第一接收单元,用于接收第二终端发送的与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
    第一发送单元,用于将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给身份密钥管理中心IKMS实体;
    第二接收单元,用于接收所述IKMS实体发送的与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
    第二发送单元,用于根据所述第二终端的标识,将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
  15. 根据权利要求14所述的第一终端,其特征在于,所述第一终端,还包括:
    第一生成单元,用于在所述第一发送单元将与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识发送给所述IKMS实体之前,根据第一共享密钥,生成第一消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
    相应的,所述第一发送单元,具体用于:
    将第一消息发送给所述IKMS实体,其中,所述第一消息包括与所述第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及所述第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性。
  16. 根据权利要求15所述的第一终端,其特征在于,所述第一共享密钥包括用于生成消息验证码的第一密钥、以及用于加密数据的第二密钥。
  17. 根据权利要求14-16任一项所述的第一终端,其特征在于,所述第二接收单元,具体用于:
    接收所述IKMS实体发送的第二消息,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性;
    相应的,所述第二发送单元,包括:
    第一验证模块,用于根据第一共享密钥,验证所述第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
    第二发送模块,用于确定所述第二消息验证码通过验证之后,根据所述第二终端的标识将与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,发送给所述第二终端。
  18. 根据权利要求14-16任一项所述的第一终端,其特征在于,所述第二接收单元,具体用于:
    接收所述IKMS实体发送的第三消息,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
    相应的,所述第二发送单元,包括:
    第二验证模块,用于根据所述IKMS实体的公钥,验证所述与所述第二终端对应的签名信息;
    第三发送模块,用于确定所述与所述第二终端对应的签名信息通过验证之后,根据所述第二终端的标识将与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及所述与所述第二终端对应的签名信息,发送给所述第二终端。
  19. 一种第二终端,其特征在于,包括:
    第一发送单元,用于向第一终端发送与所述第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
    第一接收单元,用于接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、以及加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
    生成单元,用于根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥;
    解密单元,用于根据所述对称密钥对加密后的与所述第二终端对应的私钥进行解密,得到与所述第二终端对应的私钥。
  20. 根据权利要求19所述的第二终端,其特征在于,所述第一接收单元,具体用 于:
    接收所述第一终端发送的与所述第二终端对应的第二半会话密钥参数、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由身份密钥管理中心IKMS实体生成的;
    相应的,所述生成单元,包括:
    验证模块,用于验证所述与所述第二终端对应的签名信息;
    生成模块,用于确定所述与所述第二终端对应的签名信息通过验证之后,根据与所述第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成对称密钥。
  21. 一种IKMS实体,其特征在于,包括:
    接收单元,用于接收第一终端发送的与第二终端对应的第一半会话密钥参数、以及所述第二终端的标识,其中,与所述第二终端对应的第一半会话密钥参数和所述第二终端的标识用于生成加密后的与所述第二终端对应的私钥;
    生成单元,用于生成与所述第二终端对应的第二半会话密钥参数,并根据第二终端的标识、与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成加密后的与所述第二终端对应的私钥,其中,与所述第二终端对应的第二半会话密钥参数用于解密所述加密后的与所述第二终端对应的私钥;
    发送单元,用于将与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、以及加密后的与所述第二终端对应的私钥,发送给所述第一终端。
  22. 根据权利要求21所述的IKMS实体,其特征在于,所述生成单元,包括:
    第一生成模块,用于根据所述第二终端的标识,生成与所述第二终端对应的私钥;
    第二生成模块,用于生成与所述第二终端对应的第二半会话密钥参数,并根据与第二终端对应的第一半会话密钥参数、以及与所述第二终端对应的第二半会话密钥参数,生成与所述第二终端对应的对称密钥;
    第三生成模块,用于根据与所述第二终端对应的对称密钥,对与所述第二终端对应的私钥进行加密,生成加密后的与所述第二终端对应的私钥。
  23. 根据权利要求22所述的IKMS实体,其特征在于,所述接收单元,具体用于:
    接收第一终端发送的第一消息,其中,所述第一消息包括与第二终端对应的第一半会话密钥参数、所述第二终端的标识、以及第一消息验证码,其中,所述第一消息验证码用于验证所述第一消息由所述第一终端发出、且用于验证所述第一消息的完整性;
    相应的,所述第一生成模块,包括:
    验证子模块,用于根据第一共享密钥,验证所述第一消息验证码,其中,所述第一共享密钥为所述第一终端与身份密钥管理中心IKMS实体之间协商的密钥;
    第一生成子模块,用于确定所述第一消息验证码通过验证之后,根据所述第二终端的标识生成与所述第二终端对应的私钥。
  24. 根据权利要求23所述的IKMS实体,其特征在于,所述第一共享密钥包括用于生成消息验证码的第三密钥、以及用于加密数据的第四密钥。
  25. 根据权利要求21-24任一项所述的IKMS实体,其特征在于,所述发送单元,包括:
    第四生成模块,用于根据第一共享密钥,生成第二消息验证码,其中,所述第一共享密钥为所述第一终端与所述IKMS实体之间协商的密钥;
    第一发送模块,用于将第二消息发送给所述第一终端,其中,所述第二消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及第二消息验证码,其中,所述第二消息验证码用于验证所述第二消息由所述IKMS实体发出、且用于验证所述第二消息的完整性。
  26. 根据权利要求21-24任一项所述的IKMS实体,其特征在于,所述发送单元,包括:
    第五生成模块,用于根据所述IKMS实体的私钥,生成与所述第二终端对应的签名信息,其中,与所述第二终端对应的签名信息用于验证加密后的与所述第二终端对应的私钥是由所述IKMS实体生成的;
    第二发送模块,用于将第三消息发送给所述第一终端,其中,所述第三消息包括与所述第二终端对应的第二半会话密钥参数、所述第二终端的标识、加密后的与所述第二终端对应的私钥、以及与所述第二终端对应的签名信息。
  27. 一种终端设备,其特征在于,所述终端设备包括:处理器、存储器、发送器;所述发送器耦合至所述处理器,所述处理器控制所述发送器的发送动作;
    其中,所述存储器用于存储计算机可执行程序代码,所述程序代码包括指令;当所述处理器执行所述指令时,所述指令使所述终端设备执行如权利要求1-5任一项所述的方法。
  28. 一种终端设备,其特征在于,所述终端设备包括:处理器、存储器、发送器;所述发送器耦合至所述处理器,所述处理器控制所述发送器的发送动作;
    其中,所述存储器用于存储计算机可执行程序代码,所述程序代码包括指令;当所述处理器执行所述指令时,所述指令使所述终端设备执行如权利要求6或7所述的方法。
  29. 一种IKMS实体,其特征在于,所述IKMS实体包括:处理器、存储器、通信接口;所述通信接口耦合至所述处理器;
    其中,所述存储器用于存储计算机可执行程序代码,所述程序代码包括指令;当所述处理器执行所述指令时,所述指令使所述IKMS实体执行如权利要求8-13任一项所述的方法。
PCT/CN2018/103503 2018-02-05 2018-08-31 私钥生成的方法和设备 WO2019148832A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/947,497 US20200366474A1 (en) 2018-02-05 2020-08-04 Private key generation method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810112754.4A CN110120927B (zh) 2018-02-05 2018-02-05 私钥生成的方法和设备
CN201810112754.4 2018-02-05

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/947,497 Continuation US20200366474A1 (en) 2018-02-05 2020-08-04 Private key generation method and device

Publications (1)

Publication Number Publication Date
WO2019148832A1 true WO2019148832A1 (zh) 2019-08-08

Family

ID=67479592

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103503 WO2019148832A1 (zh) 2018-02-05 2018-08-31 私钥生成的方法和设备

Country Status (3)

Country Link
US (1) US20200366474A1 (zh)
CN (1) CN110120927B (zh)
WO (1) WO2019148832A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491825B (zh) * 2020-11-13 2021-11-09 常熟理工学院 一种安全的物联网系统实现方法
CN113472780A (zh) * 2021-06-30 2021-10-01 上海和数软件有限公司 一种用于区块链的数据加密传输方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490901A (zh) * 2013-09-30 2014-01-01 广东南方信息安全产业基地有限公司 基于组合密钥体系的密钥生成和发放方法
US20150281187A1 (en) * 2014-03-28 2015-10-01 Fujitsu Limited Key transmitting method and key transmitting system
CN106936570A (zh) * 2015-12-31 2017-07-07 华为技术有限公司 一种密钥配置方法及密钥管理中心、网元
CN107579826A (zh) * 2016-07-04 2018-01-12 华为技术有限公司 一种网络认证方法、中转节点及相关系统

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7590236B1 (en) * 2004-06-04 2009-09-15 Voltage Security, Inc. Identity-based-encryption system
CN101465728A (zh) * 2008-12-17 2009-06-24 成都市华为赛门铁克科技有限公司 一种密钥分发方法、系统及装置
CN101908959B (zh) * 2010-07-28 2012-08-22 北京握奇数据系统有限公司 一种建立共享密钥的方法、设备及其系统
US8750512B2 (en) * 2011-10-28 2014-06-10 Aruba Networks, Inc. Authenticating an ephemeral Diffie-Hellman using a trusted third party
IN2013MU01234A (zh) * 2013-03-28 2015-04-10 Tata Consultancy Services Ltd
JP2016518075A (ja) * 2013-04-05 2016-06-20 インターデイジタル パテント ホールディングス インコーポレイテッド ピアツーピア通信およびグループ通信のセキュリティ保護
WO2015113138A1 (en) * 2014-01-31 2015-08-06 Teixem Corp. System and method for performing secure communications
CN105553951B (zh) * 2015-12-08 2019-11-08 腾讯科技(深圳)有限公司 数据传输方法和装置
US9705859B2 (en) * 2015-12-11 2017-07-11 Amazon Technologies, Inc. Key exchange through partially trusted third party
CN107317789B (zh) * 2016-04-27 2020-07-21 华为技术有限公司 密钥分发、认证方法,装置及系统
SG10201606061PA (en) * 2016-07-22 2018-02-27 Huawei Int Pte Ltd A method for unified network and service authentication based on id-based cryptography
CN106533662A (zh) * 2016-11-03 2017-03-22 北京奇虎科技有限公司 一种传输网络安全密钥的方法与装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490901A (zh) * 2013-09-30 2014-01-01 广东南方信息安全产业基地有限公司 基于组合密钥体系的密钥生成和发放方法
US20150281187A1 (en) * 2014-03-28 2015-10-01 Fujitsu Limited Key transmitting method and key transmitting system
CN106936570A (zh) * 2015-12-31 2017-07-07 华为技术有限公司 一种密钥配置方法及密钥管理中心、网元
CN107579826A (zh) * 2016-07-04 2018-01-12 华为技术有限公司 一种网络认证方法、中转节点及相关系统

Also Published As

Publication number Publication date
US20200366474A1 (en) 2020-11-19
CN110120927A (zh) 2019-08-13
CN110120927B (zh) 2022-03-25

Similar Documents

Publication Publication Date Title
Malina et al. A secure publish/subscribe protocol for internet of things
CN108111301B (zh) 基于后量子密钥交换实现ssh协议的方法及其系统
US11880831B2 (en) Encryption system, encryption key wallet and method
Chen et al. RCDA: Recoverable concealed data aggregation for data integrity in wireless sensor networks
CN109314705B (zh) 使用组加密密钥的用于大规模可伸缩动态多点虚拟私有网络的系统、装置和方法
US8345875B2 (en) System and method of creating and sending broadcast and multicast data
CN105684344B (zh) 一种密钥配置方法和装置
US11044084B2 (en) Method for unified network and service authentication based on ID-based cryptography
US20170033925A1 (en) Methods and apparatus for implementing a communications system secured using one-time pads
JP2013539248A (ja) 通信ネットワークにおける安全なノード承認
US11736304B2 (en) Secure authentication of remote equipment
CN110087240B (zh) 基于wpa2-psk模式的无线网络安全数据传输方法及系统
US20170134369A1 (en) Method and apparatus for providing time-assisted authentication protocol
WO2014114080A1 (zh) 数据加密保护方法及系统
US11671259B2 (en) Neighbor awareness networking password authentication
JP2019507971A5 (zh)
WO2019148832A1 (zh) 私钥生成的方法和设备
WO2016176902A1 (zh) 一种终端认证方法、管理终端及申请终端
KR20170114927A (ko) 모바일 센서 네트워크를 위한 경량 인증 프로토콜을 제공하는 방법 및 장치
CN109155913A (zh) 网络连接方法、安全节点的确定方法及装置
Kurera et al. Node-to-Node Secure Data Transmission Protocol for Low-power IoT Devices
US20130074152A1 (en) Method and devices for security association (sa) between devices
Wei et al. A key management scheme based generalized Signcryption in mobile ad hoc network
CN115766268A (zh) 处理方法、装置、设备及存储介质
Yang et al. A trusted multi-party authentication scheme based on proactive-ElGamal threshold secret sharing system

Legal Events

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

Ref document number: 18904231

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

Country of ref document: EP

Kind code of ref document: A1