WO2009076811A1 - 密钥协商方法、用于密钥协商的系统、客户端及服务器 - Google Patents

密钥协商方法、用于密钥协商的系统、客户端及服务器 Download PDF

Info

Publication number
WO2009076811A1
WO2009076811A1 PCT/CN2008/072547 CN2008072547W WO2009076811A1 WO 2009076811 A1 WO2009076811 A1 WO 2009076811A1 CN 2008072547 W CN2008072547 W CN 2008072547W WO 2009076811 A1 WO2009076811 A1 WO 2009076811A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
client
server
exchange message
public
Prior art date
Application number
PCT/CN2008/072547
Other languages
English (en)
French (fr)
Inventor
Hongtao Gao
Original Assignee
Huawei Technologies Co., Ltd.
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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Priority to EP08862820A priority Critical patent/EP2173055A1/en
Publication of WO2009076811A1 publication Critical patent/WO2009076811A1/zh

Links

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/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/0847Key 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 identity based encryption [IBE] schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/061Network architectures or network communication protocols for network security for supporting key management in a packet data network for key exchange, e.g. in peer-to-peer networks
    • 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/16Implementing security features at a particular protocol layer
    • H04L63/166Implementing security features at a particular protocol layer at the transport layer

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a transport layer security protocol.
  • TLS is a widely used protocol in the field of communication technology. It provides communication layer authentication, data privacy and integrity protection for the application layer.
  • the handshake protocol part is responsible for the authentication, negotiation encryption and integrity of the communication parties. Protection algorithm and key. Since the key is non-public information, the two parties need to negotiate the key when establishing communication, so that both parties can obtain the same key that is safe and accurate.
  • DH_anon Anonymous Diffie-Hellman
  • DH Diffie-Hellman with signature
  • DHE Ephemeral Diffie-Hellman with signature
  • PSK shared secret Pre-shared key
  • the RSA algorithm is an asymmetric cryptographic algorithm named after the inventor's name. It is a certificate-based key negotiation method. The flow is shown in Figure 1:
  • Step 101 The client initiates a session by sending a client-client (Client-Hello) message.
  • client the party that initiates the call
  • server the party that receives the call
  • any party that sends the Client-Hello message can be called when any terminal initiates a call to another terminal.
  • Called client receiving Client-Hello One side of the text can be called a server.
  • Client-Hello message parameters include: The highest TLS/Security Socket Layer version supported by the client, the random number, the session identifier, and the CipherSuite list supported by the terminal. A list of compression methods.
  • Step 102 After receiving the client-Hello message, the server selects the ciphertext group that supports the RSA mode from the list of ciphertexts supported by the terminal, and returns a server-to-server call.
  • the server- hello packet contains the ciphertext family selected by the server and other parameters.
  • Steps 101 and 102 are used by the client and server to negotiate security capabilities to determine which ciphertext family to use.
  • Step 103 The server sends a certificate (Certificate) message to the client.
  • the Certificate 4 contains a certificate or a certificate chain.
  • the server needs to generate a temporary public key private key pair; if it is an encrypted certificate, it does not need to generate a temporary public key private key pair.
  • the subsequent steps describe the flow of the RSA method by taking the case where the server certificate is a signed certificate.
  • Step 104 The server generates a temporary public key private key pair.
  • Step 105 The server sends a server key exchange (server_key_exchange) message to the client.
  • the message includes the temporary public key generated in step 104 and the signature of the server on the public key, the signature being generated by the private key corresponding to the server certificate in step 103.
  • Step 106 The server sends a certificate request (certificate_request) message to the client. This step is optional. If the server needs to authenticate the client, the server sends a certificate_request message to the client. The message includes the desired certificate type and a list of acceptable certificate authorities' names.
  • Step 107 The server sends an end (ServerHelloDone) message to the client, indicating that the message of the server part has been sent.
  • the message does not contain any parameters.
  • the server waits for a response from the client.
  • Steps 103 through 107 are used for message transmission of the server portion of the key agreement.
  • Step 108 The client verifies the server certificate sent by step 103.
  • the server public key in the certificate is used to verify the signature of the temporary public key of the server sent in step 105. If the authentication succeeds, the server is authenticated successfully, and the server can be considered to be safe and effective.
  • Step 109 The client sends a certificate (certificate) message to the server, where the packet includes a certificate or a certificate chain of the client.
  • This step is usually performed when the server requires the client's certificate, that is, the server performs step 106 and executes.
  • Step 1010 The client generates a pre-master key.
  • Step 101 The client sends a pre-master key to the server.
  • the client sends a client key exchange (client_key_exchange) message to the server.
  • client_key_exchange client key exchange
  • the message contains the pre-master key encrypted by the server temporary public key sent from step 105.
  • Step 1012 The client calculates a master key from the pre-master key by using a prescribed algorithm.
  • Step 1013 The client sends a certificate-verify packet to the server. This step is optional. If the client performs step 109, that is, the client certificate is sent to the server, the client cascades all the mutual interaction messages before the step with the master key master key, and uses the client private key. The cascaded data is signed, and then the client sends the signature to the server, that is, a certificate-verify message.
  • Step 1014 Calculate the master key master-key according to a pre-master key according to a predetermined algorithm.
  • the server decrypts the message sent in step 1011 with the server temporary private key, and obtains the pre-master key, and then calculates the master key master-key according to the re-master key according to the specified algorithm.
  • step 106 the server needs to perform step 1015 to complete the authentication of the client to ensure that the key negotiation is safe and reliable.
  • Step 1015 The server verifies the data sent in step 1013 by using the client certificate. If the authentication succeeds, the client authentication succeeds, indicating that the key negotiation is safe and reliable.
  • Steps 108 through 1015 are typically used for server-to-client authentication and client-side messaging.
  • the key negotiation process for authentication using the RSA encryption algorithm has ended.
  • DH Diffie-Hellmon
  • Each communication party will generate public parameters and private parameters, and then exchange public parameters. Then use the public parameters of the other party and their own private parameters to get the same algorithm according to a certain algorithm. Key.
  • the server sends the server side DH public parameter to the client in the server-key-exchange message, and the client sends the client DH public parameter to the server in the client-key-exchange message, and then the server and the client
  • the pre-shared key is obtained by public parameter calculation, and then the master key master key is generated to complete the key negotiation.
  • the fixed DH mode means that the DH public parameters of the two communicating parties are included in the respective certificates and sent to the other party.
  • the server and the client extract the DH public parameters of the other party from the counterpart certificate, calculate the pre-master key, and then generate the master. Key master key, complete key negotiation.
  • the short-lived DH mode means that the DH public parameters of the two communicating parties are respectively signed and sent to the other party, that is, the server sends its own DH public parameters and signs the parameters to the client by using the private key corresponding to the server certificate; the client verifies the signature by It can be judged whether these parameters have been modified during the transmission process, thereby preventing man-in-the-middle attacks; the client sends the client DH public parameters and the signatures of these parameters to the server, and the server can verify whether the parameters are sent during the transmission process by verifying the signature. It has been modified to prevent man-in-the-middle attacks. Then both the server and the client extract the DH public parameters of the other party from the other party's certificate, calculate the shared key pre-master key, and then generate the master key master key to complete the key negotiation. .
  • shared key mode The shared key method is based on a key shared by the client/server in advance to implement mutual authentication and temporary session key negotiation.
  • the RSA method is a certificate-based key negotiation method.
  • the method binds the user identity (ID, identification) and the public key by issuing a certificate for the user.
  • the digital certificate authentication center that issues the certificate ( CA, Certificate Authority) verifies the validity of the certificate, that is, the operation performed in step 108 to determine the validity of the identity of the other party.
  • the verification includes: verifying the CA signature, the process of verifying the CA signature may involve the certificate chain, CA cross-certification; whether the Ma Zheng card is added to the Certificate Revocation List (CRL); whether the Ma Quan card is within the validity period.
  • This series of verification operations requires a lot of storage and processor resources, especially for the limited processing power of mobile terminals and the limited transmission speed of mobile networks, and the resource consumption is more prominent.
  • the DH algorithm is used for key negotiation. It is not possible to authenticate the two parties. It is assumed that a malicious intermediary can impersonate the client or the server will not be recognized. Therefore, using the DH algorithm for key negotiation is vulnerable to man-in-the-middle attacks. low.
  • the technical problem to be solved by the embodiments of the present invention is to provide a key negotiation method, a system for key negotiation, a client, and a server, so that the process of key negotiation can be convenient, safe, and easy to implement.
  • an embodiment of the present invention provides a key negotiation method, where the method includes:
  • Receiving information of a key negotiation method including a password mechanism based on a user identity returned by the server;
  • a client key exchange message is sent to the server, so that the server can obtain the master key through the information carried in the client key exchange message.
  • a key negotiation method includes:
  • a client call message that includes a ciphertext family list, where the ciphertext family list of the call message includes a ciphertext family that uses a key agreement mode based on a user identity crypto mechanism;
  • the master key is obtained according to the information carried in the client key exchange message.
  • a system for key agreement includes: a client, configured to send a client call message including a ciphertext list, where the ciphertext family of the call message is in the list a ciphertext family containing a key agreement mode using a user identity based cryptosystem; receiving information including a key agreement mode based on a user identity cryptosystem; Server key exchange message; the server sends the end message sent by the server; obtains the master key; sends the client key exchange message;
  • a server configured to receive a client call message sent by the client, and select a ciphertext group that uses a key agreement mode based on a user identity-based cryptosystem from the ciphertext family list, and send the ciphertext group to the client; Sending a server key exchange message to the client; receiving a client key exchange message sent by the client; sending a server end message to the client; and exchanging the message according to the client key
  • the information carried in the key is obtained.
  • a client comprising:
  • the session initiation unit is configured to send a client call message including a ciphertext family list to the server, and initiate a session, where the ciphertext family list of the call message includes a key agreement mode using a password mechanism based on the user identity.
  • a client key exchange message sending unit configured to send a client key exchange message to the server, so that the server can obtain the master key by using the information carried in the client key exchange message;
  • the first receiving unit is configured to: Receiving, by the server, information about a key negotiation manner including a password mechanism based on a user identity; receiving a server key exchange message sent by the server; and receiving a server sending end message sent by the server;
  • a client key obtaining unit configured to obtain a master key by using the information received by the first receiving unit.
  • a server comprising:
  • a second receiving unit configured to receive a client call message that is sent by the client and that includes a ciphertext list; and receive a client key exchange message sent by the client;
  • a selecting unit configured to select, from the ciphertext family list, a ciphertext family that uses a key agreement mode based on a user identity-based cryptographic mechanism, and send the ciphertext family to the client;
  • a server key exchange message sending unit configured to send a server key exchange message to the client
  • a server sending end message sending unit configured to send a server sending result to the client Bunch of messages
  • the server key obtaining unit is configured to obtain a master key according to the information carried in the client key exchange message.
  • the embodiment of the present invention uses the key agreement method based on the password mechanism of the user identity, and uses the server ID as the server public key, and does not need to rely on the certificate for authentication, thereby effectively simplifying the key negotiation process.
  • the system resources are saved, and the key negotiation method based on the password mechanism of the user identity can complete the authentication of the identity of the other party in the process of key negotiation, effectively preventing the attack of the middleman and ensuring the security of the system,
  • the shared key that is known to both parties in the communication is used to prevent one party from deny that it has done some action, there is no undeniable problem, and no special setting is required, and the application range is wide.
  • Figure 1 is a flow chart of the prior art
  • Embodiment 1 of a method for key negotiation according to an embodiment of the present invention
  • FIG. 3 is a flowchart of Embodiment 2 of a key negotiation method according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of Embodiment 3 of a method for key negotiation according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a system for performing key negotiation according to an embodiment of the present invention. detailed description
  • the embodiment of the invention provides a key negotiation method suitable for the TLS protocol, a system for key negotiation, a client and a server, so that the key negotiation process is simpler, the application scope is wide, and the security is safe.
  • an asymmetric key mechanism which may be referred to as an Identity-Based Cryptograph (IBC)
  • IBC Identity-Based Cryptograph
  • the user public key used by the method may be the ID of the user, or may be a hash value after the hash of the user ID, and the public key may be used by a certain algorithm.
  • the step derives the private key.
  • the hash formula used for hashing is a public parameter, any terminal can be obtained. Therefore, the hash value after the hash of the user ID is called the public key, and the ID of the user directly has the same meaning as the public key. Therefore, it is generally said that the user ID is used as the user public key.
  • IBC User Identity Based Authentication and Key Agreement
  • IBE Identity-based Encryption
  • IBC User-based Authentication
  • the present invention provides a specific implementation manner of implementing key negotiation using the foregoing method, which will be separately described below.
  • the embodiment of the present invention mainly improves the key negotiation in which the key negotiation is performed by using the foregoing IBC method.
  • cipher Suite In the TLS protocol, different cipher suites (Cipher Suite) are defined for different combinations of key agreement, encryption, and integrity protection.
  • a ciphertext family is used to identify a combination of key agreement, encryption, and integrity protection.
  • selecting a ciphertext family means that the key agreement, encryption, and integrity protection methods of the ciphertext family identity are selected.
  • RSA indicates that RSA is used for key agreement
  • DES CBC indicates encrypted block link (CBC, Cipher) using Data Encryption Standard (DES) algorithm.
  • Block cipher ) mode performs cryptographic operations
  • SHA represents the use of a secure hash algorithm (SHA, Safe Hash Algorithm ) for integrity operations.
  • NULL means no encryption
  • RC4-128 International Data Encryption Algorithm (IDEA) - CBC, DES-CBC, 3DES-EDE (encrypt decrypt encrypt) - CBC represents different force-to-smart algorithms
  • MD5 messages digest version 5, message digest Version 5
  • SHA represents different integrity algorithms.
  • the ciphertext family list contains a list of key agreement, encryption, and integrity protection supported by the client, in descending order of priority.
  • the existing cipher text list does not include the key negotiation method in the IBC mode. Therefore, the ciphertext family marked with the IBC mode is provided for use by the key negotiation method.
  • the key negotiation method is marked as IBAKA ciphers:
  • IBAKA-CK (Chen-Kudla) indicates that the key negotiation is performed by IBAKA.
  • the algorithm used is Chen-Kudla.
  • Chen-Kudla algorithm There are many algorithms that can be used in IBAKA mode, for example, Chen-Kudla algorithm, Smart (S). Mart) - Chen-Kudla algorithm, etc., here the Chen-Kudla algorithm is taken as an example.
  • IB AKA-CK is just an example. It can be replaced with other characters, as long as it is defined in advance.
  • the key negotiation method is marked as the ciphertext family of the IBE mode:
  • IBE-BF (Bonne-Franklin) indicates that the key negotiation is performed by IBE.
  • the algorithm used is Boneh-Franklin.
  • Boneh-Franklin algorithm There are many algorithms that can be used in IBE mode, for example, Boneh-Franklin algorithm, Boneh- Boyen (wave industry) algorithm, etc., here is illustrated by the Boneh-Franklin algorithm.
  • IBE-BF is just an example. It can be replaced with other characters, as long as it is defined in advance.
  • the key negotiation method is marked as IBS ciphertext family:
  • DHE-IBS-Hs means to use the IBS signature to protect the temporary DH parameters for key negotiation.
  • the algorithm used is Hess.
  • algorithms that can be used in IBS mode for example, Hess algorithm, Cha-Cheon -Books) Algorithms, etc.
  • the Hess algorithm is taken as an example.
  • DHE-IBS-Hs is just an example. It can be replaced with other characters, as long as it is defined in advance.
  • the first embodiment of the key negotiation method provided by the embodiment of the present invention uses the IBAKA as an example to describe the process of performing key agreement.
  • Step 201 The client sends a client.
  • a Hello message initiates a session to the server.
  • the Client-Hello message includes the following parameters: The highest TLS/SSL supported by the client, the random number, the session identifier, the list of supported ciphertext families, and the list of supported compression methods.
  • the client supports the IBAKA mode and wants to perform key negotiation in the IBAKA mode
  • a certain ciphertext family based on the IBAKA mode is set to a higher priority, that is, placed in front of the ciphertext family list.
  • the client needs to set different priorities for the key negotiation mode supported by the client. Level, so that the server can choose the key negotiation method that the client most wants to use.
  • IBAKA is used. Therefore, IBAKA has the highest priority in the ciphertext list of the Client-Hello message.
  • Step 202 The server selects a key negotiation mode and sends the key to the client.
  • the server After receiving the client-Hello message, the server selects the ciphertext family supported by the server and has the highest priority in the ciphertext list provided by the client-Hello message. In this embodiment, the ciphertext family based on the IBAKA mode is selected. E.g
  • step 201 and step 202 the client and the server complete the security capability negotiation, and select the IBAKA mode for key negotiation.
  • Step 203 The server sends a server key exchange (Server-key-exchange) message to the client, where the packet carries the server IBC parameter and the server public key information.
  • server key exchange Server-key-exchange
  • the server public key information includes the server's public key, that is, the server ID, and may also include the server public key validity period.
  • the server public key validity period is used to control the validity period of the server public key. If the validity period is exceeded, the new server public key needs to be enabled. , which is the new server ID. After receiving the validity period of the server public key, the client can judge whether the received server public key is expired by judging whether the validity period expires.
  • the private key of the server is generated by the private key generation center (KGC, Key Generate Center) using the server public key.
  • KGC Key Generate Center
  • the KGC uses the server public key plus the server public key validity period to generate the server private key. Therefore, when the server public key expires, the corresponding server private key will also expire, so the server public key validity period is also valid for the server private key. After the expiration of the validity period and the new server public key is enabled, the server needs to send a new server ID and a new expiration date to the KGC to apply for a new private key.
  • the server and the client share the same KGC.
  • the server public key information also includes the KGC identifier of the server, and the identifier is the domain name address of the KGC. After obtaining the domain name address of the KGC, the client may go to the domain name address to obtain the public parameter of the KGC.
  • the server IBC parameters vary according to the IBAKA method, and the IBAKA method is assumed to be the Chen-Kudla algorithm, and the server IBC parameters can be represented by T s . In order to get T s , the server needs to complete two steps in advance:
  • the server sends the server ID to the KGC.
  • the server ID can be represented by ID S.
  • the server private key S s can be described by formula:
  • KGC refers to the KGC that generates the private key for the client and server.
  • the public parameters of KGC usually include: Gl, G2, e A , P, Ppub, HI, H2.
  • P is the generator of group G1
  • parameter Ppub sP
  • s is the master key of KGC
  • HI and H2 are two hash functions. HI converts any binary string consisting of 0 and 1 into an element in G1.
  • H2 converts the elements in G2 into binary strings of 0 and 1.
  • the server IBC parameter T s is the hash value of the random number a and the server ID selected by the server.
  • steps 1 and 2 can be completed after the start of the process, before step 203, or before the start of the process, for example, when the server performs key negotiation last time.
  • Step 204 The server sends a ServerHelloDone packet to the client.
  • the message indicating the server part has been sent. This message does not contain any parameters.
  • the server waits for a response from the client.
  • Step 205 The client sends a Client-key-exchange packet to the server, where the packet carries the client IBC parameter and the client public key information.
  • the client public key information includes the client's public key, that is, the client ID, and may also include the client public key validity period.
  • the client public key validity period is similar to the server public key validity period, and is used to control the validity period of the client public key. For this validity period, a new client public key needs to be enabled.
  • the server can determine whether the client public key is expired by determining whether the validity period expires.
  • the client's private key is generated by KGC using the client public key.
  • KGC uses the client public key plus the client public key validity period to generate the client private key.
  • the client public key validity period is also the client private key validity period.
  • Exceeding the client public key validity period the client needs to send the client ID and the new validity period. KGC applies for a new private key.
  • the client public key information also includes the KGC identifier of the client, and the identifier is the domain name address of the KGC. After the server obtains the domain name address of the KGC, the server can go to the address to obtain the public parameters of the KGC.
  • the client IBC parameters vary according to the IBAKA mode algorithm. Assuming the Chen-Kudla algorithm is used, the client IBC parameters can be represented by T c . In order to get T c , the client needs to complete two steps in advance:
  • the client sends the client ID to the KGC.
  • the client ID can be represented by ID C.
  • the client private key S c can be described by formula:
  • both the server and the client obtain the ID of the other party, the IBC parameter of the other party, the public parameters of the KGC shared by the server and the client, and their own private key. Then, the client and the server can calculate the master key according to the obtained parameters. Steps 206 to 208 in FIG. 2 are the master key calculation process of the client, and steps 209 to 2011 are the master key calculation process of the server.
  • the client obtains the ID of the server when sending the information to the server. Therefore, the server-key-exchange message may carry the ID of the server as the server public key, or Does not carry the ID of the server that is the server's public key.
  • Step 206 the client private key Sc :, a client server ID, the server parameters T s IBC and the KGC disclosed parameters, calculate the shared key K c, K c may be written as:
  • Kc e ⁇ (S c , Ts+bQs)
  • Step 209 the server to server private key S s, client ID, customer side IBC parameters T c and the KGC disclosed parameters, calculate the shared key K s, K s may be written as:
  • K s e ⁇ (S s , Tc+aQc)
  • step 206 There is no order relationship between step 206 and step 209, which may be performed sequentially or simultaneously.
  • Step 207 The client generates a pre-master key pre-master key.
  • the shared key K obtained in step 206 can be directly used as a pre-master key.
  • a two-byte client version number (Client_ Version) can also be added before K.
  • the Client- Version is the highest TLS version number supported by the client.
  • Step 2010 The server generates a pre-master key pre-master key.
  • the shared key K obtained in step 209 can be directly used as a pre-master key.
  • a two-byte Client-Version can be added as a pre-master key before the K.
  • the Client_Version is a client.
  • the server can obtain the Client-Version through the Client-Hello message obtained in step 201.
  • step 207 and step 2010, There is no order relationship between step 207 and step 2010, which can be executed sequentially or simultaneously.
  • Step 208 The client generates a master key from the pre-master key pre-master key.
  • Master 201 avoids Step 201 1.
  • the server generates a master key master key from the pre-master key pre-master key.
  • step 208 There is no order relationship between step 208 and step 201 1 , which may be performed sequentially or simultaneously.
  • ClientHello. random and ServerHello. random are separated by 1 J for ClientHello and ServerHello A random number in two messages.
  • the Master_ secret is 48 bytes in length.
  • the Server-key-exchange and the client-key-exchange can be implemented in the following format:
  • ibakaserverpara represents the server-side IBC parameter
  • ServerPublicSecret represents the server public key information
  • “String ⁇ 0..1024>ServerIdentity” represents the server ID
  • “ValidityPeriod” represents the public key validity period
  • “String ⁇ 0..1024>Serverkgc , represents the address of the server KGC
  • " ibakaclientpara represents the client IBC parameter
  • “ClientPublicSecret” represents the client public key information.
  • the key negotiation method is used in Embodiment 1 of the key negotiation method provided by the embodiment of the present invention. Since the IBC uses the user ID as the user public key, the user ID and the user public key are not required to be bound by using the certificate. There is no need to rely on certificates for authentication, and the corresponding steps of using certificate authentication are not required, which simplifies the key negotiation process and saves storage and processor resources, especially for mobile terminals with limited processing power and mobile networks. Limited biography The speed of transmission is more obvious. At the same time, the identity of the other party can be authenticated during the key negotiation process, which effectively prevents the attack of the middleman and ensures the security of the system. It does not need special settings and has a wide application range.
  • the second embodiment of the key negotiation method provided by the embodiment of the present invention uses the IBS as an example to describe the process of performing key agreement.
  • the second embodiment of the key negotiation method uses the IBS to perform the signature protection DH parameter as an example.
  • the process is as shown in FIG. 3:
  • Step 301 The client sends a Client-Hello message to the server to initiate a session.
  • the Client-Hello message includes the following parameters: The highest TLS/SSL supported by the client, the random number, the session identifier, the list of supported ciphertext families, and the list of supported compression methods.
  • the ciphertext group based on the IBS mode is set to the highest priority, that is, placed in front of the ciphertext family list.
  • the DH parameter is protected by using the IBS signature as an example, and the algorithm used is Hess. Therefore, the ciphertext family marked with the key negotiation method as "DHE-IBS-Hs" can be placed in the client. The front of the ciphertext list of Hello messages.
  • Step 302 The server selects a key negotiation mode and sends the key to the client.
  • the server After receiving the client-Hello message, the server selects the ciphertext family supported by the server and has the highest priority in the ciphertext list provided by the client-Hello message.
  • the ciphertext family based on the IBS mode is selected. For example, TLS-DHE-IBS-Hs- WITH-3DES-EDE-CBC-SHA, and then send the selected ciphertext family to the client. Choosing a ciphertext family based on the IBS method means choosing to use the IBS method to achieve the secret. Key negotiation.
  • step 301 and step 302 the client and the server complete the security capability negotiation, and select the DHE-IBS-Hs mode for key negotiation.
  • Step 303 The server sends a Server_key_exchange message to the client, where the server includes the server DH public parameter, the IBS signature of the DH public parameter, and the server public key information.
  • the server public key information includes the server's public key, that is, the server ID, and may also include the server public key validity period and the server KGC address.
  • the server public key validity period is used to control the validity period of the server public key. If the validity period is exceeded, the new server public key, that is, the new server ID, needs to be enabled. After receiving the validity period of the server public key, the client can determine whether the received server public key is expired by determining whether the validity period expires.
  • the private key of the server is generated by the server KGC using the server public key.
  • the KGC uses the server public key plus the server public key validity period to generate the server private key.
  • the server public key validity period is also the server private key validity period.
  • the server public key validity period is exceeded, and the new server public key is enabled, the server needs to send a new server ID. And the new expiration date goes to KGC to apply for a new private key.
  • the client After receiving the validity period of the server public key, the client can judge whether the received server public key is expired by judging whether the validity period expires.
  • the KGC of the server is the KGC for generating the private key by the server
  • the KGC of the client is the KGC for generating the private key by the client
  • the KGC of the server and the KGC of the client may be served by the same KGC, or may be different.
  • KGC serves, when the KGC is served by different KGCs, and the client does not know the server KGC address, it needs to send the server KGC address to the client in this step.
  • the client can send a Client-Hello message to the server, that is, the client knows the ID of the server, that is, knows the public key of the server, so the server in the packet ID information is not required and may not be carried.
  • the IBS is used to sign the DH public parameters, that is, the DH public parameters are encrypted using the server private key and the server's KGC public parameters. Therefore, before this step, the server must complete two steps in advance:
  • step 1 and step 2 For detailed methods of step 1 and step 2, reference may be made to the description in step 203 in the first embodiment, and the description is not repeated here.
  • Steps 1 and 2 can be completed after the start of the process, before step 303, or before the process begins, for example, when the server performs key agreement last time.
  • the IBS algorithm used by the server to sign the DH public parameters is the format of the Server-key-exchange document.
  • ServerDHParams indicates that the server DH exposes parameters.
  • the signature indicates the signature of the server DH public parameter using IBS.
  • the signature process is as follows:
  • PI is the element in a group G1 that the server selects immediately, and k is the random number that the server selects immediately.
  • m is the signed message, here is the DH public parameter of the server.
  • the two values V and u are the signature values.
  • the Signature parameter can be defined as follows: Struct ⁇
  • hs - ⁇ 1..2 6-1> and hs_u ⁇ 1..2 A 16-l> are the two values after the signature operation in the Hess algorithm.
  • Step 304 The server sends a ServerHelloDone packet to the client.
  • the message indicating the server part has been sent. This message does not contain any parameters.
  • the server waits for a response from the client.
  • Step 305 The client verifies the signature in the server-key-exchange message.
  • the client After receiving the Server-key-exchange packet, the client verifies the signature of the parameter carried by the IBS carried in the packet. Before the verification, the client needs to obtain the KGC public parameters of the server and the public key of the server in advance, and obtain the KGC public parameters of the server, which is usually obtained by the KGC address of the server to the KGC of the server.
  • the KGC of the server and the KGC of the client may be served by the same KGC, it may also be performed by different KGCs. Therefore, when served by different KGCs, the client may not know the KGC address of the server, and the timing of the client acquiring the KGC address of the server. This step can be obtained from the Server-key-exchange packet, or it can be obtained before the last key negotiation with the server.
  • obtaining the KGC public parameters of the server may be performed in this step, or may be obtained before the process, for example, when the key negotiation with the server was last.
  • the signature verification process in the client-to-server-key-exchange document is as follows:
  • the verification is successful, it means that the server DH public parameters have not been replaced or modified, and the identity of the server is also trusted, which is equivalent to authenticating the server.
  • Step 306 The client sends a Client-key-exchange packet to the server.
  • the Client-key-exchange contains the client DH public parameters.
  • the client-key-exchange message may further include a signature and a client public key information of the DH public parameter by using an IBS algorithm, so that when the server needs to authenticate the client, the client identity can be confirmed by the verification signature.
  • the signature method is to encrypt the DH public parameters using the client private key and the public parameters of the client's KGC. If the server does not need to authenticate the client, the Client-key-exchange message may not include the signature of the DH parameter.
  • the Client-key-exchange message contains the signature of the DH parameter by the IBS algorithm
  • the Client-key-exchange message can be defined as follows:
  • ClientDHParams indicates that the client DH exposes parameters.
  • step 305 There is no order relationship between step 305 and step 306, which may be performed sequentially or simultaneously. carried out.
  • Step 307 The server verifies the signature in the Client-key-exchange message.
  • the server When the DH parameter is signed, the server will verify the signature. If the verification is passed, it indicates that the client DH public parameters are not replaced or modified, and the client's identity is trusted, which is equivalent to authenticating the client. , can effectively prevent the attack of the middleman.
  • step 307 may not be performed.
  • Step 308 The client presses the Diffie-Hellmon algorithm to generate a DH shared key pre-shared key according to the server DH public parameter and the client DH private parameter, thereby obtaining a pre-master key pre-master key.
  • the method of obtaining the pre-master key from the shared key in the second embodiment reference may be made to the related description in the first embodiment. .
  • Step 309 The server generates a DH shared key pre-shared key according to the Diffie-Hellmon algorithm according to the client DH public parameter and the server DH private parameter, thereby obtaining a pre-master key pre-master key.
  • a pre-master key pre-master key for the method of obtaining the pre-master key from the shared key in the second embodiment, reference may be made to the related description in the first embodiment.
  • step 308 and step 309 There is no order relationship between step 308 and step 309, which may be performed sequentially or simultaneously.
  • the client and the server generate the same DH shared key with the DH public parameters of the other party through the respective DH private parameters in steps 308 and 309, respectively.
  • Step 3010 The client generates a master key master key from the pre-master key pre-master key.
  • Step 301 The server generates a master key master key from the pre-master key pre-master key.
  • the client or the server generates the master key method from the re-master key.
  • the master key algorithm is calculated by the re-master key in the TLS.
  • the method described in the first embodiment of the key negotiation method provided in the embodiment of the present invention may be referred to. It will not be repeated here.
  • the key negotiation is now complete.
  • the DH parameter is protected by the IBS signature, so that the communication parties can authenticate each other, effectively preventing the attack of the middleman, and significantly improving the security of the system.
  • the second embodiment of the key negotiation method provided by the embodiment of the present invention does not need to rely on the certificate for authentication, and does not need to perform complicated steps related to the certificate, saves network resources, does not need special settings, and has a wide application range.
  • the second embodiment of the key negotiation method provided by the embodiment of the present invention does not need to rely on the certificate for authentication, and does not need to perform complicated steps related to the certificate, and does not need to be specially set, and has a wide application range.
  • the third embodiment of the key negotiation method provided by the embodiment of the present invention uses the IBE as an example to describe the process of the key negotiation.
  • the third process of the key negotiation method provided by the embodiment of the present invention is as shown in FIG. 4:
  • Step 401 The client sends a Client-Hello message to the server to initiate a session.
  • the Client-Hello 4 message includes the following parameters: the highest version supported by the client, TLS/SSL, random number, session identifier, list of supported ciphertext families, and list of supported compression methods.
  • the client supports the IBE mode and wants to perform key negotiation in this way, set a certain ciphertext family based on the IBE mode to the highest priority, that is, in front of the ciphertext family list.
  • key negotiation methods There are usually many types of key negotiation methods that the client can support. In some cases, some unexpected situations occur. For example, if the server does not support the IBE mode, you need to select other methods. The client needs to set different priorities for the key negotiation mode supported by the client. Level, so that the server can try to choose the key negotiation method that the client wants to use.
  • Step 402 The server selects a key negotiation mode and sends the key to the client.
  • the server After receiving the Client-Hello message, the server provides the ciphertext family in the Client-Hello message.
  • the ciphertext family supported by the server and having the highest priority is selected in the list.
  • the ciphertext family based on the IBE mode is selected, for example, TLS-IBE-BF- WITH-AES-128-CBC-SHA, and then the selection is performed.
  • the ciphertext is sent to the client. Selecting the ciphertext family based on the IBE mode means choosing to use the IBE method to implement key negotiation.
  • step 401 and step 402 the client and the server complete the security capability negotiation, and select the IBE-BF mode for key negotiation.
  • Step 403 The server sends a Server-key-exchange packet to the client, where the packet carries the server public key information.
  • the server public key information includes the server's public key, that is, the server ID, and may also include the server public key validity period and the server KGC address.
  • the server public key validity period is used to control the validity period of the server public key. If the validity period is exceeded, the new server public key, that is, the new server ID, needs to be enabled. After receiving the validity period of the server public key, the client can determine whether the received server public key is expired by determining whether the validity period expires.
  • the private key of the server is generated by the server KGC using the server public key.
  • the KGC uses the server public key plus the server public key validity period to generate the server private key.
  • the server public key validity period is also the server private key validity period.
  • the server public key validity period is exceeded, and the new server public key is enabled, the server needs to send a new server ID. And the new expiration date goes to KGC to apply for a new private key.
  • the KGC of the server is the KGC for generating the private key by the server
  • the KGC of the client is the KGC for generating the private key by the client
  • the KGC of the server and the KGC of the client may be served by the same KGC, or may be different. KGC served. In the case of a different KGC, and the client does not know the server KGC address, you need to send the server KGC address to the client in this step.
  • the client can send a Client-Hello message to the server, that is, the client knows the ID of the server, that is, the public key of the server, so the service in the message
  • the device ID information is not required and may not be carried.
  • the Server-key-exchange can be defined as:
  • Serverldentity is the server ID
  • ValidityPeriod is the public key validity period
  • Step 404 The server sends a ServerHelloDone packet to the client.
  • the message indicating the server part has been sent. This message does not contain any parameters.
  • the server waits for a response from the client.
  • Step 405 The client generates a pre-master key pre-master key according to the prior art TLS protocol specification.
  • Step 406 The client sends a Client-key-exchange packet to the server.
  • the client obtains the server through the KGC address of the server to the KGC of the server.
  • KGC exposes the parameters, uses the server's KGC public parameters, the server public key and the client-selected control parameters to force the pre-master key, and carries the pre-master key in the client-key-exchange message. Sent to the server.
  • the Client-key-exchange message may also include a server public key and control parameters.
  • the control parameter may be the server public key validity period parameter described in step 403, or the client public key validity period may be specified as a control parameter by the client. If the server public key validity period is specified by the client as the control parameter, the Client-key-exchange message must contain control parameters.
  • Client-key-exchange can be defined as follows:
  • Step 407 The client generates a master key from the pre-master key according to the TLS protocol specification. Step 406 and step 407 have no order relationship, and may be executed sequentially or simultaneously.
  • Step 408 The server uses the KGC public parameter of the server, the server public key, and the control parameter to receive the force.
  • the secret pre-master key is decrypted, the pre-master key is obtained, and the master key is generated from the re-master key according to the TLS ten-party specification.
  • the client or the server generates the master key method from the re-master key.
  • the master key algorithm is calculated by using the pre-master key in the TLS. For reference, refer to the description in the first embodiment of the key negotiation method provided by the embodiment of the present invention. This is not repeated. The key negotiation is now complete.
  • the client generates the pre-master.
  • the key pre-master key is sent to the server, and the client and the server generate a master key according to the pre-master key, complete the key negotiation, and protect the pre-master key transmission by using the server's KGC public parameters, the server public key and the control parameters.
  • the process so that the process of key negotiation is safe, reliable, very easy to implement, and is not limited by the application environment.
  • the application scope is wide, and the shared key that is known in advance by the communication parties is not used, preventing one party from denying that it has done some
  • the third embodiment of the key negotiation method provided by the embodiment of the present invention does not need to rely on a certificate for authentication, and does not need to perform cumbersome steps related to the certificate, thereby saving network resources.
  • the third embodiment of the key negotiation method provided by the embodiment of the present invention does not need to rely on a certificate for authentication, and does not need to perform cumbersome steps related to the certificate.
  • a client key exchange message is sent to the server, so that the server can obtain the master key through the information carried in the client key exchange message.
  • the master key is obtained according to the information carried in the client key exchange message.
  • the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • FIG. 5 The structure of the system for key agreement provided by the embodiment of the present invention is as shown in FIG. 5, which includes:
  • the client 5100 is configured to send a client call message that includes a ciphertext family list, where the ciphertext family list of the call message includes a ciphertext family that uses a key agreement mode based on a user identity cipher mechanism; Information about the key negotiation mode of the password mechanism based on the user identity; receiving the server key exchange message; receiving the end message sent by the server sent by the receiving server; obtaining the master key; sending the client key exchange message.
  • the server 5200 is configured to receive a client call message sent by the client, and select a ciphertext group that uses a key agreement mode based on a user identity-based password mechanism from the ciphertext family list, and send the message to the client. Transmitting a server key exchange message to the client; receiving a client key exchange message sent by the client; sending a server sending end message to the client; according to the client key exchange message The information carried in the text obtains the master key.
  • the client 5100 in the system further includes:
  • the session initiating unit 5130 is configured to send a client call message including a ciphertext family list to the server 5200, and initiate a session, where the ciphertext family list of the call message includes a key negotiation method using a password mechanism based on a user identity.
  • the client key exchange message sending unit 5140 is configured to send the client to the server 5200. Key exchange message, so that the server 5200 can obtain the master key through the information carried in the client key exchange message;
  • the first receiving unit 5120 is configured to receive, by the server 5200, information about a key negotiation manner that includes a password mechanism based on a user identity; a server key exchange message sent by the receiving server 5200; and a server sending end report sent by the receiving server.
  • a key negotiation manner that includes a password mechanism based on a user identity
  • a server key exchange message sent by the receiving server 5200
  • a server sending end report sent by the receiving server.
  • the client key obtaining unit 51 10 is configured to obtain a master key by using the information received by the first receiving unit.
  • the client key obtaining unit 5110 in the client 5100 further includes:
  • a first shared key unit 5112 configured to obtain, according to the user identity-based cryptographic mechanism, a user-identified cryptographic mechanism parameter from the server key exchange message; Generating a central public parameter, a client private key, a user identity based password mechanism parameter of the server 5200, and a server user identity as a server public key, to obtain a shared key;
  • the first master key unit 511 1 is configured to obtain the master key by using the shared key; the first obtaining unit 51 13 is configured to obtain the Diffy of the server 5200 from the key exchange message. Herman discloses the parameters and signs the public parameters using the server private key;
  • the first verification unit 5114 is configured to verify the signature of the public parameter by using the IBC by using a pre-obtained server private key generation center public parameter and a server user identity as a server public key;
  • a second master key unit 5115 configured to generate Diffy Hermann using the Dieffiehmann public parameter of the server 5200 and the Diffiemannian public parameter of the client 5100 when the first verification unit verifies the passage Sharing a key, using the Diffie Hermann shared key as a pre-master key, generating the master key by using the pre-master key;
  • a third master key unit 5116 configured to generate a pre-master key according to a transport layer security protocol, and generate the master key by using the pre-master key;
  • the first master key unit 51 11 in the client key obtaining unit further includes:
  • the first key generating unit 51 11 1 is configured to generate the master key by using the shared key as a pre-master key.
  • the second key generating unit 51 112 is configured to generate the master key by using the shared key and the client version number as a pre-master key by using the pre-master key.
  • the client key exchange unit 5140 in the client 5100 further includes: a first client sending unit 5141, configured to send, to the server 5200, a client that carries the user identity based password mechanism parameter of the client 5100. Key exchange message.
  • the second client sending unit 5142 is configured to send, to the server 5200, a client key exchange message carrying the Diffel Herman public parameter of the client 5100.
  • the signing unit 5143 is configured to carry, in the client key exchange message, a signature that uses the IBC to perform the Diffel Herman public parameter of the client 5100.
  • the third client sending unit 5144 is configured to encrypt the pre-master key by using a pre-obtained server private key generation center public parameter, a server user identity as a server public key, and a control parameter selected by the client, and carry the The client key exchange message is sent to the server 5200.
  • the control parameter unit 5145 is configured to generate the control parameter, and send the control parameter to the server 5200 in the client key exchange message.
  • the server 5200 in the system further includes:
  • the second receiving unit 5250 is configured to receive a client call message that is sent by the client 5100 and that includes a ciphertext list; and receive a client key exchange message sent by the client 5100.
  • the selecting unit 5220 is configured to select, from the ciphertext family list, a ciphertext family in a key agreement manner using a password mechanism based on a user identity, and send the ciphertext family to the client 5100.
  • the server key exchange message sending unit 5210 is configured to send a server key exchange message to the client 5100.
  • a server sending end message sending unit configured to send a server sending end message to the client 5100
  • the server key obtaining unit 5270 is configured to obtain a master key according to information carried in the client key exchange message, and complete key negotiation.
  • the second obtaining unit 5230 is configured to obtain, from the client key exchange message, a signature made by the IBC on the Diffel Herman public parameter of the client 5100.
  • the second verification unit 5240 is configured to verify, by using the pre-obtained client private key generation center public parameter and the client user identity as the client public key, that the use of the IBC to disclose the Diffelmann of the client 5100
  • the signature is made by the parameter; after the verification is passed, the fifth master key unit 5271 is used to generate the Diffy Herman using the Dieffiehmann public parameter of the server 5200 and the Diffiemannian public parameter of the client 5100. Shared key.
  • the parameter obtaining unit 5260 is configured to obtain the control parameter from the key exchange message.
  • the server key obtaining unit 5270 in the server 5200 further includes:
  • a second shared key unit 5272 configured to obtain, from the key exchange message, a user identity based password mechanism parameter of the client 5100, and a client user identity of the client public key;
  • the cryptographic mechanism of the identity obtains the shared key by using the pre-acquired private key generation center public parameter, the server private key, the user identity-based cryptographic mechanism parameter of the client 5100, and the client user identity;
  • a fourth master key unit 5274 configured to obtain the master key by using the shared key
  • a fifth master key unit 5271 configured to acquire the client 5100 from the key exchange message Philip Herman public parameters; using the Diffie Herman public parameters of the server 5200 and the Diffie Hermann public parameters of the client 5100 to generate a Diffie Herman shared key to the Diffie Herman
  • the shared key is used as a pre-master key, and the master key is generated by the pre-master key;
  • a sixth master key unit 5273 configured to obtain an encrypted pre-master key from the key exchange message; use a server private key to generate a central public parameter, a server user identity as a server public key, and a client selection
  • the control parameter decrypts the pre-master key to obtain a pre-master key, and the master key is generated by the pre-master key.
  • the fourth master key unit 5274 in the server key obtaining unit 5270 further includes:
  • the third key generating unit 52741 is configured to generate the master key by using the shared key as a pre-master key.
  • the fourth key generating unit 52742 is configured to generate the master key by using the shared key and the client version number as a pre-master key by using the pre-master key.
  • the server key exchange message sending unit 5210 in the server 5200 further includes:
  • the first server sending unit 5211 is configured to send, to the client 5100, a server key exchange message carrying a user identity based crypto mechanism parameter of the server.
  • the second server sending unit 5212 is configured to carry the Duffy Herman public parameter of the server 5200 and the signature of the public parameter by using the IBC in the server key exchange message, to the client 5100. send.
  • the client embodiment provided by the embodiment of the present invention is basically the same as the client 5100 described in the embodiment of the system for the key negotiation. The description is not repeated here.
  • the server embodiment provided by the embodiment of the present invention is basically the same as the server 5200 described in the system embodiment for the key negotiation provided by the embodiment of the present invention, and the description is not repeated here.
  • the present invention can be implemented by hardware, or by software plus necessary general hardware platform.
  • the technical solution of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several The instructions are for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a computer device which may be a personal computer, server, or network device, etc.
  • the above describes a key negotiation method, a system for key negotiation, a client, and a server provided by the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Description

密钥协商方法、 用于密钥协商的系统、 客户端及服务器 技术领域
本发明涉及通信技术领域, 尤其涉及一种适用于传输层安全协议
( TLS , Transport Layer Security Protocol ) 的密钥协商方法、 用于密钥协 商的系统、 客户端及服务器。 背景技术
TLS是一种在通信技术领域得到广泛应用的协议, 它为应用层提供通 信双方认证、数据保密和完整性保护,其中,握手协议( handshake protocol ) 部分负责通信双方的认证、 协商加密、 完整性保护算法和密钥, 由于密钥 是非公开的信息, 因此通信双方在建立通信时需要对密钥进行协商, 以使 通信双方可以获得安全准确的相同密钥。
目前握手协议釆用的密钥协商方法主要有五种: RSA ( Rivest -Shamir
-Adleman ) 方式、 匿名迪菲赫尔曼方式 ( Anonymous Diffie-Hellman , DH_anon ) 、 固定 DH方式 (Diffie-Hellman with signature, DH ) 、 短暂 DH方式 ( Ephemeral Diffie-Hellman with signature, DHE ) 、 共享密钥方 式 (pre-shared key, PSK ) 。 下面介绍一下以上几种密钥协商方法的实现 过程。
1、 RSA方式
RSA算法是一种非对称密码算法, 其以发明人名字进行命名, 是一种 基于证书的密钥协商方法, 其流程如图 1所示:
步骤 101、客户端通过发送客户端呼叫(Client— Hello )报文发起会话。 在 TLS 中定义先发起呼叫的一方为客户端 (client ) , 接收呼叫的一 方为服务器 ( server ) , 因此无论任何终端在向另一个终端发起呼叫时, 发送 Client— Hello报文的一方都可以被称为客户端, 接收 Client— Hello报 文的一方都可以被称为服务器。
Client— Hello报文的参数包括: 客户端支持的最高的 TLS/安全套接层 协议层 (SSL, Security Socket Layer )版本, 随机数, 会话标识符, 终端 支持的密文族 ( CipherSuite ) 列表, 支持的压缩方法列表。
步骤 102、 服务器收到 Client— Hello报文后, 从终端支持的密文族列 表中选择支持 RSA方式的密文族, 返回服务器呼叫 ( server— hello )报文。
server— hello报文中包含服务器选择的密文族, 及其他参数。
步骤 101和 102用于客户端和服务器协商安全能力, 确定用哪种密文 族。
步骤 103、 服务器发送证书 (Certificate )报文给客户端。
该 Certificate 4艮文中包含一个证书或一个证书链。
如果步骤 103中服务器发送的证书是签名证书, 则服务器需要生成临 时的公钥私钥对; 如果是加密证书, 则不需要生成临时的公钥私钥对。 后 续步骤以服务器证书是签名证书的情况为例说明 RSA方式的流程。
步骤 104、 服务器生成临时的公钥私钥对。
步骤 105、 服务器发送服务器密钥交流( server— key— exchange )报文 给客户端。 该报文中包含步骤 104中生成的临时公钥, 以及服务器对公钥 的签名, 该签名由步骤 103中的服务器证书对应的私钥生成。
步骤 106、 服务器发送证书请求 ( certificate— request )报文给客户端。 本步骤是可选的, 如果服务器需要对客户端做认证, 则服务器发送 certificate— request报文给客户端。 该报文包括期望的证书类型和可接受的 证书管理机构的名字列表。
步骤 107、 服务器发送结束( ServerHelloDone )报文给客户端, 指示 服务器部分的消息已发送结束。 该消息不含任何参数, 发送完该消息后, 服务器等待客户端的响应。
步骤 103到步骤 107用于密钥协商的服务器部分的消息发送。 步骤 108、 客户端验证步骤 103发送来的服务器证书。
验证证书通过后, 使用证书中的服务器公钥验证步骤 105发送过来的 服务器临时公钥的签名, 验证通过即对服务器认证成功, 可以认为该服务 器是安全有效的。
步骤 109、 客户端发送证书 (certificate )报文给服务器, 该报文包含 客户端的证书或证书链。
本步骤通常在服务器要求客户端的证书时执行, 即服务器进行过步骤 106后执行。
步骤 1010、 客户端生成预先主密钥 ( pre-master key ) 。
步骤 101 1、 客户端发送预先主密钥给服务器。
客户端发送客户端密钥交流 ( client— key— exchange ) 报文给服务器。 该报文包含由步骤 105发送过来的服务器临时公钥加密的预先主密钥。
步骤 1012、 客户端通过规定的算法从 pre-master key计算得到主密钥 ( master key ) 。
步骤 1013、 客户端发送证书校验( certificate— verify )报文到服务器。 本步骤是可选的, 如果客户端执行了步骤 109, 即发送了客户端证书 给服务器, 则客户端将本步骤之前的所有双方交互消息与主密钥 master key级联, 并用客户端私钥对级联后的数据签名, 然后客户端发送该签名 给服务器, 即 certificate— verify报文。
步骤 1014、 根据 pre-master key 按规定的算法计算得到主密钥 master-key。
服务器用服务器临时私钥解密步骤 1011 发来的消息, 即可获得 pre-master key, 然后根据 re-master key 按规定的算法计算得到主密钥 master-key。
此时服务器和客户端都获得了主密钥 master-key,密钥协商基本完成, 但是为了安全性考虑, 服务器需要对客户端进行认证, 即进行步骤 106、 步骤 109及步骤 1013的动作, 那么服务器此时还需要进行步骤 1015 , 完 成对客户端的认证, 以确保此次密钥协商是安全可靠的。
步骤 1015、服务器使用客户端证书对步骤 1013发来的数据进行验证。 如果验证成功, 则对客户端认证成功, 说明此次密钥协商是安全可靠的。
步骤 108到步骤 1015通常用于服务器对客户端的认证和客户端部分 的消息发送。 至此使用 RSA加密算法进行认证的密钥协商流程结束。
2、 匿名 DH方式、 固定 DH方式和短暂 DH方式
DH (Diffie-Hellmon)是一种密钥协商机制, 通信双方会各自生成公开 参数和私有参数, 然后交换公开参数, 再用对方的公开参数和自己的私有 参数按一定的算法即可得到相同的密钥。
匿名 DH方式中,服务器在 server— key— exchange报文中发送服务器方 DH公开参数给客户端, 客户端在 client— key— exchange报文中发送客户端 DH公开参数给服务器, 之后服务器和客户端分别通过公开参数计算得到 pre-shared key , 继而生成主密钥 master key , 完成密钥协商。
固定 DH方式是指通信双方的 DH公开参数被包含在各自的证书中发 给对方 ,服务器和客户端双方再从对方证书中提取出对方的 DH公开参数, 计算得到 pre-master key, 继而生成主密钥 master key, 完成密钥协商。
短暂 DH方式指通信双方的 DH公开参数被各自签名后发送给对方, 即服务器发送自己的 DH公开参数以及利用服务器证书对应的私钥对这些 参数做签名到客户端; 客户端通过验证该签名, 可以判断这些参数在发送 过程中是否被修改过, 从而防止中间人攻击; 客户端发送客户端 DH公开 参数以及对这些参数作的签名给服务器, 服务器通过验证签名, 可以判断 这些参数在发送过程中是否被修改过, 以防止中间人攻击, 然后服务器和 客户端双方再从对方证书中提取出对方的 DH公开参数, 计算得到共享密 钥 pre-master key, 继而生成主密钥 master key, 完成密钥协商。
3、 共享密钥方式 共享密钥方式是基于客户端 /服务器预先共享的为双方所知的密钥,来 实现双方认证和临时会话密钥协商。
在对现有技术的研究和实践过程中, 发明人发现现有技术存在以下问 题:
1、 RSA方式是一种基于证书的密钥协商方法, 该方法通过为用户签 发证书将用户身份 ( ID , identification ) 和公钥绑定, 使用证书前, 需向 签发证书的数字证书认证中心 ( C A , Certificate Authority )验证证书的有 效性, 即步骤 108进行的操作, 以确定对方身份的有效性。 该验证包括: 验证 CA签名, 验证 CA签名的过程可能涉及到证书链、 CA交叉认证; 马全证是否被加入证书 回目录 ( CRL, Certificate Revocation List ) ; 马全证 是否在有效期内。 这一系列的验证操作需要耗费很多存储和处理器资源, 尤其是对于移动终端有限的处理能力以及移动网络有限的传输速度, 资源 耗费更加突出。
2、 使用 DH 算法进行密钥协商, 不能对通信双方认证, 假设有恶意 中间人冒充客户端或服务器攻击对方将不能被识别, 因此使用 DH算法进 行密钥协商容易受到中间人的攻击, 系统安全性较低。
3、 使用共享密钥方式进行密钥协商, 需要预先具备为通信双方部署 为双方所知密钥的条件, 这需要根据具体的环境使用不同的方式, 有些环 境下则很难实现, 尤其在网络中更不易实现。 同时使用共享密钥方式时, 因为通信双方预先都知道共享密钥, 无法防止一方否认其做过某个动作, 即存在不可否认问题。 发明内容
本发明实施例要解决的技术问题是提供一种密钥协商方法、 用于密钥 协商的系统、 客户端及服务器, 以使密钥协商的过程可以便捷、 安全、 易 于实现。 为解决上述技术问题, 本发明实施例一方面, 提供了一种密钥协商方 法, 所述方法包括:
向服务器发送包含密文族列表的客户端呼叫报文, 发起会话, 所述呼 叫报文的密文族列表中包含使用基于用户身份的密码机制的密钥协商方 式的密文族;
接收所述服务器返回的包含基于用户身份的密码机制的密钥协商方 式的信息;
接收所述服务器发送的服务器密钥交流报文;
接收所述服务器发送的服务器发送结束报文;
获得主密钥;
向服务器发送客户端密钥交流报文, 以使服务器可以通过客户端密钥 交流报文携带的信息获得主密钥。
另一方面, 提供了一种密钥协商方法, 所述方法包括:
接收客户端发送的包含密文族列表的客户端呼叫报文, 所述呼叫报文 的密文族列表中包含使用基于用户身份的密码机制的密钥协商方式的密 文族;
从所述密文族列表中选择使用基于用户身份的密码机制的密钥协商 方式的密文族, 发送给所述客户端;
向所述客户端发送服务器密钥交流报文;
向所述客户端发送服务器发送结束报文;
接收客户端发送的客户端密钥交流报文;
根据所述客户端密钥交流报文中携带的信息获得主密钥。
另一方面, 提供了一种用于密钥协商的系统, 所述系统包括: 客户端, 用于发送包含密文族列表的客户端呼叫报文, 所述呼叫报文 的密文族列表中包含使用基于用户身份的密码机制的密钥协商方式的密 文族; 接收包含基于用户身份的密码机制的密钥协商方式的信息; 接收服 务器密钥交流报文;接收服务器发送的服务器发送结束报文;获得主密钥; 发送客户端密钥交流报文;
服务器, 用于接收所述客户端发送的客户端呼叫报文; 从所述密文族 列表中选择使用基于用户身份的密码机制的密钥协商方式的密文族, 发送 给所述客户端; 向所述客户端发送服务器密钥交流报文; 接收所述客户端 发送的客户端密钥交流报文; 向所述客户端发送服务器发送结束报文; 根 据所述客户端密钥交流报文中携带的信息获得主密钥。
另一方面, 提供了一种客户端, 所述客户端包括:
会话发起单元, 用于向服务器发送包含密文族列表的客户端呼叫报 文, 发起会话, 所述呼叫报文的密文族列表中包含使用基于用户身份的密 码机制的密钥协商方式的密文族;
客户端密钥交流报文发送单元, 用于向服务器发送客户端密钥交流报 文, 以使服务器可以通过客户端密钥交流报文携带的信息获得主密钥; 第一接收单元, 用于接收所述服务器返回的包含基于用户身份的密码 机制的密钥协商方式的信息; 接收服务器发送的服务器密钥交流报文; 接 收服务器发送的服务器发送结束报文;
客户端密钥获取单元, 用于通过所述第一接收单元接收的信息获得主 密钥。
另一方面, 提供了一种服务器, 所述服务器包括:
第二接收单元, 用于接收客户端发送的包含密文族列表的客户端呼叫 报文; 接收客户端发送的客户端密钥交流报文;
选择单元, 用于从所述密文族列表中选择使用基于用户身份的密码机 制的密钥协商方式的密文族, 向所述客户端发送;
服务器密钥交流报文发送单元, 用于向所述客户端发送服务器密钥交 流报文;
服务器发送结束报文发送单元, 用于向所述客户端发送服务器发送结 束报文;
服务器密钥获取单元, 用于根据所述客户端密钥交流报文中携带的信 息获得主密钥。
由以上技术方案可以看出, 本发明实施例由于使用了基于用户身份的 密码机制的密钥协商方式, 使用服务器 ID作为服务器公钥, 不需要依赖 证书进行认证, 有效简化了密钥协商的流程, 节约了系统资源, 且使用基 于用户身份的密码机制的密钥协商方式在密钥协商的过程中就可以完成 对对方身份的认证, 有效防止了中间人的攻击, 保障了系统的安全性, 不 使用通信双方预先都知道的共享密钥, 防止一方否认其做过某个动作, 不 存在不可否认问题, 且不需要进行特别的设置, 应用范围较广。 附图说明
图 1为现有技术流程图;
图 2为本发明实施例提供的密钥协商方法实施例一流程图;
图 3为本发明实施例提供的密钥协商方法实施例二流程图;
图 4为本发明实施例提供的密钥协商方法实施例三流程图;
图 5为本发明实施例提供的进行密钥协商的系统实施例结构示意图。 具体实施方式
本发明实施例提供了一种适用于 TLS协议的密钥协商方法、用于密钥 协商的系统、 客户端及服务器, 以使密钥协商的过程更加简便、 应用范围 广、 且安全。
在本发明实施例提供的密钥协商方法实施例中, 使用了一种可以被称 为基于用户身份的密码机制 (IBC, Identity-Based Cryptograph ) 的非对称 密钥机制来进行密钥的协商, 该方法使用的用户公钥可以是用户的 ID,也 可以是用户 ID经过哈希后的哈希值, 通过一定的算法使用公钥可以进一 步衍生出私钥。
由于进行哈希时使用的哈希公式为公开参数, 任何终端都可以获得, 因此将用户 ID经过哈希后的哈希值称为公钥与直接将用户的 ID称为公钥 具有相同的含义, 因此通常都统一称之为使用用户 ID作为用户公钥。
其中, IBC常用的可以实现的方法包括: 基于用户身份的认证和密钥 十办商 ( IBAKA, Identity-based Authentication and Key Agreement ) 、 基于 用户身份的加密( IBE , Identity-based Encrypt )、基于用户身份的签名( IBS , Identity-based Signature ) , 本发明实施例提供了使用上述方法实现密钥协 商的具体实施方式, 以下将分别说明。
在 TLS协议中握手协议部分的密钥协商、加密和完整性保护的方法都 有^ ί艮多种, 而且各种密钥协商方式、 各种加密方法和各种完整性保护方法 可以灵活组合, 本发明实施例主要是对其中的密钥协商进行改进, 即使用 上述 IBC的方法进行密钥协商。
在 TLS协议中, 对不同的密钥协商、加密和完整性保护组合定义了不 同的密文族 ( Cipher Suite ) , 使用一个密文族标识一个密钥协商、 加密和 完整性保护的组合, 通信双方在建立会话时, 选择一个密文族, 即意味着 选择了该密文族标识的密钥协商、 加密和完整性保护的方法。
例如密文族 TLS— RSA— WITH— DES— CBC— SHA中, RSA表示使用 RSA 方式进行密钥协商, DES CBC 表示使用数据加密标准 ( DES , Data Encryption Standard ) 算法的加密块链接 (CBC, Cipher Block cipher )模 式做加密操作, SHA表示使用安全哈希算法( SHA, Safe Hash Algorithm ) 做完整性操作。
下面的密文族实例表示 RSA 方式可以与哪些加密及完整性保护的方 法相结合:
Cipher Suite TLS— RSA— WITH— NULL— MD 5
Cipher Suite TLS— RSA— WITH— NULL— SHA Cipher Suite TLS—RSA— WITH— RC4— 128— MD5
Cipher Suite TLS—RSA— WITH— RC4— 128— SHA
Cipher Suite TLS—RSA— WITH— IDEA— CBC— SHA
Cipher Suite TLS—RSA— WITH— DES— CBC— SHA
Cipher Suite TLS—RSA— WITH— 3DES—EDE— CBC— SHA
其中, 空 (NULL ) 表示不加密; RC4— 128、 国际数据加密技术算法 ( IDEA, International Data Encryption Algorithm ) —CBC , DES— CBC , 3DES— EDE (力口密解密力口密, encrypt decrypt encrypt )—CBC表示不同的力口 密算法; MD5 (信息摘要算法版本 5 , message digest Version 5 )及 SHA 表示不同的完整性算法。
在 Client— Hello报文中, 密文族列表包含客户端支持的密钥协商、 加 密和完整性保护相组合的列表, 按优先级递减次序排列。
由于现有的密文族列表中不包含 IBC方式的密钥协商方法, 因此本实 施例提供了密钥协商方法标记为 IBC方式的密文族, 以供使用, 例如, 密 钥协商方法标记为 IBAKA方式的密文族:
TLS_IBAKA_CK_WITH_RC4_128 SHA
TLS— IBAKA— CK— WITH— 3DES— EDE— CBC— SHA
TLS— IBAKA— CK— WITH— AES— 128— CBC— SHA
TLS— IBAKA— CK— WITH— AES— 256— CBC— SHA
其中 IBAKA— CK (陈-库达, Chen-Kudla )表示用 IBAKA方式进行密 钥协商, 所用算法为 Chen-Kudla, IBAKA方式可以使用的算法有很多种, 例如, Chen-Kudla算法、 Smart (斯玛特) -Chen-Kudla算法等等, 此处以 Chen-Kudla算法为例进行说明。 另外需要说明的是 " IB AKA— CK" 只是一 个例子, 可以使用其它字符替代, 只要预先做好定义即可。
密钥协商方法标记为 IBE方式的密文族:
TLS—IBE—BF— WITH— RC4— 128— SHA
TLS IBE BF WITH 3DES EDE CBC SHA TLS—IBE—BF— WITH— AES— 128— CBC—SHA
TLS—IBE—BF— WITH— AES— 256— CBC—SHA
其中 IBE— BF (波讷 -富兰克林, Boneh-Franklin )表示用 IBE方式进 行密钥协商, 所用算法为 Boneh-Franklin, IBE方式可以使用的算法有艮 多种, 例如, Boneh-Franklin算法、 Boneh-Boyen (波业)算法等等, 此处 以 Boneh-Franklin算法为例进行说明。 此处需要说明的是 "IBE— BF" 只是 一个例子, 可以使用其它字符替代, 只要预先做好定义即可。
密钥协商方法标记为 IBS方式的密文族:
TLS—DHE— IBS— Hs— WITH— RC4— 128— SHA
TLS—DHE— IBS— Hs— WITH— 3DES—EDE— CBC—SHA
TLS—DHE— IBS— Hs— WITH— AES— 128— CBC—SHA
TLS—DHE— IBS— Hs— WITH— AES— 256— CBC—SHA
其中 DHE— IBS— Hs (赫斯, Hess )表示使用 IBS签名保护临时 DH参 数进行密钥协商, 所用算法为 Hess, IBS方式可以使用的算法有很多种, 例如, Hess算法、 Cha-Cheon (查-册恩) 算法等等, 此处以 Hess算法为 例进行说明。 此处需要说明的是 "DHE— IBS— Hs" 只是一个例子, 可以使 用其它字符替代, 只要预先做好定义即可。
本发明实施例提供的密钥协商方法实施例一, 以使用 IBAKA为例对 进行密钥协商的过程进行说明。
使用 IBAKA实现密钥协商的具体流程有很多种, 本发明实施例提供 的密钥协商方法实施例一以其中一种为例进行描述, 其流程如图 2所示: 步骤 201、 客户端发送 Client— Hello报文给服务器发起会话。
该 Client— Hello报文包括的参数有: 客户端支持的最高的 TLS/SSL, 随机数, 会话标识符, 支持的密文族列表, 支持的压缩方法列表。
如果客户端支持 IBAKA方式, 并希望以 IBAKA方式进行密钥协商, 则将基于 IBAKA方式的某种密文族设置为较高优先级, 即放在密文族列 表的前面。 客户端可以支持的密钥协商方式通常有多种, 鉴于有些时候会发生一 些意外情况, 例如服务器不支持 IBAKA方式, 需要选择其它方式, 客户 端需要对自身支持的密钥协商方式设置不同的优先级, 以使服务器可以尽 量选择客户端最希望使用的密钥协商方式。
本实施例一是以 IBAKA方式,因此此 Client— Hello报文的密文族列表 中, IBAKA的优先级最高。
步骤 202、 服务器选择一种密钥协商方式, 发送给客户端。
服务器收到 Client— Hello报文后, 在 Client— Hello报文提供的密文族 列表中选择服务器支持且优先级最高的密文族, 本实施例中选择的是基于 IBAKA 方 式 的 密 文 族 , 例 如
TLS— IBAKA— CK— WITH— AES— 128— CBC—SHA, 然后将选择的密文族发送 到客户端。选择基于 IBAKA方式的密文族即表示选择使用 IBAKA方式实 现密钥协商。
在步骤 201和步骤 202中, 客户端和服务器完成了安全能力协商, 选 择使用 IBAKA方式进行密钥协商。
步骤 203、 服务器发送服务器密钥交流( Server— key— exchange )报文 给客户端, 报文中携带了服务器 IBC参数及服务器公钥信息。
其中, 服务器公钥信息包括服务器的公钥, 即服务器 ID, 同时还可以 包含服务器公钥有效期, 服务器公钥有效期用于控制服务器公钥的有效 期, 超过该有效期, 则需要启用新的服务器公钥, 即新的服务器 ID。 客户 端收到服务器公钥有效期后, 可以通过判断该有效期是否过期来判断收到 的服务器公钥是否过期。
在 IBC中,服务器的私钥由私钥生成中心( KGC, Key Generate Center) 使用服务器公钥生成, 当设置服务器公钥有效期时, 则 KGC使用服务器 公钥加服务器公钥有效期生成服务器私钥, 因此, 服务器公钥过期时, 相 应服务器私钥也会过期, 所以服务器公钥有效期同时也是服务器私钥有效 期, 超过该有效期, 且启用了新的服务器公钥后, 服务器需要发送新的服 务器 ID和新的有效期去 KGC申请新的私钥。
本发明实施例提供的密钥协商方法实施例一中服务器和客户端共用 同一个 KGC。
服务器公钥信息还包括服务器的 KGC的标识,该标识为 KGC的域名 地址, 客户端获得该 KGC的域名地址后, 可以去该域名地址获取该 KGC 的公开参数。
服务器 IBC参数根据 IBAKA方式釆用算法的不同而有所不同, 假设 IBAKA方式釆用的是 Chen-Kudla算法, 服务器 IBC参数可以用 Ts表示。 为 了获得 Ts, 服务器需要预先完成两个步骤:
1、 向 KGC申请生成服务器私钥, 且该私钥在有效期内。
月良务器向 KGC发送服务器 ID, 服务器 ID可以以 IDS表示, KGC使用服 务器 ID的哈希值 QS=H1(IDS)和 KGC的主密钥 s的乘积生成服务器私钥 Ss, 并返回给服务器。
服务器私钥 Ss用公式可以描述为:
Ss=sQs
2、 获取 KGC的公开参数, KGC是指为客户端和服务器生成私钥的 KGC。 KGC的公开参数通常包含: Gl , G2, eA, P, Ppub, HI , H2。
其中 Gl , G2分别为基于椭圓曲线构造的加法循环群和乘法循环群, eA为双线映射操作, eA: Gl X Gl = G2, 即通过双线性映射将 G1中的元素 对应到 G2中的元素。 P为群 G1的生成元, 参数 Ppub=sP, s是 KGC的主 密钥, 是 KGC在以素数为模的整数域中选取的随机数。 HI , H2为两个哈 希函数。 HI将任何 0和 1组成的二进制串转换为 G1中的元素。 H2将 G2 中的元素转换为 0和 1组成的二进制串。
服务器 IBC参数 Ts为服务器选择的随机数 a与服务器 ID的哈希值
QS=H1(IDS)的乘积, 因此服务器 IBC参数 Ts用公式可以表述为: Ts=aQs
上述步骤 1和 2可以在本流程开始后, 步骤 203之前完成, 也可以在 本流程开始之前完成, 例如服务器上一次进行密钥协商时完成。
步骤 204、服务器发送 ServerHelloDone报文给客户端。指示服务器部 分的消息已发送结束。 该消息不含任何参数。 发送完该消息后, 服务器等 待客户端的响应。
步骤 205、 客户端发送 Client— key— exchange报文给服务器, 该报文中 携带客户端 IBC参数和客户端公钥信息。
其中,客户端公钥信息包括客户端的公钥即客户端 ID, 同时还可以包 含客户端公钥有效期, 客户端公钥有效期与服务器公钥有效期类似, 用于 控制客户端公钥的有效期, 超过该有效期, 则需要启用新的客户端公钥, 服务器收到客户端公钥有效期后, 可以通过判断该有效期是否过期来判断 客户端公钥是否过期。
同时客户端的私钥为 KGC使用客户端公钥生成, 当设置有客户端公 钥有效期时, 则 KGC使用客户端公钥加客户端公钥有效期生成客户端私 钥。 客户端公钥过期时, 相应客户端私钥也会过期, 因此客户端公钥有效 期同时也是客户端私钥有效期, 超过该客户端公钥有效期, 客户端需要发 送客户端 ID和新的有效期去 KGC申请新的私钥。
客户端公钥信息还包括客户端的 KGC的标识,该标识为 KGC的域名 地址, 服务器获得该 KGC的域名地址后, 可以去该地址获取该 KGC的公 开参数。
客户端 IBC参数根据 IBAKA方式釆用算法的不同而有所不同, 假设釆 用的是 Chen-Kudla算法, 客户端 IBC参数可以用 Tc表示。 为了获得 Tc, 客 户端需要预先完成两个步骤:
1、 向 KGC申请生成客户端私钥, 且该私钥在有效期内。
客户端向 KGC发送客户端 ID, 客户端 ID可以以 IDC表示, KGC使用客 户端 ID的哈希值 QC=H1(IDC)和 KGC的主密钥 s的乘积生成客户端私钥 Sc, 并返回给客户端。
客户端私钥 Sc用公式可以描述为:
Sc=sQc
2、 获取服务器 KGC的公开参数。
客户端 IBC参数 Tc为客户端选择的随机数 b与客户端 ID的哈希值 Qc=H 1 (IDC)的乘积, 因此客户端 IBC参数 Tc用公式可以表述为:
Tc=bQ
此时服务器和客户端都获得了对方的 ID、 对方的 IBC参数、 服务器 和客户端共用的 KGC的公开参数和自己的私钥。 接着客户端和服务器就 可以根据获得的参数计算出主密钥, 图 2中步骤 206到步骤 208为客户端 的主密钥计算过程, 步骤 209到步骤 2011为服务器的主密钥计算过程。
此处需要说明的是, 客户端在步骤 201中, 向服务器发出信息时就已 经获得了服务器的 ID, 因此, Server— key— exchange报文中可以携带作为 服务器公钥的服务器的 ID, 也可以不携带作为服务器公钥的服务器的 ID。
步骤 206、 客户端以客户端私钥 Sc:、 服务器 ID、 服务器 IBC参数 Ts和 KGC的公开参数, 计算得到共享密钥 Kc, Kc用公式可以表述为:
Kc=e^(Sc, Ts+bQs)
'•' Ts=aQs; Sc=sQc;
.·. Kc=e^( sQc, aQs +bQs)= εΛ( Qc +Qs)s(a+b)
步骤 209、 服务器以服务器私钥 Ss、 客户端 ID、 客户端 IBC参数 Tc和 KGC的公开参数, 计算得到共享密钥 Ks, Ks用公式可以表述为:
Ks= e^(Ss, Tc+aQc)
■·■ Tc=bQc; Ss=sQs;
.·. Ks=e^( sQs , bQc + aQc)= e ( Qc +Qs)s(a+b)
由上可知 KC=KS=K, 因此, 在客户端进行过步骤 206, 服务器进行过 步骤 209后, 通信双方就获得了相同的共享密钥 K。
步骤 206和步骤 209之间没有顺序关系, 可以先后执行, 也可以同时 执行。
步骤 207、 客户端生成预先主密钥 pre-master key。
可以将步骤 206中获得的共享密钥 K直接作为 pre-master key, 为了 防止版本重放( Version Rollback )攻击, 也可以在 K之前加上两个字节的 客户端版本号 ( Client— Version )作为 re-master key, 该 Client— Version为 客户端支持的最高 TLS版本号。
步骤 2010、 服务器生成预先主密钥 pre-master key。
可以将步骤 209中获得的共享密钥 K直接作为 pre-master key, 为了 防止版本重放攻击, 也可以在 K之前加上两个字节的 Client一 Version作为 pre-master key, 该 Client_Version为客户端支持的最高 TLS版本号, 服务 器可以通过在步骤 201 中获得的 Client— Hello 报文中获取该 Client— Version。
步骤 207和步骤 2010之间没有顺序关系, 可以先后执行, 也可以同 时执行。
步骤 208、客户端从预先主密钥 pre-master key生成主密钥 master key„ 步骤 201 1、 服务器从预先主密钥 pre-master key 生成主密钥 master key。
步骤 208和步骤 201 1之间没有顺序关系, 可以先后执行, 也可以同 时执行。
本实施例一中客户端或服务器从 re-master key生成 master key方法 为 TLS中通用的通过 re-master key计算得到 master key的算法, 即: master— secret = PRF (pre— master一 secret, "master secret", ClientHello. random + ServerHello.random)[0..47];
ClientHello. random 和 ServerHello. random 分另1 J为 ClientHello 和 ServerHello两个报文中的随机数。 Master— secret的长度为 48字节。
此时客户端和服务器都获得了主密钥 master key, 密钥协商完成。 在本实施例中 , Server— key— exchange才艮文和 Client— key— exchange才艮文 可以使用如下格式实现:
struct {
select (KeyExchangeAlgorithm) {
/* other cases for rsa, diffie— hellman, psk, etc. */ case ibaka: /* NEW */
ibakaserverpara;
ServerPublicSecret;
};
} ServerKeyExchange;
Struct{
String<0..1024> Serverldentity;
ValidityPeriod;
string<0..1024> Serverkgc;
} ServerPublicSecret;
Struct ValidityPeriod {
Uint32 notBefore;
Uint32 not After;
} struct {
select (KeyExchangeAlgorithm) {
/* other cases for rsa, diffie— hellman, psk, etc. */ case ibaka: /* NEW */
ibakaclientpara; ClientPublicSecret;
} exchange— keys;
} ClientKeyExchange;
其中 "ibakaserverpara"代表服务器端 IBC参数; " ServerPublicSecret" 代表服务器公钥信息; "String<0..1024>ServerIdentity" 代表服务器 ID; "ValidityPeriod" 代表公钥有效期; "String<0..1024>Serverkgc,, 代表服 务器 KGC 的地址; " ibakaclientpara,, 代表客户端 IBC 参数, "ClientPublicSecret" 代表客户端公钥信息。
针对不同的算法,例如 Chen-Kudla算法、 Smart-Chen-Kudla算法等等, ibakaserverpara和 ibakaclientpara也会有不同 , 上文都是以 Chen-Kudla算 法为例进行描述的, 下面以 BF算法为例, 定义双方的参数如下:
struct {
opaque AlgObjectld;
opaque t_s<0..2A16-l>;
} ibakaServerParams; struct {
opaque AlgObjectld;
opaque t_c<1..2A16-l>;
} ibakaClientParams;
其中 , "opaque AlgObjectld" 代表算法 ID, opaque表示 IBC参数为 二进制数, 大小为 O bit到 ( 2Λ16-1 ) bits„
使用本发明实施例提供的密钥协商方法实施例一来进行密钥协商, 由 于 IBC是使用用户 ID作为用户公钥的,也就不需要使用证书对用户 ID和 用户公钥进行绑定, 因此也就不需要依赖证书进行认证, 相应使用证书认 证的相关步骤都不需要进行, 有效简化了密钥协商的流程, 节约了存储和 处理器资源, 尤其是对于移动终端有限的处理能力以及移动网络有限的传 输速度, 效果更加明显; 同时在密钥协商的过程中就可以完成对对方身份 的认证, 有效防止了中间人的攻击, 保障了系统的安全性; 且不需要进行 特别的设置, 应用范围较广
本发明实施例提供的密钥协商方法实施例二, 以使用 IBS为例对进行 密钥协商的过程进行说明。
使用 IBS实现密钥协商的具体流程有很多种, 本发明实施例提供的密 钥协商方法实施例二以使用 IBS进行签名保护 DH参数为例进行描述, 其 流程如图 3所示:
步骤 301、 客户端发送 Client— Hello报文给服务器发起会话。
该 Client— Hello报文包括的参数有: 客户端支持的最高的 TLS/SSL, 随机数, 会话标识符, 支持的密文族列表, 支持的压缩方法列表。
如果客户端支持 IBS方式, 并希望以此方式进行密钥协商, 则将基于 IBS方式的某种密文族设置为最高优先级, 即放在密文族列表的前面。
客户端可以支持的密钥协商方式通常有多种, 鉴于有些时候会发生一 些意外情况, 例如服务器不支持 IBS方式, 则需要选择其它方式。 客户端 需要对自身支持的密钥协商方式设置不同的优先级, 以使服务器可以尽量 选择客户端最希望使用的密钥协商方式。
本实施例二是以使用 IBS签名保护 DH参数为例进行描述的, 并且所 用算法为 Hess, 因此, 可以将密钥协商方法标记为 "DHE— IBS— Hs" 的密 文族放在此 Client— Hello报文的密文族列表的前面。
步骤 302、 服务器选择一种密钥协商方式, 发送给客户端。
服务器收到 Client— Hello报文后, 在 Client— Hello报文提供的密文族 列表中选择服务器支持且优先级最高的密文族, 本实施例中选择的是基于 IBS 方 式 的 密 文 族 , 例 如 TLS—DHE— IBS— Hs— WITH— 3DES—EDE—CBC—SHA,然后将选择的密文族发 送到客户端。选择基于 IBS方式的密文族即表示选择使用 IBS方式实现密 钥协商。
在步骤 301和步骤 302中, 客户端和服务器完成了安全能力协商, 选 择使用 DHE— IBS— Hs方式进行密钥协商。
步骤 303、 服务器发送 Server— key— exchange才艮文给客户端, 该才艮文中 包含服务器 DH公开参数, 用 IBS对该 DH公开参数作的签名, 以及服务 器公钥信息。
其中,服务器公钥信息包括服务器的公钥即服务器 ID, 同时还可以包 含服务器公钥有效期及服务器 KGC的地址。 服务器公钥有效期, 用于控 制服务器公钥的有效期, 超过该有效期, 则需要启用新的服务器公钥, 即 新的服务器 ID。客户端收到服务器公钥有效期后, 可以通过判断该有效期 是否过期来判断收到的服务器公钥是否过期。
同时服务器的私钥为服务器 KGC使用服务器公钥生成, 当设置服务 器公钥有效期时, 则 KGC使用服务器公钥加服务器公钥有效期生成服务 器私钥。 服务器公钥过期时, 相应服务器私钥也会过期, 因此服务器公钥 有效期同时也是服务器私钥有效期, 超过该服务器公钥有效期, 且启用了 新的服务器公钥后, 服务器需要发送新的服务器 ID和新的有效期去 KGC 申请新的私钥。
客户端收到服务器公钥有效期后, 可以通过判断该有效期是否过期来 判断收到的服务器公钥是否过期。
本发明实施例二中, 服务器的 KGC即为服务器生成私钥的 KGC, 客 户端的 KGC即为客户端生成私钥的 KGC ,服务器的 KGC和客户端的 KGC 可能由同一个 KGC担任, 也有可能由不同 KGC担任, 在由不同 KGC担 任, 且客户端不知道服务器 KGC地址时, 就需要在本步骤中发送服务器 KGC地址给客户端。
另外需要说明的是, 客户端可以向服务器发出 Client— Hello报文, 即 说明客户端知道服务器的 ID, 即知道服务器的公钥, 因此该报文中服务器 ID信息不是必须的, 可以不携带。
用 IBS对 DH公开参数作的签名, 即为使用服务器私钥、 及服务器的 KGC公开参数对该 DH公开参数进行加密, 因此本步骤之前,服务器必须 预先完成两个步骤:
1、 向服务器 KGC申请生成服务器私钥, 且该私钥在有效期内。
2、 获取服务器 KGC的公开参数。
完成步骤 1和步骤 2的详细方法, 可参考实施例一中步骤 203中的描 述, 在此不再重复描述。
步骤 1和步骤 2可以在本流程开始后, 步骤 303之前完成, 也可以在 本流程开始之前完成, 例如服务器上一次进行密钥协商时完成。
本实施例二中, 服务器对 DH公开参数做的签名使用的 IBS 算法为 该 Server— key— exchange才艮文的格式可以定义 口下:
struct {
select (KeyExchangeAlgorithm) {
case dhe_ibs:
ServerDHParams params;
Signature signed— params;
ServerPublicSecret;
Figure imgf000023_0001
其中, ServerDHParams表示服务器 DH公开参数。
签名 (Signature )表示使用 IBS对服务器 DH公开参数的签名, 在釆 用 Hess算法签名时, 签名过程如下:
r = eA(Pl , P) k, v=H2(m, r); u=vSs+kPl ,
其中 PI为服务器随即选取的一个群 Gl中的元素, k为服务器随即选 取的随机数。 m为被签名的消息, 这里就是服务器的 DH公开参数。 V和 u两个数值就是签名值, 该 Signature参数可以定义如下: struct {
select (SignatureAlgorithm) {
case ibs-hs:
digitally-signed struct {
opaque hs_v <1..2A16-1>;
opaque hs_u <1..2A16-1>;
};
};
} Signature;
其中, hs— ¥<1..2 6-1>和 hs—u<1..2A16-l>分别为 Hess算法中签名操 作后的两个值。
步骤 304、服务器发送 ServerHelloDone报文给客户端。指示服务器部 分的消息已发送结束。 该消息不含任何参数。 发送完该消息后, 服务器等 待客户端的响应。
步骤 305、 客户端验证 Server— key— exchange报文中的签名。
客户端收到 Server— key— exchange报文后, 对该报文中携带的用 IBS 对该参数作的签名进行验证。验证前,客户端需要预先获得服务器的 KGC 公开参数及服务器的公钥, 获得服务器的 KGC公开参数的方法, 通常是 通过服务器的 KGC地址到服务器的 KGC去获取。
由于服务器的 KGC和客户端的 KGC可能由同一个 KGC担任, 也有 可能由不同 KGC担任, 因此在由不同 KGC担任时, 客户端可能不知道服 务器的 KGC地址, 客户端获取服务器的 KGC地址的时机, 可以是在本步 骤进行, 从该 Server— key— exchange 报文获取, 也可以是在本流程之前, 在上一次与该服务器进行密钥协商时获取。
同样, 获取服务器的 KGC公开参数可以是在本步骤进行, 也可以是 在本流程之前, 例如在上一次与该服务器进行密钥协商时获取。
客户端对 Server— key— exchange才艮文中的签名验证过程如下: 已知消息 m (即服务器 DH公开参数)和签名(V, u),计算 r=eA(u, P) -eA(Qs, Ppub)v
如果 v = H2(m,r), 则验证成功。
如果验证成功, 表示服务器 DH公开参数未被替换或修改, 同时也代 表服务器的身份是可信的, 相当于对服务器进行了认证。
由于本步骤对服务器进行了认证, 可以有效防止中间人的攻击。
步骤 306、 客户端发送 Client— key— exchange报文给服务器。
该 Client— key— exchange才艮文中包含客户端 DH公开参数。
该 Client— key— exchange报文中还可以包含用 IBS算法对该 DH公开参 数做的签名及客户端公钥信息, 以便于在服务器需要对客户端进行认证 时, 可以通过验证签名确认客户端身份, 签名方式为使用客户端私钥、 及 客户端的 KGC的公开参数对该 DH公开参数进行加密。 如果服务器不需 要对客户端做认证,该 Client— key— exchange报文中也可以不包含对 DH参 数的签名。在 Client— key— exchange报文中包含用 IBS算法对 DH参数做的 签名时, 该 Client— key— exchange报文可以定义如下:
struct {
select (KeyExchangeAlgorithm) {
case diffie— hellman— ibs:
ClientDHParams public;
Signature signed— params;
ClientPublicSecret;
};
} ClientKeyExchange;
其中 ClientDHParams表示客户端 DH公开参数。
Signature表示使用 IBS对客户端 DH公开参数的签名,可以釆用步骤
303中 Signature的定义实现, 在此不再重复描述。
步骤 305与步骤 306之间没有顺序关系, 可以先后执行, 也可以同时 执行。
步骤 307、 服务器验证 Client— key— exchange报文中的签名。
当步骤 306中发出的 Client— key— exchange报文中包含用 IBS算法对
DH参数做的签名时, 服务器会对该签名进行验证, 如果验证通过, 表示 客户端 DH公开参数未被替换或修改,同时也代表客户端的身份是可信的, 相当于对客户端进行了认证, 可以有效防止中间人的攻击。
在服务器不需要对客户端进行认证时, 可以不进行步骤 307。
此时服务器和客户端都获得了对方的 DH公开参数。
步骤 308、 客户端按 Diffie-Hellmon算法, 根据服务器 DH公开参数 及客户端 DH私有参数生成 DH共享密钥 pre-shared key,从而得到预先主 密钥 pre-master key。本实施例二从共享密钥得到预先主密钥的方法可以参 考实施例一中的相关描述。 。
步骤 309、 服务器按 Diffie-Hellmon算法, 根据客户端 DH公开参数 及服务器 DH私有参数生成 DH共享密钥 pre-shared key,从而得到预先主 密钥 pre-master key。本实施例二从共享密钥得到预先主密钥的方法可以参 考实施例一中的相关描述。
步骤 308与步骤 309之间没有顺序关系, 可以先后执行, 也可以同时 执行。 客户端和服务器分别在步骤 308与步骤 309中, 通过各自的 DH私 有参数, 与对方的 DH公开参数生成相同的 DH共享密钥。
步骤 3010、 客户端从预先主密钥 pre-master key 生成主密钥 master key。
步骤 301 1、 服务器从预先主密钥 pre-master key 生成主密钥 master key。
客户端或服务器从 re-master key生成 master key方法为 TLS中制定 的通过 re-master key计算得到 master key算法, 可以参考在本发明实施 例提供的密钥协商方法实施例一中描述的方法, 在此不再重复。 此时密钥协商完成。
由上可知在本发明实施例提供的密钥协商方法实施例二中, 使用 IBS 签名保护 DH参数, 以使通信双方可以对对方进行认证, 有效防止了中间 人的攻击, 显著提高了系统的安全性。 同样本发明实施例提供的密钥协商 方法实施例二也不需要依赖证书进行认证, 不需要进行与证书相关的繁瑣 步骤, 节约了网络资源, 不需要进行特别的设置, 应用范围较广。
同样本发明实施例提供的密钥协商方法实施例二也不需要依赖证书 进行认证, 不需要进行与证书相关的繁瑣步骤, 不需要进行特别的设置, 应用范围较广。
本发明实施例提供的密钥协商方法实施例三, 以使用 IBE为例对密钥 协商的过程进行说明, 本发明实施例提供的密钥协商方法实施例三流程如 图 4所示:
步骤 401、 客户端发送 Client— Hello报文给服务器发起会话。
该 Client— Hello 4艮文包括的参数有:客户端支持的最高版本 TLS/SSL, 随机数, 会话标识符, 支持的密文族列表, 支持的压缩方法列表。
如果客户端支持 IBE方式, 并希望以此方式进行密钥协商, 则将基于 IBE方式的某种密文族设置为最高优先级, 即放在密文族列表的前面。
客户端可以支持的密钥协商方式通常有多种, 鉴于有些时候会发生一 些意外情况, 例如服务器不支持 IBE方式, 需要选择其它方式, 客户端需 要对自身支持的密钥协商方式设置不同的优先级, 以使服务器可以尽量选 择客户端希望使用的密钥协商方式。
本实施例是以使用 IBE 为例进行描述的, 并且所用算法为 Boneh-Franklin算法, 因此, 可以将密钥协商方法标记为 "IBE— BF" 的密 文族放在此 Client— Hello报文的密文族列表的前面。
步骤 402、 服务器选择一种密钥协商方式, 发送给客户端。
服务器收到 Client— Hello报文后, 在 Client— Hello报文提供的密文族 列表中选择服务器支持且优先级最高的密文族, 本实施例三中选择的是基 于 IBE方式的密文族, 例如 TLS—IBE—BF— WITH— AES— 128— CBC—SHA, 然后将选择的密文族发送到客户端。选择基于 IBE方式的密文族即表示选 择使用 IBE方式实现密钥协商。
在步骤 401和步骤 402中, 客户端和服务器完成了安全能力协商, 选 择使用 IBE— BF方式进行密钥协商。
步骤 403、 服务器发送 Server— key— exchange报文给客户端, 报文中携 带服务器公钥信息。
其中,服务器公钥信息包括服务器的公钥即服务器 ID, 同时还可以包 含服务器公钥有效期和服务器 KGC的地址。 服务器公钥有效期, 用于控 制服务器公钥的有效期, 超过该有效期, 则需要启用新的服务器公钥, 即 新的服务器 ID。客户端收到服务器公钥有效期后, 可以通过判断该有效期 是否过期来判断收到的服务器公钥是否过期。
同时服务器的私钥为服务器 KGC使用服务器公钥生成, 当设置服务 器公钥有效期时, 则 KGC使用服务器公钥加服务器公钥有效期生成服务 器私钥。 服务器公钥过期时, 相应服务器私钥也会过期, 因此服务器公钥 有效期同时也是服务器私钥有效期, 超过该服务器公钥有效期, 且启用了 新的服务器公钥后, 服务器需要发送新的服务器 ID和新的有效期去 KGC 申请新的私钥。
本发明实施例三中, 服务器的 KGC即为服务器生成私钥的 KGC, 客 户端的 KGC即为客户端生成私钥的 KGC ,服务器的 KGC和客户端的 KGC 可能由同一个 KGC担任, 也有可能由不同 KGC担任。 在由不同 KGC担 任, 且客户端不知道服务器 KGC地址时, 就需要在本步骤中发送服务器 KGC地址给客户端。
另外需要说明的是, 客户端可以向服务器发出 Client— Hello报文, 即 说明客户端知道服务器的 ID,也即知道服务器的公钥, 因此该报文中服务 器 ID信息不是必须的, 可以不携带。
该 Server— key— exchange才艮文可以^口下定义:
struct {
select (KeyExchangeAlgorithm) {
case ibe— bf:
ServerPublicSecret;
};
} S erverKey Exchange; Struct{
String<0..1024> Serverldentity;
ValidityPeriod;
string<0..1024> Serverkgc; 〃服务器 KGC的地址
} ServerPublicSecret;
Struct ValidityPeriod {
Uint32 notBefore;
Uint32 notAfter;
}
其中, Serverldentity 为服务器 ID; ValidityPeriod 为公钥有效期;
"string<0..1024> Serverkgc" 为服务器 KGC的地址。
步骤 404、服务器发送 ServerHelloDone报文给客户端。指示服务器部 分的消息已发送结束。 该消息不含任何参数。 发送完该消息后, 服务器等 待客户端的响应。
步骤 405、 客户端按照现有技术 TLS 协议规范生成预先主密钥 pre-master key。
步骤 406、 客户端发送 Client— key— exchange报文至服务器。
客户端通过服务器的 KGC 地址到服务器的 KGC 去获取服务器的 KGC公开参数, 使用服务器的 KGC公开参数、 服务器公钥与客户端选择 的控制参数力口密 pre-master key , 并将力口密后的 pre-master key 携带在 Client— key— exchange报文中发送到服务器。
该 Client— key— exchange报文中还可以包含服务器公钥及控制参数。控 制参数可以是步骤 403中描述的服务器公钥有效期参数, 也可以由客户端 指定将服务器公钥有效期作为控制参数。 如果是由客户端指定的将服务器 公钥有效期作为控制参数 ,则该 Client— key— exchange报文中必须包含控制 参数。
此时 , 该 Client— key— exchange才艮文可以定义如下:
struct {
select (KeyExchangeAlgorithm) {
case ibe— bf: IbeEncryptedPreMasterSecret;
} exchange— keys;
} ClientKeyExchange; struct {
public-key-encrypted PreMasterSecret pre— master— secret; } EncryptedPreMasterSecret;
步骤 407、客户端按照 TLS协议规范从 pre-master key生成 master key„ 步骤 406和步骤 407之间没有顺序关系, 可以先后执行, 也可以同时 执行。
步骤 408、服务器使用服务器的 KGC公开参数、服务器公钥与控制参 数对接收到的力。密过的 pre-master key解密, 得到 pre-master key, 再按照 TLS十办议规范从 re-master key生成 master key。
客户端或服务器从 re-master key生成 master key方法为 TLS中制定 的通过 pre-master key计算得到 master key算法, 可以参考本发明实施例 提供的密钥协商方法实施例一中的相关描述, 在此不再重复。 此时密钥协商完成。
由上可知在本发明实施例提供的密钥协商方法实施例三中, 不需要预 先在进行密钥协商的通信双方两端部署为两者共知的共享密钥, 而由客户 端生成预先主密钥 pre-master key发送给服务器, 客户端和服务器再依据 pre-master key生成 master key, 完成密钥协商, 并使用服务器的 KGC公 开参数、 服务器公钥与控制参数保护 pre-master key的传递过程, 以使密 钥协商的过程安全, 可靠, 非常容易实现, 也不受应用环境的限制, 应用 范围较广, 不使用通信双方预先都知道的共享密钥, 防止一方否认其做过 某个动作, 不存在不可否认问题, 同样本发明实施例提供的密钥协商方法 实施例三也不需要依赖证书进行认证, 不需要进行与证书相关的繁瑣步 骤, 节约了网络资源。
同样本发明实施例提供的密钥协商方法实施例三也不需要依赖证书 进行认证, 不需要进行与证书相关的繁瑣步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分 步骤是可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一种 计算机可读存储介质中, 该程序在执行时, 包括如下步骤:
向服务器发送包含密文族列表的客户端呼叫报文, 发起会话, 所述密 文族列表中包含使用基于用户身份的密码机制的密钥协商方式的密文族; 接收所述服务器返回的包含基于用户身份的密码机制的密钥协商方 式的信息;
接收所述服务器发送的服务器密钥交流报文;
接收所述服务器发送的服务器发送结束报文;
获得主密钥;
向服务器发送客户端密钥交流报文, 以使服务器可以通过客户端密钥 交流报文携带的信息获得主密钥。
或者包括如下步骤: 接收客户端发送的包含密文族列表的客户端呼叫报文, 所述密文族列 表中包含使用基于用户身份的密码机制的密钥协商方式的密文族;
从所述密文族列表中选择使用基于用户身份的密码机制的密钥协商 方式的密文族, 发送给所述客户端;
向所述客户端发送服务器密钥交流报文;
向所述客户端发送服务器发送结束报文;
接收客户端发送的客户端密钥交流报文;
根据所述客户端密钥交流报文中携带的信息获得主密钥。
上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
本发明实施例提供的用于密钥协商的系统实施例结构如图 5所示, 包 括:
客户端 5100 , 用于发送包含密文族列表的客户端呼叫报文, 所述呼叫 报文的密文族列表中包含使用基于用户身份的密码机制的密钥协商方式 的密文族; 接收包含基于用户身份的密码机制的密钥协商方式的信息; 接 收服务器密钥交流报文; 接收服务器发送的服务器发送结束报文; 获得主 密钥; 发送客户端密钥交流报文。
服务器 5200 , 用于接收所述客户端发送的客户端呼叫报文; 从所述密 文族列表中选择使用基于用户身份的密码机制的密钥协商方式的密文族, 发送给所述客户端; 向所述客户端发送服务器密钥交流报文; 接收所述客 户端发送的客户端密钥交流报文; 向所述客户端发送服务器发送结束报 文; 根据所述客户端密钥交流报文中携带的信息获得主密钥。
系统中客户端 5100又包括:
会话发起单元 5130 , 用于向服务器 5200发送包含密文族列表的客户 端呼叫报文, 发起会话, 所述呼叫报文的密文族列表中包含使用基于用户 身份的密码机制的密钥协商方式的密文族;
客户端密钥交流报文发送单元 5140 , 用于向服务器 5200发送客户端 密钥交流报文, 以使服务器 5200 可以通过客户端密钥交流报文携带的信 息获得主密钥;
第一接收单元 5120, 用于接收所述服务器 5200返回的包含基于用户 身份的密码机制的密钥协商方式的信息; 接收服务器 5200发送的服务器 密钥交流报文; 接收服务器发送的服务器发送结束报文;
客户端密钥获取单元 51 10,用于通过所述第一接收单元接收的信息获 得主密钥。
客户端 5100中的客户端密钥获取单元 5110又包括:
第一共享密钥单元 5112 ,用于从所述服务器密钥交流报文中获取所述 服务器 5200 的基于用户身份的密码机制参数; 根据所述基于用户身份的 密码机制, 通过预先获取的私钥生成中心公开参数、 客户端私钥、 所述服 务器 5200 的基于用户身份的密码机制参数及作为服务器公钥的服务器用 户身份, 获得共享密钥;
第一主密钥单元 511 1 , 用于通过所述共享密钥获得所述主密钥; 第一获取单元 51 13 ,用于从所述密钥交流报文中获取所述服务器 5200 的迪菲赫尔曼公开参数及使用服务器私钥对所述公开参数做的签名;
第一验证单元 5114,用于通过预先获得的服务器私钥生成中心公开参 数及作为服务器公钥的服务器用户身份,验证所述使用 IBC对所述公开参 数做的签名;
第二主密钥单元 5115 , 用于在第一验证单元验证通过时, 使用所述服 务器 5200的迪菲赫尔曼公开参数及客户端 5100的迪菲赫尔曼公开参数生 成迪菲赫尔曼共享密钥, 以所述迪菲赫尔曼共享密钥作为预先主密钥, 通 过所述预先主密钥生成所述主密钥;
第三主密钥单元 5116, 用于根据传输层安全协议生成预先主密钥, 通 过所述预先主密钥生成所述主密钥;
客户端密钥获取单元中的第一主密钥单元 51 11又包括: 第一密钥生成单元 51 11 1 , 用于以所述共享密钥作为预先主密钥, 通 过所述预先主密钥生成所述主密钥。
第二密钥生成单元 51 112, 用于以所述共享密钥与所述客户端版本号 作为预先主密钥, 通过所述预先主密钥生成所述主密钥。
客户端 5100中的客户端密钥交流 4艮文发送单元 5140又包括: 第一客户端发送单元 5141 , 用于向服务器 5200发送携带所述客户端 5100的基于用户身份的密码机制参数的客户端密钥交流报文。
第二客户端发送单元 5142, 用于向服务器 5200发送携带所述客户端 5100的迪菲赫尔曼公开参数的客户端密钥交流报文。
签名单元 5143 , 用于在所述客户端密钥交流报文中携带使用 IBC对 所述客户端 5100的迪菲赫尔曼公开参数做的签名。
第三客户端发送单元 5144,用于使用预先获得的服务器私钥生成中心 公开参数、 作为服务器公钥的服务器用户身份及客户端选择的控制参数对 所述预先主密钥进行加密, 并携带在所述客户端密钥交流报文中发送至服 务器 5200。
控制参数单元 5145 , 用于生成所述控制参数, 并将所述控制参数携带 在所述客户端密钥交流报文中向服务器 5200发送。
系统中服务器 5200又包括:
第二接收单元 5250, 用于接收客户端 5100发送的包含密文族列表的 客户端呼叫报文; 接收客户端 5100发送的客户端密钥交流报文;
选择单元 5220,用于从所述密文族列表中选择使用基于用户身份的密 码机制的密钥协商方式的密文族, 向所述客户端 5100发送;
服务器密钥交流报文发送单元 5210, 用于向所述客户端 5100发送服 务器密钥交流报文;
服务器发送结束报文发送单元, 用于向所述客户端 5100发送服务器 发送结束报文; 服务器密钥获取单元 5270,用于根据所述客户端密钥交流报文中携带 的信息获得主密钥, 完成密钥协商。
第二获取单元 5230,用于从所述客户端密钥交流报文中获取使用 IBC 对所述客户端 5100的迪菲赫尔曼公开参数做的签名;
第二验证单元 5240,用于通过预先获得的客户端私钥生成中心公开参 数及作为客户端公钥的客户端用户身份,验证所述使用 IBC对所述客户端 5100的迪菲赫尔曼公开参数做的签名; 验证通过, 则使所述第五主密钥单 元 5271使用服务器 5200的迪菲赫尔曼公开参数及所述客户端 5100的迪 菲赫尔曼公开参数生成迪菲赫尔曼共享密钥。
参数获取单元 5260, 用于从所述密钥交流报文中获取所述控制参数。 服务器 5200中服务器密钥获取单元 5270又包括:
第二共享密钥单元 5272 ,用于从所述密钥交流报文中获取所述客户端 5100的基于用户身份的密码机制参数, 及客户端公钥的客户端用户身份; 根据所述基于用户身份的密码机制, 通过预先获取的私钥生成中心公开参 数、 服务器私钥、 所述客户端 5100 的基于用户身份的密码机制参数及所 述客户端用户身份, 获得共享密钥;
第四主密钥单元 5274, 用于通过所述共享密钥获得所述主密钥; 第五主密钥单元 5271 , 用于从所述密钥交流报文中获取所述客户端 5100的迪菲赫尔曼公开参数; 使用服务器 5200的迪菲赫尔曼公开参数及 所述客户端 5100 的迪菲赫尔曼公开参数生成迪菲赫尔曼共享密钥, 以所 述迪菲赫尔曼共享密钥作为预先主密钥, 通过所述预先主密钥生成所述主 密钥;
第六主密钥单元 5273 ,用于从所述密钥交流报文中获取加密过的预先 主密钥; 使用服务器私钥生成中心公开参数、 作为服务器公钥的服务器用 户身份及客户端选择的控制参数对所述预先主密钥进行解密, 获得预先主 密钥, 通过所述预先主密钥生成所述主密钥。 服务器密钥获取单元 5270中第四主密钥单元 5274又包括:
第三密钥生成单元 52741 , 用于以所述共享密钥作为预先主密钥, 通 过所述预先主密钥生成所述主密钥。
第四密钥生成单元 52742, 用于以所述共享密钥与所述客户端版本号 作为预先主密钥, 通过所述预先主密钥生成所述主密钥。
服务器 5200中服务器密钥交流报文发送单元 5210又包括:
第一服务器发送单元 5211 , 用于向所述客户端 5100发送携带所述服 务器的基于用户身份的密码机制参数的服务器密钥交流报文。
第二服务器发送单元 5212,用于在所述服务器密钥交流报文中携带所 述服务器 5200的迪菲赫尔曼公开参数及使用 IBC对所述公开参数做的签 名, 向所述客户端 5100发送。
本发明实施例提供的客户端实施例与本发明实施例提供的用于密钥 协商的系统实施例中描述的客户端 5100基本一致, 在此不再重复描述。
本发明实施例提供的服务器实施例与本发明实施例提供的用于密钥 协商的系统实施例中描述的服务器 5200基本一致, 在此不再重复描述。
本发明实施例提供的用于密钥协商的系统实施例、 本发明实施例提供 的客户端实施例、 与本发明实施例提供的服务器实施例的具体工作方式可 参考上文本发明实施例提供的密钥协商的方法实施例, 在此不再重复描 述。
通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到本 发明, 可以通过硬件实现, 也可以借助软件加必要的通用硬件平台的方式 来实现。 基于这样的理解, 本发明的技术方案可以以软件产品的形式体现 出来, 该软件产品可以存储在一个非易失性存储介质 (可以是 CD-ROM, U盘, 移动硬盘等) 中, 包括若干指令用以使得一台计算机设备(可以是 个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述的方 法。 以上对本发明所提供的一种密钥协商方法、 用于密钥协商的系统、 客 户端及服务器进行了详细介绍, 本文中应用了具体个例对本发明的原理及 实施方式进行了阐述, 以上实施例的说明只是用于帮助理解本发明的方法 及其核心思想; 同时, 对于本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容 不应理解为对本发明的限制。

Claims

权 利 要 求 书
1、 一种密钥协商方法, 其特征在于, 所述方法包括:
向服务器发送包含密文族列表的客户端呼叫报文, 发起会话, 所述呼 叫报文的密文族列表中包含使用基于用户身份的密码机制的密钥协商方 式的密文族;
接收所述服务器返回的包含基于用户身份的密码机制的密钥协商方 式的信息;
接收所述服务器发送的服务器密钥交流报文;
接收所述服务器发送的服务器发送结束报文;
获得主密钥;
向服务器发送客户端密钥交流报文, 以使服务器可以通过客户端密钥 交流报文携带的信息获得主密钥。
2、 如权利要求 1 所述的密钥协商方法, 其特征在于, 所述基于用户 身份的密码机制的密钥协商方式为基于用户身份的认证和密钥协商的密 钥协商方式;
所述向服务器发送客户端密钥交流报文包括: 在所述客户端密钥交流 报文中携带所述客户端的基于用户身份的密码机制参数及客户端公钥, 向 服务器发送;
所述获得主密钥包括:
从所述服务器密钥交流报文中获取所述服务器的基于用户身份的密 码机制参数;
根据所述基于用户身份的密码机制, 通过获取的私钥生成中心公开参 数、 客户端私钥、 所述服务器的基于用户身份的密码机制参数及服务器公 钥, 获得共享密钥;
通过所述共享密钥获得所述主密钥。
3、 如权利要求 2所述的密钥协商方法, 其特征在于, 所述通过所述 共享密钥获得所述主密钥包括:
以所述共享密钥作为预先主密钥, 通过所述预先主密钥生成所述主密 钥。
4、 如权利要求 2所述的密钥协商方法, 其特征在于, 所述通过所述 共享密钥获得所述主密钥包括:
以所述共享密钥与所述客户端版本号作为预先主密钥, 通过所述预先 主密钥生成所述主密钥。
5、 如权利要求 2、 3或 4所述的密钥协商方法, 其特征在于, 所述方 法还包括:
在所述客户端密钥交流报文中携带客户端公钥有效期, 以使所述服务 器可以通过所述有效期判断客户端公钥是否过期。
6、 如权利要求 1 所述的密钥协商方法, 其特征在于, 所述基于用户 身份的密码机制的密钥协商方式为基于用户身份的签名的密钥协商方式; 所述向服务器发送客户端密钥交流报文包括: 在所述客户端密钥交流 报文中携带所述客户端的迪菲赫尔曼公开参数, 向服务器发送;
所述获得主密钥包括:
从所述服务器密钥交流报文中获取所述服务器的迪菲赫尔曼公开参 数及使用基于用户身份的签名方式对所述迪菲赫尔曼公开参数做的签名; 通过获得的服务器私钥生成中心公开参数及服务器公钥, 验证所述服 务器密钥交流报文中使用基于用户身份的签名方式对所述迪菲赫尔曼公 开参数做的签名;
验证通过时, 使用所述服务器的迪菲赫尔曼公开参数和客户端的迪菲 赫尔曼私有参数生成迪菲赫尔曼共享密钥, 通过所述迪菲赫尔曼共享密钥 生成所述主密钥。
7、 如权利要求 6所述的密钥协商方法, 其特征在于, 所述方法还包 括: 使用基于用户身份的签名方式对所述客户端的迪菲赫尔曼公开参数 做签名, 并携带在所述客户端密钥交流报文中, 以使所述服务器可以对客 户端进行认证。
8、 如权利要求 1 所述的密钥协商方法, 其特征在于, 所述基于用户 身份的密码机制的密钥协商方式为基于用户身份的加密的密钥协商方式; 所述获得主密钥包括: 生成预先主密钥, 通过所述预先主密钥生成所 述主密钥;
所述向服务器发送客户端密钥交流报文包括: 使用获得的服务器的私 钥生成中心公开参数、 服务器公钥及客户端选择的控制参数对所述预先主 密钥进行加密, 并携带在所述客户端密钥交流报文中向服务器发送。
9、 如权利要求 8 所述的密钥协商方法, 其特征在于, 所述方法还包 括:
将所述控制参数携带在所述客户端密钥交流报文中向服务器发送。
10、 一种密钥协商方法, 其特征在于, 所述方法包括:
接收客户端发送的包含密文族列表的客户端呼叫报文, 所述呼叫报文 的密文族列表中包含使用基于用户身份的密码机制的密钥协商方式的密 文族;
从所述密文族列表中选择使用基于用户身份的密码机制的密钥协商 方式的密文族, 发送给所述客户端;
向所述客户端发送服务器密钥交流报文;
向所述客户端发送服务器发送结束报文;
接收客户端发送的客户端密钥交流报文;
根据所述客户端密钥交流报文中携带的信息获得主密钥。
1 1、 如权利要求 10所述的密钥协商方法, 其特征在于, 所述基于用 户身份的密码机制的密钥协商方式为基于用户身份的认证和密钥协商的 密钥协商方式; 所述向所述客户端发送服务器密钥交流报文包括: 在所述服务器密钥 交流报文中携带所述服务器的基于用户身份的密码机制参数, 向所述客户 端发送;
所述根据所述客户端密钥交流报文中携带的信息获得主密钥包括: 从所述客户端密钥交流报文中获取所述客户端的基于用户身份的密 码机制参数, 及客户端公钥;
通过获取的私钥生成中心公开参数、 服务器私钥、 所述客户端的基于 用户身份的密码机制参数及所述客户端公钥, 获得共享密钥;
通过所述共享密钥获得所述主密钥。
12、 如权利要求 1 1 所述的密钥协商方法, 其特征在于, 所述通过所 述共享密钥获得所述主密钥包括:
以所述共享密钥作为预先主密钥, 通过所述预先主密钥生成所述主密 钥。
13、 如权利要求 1 1 所述的密钥协商方法, 其特征在于, 所述通过所 述共享密钥获得所述主密钥包括:
以所述共享密钥与所述客户端版本号作为预先主密钥, 通过所述预先 主密钥生成所述主密钥。
14、 如权利要求 10所述的密钥协商方法, 其特征在于, 所述基于用 户身份的密码机制的密钥协商方式为基于用户身份的签名的密钥协商方 式;
所述向所述客户端发送服务器密钥交流报文包括: 在所述服务器密钥 交流报文中携带所述服务器的迪菲赫尔曼公开参数及使用基于用户身份 的签名方式对所述公开参数做的签名, 向所述客户端发送;
所述根据所述客户端密钥交流报文中携带的信息获得主密钥包括: 从所述客户端密钥交流报文中获取所述客户端的迪菲赫尔曼公开参 数; 使用所述客户端的迪菲赫尔曼公开参数和服务器的迪菲赫尔曼私有 参数生成迪菲赫尔曼共享密钥, 通过所述迪菲赫尔曼共享密钥生成所述主 密钥。
15、 如权利要求 14所述的密钥协商方法, 其特征在于, 所述方法还 包括:
从所述客户端密钥交流报文中获取使用基于用户身份的签名方式对 所述客户端的迪菲赫尔曼公开参数做的签名;
通过获得的客户端私钥生成中心公开参数及客户端公钥验证所述客 户端密钥交流报文中的使用基于用户身份的签名方式对所述客户端的迪 菲赫尔曼公开参数做的签名; 验证通过, 则生成迪菲赫尔曼共享密钥。
16、 如权利要求 10所述的密钥协商方法, 其特征在于, 所述基于用 户身份的密码机制的密钥协商方式为基于用户身份的加密的密钥协商方 式;
所述根据所述客户端密钥交流报文中携带的信息获得主密钥包括: 从所述客户端密钥交流报文中获取加密过的预先主密钥;
使用服务器私钥生成中心公开参数、 服务器公钥及客户端选择的控制 参数对所述加密的预先主密钥进行解密, 获得预先主密钥, 通过所述预先 主密钥生成所述主密钥。
17、如权利要求 10到 16中任一项所述的密钥协商方法,其特征在于, 所述方法还包括:
在所述服务器密钥交流报文中携带服务器公钥有效期, 以使所述客户 端可以通过所述有效期判断服务器公钥是否过期。
18、 一种用于密钥协商的系统, 其特征在于, 所述系统包括: 客户端, 用于发送包含密文族列表的客户端呼叫报文, 所述呼叫报文 的密文族列表中包含使用基于用户身份的密码机制的密钥协商方式的密 文族; 接收包含基于用户身份的密码机制的密钥协商方式的信息; 接收服 务器密钥交流报文;接收服务器发送的服务器发送结束报文;获得主密钥; 发送客户端密钥交流报文;
服务器, 用于接收所述客户端发送的客户端呼叫报文; 从所述密文族 列表中选择使用基于用户身份的密码机制的密钥协商方式的密文族, 发送 给所述客户端; 向所述客户端发送服务器密钥交流报文; 接收所述客户端 发送的客户端密钥交流报文; 向所述客户端发送服务器发送结束报文; 根 据所述客户端密钥交流报文中携带的信息获得主密钥。
19、 一种客户端, 其特征在于, 所述客户端包括:
会话发起单元, 用于向服务器发送包含密文族列表的客户端呼叫报 文, 发起会话, 所述呼叫报文的密文族列表中包含使用基于用户身份的密 码机制的密钥协商方式的密文族;
客户端密钥交流报文发送单元, 用于向服务器发送客户端密钥交流报 文, 以使服务器可以通过客户端密钥交流报文携带的信息获得主密钥; 第一接收单元, 用于接收所述服务器返回的包含基于用户身份的密码 机制的密钥协商方式的信息; 接收服务器发送的服务器密钥交流报文; 接 收服务器发送的服务器发送结束报文;
客户端密钥获取单元, 用于通过所述第一接收单元接收的信息获得主 密钥。
20、 如权利要求 19所述的客户端, 其特征在于, 所述客户端密钥获 取单元进一步包括:
第一共享密钥单元, 用于从所述服务器密钥交流报文中获取所述服务 器的基于用户身份的密码机制参数; 根据所述基于用户身份的密码机制, 通过获取的私钥生成中心公开参数、 客户端私钥、 所述服务器的基于用户 身份的密码机制参数及服务器公钥, 获得共享密钥;
第一主密钥单元, 用于通过所述共享密钥获得所述主密钥;
所述客户端密钥交流报文发送单元进一步包括: 第一客户端发送单元, 用于向服务器发送所述客户端密钥交流报文, 在所述客户端密钥交流报文中携带所述客户端的基于用户身份的密码机 制参数及客户端公钥。
21、 如权利要求 19所述的客户端, 其特征在于, 所述客户端密钥获 取单元进一步包括:
第一获取单元, 用于从所述服务器密钥交流报文中获取所述服务器的 迪菲赫尔曼公开参数及使用服务器私钥对所述迪菲赫尔曼公开参数做的 签名;
第一验证单元, 用于通过获得的服务器私钥生成中心公开参数及服务 器公钥, 验证所述使用基于用户身份的签名方式对所述迪菲赫尔曼公开参 数做的签名;
第二主密钥单元, 用于在第一验证单元验证通过时, 使用所述服务器 的迪菲赫尔曼公开参数及客户端的迪菲赫尔曼公开参数和私有参数生成 迪菲赫尔曼共享密钥, 通过所述迪菲赫尔曼共享密钥生成所述主密钥; 所述客户端密钥交流报文发送单元包括:
第二客户端发送单元, 用于向服务器发送携带所述客户端的迪菲赫尔 曼公开参数的客户端密钥交流报文。
22、 如权利要求 21 所述的客户端, 其特征在于, 所述客户端密钥交 流报文发送单元还包括:
签名单元, 用于使用基于用户身份的签名方式对所述客户端的迪菲赫 尔曼公开参数做签名, 并携带在所述客户端密钥交流报文中。
23、 如权利要求 19所述的客户端, 其特征在于, 所述客户端密钥获 取单元包括:
第三主密钥单元, 用于生成预先主密钥, 通过所述预先主密钥生成所 述主密钥;
所述客户端密钥交流报文发送单元包括: 第三客户端发送单元, 用于使用获得的服务器的私钥生成中心公开参 数、 服务器公钥及客户端选择的控制参数对所述预先主密钥进行加密, 并 携带在所述客户端密钥交流报文中向服务器发送。
24、 一种服务器, 其特征在于, 所述服务器包括:
第二接收单元, 用于接收客户端发送的包含密文族列表的客户端呼叫 报文; 接收客户端发送的客户端密钥交流报文;
选择单元, 用于从所述密文族列表中选择使用基于用户身份的密码机 制的密钥协商方式的密文族, 向所述客户端发送;
服务器密钥交流报文发送单元, 用于向所述客户端发送服务器密钥交 流报文;
服务器发送结束报文发送单元, 用于向所述客户端发送服务器发送结 束报文;
服务器密钥获取单元, 用于根据所述客户端密钥交流报文中携带的信 息获得主密钥。
25、 如权利要求 24所述的服务器, 其特征在于, 所述服务器密钥获 取单元进一步包括:
第二共享密钥单元, 用于从所述客户端密钥交流报文中获取所述客户 端的基于用户身份的密码机制参数, 及客户端公钥; 根据所述基于用户身 份的密码机制, 通过获取的私钥生成中心公开参数、 服务器私钥、 所述客 户端的基于用户身份的密码机制参数及所述客户端用户身份, 获得共享密 钥;
第四主密钥单元, 用于通过所述共享密钥获得所述主密钥; 所述服务器密钥交流报文发送单元进一步包括:
第一服务器发送单元, 用于向所述客户端发送携带所述服务器的基于 用户身份的密码机制参数的服务器密钥交流报文。
26、 如权利要求 24所述的服务器, 其特征在于, 所述服务器密钥获 取单元进一步包括:
第五主密钥单元, 用于从所述客户端密钥交流报文中获取所述客户端 的迪菲赫尔曼公开参数; 使用服务器的迪菲赫尔曼公开参数及所述客户端 的迪菲赫尔曼公开参数和私有参数生成迪菲赫尔曼共享密钥, 以所述迪菲 赫尔曼共享密钥作为预先主密钥, 通过所述预先主密钥生成所述主密钥; 所述服务器密钥交流报文发送单元进一步包括:
第二服务器发送单元, 用于在所述服务器密钥交流报文中携带所述服 务器的迪菲赫尔曼公开参数及使用基于用户身份的签名方式对所述公开 参数做的签名, 并向所述客户端发送。
27、 如权利要求 26所述的服务器, 其特征在于, 所述服务器还包括: 第二获取单元, 用于从所述客户端密钥交流报文中获取使用基于用户 身份的签名方式对所述客户端的迪菲赫尔曼公开参数做的签名;
第二验证单元, 用于通过获得的客户端私钥生成中心公开参数及客户 端公钥, 验证所述使用客户端私钥对所述客户端的迪菲赫尔曼公开参数做 的签名; 验证通过, 则控制第五主密钥单元生成迪菲赫尔曼共享密钥。
28、 如权利要求 24所述的服务器, 其特征在于, 所述服务器密钥获 取单元进一步包括:
第六主密钥单元, 用于从所述客户端密钥交流报文中获取加密过的预 先主密钥; 使用服务器私钥生成中心公开参数、 服务器公钥及客户端选择 的控制参数对所述预先主密钥进行解密, 获得预先主密钥, 通过所述预先 主密钥生成所述主密钥。
PCT/CN2008/072547 2007-12-14 2008-09-26 密钥协商方法、用于密钥协商的系统、客户端及服务器 WO2009076811A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP08862820A EP2173055A1 (en) 2007-12-14 2008-09-26 A method, a system, a client and a server for key negotiating

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2007103021457A CN101459506B (zh) 2007-12-14 2007-12-14 密钥协商方法、用于密钥协商的系统、客户端及服务器
CN200710302145.7 2007-12-14

Publications (1)

Publication Number Publication Date
WO2009076811A1 true WO2009076811A1 (zh) 2009-06-25

Family

ID=40770151

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/072547 WO2009076811A1 (zh) 2007-12-14 2008-09-26 密钥协商方法、用于密钥协商的系统、客户端及服务器

Country Status (3)

Country Link
EP (1) EP2173055A1 (zh)
CN (1) CN101459506B (zh)
WO (1) WO2009076811A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577370A (zh) * 2016-02-29 2016-05-11 赵运磊 一种应用于客户-服务器环境的认证密钥协商方法
CN108989054A (zh) * 2018-08-30 2018-12-11 武汉理工大学 一种密码系统及数字签名方法
CN110995414A (zh) * 2019-12-23 2020-04-10 中金金融认证中心有限公司 基于国密算法在tls1_3协议中建立通道的方法
WO2021012574A1 (zh) * 2019-07-24 2021-01-28 深圳壹账通智能科技有限公司 多重签名方法、签名中心、介质及电子设备
CN112422507A (zh) * 2020-10-19 2021-02-26 北京电子科技学院 一种基于标识算法的国密ssl加密方法
CN113300845A (zh) * 2021-07-20 2021-08-24 国能信控互联技术有限公司 一种智慧热网数据传输安全防护系统和方法
CN115529129A (zh) * 2022-09-29 2022-12-27 上海浦东发展银行股份有限公司 加密通信方法、装置和计算机设备

Families Citing this family (62)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582906B (zh) * 2009-06-23 2012-04-18 中国人民解放军信息工程大学 密钥协商方法和装置
CN102035644B (zh) * 2009-09-29 2013-02-27 国基电子(上海)有限公司 主密钥动态配置系统及方法
CN102064946A (zh) * 2011-01-25 2011-05-18 南京邮电大学 一种基于身份加密的密钥共享方法
WO2013018025A1 (en) * 2011-08-04 2013-02-07 International Business Machines Corporation Security policy enforcement
EP2792100B1 (en) * 2011-12-15 2020-07-29 Intel Corporation Method and device for secure communications over a network using a hardware security engine
CN102801616B (zh) * 2012-08-02 2015-04-15 华为技术有限公司 报文发送和接收的方法、装置和系统
MY171259A (en) * 2012-11-05 2019-10-07 Mimos Berhad System and method for identity-based entity authentication for client-server communications
CN103124215A (zh) * 2013-01-25 2013-05-29 匡创公司 带有时间标记的自认证方法
CN103269272B (zh) * 2013-05-22 2016-03-02 河海大学 一种基于短期证书的密钥封装方法
CN103354498B (zh) * 2013-05-31 2016-09-28 北京创世泰克科技股份有限公司 一种基于身份的文件加密传输方法
EP3051744B1 (en) * 2013-10-28 2019-01-02 Huawei Device (Dongguan) Co., Ltd. Key configuration method and apparatus
CN105141568B (zh) * 2014-05-28 2019-02-12 腾讯科技(深圳)有限公司 安全通信通道建立方法及系统、客户端和服务器
CN104023013B (zh) * 2014-05-30 2017-04-12 上海帝联信息科技股份有限公司 数据传输方法、服务端和客户端
CN105281940B (zh) * 2014-07-18 2020-08-21 南京中兴软件有限责任公司 一种基于netconf协议的hello报文交互的方法、设备和系统
US9992670B2 (en) 2014-08-12 2018-06-05 Vodafone Ip Licensing Limited Machine-to-machine cellular communication security
GB2529391A (en) * 2014-08-12 2016-02-24 Vodafone Ip Licensing Ltd Machine-to-machine cellular communication security
CN104301103A (zh) * 2014-09-19 2015-01-21 闫鸿滨 基于环Zn圆锥曲线公钥密码体制的多重密码恢复方法
CN104486077B (zh) * 2014-11-20 2017-09-15 中国科学院信息工程研究所 一种VoIP实时数据安全传输的端到端密钥协商方法
CN105991622A (zh) * 2015-03-05 2016-10-05 阿里巴巴集团控股有限公司 一种报文验证方法及设备
KR102284954B1 (ko) * 2015-04-08 2021-08-03 삼성전자 주식회사 무선 통신 시스템에서 단말에 프로파일을 다운로드 하는 방법 및 장치
CZ2015473A3 (cs) * 2015-07-07 2017-02-08 Aducid S.R.O. Způsob zabezpečení autentizace při elektronické komunikaci
KR20170035665A (ko) * 2015-09-23 2017-03-31 삼성에스디에스 주식회사 키 교환 장치 및 방법
CN105553966B (zh) * 2015-12-10 2018-11-09 中国联合网络通信集团有限公司 密钥交换的方法及装置
CN105763333B (zh) * 2016-01-28 2019-05-24 北京江南天安科技有限公司 一种非对称密钥的协商方法
CN108259160B (zh) * 2016-12-28 2021-06-18 湖北高瞻科技有限责任公司 数据通讯加密方法及装置
JP6644037B2 (ja) * 2017-09-08 2020-02-12 株式会社東芝 通信制御システム
CN108289253A (zh) * 2018-01-09 2018-07-17 武汉斗鱼网络科技有限公司 弹幕发送间隔控制方法、存储介质、电子设备及系统
CN108307244B (zh) * 2018-01-09 2020-06-16 武汉斗鱼网络科技有限公司 弹幕发言时间控制方法、存储介质、电子设备及系统
CN108388946B (zh) * 2018-01-29 2021-08-17 湘潭大学 一种基于盲量子计算的两方量子计算方法
CN108322464B (zh) * 2018-01-31 2020-11-17 中国联合网络通信集团有限公司 一种密钥验证方法及设备
CN108173653A (zh) * 2018-03-13 2018-06-15 江苏信源久安信息科技有限公司 通过标识密码算法生成具有生命周期密钥的方法
CN108965243B (zh) * 2018-05-29 2020-10-16 如般量子科技有限公司 一种基于对称密钥池和跨中继的类aka身份认证系统和方法
CN110662089A (zh) * 2018-06-29 2020-01-07 武汉斗鱼网络科技有限公司 弹幕接收处理方法、存储介质、电子设备及系统
CN110868285B (zh) * 2018-08-28 2023-05-19 中国电信股份有限公司 认证方法、服务器、系统和计算机可读存储介质
CN109740321B (zh) * 2018-12-25 2020-03-31 北京深思数盾科技股份有限公司 吊销加密机管理员锁的方法、加密机及厂商服务器
US10630467B1 (en) * 2019-01-04 2020-04-21 Blue Ridge Networks, Inc. Methods and apparatus for quantum-resistant network communication
CN109617916A (zh) * 2019-01-16 2019-04-12 北京云中融信网络科技有限公司 秘钥处理方法及即时通讯系统
CN111600829A (zh) * 2019-02-21 2020-08-28 杭州萤石软件有限公司 用于物联网设备间的安全通信方法和系统
CN110380868A (zh) * 2019-08-22 2019-10-25 广东浪潮大数据研究有限公司 一种通信方法、装置及通信系统和存储介质
CN110677389B (zh) * 2019-09-09 2022-01-25 杭州迪普科技股份有限公司 基于ssl协议的混合攻击防护方法和装置
WO2021064978A1 (ja) * 2019-10-04 2021-04-08 日本電信電話株式会社 端末、サーバ、方法及びプログラム
CN110831000B (zh) * 2019-10-31 2023-04-07 迈普通信技术股份有限公司 一种安全接入方法、设备及系统
US11206135B2 (en) 2019-11-11 2021-12-21 International Business Machines Corporation Forward secrecy in Transport Layer Security (TLS) using ephemeral keys
CN110971401B (zh) * 2019-11-19 2021-10-22 武汉大学 一种基于交叉互锁机制的认证密钥协商方法及其实施装置
CN111327605B (zh) * 2020-01-23 2022-09-13 北京无限光场科技有限公司 传输私密信息的方法、终端、服务器和系统
CN111585976B (zh) * 2020-04-09 2021-11-23 北京理工大学 通信方法、装置、存储介质和电子设备
CN111510291B (zh) * 2020-04-20 2023-06-02 重庆邮电大学 基于双线性对的高效身份认证密钥协商方法
CN111756699B (zh) * 2020-05-28 2022-05-06 苏州浪潮智能科技有限公司 一种基于非对称加密的lldp协议优化方法与系统
EP4145787A4 (en) * 2020-05-29 2023-05-31 Huawei Technologies Co., Ltd. COMMUNICATION METHOD AND DEVICE
US20230308869A1 (en) * 2020-07-24 2023-09-28 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for communication on multiple links, and computer-readable storage medium
CN112134694B (zh) * 2020-08-11 2024-01-23 北京智芯微电子科技有限公司 数据交互方法、主站、终端及计算机可读存储介质
CN114124367B (zh) * 2020-08-31 2023-03-24 Oppo广东移动通信有限公司 一种数据传输方法、装置及存储介质
CN116318677A (zh) * 2020-08-31 2023-06-23 Oppo广东移动通信有限公司 一种数据传输方法、客户端、服务端及存储介质
CN114499913B (zh) * 2020-10-26 2022-12-06 华为技术有限公司 加密报文的检测方法及防护设备
CN115720149A (zh) * 2020-10-26 2023-02-28 华为技术有限公司 加密报文的检测方法及防护设备
CN112187832A (zh) * 2020-11-03 2021-01-05 北京指掌易科技有限公司 数据传输方法和电子设备
CN112511550B (zh) * 2020-12-02 2022-02-22 迈普通信技术股份有限公司 通信方法、装置、电子设备及存储介质
CN113179155A (zh) * 2021-03-26 2021-07-27 广东工业大学 一种基于纠缠交换的单服务器盲量子计算方法
CN113438071B (zh) * 2021-05-28 2024-04-09 荣耀终端有限公司 安全通信的方法及设备
CN114337989A (zh) * 2021-12-30 2022-04-12 中科曙光国际信息产业有限公司 Ssh密钥的管理方法、装置、设备以及存储介质
CN114760253B (zh) * 2022-03-31 2022-10-28 慧之安信息技术股份有限公司 快速物联网数据传输方法和系统
WO2024073843A1 (en) * 2022-10-03 2024-04-11 QDS Holdings Inc. Systems and methods for establishing a secure digital network environment

Citations (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564514A (zh) * 2004-03-26 2005-01-12 中兴通讯股份有限公司 无线局域网自组网模式共享密钥认证和会话密钥协商方法
CN1564626A (zh) * 2004-03-22 2005-01-12 西安电子科技大学 基于漫游密钥交换认证协议的无线局域网安全接入方法
CN1625101A (zh) * 2003-12-01 2005-06-08 中国电子科技集团公司第三十研究所 一种基于对称密码算法的强鉴别方法
JP2005176144A (ja) * 2003-12-12 2005-06-30 Ntt Docomo Inc 端末装置、通信システム及び通信方法
US6931528B1 (en) * 1997-11-10 2005-08-16 Nokia Networks Oy Secure handshake protocol
CN1655498A (zh) * 2004-02-10 2005-08-17 管海明 一种多中心的基于身份的密钥管理方法
CN1697373A (zh) * 2005-06-17 2005-11-16 中兴通讯股份有限公司 一种用户与应用服务器协商共享密钥的方法
CN1701315A (zh) * 2003-07-11 2005-11-23 日本电信电话株式会社 数据库访问控制方法、控制装置及代理处理服务器装置
CN1764195A (zh) * 2005-11-15 2006-04-26 中兴通讯股份有限公司 一种非对等实体安全等级协商方法
CN1767429A (zh) * 2004-10-29 2006-05-03 大唐移动通信设备有限公司 移动通信用户认证与密钥协商方法
US20060095771A1 (en) * 2004-11-02 2006-05-04 Guido Appenzeller Security device for cryptographic communications
WO2006051517A1 (en) * 2004-11-12 2006-05-18 Dublin City University Identity based encryption
CN1863040A (zh) * 2005-07-14 2006-11-15 华为技术有限公司 保证安全联盟信息安全的方法和装置
CN1889433A (zh) * 2006-07-20 2007-01-03 上海交通大学 基于隐式公钥证书的双方认证密钥协商方法及系统
WO2007017884A1 (en) * 2005-08-05 2007-02-15 Hewlett-Packard Development Company L.P. System, method and apparatus to obtain a key for encryption/decryption/data recovery from an enterprise cryptography key management system
CN1921682A (zh) * 2005-08-26 2007-02-28 华为技术有限公司 增强通用鉴权框架中的密钥协商方法
CN1929371A (zh) * 2005-09-05 2007-03-14 华为技术有限公司 用户和外围设备协商共享密钥的方法
CN1937489A (zh) * 2006-09-23 2007-03-28 西安西电捷通无线网络通信有限公司 一种网络密钥管理及会话密钥更新方法
CN1956374A (zh) * 2005-10-28 2007-05-02 腾讯科技(深圳)有限公司 一种为身份认证提供数据加密的装置和方法
CN1980123A (zh) * 2005-11-30 2007-06-13 中国科学院研究生院 基于ibe的pki系统的实现方法及其密钥管理装置
CN101009919A (zh) * 2006-01-24 2007-08-01 华为技术有限公司 一种基于移动网络端到端通信的认证方法
US20070199071A1 (en) * 2004-09-20 2007-08-23 Callas Jonathan D Apparatus and method for identity-based encryption within a conventional public-key infrastructure
CN101030862A (zh) * 2007-03-29 2007-09-05 中兴通讯股份有限公司 非ip多媒体业务ue的鉴权方法、鉴权网络及ue
CN101047945A (zh) * 2006-03-28 2007-10-03 华为技术有限公司 移动通信系统及用户临时身份分发方法
CN101060530A (zh) * 2007-05-22 2007-10-24 赵运磊 可抵赖的互联网密钥交换协议
CN101076190A (zh) * 1996-01-24 2007-11-21 伊兹安全网络有限公司 移动通信系统中鉴权密钥的管理

Patent Citations (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076190A (zh) * 1996-01-24 2007-11-21 伊兹安全网络有限公司 移动通信系统中鉴权密钥的管理
US6931528B1 (en) * 1997-11-10 2005-08-16 Nokia Networks Oy Secure handshake protocol
CN1701315A (zh) * 2003-07-11 2005-11-23 日本电信电话株式会社 数据库访问控制方法、控制装置及代理处理服务器装置
CN1625101A (zh) * 2003-12-01 2005-06-08 中国电子科技集团公司第三十研究所 一种基于对称密码算法的强鉴别方法
JP2005176144A (ja) * 2003-12-12 2005-06-30 Ntt Docomo Inc 端末装置、通信システム及び通信方法
CN1655498A (zh) * 2004-02-10 2005-08-17 管海明 一种多中心的基于身份的密钥管理方法
CN1564626A (zh) * 2004-03-22 2005-01-12 西安电子科技大学 基于漫游密钥交换认证协议的无线局域网安全接入方法
CN1564514A (zh) * 2004-03-26 2005-01-12 中兴通讯股份有限公司 无线局域网自组网模式共享密钥认证和会话密钥协商方法
US20070199071A1 (en) * 2004-09-20 2007-08-23 Callas Jonathan D Apparatus and method for identity-based encryption within a conventional public-key infrastructure
CN1767429A (zh) * 2004-10-29 2006-05-03 大唐移动通信设备有限公司 移动通信用户认证与密钥协商方法
US20060095771A1 (en) * 2004-11-02 2006-05-04 Guido Appenzeller Security device for cryptographic communications
WO2006051517A1 (en) * 2004-11-12 2006-05-18 Dublin City University Identity based encryption
CN1697373A (zh) * 2005-06-17 2005-11-16 中兴通讯股份有限公司 一种用户与应用服务器协商共享密钥的方法
CN1863040A (zh) * 2005-07-14 2006-11-15 华为技术有限公司 保证安全联盟信息安全的方法和装置
WO2007017884A1 (en) * 2005-08-05 2007-02-15 Hewlett-Packard Development Company L.P. System, method and apparatus to obtain a key for encryption/decryption/data recovery from an enterprise cryptography key management system
CN1921682A (zh) * 2005-08-26 2007-02-28 华为技术有限公司 增强通用鉴权框架中的密钥协商方法
CN1929371A (zh) * 2005-09-05 2007-03-14 华为技术有限公司 用户和外围设备协商共享密钥的方法
CN1956374A (zh) * 2005-10-28 2007-05-02 腾讯科技(深圳)有限公司 一种为身份认证提供数据加密的装置和方法
CN1764195A (zh) * 2005-11-15 2006-04-26 中兴通讯股份有限公司 一种非对等实体安全等级协商方法
CN1980123A (zh) * 2005-11-30 2007-06-13 中国科学院研究生院 基于ibe的pki系统的实现方法及其密钥管理装置
CN101009919A (zh) * 2006-01-24 2007-08-01 华为技术有限公司 一种基于移动网络端到端通信的认证方法
CN101047945A (zh) * 2006-03-28 2007-10-03 华为技术有限公司 移动通信系统及用户临时身份分发方法
CN1889433A (zh) * 2006-07-20 2007-01-03 上海交通大学 基于隐式公钥证书的双方认证密钥协商方法及系统
CN1937489A (zh) * 2006-09-23 2007-03-28 西安西电捷通无线网络通信有限公司 一种网络密钥管理及会话密钥更新方法
CN101030862A (zh) * 2007-03-29 2007-09-05 中兴通讯股份有限公司 非ip多媒体业务ue的鉴权方法、鉴权网络及ue
CN101060530A (zh) * 2007-05-22 2007-10-24 赵运磊 可抵赖的互联网密钥交换协议

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577370A (zh) * 2016-02-29 2016-05-11 赵运磊 一种应用于客户-服务器环境的认证密钥协商方法
CN108989054A (zh) * 2018-08-30 2018-12-11 武汉理工大学 一种密码系统及数字签名方法
CN108989054B (zh) * 2018-08-30 2020-08-04 武汉理工大学 一种密码系统及数字签名方法
WO2021012574A1 (zh) * 2019-07-24 2021-01-28 深圳壹账通智能科技有限公司 多重签名方法、签名中心、介质及电子设备
CN110995414A (zh) * 2019-12-23 2020-04-10 中金金融认证中心有限公司 基于国密算法在tls1_3协议中建立通道的方法
CN110995414B (zh) * 2019-12-23 2023-08-11 中金金融认证中心有限公司 基于国密算法在tls1_3协议中建立通道的方法
CN112422507A (zh) * 2020-10-19 2021-02-26 北京电子科技学院 一种基于标识算法的国密ssl加密方法
CN112422507B (zh) * 2020-10-19 2023-04-07 北京电子科技学院 一种基于标识算法的国密ssl加密方法
CN113300845A (zh) * 2021-07-20 2021-08-24 国能信控互联技术有限公司 一种智慧热网数据传输安全防护系统和方法
CN113300845B (zh) * 2021-07-20 2022-07-05 国能信控互联技术有限公司 一种智慧热网数据传输安全防护系统和方法
CN115529129A (zh) * 2022-09-29 2022-12-27 上海浦东发展银行股份有限公司 加密通信方法、装置和计算机设备

Also Published As

Publication number Publication date
EP2173055A1 (en) 2010-04-07
CN101459506A (zh) 2009-06-17
CN101459506B (zh) 2011-09-14

Similar Documents

Publication Publication Date Title
WO2009076811A1 (zh) 密钥协商方法、用于密钥协商的系统、客户端及服务器
CN107948189B (zh) 非对称密码身份鉴别方法、装置、计算机设备及存储介质
CN108650227B (zh) 基于数据报安全传输协议的握手方法及系统
US9621545B2 (en) System and method for connecting client devices to a network
EP3210335B1 (en) Efficient start-up for secured connections and related services
JP4527358B2 (ja) 鍵供託を使用しない、認証された個別暗号システム
US7899185B2 (en) Real privacy management authentication system
JP5349619B2 (ja) アイデンティティベースの認証鍵共有プロトコル
WO2011023082A1 (zh) 加密信息协商方法、设备及网络系统
WO2007011897A2 (en) Cryptographic authentication, and/or establishment of shared cryptographic keys, using a signing key encrypted with a non-one-time-pad encryption, including (but not limited to) techniques with improved security against malleability attacks
WO2010078755A1 (zh) 电子邮件的传送方法、系统及wapi终端
JP2005515715A (ja) データ伝送リンク
WO2007140665A1 (fr) Système et procédé d&#39;authentification de sécurité de connexion authentique basés sur cpk
Claeys et al. Securing complex IoT platforms with token based access control and authenticated key establishment
TW201537937A (zh) 統一身份認證平臺及認證方法
WO2010088812A1 (zh) 即时消息的传送方法、系统及wapi终端
JP2007533278A (ja) 移動体ノードの高速かつ安全な接続性
Badra et al. Key-exchange authentication using shared secrets
CA2795420C (en) Derived certificate based on changing identity
Badra et al. Adding identity protection to eap-tls smartcards
US20240129115A1 (en) Generating post-quantum pre-shared keys
WO2022218544A1 (en) Device and method for decision-making
Kuo et al. Comparison studies between pre-shared key and public key exchange mechanisms for transport layer security (TLS)
Jain Secure Socket Layer (SSL) and Transport Layer Security (TLS)
Mannan et al. A protocol for secure public Instant Messaging (extended version)

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008862820

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE