WO2017045552A1 - Method and device for loading digital certificate in ssl or tls communication - Google Patents

Method and device for loading digital certificate in ssl or tls communication Download PDF

Info

Publication number
WO2017045552A1
WO2017045552A1 PCT/CN2016/098186 CN2016098186W WO2017045552A1 WO 2017045552 A1 WO2017045552 A1 WO 2017045552A1 CN 2016098186 W CN2016098186 W CN 2016098186W WO 2017045552 A1 WO2017045552 A1 WO 2017045552A1
Authority
WO
WIPO (PCT)
Prior art keywords
signature
digital certificate
mode
client
key exchange
Prior art date
Application number
PCT/CN2016/098186
Other languages
French (fr)
Chinese (zh)
Inventor
齐铁鹏
杨洋
刘立朋
李振宇
蒋锷
周辉
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017045552A1 publication Critical patent/WO2017045552A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials

Definitions

  • the present application relates to the technical field of communication, and in particular to a method for loading a digital certificate in SSL or TLS communication and an apparatus for loading a digital certificate in SSL or TLS communication.
  • HTTPS Hyper Text Transfer Protocol over Secure Socket Layer
  • HTTPS is a HTTP (Hypertext Transfer Protocol) channel for security purposes. That is, HTTP is added to SSL (Secure Sockets Layer) or its subsequent version TLS (Transport Layer Security). SSL/TLS utilizes data encryption, authentication, and message integrity verification mechanisms to provide security for the transmission of data over the network.
  • SSL Secure Sockets Layer
  • TLS Transport Layer Security
  • SSL/TLS The cryptographic algorithms applied by SSL/TLS, such as the hash algorithm of the digest, the signature algorithm of the certificate, and the encryption algorithm of the data, are also constantly updated, and various clients (including various versions of the browser, various types) Encryption methods that can be supported by applications, etc. are also uneven.
  • the digital certificate is basically loaded at startup. Only one digital certificate can be used for the specified domain name. Once the digital certificate is loaded, the digest algorithm and signature algorithm specified in the certificate can only be used for SSL/TLS handshake. Negotiation.
  • embodiments of the present application have been made in order to provide an overcoming of the above problems or at least partially A method for loading a digital certificate in SSL or TLS communication and a corresponding device for loading a digital certificate in SSL or TLS communication, which solve the above problems.
  • the embodiment of the present application discloses a method for loading a digital certificate in SSL or TLS communication, including:
  • the step of verifying the key exchange mode and the first signature mode supported by the client according to the handshake request message includes:
  • the step of verifying the key exchange mode and the first signature mode supported by the client according to the handshake request message further includes:
  • a first signature mode supported by the client is identified from the extension header.
  • the first signature mode that is verified is the first signature mode with the highest encryption strength of the client.
  • the digital certificate is divided into groups according to the type of the public key, and one of the digital certificates is loaded in each group, and the currently loaded digital certificate is the highest-encrypted digital certificate in the group.
  • the step of determining whether the key exchange mode and the signature mode match the currently loaded digital certificate comprises:
  • loading the other digital certificate that matches the key exchange manner and the first signature manner The steps include:
  • the digital certificate to which the third signature mode belongs is loaded to replace the digital certificate currently loaded in the packet to which the public key belongs.
  • the embodiment of the present application further discloses an apparatus for loading a digital certificate in SSL or TLS communication, including:
  • a handshake request message receiving module configured to receive a handshake request message sent by the client based on a Secure Sockets Layer protocol SSL or a Transport Layer Security Protocol TLS;
  • a client information verification module configured to verify, according to the handshake request message, a key exchange manner supported by the client and a first signature manner
  • a digital certificate matching module configured to determine whether the key exchange mode and the first signature mode match the currently loaded digital certificate; if not, the digital certificate loading module is invoked;
  • a digital certificate loading module loading other digital certificates matching the key exchange manner and the first signature manner
  • the handshake response message returning module is configured to return a handshake response message to the client according to the key exchange manner that matches the success of the digital certificate and the first signature manner.
  • the client information verification module includes:
  • a cipher suite lookup submodule for finding a cipher suite from the handshake request message
  • a cipher suite identification submodule configured to identify a key exchange mode and a first signature mode supported by the client from the cipher suite
  • the client information verification module further includes:
  • An extension header search submodule configured to search for an extension header of a transport layer security protocol TLS from the handshake request
  • the extended header identification submodule is configured to identify, from the extended header, a first signature manner supported by the client.
  • the first signature mode that is verified is the first signature mode with the highest encryption strength of the client.
  • the digital certificate is divided into groups according to the type of the public key, and one of the digital certificates is loaded in each group, and the currently loaded digital certificate is the highest-encrypted digital certificate in the group.
  • the digital certificate matching module includes:
  • a public key lookup submodule configured to find a public key that matches the key exchange manner
  • a current signature mode identification submodule configured to identify a digital certificate currently loaded in a packet to which the public key belongs Second signature method
  • a first signature matching submodule configured to determine whether the first signature mode matches the second signature mode; if yes, the first determining submodule is invoked, and if not, the second determining submodule is invoked;
  • a first determining submodule configured to determine that the key exchange mode and the signature manner match the currently loaded digital certificate
  • the second determining submodule is configured to determine that the key exchange mode and the signature manner do not match the currently loaded digital certificate.
  • the digital certificate loading module includes:
  • a further signature mode identifying submodule configured to identify a third signature mode of other digital certificates in the group to which the public key belongs;
  • a second signature matching sub-module configured to determine whether the third signature mode matches the first signature mode; if yes, calling a digital certificate replacement sub-module;
  • a digital certificate replacement submodule configured to load the digital certificate to which the third signature mode belongs, to replace the digital certificate currently loaded in the packet to which the public key belongs.
  • the digital certificate is matched with the key exchange mode supported by the client and the first signature mode, so that the appropriate digital certificate is dynamically loaded during the handshake negotiation process to ensure successful completion of the SSL/TLS handshake negotiation.
  • the poor compatibility of the website ensures that the client accesses the website through a secure protocol such as HTTPS, which improves the security of the communication.
  • the embodiment of the present application can configure multiple different types of digital certificates for the same domain name, which improves the dynamic loading efficiency of the digital certificate.
  • FIG. 1 is a flow chart showing the steps of an embodiment of a method for loading a digital certificate in SSL/TLS communication according to the present application
  • FIG. 2 is a network model architecture diagram of an embodiment of the present application.
  • FIG. 3 is a signaling diagram of an SSL handshake according to an embodiment of the present application.
  • FIG. 4 is a structural block diagram of an embodiment of an apparatus for loading a digital certificate in SSL/TLS communication according to the present application.
  • SSL/TLS is a secure network transmission protocol, mainly to protect confidential information transmitted over the Internet.
  • the protocol includes two processes: a handshake phase and a data transmission phase.
  • the transmitted data is separately encrypted and decrypted using the negotiated symmetric key, and the digest key is digested to ensure the privacy and integrity of the data.
  • the main purpose of the handshake phase is to confirm the true validity of the identity of the other party and to generate the key required for the data transmission phase.
  • the SSL handshake process is as follows:
  • a client client sends a Client hello message.
  • the message mainly includes the SSL version number, random number, callback ID, cipher suite, and compression method.
  • the cipher suite indicates the list of algorithms that the client can support, including the key exchange method, the signature method, and the encryption method.
  • the server returns a hello message to the client, including the SSL version number, the key exchange mode supported by the server and the client, the signature mode, and the encryption method, and the random number used to generate the secret key.
  • the server needs to match the cipher suite in the client hello through the pre-loaded digital certificate and signature method. Only when the match is successful, the server hello message is returned, and the cipher algorithm used by both parties is identified in Client_hello.
  • the server sends the specified certificate (certificate chain) to the client for authentication.
  • the client After successfully verifying the server certificate, the client sends a client key exchange message to the server, which is used to encrypt the pre-master key through the server's public key and then send it to the server.
  • the two parties generate a master key for the transmission phase according to the pre-master key and the random number, thereby completing the SSL handshake negotiation process.
  • step e when the client verifies the server certificate, the client verifies the digital signature in the certificate according to the signature method in the certificate and the hash digest algorithm used by the signature. If the client does not support the response signature algorithm and the digest algorithm, The verification of the digital certificate will fail and the SSL handshake will not be completed.
  • the digital certificate supported by the client is dynamically loaded to perform handshake to ensure the successful handshake of the SSL/TLS.
  • FIG. 1 is a flow chart showing the steps of an embodiment of a method for loading a digital certificate in an SSL/TLS communication, which may include the following steps:
  • Step 101 Receive a handshake request message sent by the client according to a Secure Sockets Layer protocol SSL or a transport layer security protocol TLS.
  • SSL Secure Sockets Layer protocol
  • TLS transport layer security protocol
  • the SSL/TLS is between the application layer and the TCP (Transmission Control Protocol) and IP (Internet Protocol) protocols.
  • TCP Transmission Control Protocol
  • IP Internet Protocol
  • the application layer data is no longer passed directly to the transport layer, but to the SSL/TLS layer, which encrypts the data received from the application layer.
  • the SSL protocol itself is divided into two layers:
  • the upper layer is an SSL handshake protocol, an SSL change cipher spec protocol, and an SSL alert protocol.
  • the underlying layer is the SSL record protocol.
  • SSL handshake protocol used to negotiate the cipher suite (encryption algorithm, key exchange algorithm, MAC algorithm, etc.) used in the communication process, securely exchange keys between the server and the client, and implement authentication of the server and the client.
  • SSL password change protocol The client and server notify the peer through the password change protocol, and subsequent packets will be protected and transmitted using the newly negotiated cipher suite and key.
  • SSL warning protocol used to report alarm information to the communication peer.
  • the message contains the severity and description of the alarm.
  • SSL record protocol It is mainly responsible for blocking, calculating, adding MAC value, encrypting, and transmitting the processed record block to the upper layer data (SSL handshake protocol, SSL password change protocol, SSL warning protocol, and application layer protocol message). Give the opposite end.
  • the TLS protocol includes two protocol groups: the TLS Record Protocol and the TLS Handshake Protocol.
  • the TLS Recording Protocol is a layered protocol.
  • the information in each layer may contain fields such as length, description, and content.
  • the recording protocol supports information transfer, segmentation of data into processable blocks, compression of data, application of MAC, encryption, and transmission of results.
  • the received data is decrypted, verified, decompressed, reorganized, etc., and then transmitted to the upper client.
  • the TLS handshake protocol consists of three sub-protocol groups, allowing peers to agree on the security parameters of the record layer, self-certify, instantiate security parameters, and report error conditions to each other.
  • TLS is based on SSL and is a subsequent version of SSL, there is a difference between the two, mainly because the encryption algorithms they support are different, and the overall process is basically the same. Therefore, in the implementation of this application In the example, it is mainly explained by SSL.
  • the first phase of the SSL handshake initiates a logical connection and establishes the security capabilities of the connection.
  • the client sends a Client hello message (ie, a handshake request message) to the server and waits for a response from the server.
  • a Client hello message ie, a handshake request message
  • Step 102 Verify, according to the handshake request message, a key exchange mode and a first signature mode supported by the client.
  • Client hello messages usually include Version (version), Random (client random number), Session id (session ID), Cipher suite (client-supported cipher suite), Compression method (client-supported compression method) and other information.
  • the same set of encryption and decryption algorithms can be used to ensure data encryption and decryption in the SSL communication process.
  • the client informs the server of the signature mode it supports, that is, the client transmits a list of locally supported cipher suites (Cipher Suite) to the server.
  • Cipher Suite locally supported cipher suites
  • the server can then look up the cipher suite from the handshake request message, and identify the key exchange mode and the first signature mode supported by the client from the cipher suite.
  • SSL-based cipher suites usually start with "SSL”.
  • TLS-based cipher suites usually start with "TLS”, followed by the key exchange method used in the key exchange phase, the symmetric encryption used to transfer data,
  • the signature method used in the MAC used for data integrity verification uses the word "With” to separate the key exchange method, the symmetric encryption method, and the signature method.
  • DHE_RSA and ECDHE_ECDSA are key exchange modes
  • DES_CBC and AES_128_GCM are symmetric encryption modes
  • SHA and SHA256 are signature modes (that is, different versions of hash algorithms).
  • the first signature method verified may be the first signature mode with the highest encryption strength of the client.
  • the server parses the Client hello, it can traverse the list of cipher suites to record the first signature method with the highest encryption strength.
  • the extension header of the transport layer security protocol TLS can be looked up from the handshake request, and the extension header indicates a list of signature methods that the client can support.
  • the signature mode supported by the client can be read from the extension header, and the first signature party supported by the client is updated. formula.
  • TLS Transmission Control Protocol
  • Internet Explorer may not add extension headers according to the TLS specification. In this case, you can still traverse the cipher suite list to obtain the number supported by the client.
  • a signature method may be used.
  • Step 103 determining the key exchange mode and the first signature mode, whether it matches the currently loaded digital certificate; if not, executing step 104;
  • a standard X.509 digital certificate contains the following contents:
  • Version information serial number, signature method used, issuer name, expiration date, owner name, public key used for negotiation, digital signature.
  • a digital certificate is an electronic certificate that needs to be applied and issued by a specialized digital certificate authority (CA).
  • CA digital certificate authority
  • a private key and a public key are generated.
  • the private key is kept by the server and cannot be leaked.
  • the public key is attached to the digital certificate and can be made public.
  • the digital certificate itself is also accompanied by a certificate electronic signature, which is used to verify the integrity and authenticity of the certificate and to prevent the certificate from being serially altered.
  • the digital certificate may be grouped according to the type of the public key.
  • OpenSSL Open Secure Sockets Layer
  • the server is configured with the following digital certificates:
  • One of the digital certificates can be loaded in each group.
  • the server can read the configured digital certificate into memory and load the specified digital certificate into the context of SSL or TLS at startup.
  • the specified digital certificate can be reloaded into the context of SSL or TLS when the communication of the SSL or TLS is ended.
  • the embodiment of the present application can configure multiple different types of digital certificates for the same domain name, which improves the dynamic loading efficiency of the digital certificate.
  • the currently loaded digital certificate may be the highest-encrypted digital certificate in the group to which it belongs.
  • SHA256 has a higher encryption strength than SHA1, so for the above example grouping, you can load sha256WithRSAEncryption, ecdsa-with-SHA256.
  • a callback function may be registered with the SSL/TLS service program for dynamically selecting the digital certificate according to the signature mode in the subsequent handshake phase.
  • the callback function is called to pass a parameter to the callback function, that is, the signature mode supported by the client, such as the hash algorithm with the highest encryption strength.
  • the callback function performs a matching of the signature algorithm used by the hash algorithm with the certificate of the current same type of packet, and finds the certificate reload with the highest algorithm strength and matching the strength of the client hash algorithm.
  • the public key matching the key exchange manner may be searched for, and the second signature manner of the digital certificate currently loaded in the packet to which the public key belongs is identified;
  • the encryption strength of the second signature mode is equal to or lower than the encryption strength of the first signature mode.
  • the first signature mode is SHA256
  • the second signature mode is SHA224
  • the two match If the second signature mode is SHA512, the two do not match.
  • the key exchange mode and the signature mode may be determined to be matched with the currently loaded digital certificate
  • the key exchange mode and the signature mode may be determined to not match the currently loaded digital certificate.
  • the first signature mode is SHA. If the RSA belongs to the group, the currently loaded digital certificate is sha256WithRSAEncryption, its second signature is sha256, does not match SHA, and needs to reload other matching digital certificates.
  • Step 104 Load other digital certificates that match the key exchange mode and the first signature mode.
  • the third signature mode of the other digital certificate in the group to which the public key belongs may be identified, and whether the third signature mode matches the first signature mode is determined, and if yes, the digital certificate to which the third signature mode belongs is loaded to the SSL. Or the TLS context to replace the digital certificate currently loaded in the packet to which the public key belongs. The subsequent SSL or TLS handshake operation will be sent to the client using this new digital certificate to ensure the normal operation of the handshake operation.
  • the digital certificate with the highest encryption strength in the signature mode can be loaded.
  • Step 105 Return a handshake response message to the client according to the key exchange mode that matches the success of the digital certificate and the first signature mode.
  • step 105 may be directly performed to return a handshake response message.
  • step 103 if it is determined that the key exchange mode and the first signature mode do not match the currently loaded digital certificate, step 104 is executed, the matching digital certificate is loaded, and then step 105 is performed to return a handshake response. Message.
  • the server returns a Server hello message (ie, a handshake response message) to the client, and confirms the information in the Client hello message.
  • a Server hello message ie, a handshake response message
  • Server hello usually includes Version (version, the highest version number supported by the client and the lower version number supported by the server), Random (server random number), Session id (session ID), Cipher suite (server) Information such as the selected cipher suite), Compression method (server-selected compression method).
  • the digital certificate is matched with the key exchange mode supported by the client and the first signature mode, so that the appropriate digital certificate is dynamically loaded during the handshake negotiation process to ensure successful completion of the SSL/TLS handshake negotiation.
  • the poor compatibility of the website ensures that the client accesses the website through a secure protocol such as HTTPS, which improves the security of the communication.
  • the client and server can know the following:
  • the server and client can perform handshake operations and encryption and decryption operations according to the SSL or TLS specifications.
  • the server sends the digital certificate carrying its own public key to the SSL client through a Certificate message.
  • the server sends a Server Hello Done message to notify the client that the version and cipher suite negotiation has ended and the key exchange begins.
  • the public key in the digital certificate is used to encrypt the premaster secret generated by the client, and is sent to the server through the Client Key Exchange message.
  • the client sends a Change Cipher Spec message to inform the server that subsequent packets will be encrypted and MAC calculated using the negotiated key and cipher suite.
  • the client calculates the hash value of the interactive handshake message (all the interactive messages except the Change Cipher Spec message), processes the hash value (calculates and adds the MAC value, encryption, etc.) using the negotiated key and cipher suite, and passes The Finished message is sent to the SSL server.
  • the server uses the same method to calculate the hash value of the exchanged handshake message and compares it with the decrypted result of the Finished message. If the two are the same and the MAC value is successfully verified, the key and cipher suite negotiation is successful.
  • the server sends a Change Cipher Spec message to inform the SSL client that the subsequent message will be encrypted and MAC calculated using the negotiated key and cipher suite.
  • the server calculates the hash value of the handshake message that has been exchanged, processes the hash value (calculates and adds the MAC value, encryption, etc.) using the negotiated key and cipher suite, and sends the message to the client through the Finished message.
  • the client uses the same method to calculate the hash value of the exchanged handshake message and compares it with the decrypted result of the Finished message. If the two are the same and the MAC value is successfully verified, the key and cipher suite negotiation is successful.
  • the client After receiving the Finished message sent by the server, if the decryption succeeds, the client can determine that the server is the owner of the digital certificate, that is, the server authentication succeeds, because only the server with the private key can decrypt the premaster secret from the Client Key Exchange message. Indirectly, the client-to-server authentication is implemented.
  • the server and the client respectively generate the symmetric master key required for encryption, the authentication key and the initialization vector used for integrity verification, respectively, using the preliminary master key.
  • the sender (server or client) will first encrypt with the symmetric key, and use the authentication key to group the data according to the signature negotiated during the handshake (such as MD5 or SHA based MAC). Algorithm) to sign and generate a summary.
  • the signature such as MD5 or SHA based MAC.
  • Algorithm Algorithm
  • the receiving end decrypts with a symmetric key, and uses the authentication key to sign the decrypted data according to the signature method negotiated during handshake (such as MD5 or SHA based MAC algorithm), generating a digest and receiving it.
  • the summary is compared to verify the integrity of the data.
  • the packet is not changed; otherwise, the packet is modified during transmission, and the receiver (client or server) will discard the packet.
  • FIG. 4 a structural block diagram of an apparatus for loading a digital certificate in an SSL/TLS communication according to the present application is shown. Specifically, the following modules may be included:
  • the handshake request message receiving module 401 is configured to receive a handshake request message sent by the client according to the Secure Sockets Layer protocol SSL or the transport layer security protocol TLS;
  • the client information verification module 402 is configured to verify, according to the handshake request message, a key exchange manner supported by the client and a first signature manner;
  • the digital certificate matching module 403 is configured to determine whether the key exchange mode and the first signature mode are matched with the currently loaded digital certificate; if not, the digital certificate loading module 404 is invoked;
  • the digital certificate loading module 404 loads other digital certificates that match the key exchange manner and the first signature manner;
  • the handshake response message returning module 405 is configured to return a handshake response message to the client according to the key exchange mode that matches the success of the digital certificate and the first signature mode.
  • the client information verification module 402 may include the following sub-modules:
  • a cipher suite lookup submodule for finding a cipher suite from the handshake request message
  • a cipher suite identification submodule configured to identify a key exchange mode and a first signature mode supported by the client from the cipher suite
  • the client information verification module 402 may further include the following sub-modules:
  • An extension header search submodule configured to search for an extension header of a transport layer security protocol TLS from the handshake request
  • the extended header identification submodule is configured to identify, from the extended header, a first signature manner supported by the client.
  • the first signature mode that is verified may be the first signature mode with the highest encryption strength of the client.
  • the digital certificate may be grouped according to the type of the public key, and one of the digital certificates is loaded in each group, and the currently loaded digital certificate may be the digital certificate with the highest encryption strength in the group.
  • the digital certificate matching module 404 may include the following sub-modules:
  • a public key lookup submodule configured to find a public key that matches the key exchange manner
  • a current signature mode identification submodule configured to identify a second signature mode of the digital certificate currently loaded in the packet to which the public key belongs
  • a first signature matching submodule configured to determine whether the first signature mode matches the second signature mode; if yes, the first determining submodule is invoked, and if not, the second determining submodule is invoked;
  • a first determining submodule configured to determine the key exchange mode and the signature manner, and match the currently loaded digital certificate
  • the second determining sub-module is configured to determine that the key exchange mode and the signature mode do not match the currently loaded digital certificate.
  • the digital certificate loading module 405 may include the following sub-modules:
  • a further signature mode identifying submodule configured to identify a third signature mode of other digital certificates in the group to which the public key belongs;
  • a second signature matching sub-module configured to determine whether the third signature mode matches the first signature mode; if yes, calling a digital certificate replacement sub-module;
  • a digital certificate replacement submodule configured to load the digital certificate to which the third signature mode belongs, to replace the digital certificate currently loaded in the packet to which the public key belongs.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, embodiments of the present application may adopt an entirely hardware embodiment, an entirely software embodiment, or a combination of soft A form of embodiment of hardware and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.
  • the above provides a method for loading a digital certificate in SSL/TLS communication and a device for loading a digital certificate in SSL/TLS communication provided by the present application, and a specific example is applied to the principle of the present application.
  • the description of the above embodiments is only for helping to understand the method of the present application and its core ideas; at the same time, for those skilled in the art, according to the idea of the present application, in the specific implementation and application scope There are variations, and the contents of this specification should not be construed as limiting the application.

Abstract

Provided are a method and device for loading a digital certificate in SSL or TLS communication. The method comprises: receiving a handshake request message sent by a client based on a secure sockets layer (SSL) or transport layer security (TLS); according to the handshake request message, verifying a key exchange mode and a first signature mode supported by the client; judging whether the key exchange mode and the first signature mode match a currently loaded digital certificate; if not, loading another digital certificate matching the key exchange mode and the first signature mode; and according to the key exchange mode and the first signature mode successfully matching the digital certificate, returning a handshake response message to the client.The embodiments of the present application achieve dynamic loading of a suitable digital certificate in a handshake negotiation process, thereby ensuring successful completion of SSL/TLS handshake negotiation.

Description

一种在SSL或TLS通信中加载数字证书的方法和装置Method and device for loading digital certificate in SSL or TLS communication
本申请要求2015年09月15日递交的申请号为201510587689.7、发明名称为“一种在SSL或TLS通信中加载数字证书的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510587689.7, entitled "A Method and Apparatus for Loading Digital Certificates in SSL or TLS Communication", filed on September 15, 2015, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及通信的技术领域,特别是涉及一种在SSL或TLS通信中加载数字证书的方法和一种在SSL或TLS通信中加载数字证书的装置。The present application relates to the technical field of communication, and in particular to a method for loading a digital certificate in SSL or TLS communication and an apparatus for loading a digital certificate in SSL or TLS communication.
背景技术Background technique
基于电子商务和网上银行等新兴应用,极大地方便了人们的日常生活,受到人们的青睐。由于这些应用都需要在网络上进行在线交易,它们对网络通信的安全性提出了更高的要求。因此,HTTPS(Hyper Text Transfer Protocol over Secure Socket Layer,超文本传输安全协议)已经被越来越多的网站所使用。Emerging applications such as e-commerce and online banking have greatly facilitated people's daily life and are favored by people. Since these applications require online transactions on the network, they place higher demands on the security of network communications. Therefore, HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer) has been used by more and more websites.
HTTPS是以安全为目标的HTTP(Hypertext transfer protocol,超文本传送协议)通道,即HTTP下加入SSL(Secure Sockets Layer,安全套接层协议)或其后续版本TLS(Transport Layer Security,安全传输层协议),SSL/TLS利用数据加密、身份验证和消息完整性验证机制,为网络上数据的传输提供安全性保证。HTTPS is a HTTP (Hypertext Transfer Protocol) channel for security purposes. That is, HTTP is added to SSL (Secure Sockets Layer) or its subsequent version TLS (Transport Layer Security). SSL/TLS utilizes data encryption, authentication, and message integrity verification mechanisms to provide security for the transmission of data over the network.
SSL/TLS所应用的密码算法,如摘要的哈希算法、证书的签名算法、数据的加密算法等也随之不断的更新,而目前各种客户端(包括各种版本的浏览器,各种应用等)所能支持的加密方式也参差不齐。The cryptographic algorithms applied by SSL/TLS, such as the hash algorithm of the digest, the signature algorithm of the certificate, and the encryption algorithm of the data, are also constantly updated, and various clients (including various versions of the browser, various types) Encryption methods that can be supported by applications, etc. are also uneven.
在诸如电子商务平台这样访问量巨大的网站中,经常面临各种版本的客户端访问。In a highly visited website such as an e-commerce platform, there are often various versions of client access.
目前对于支持SSL/TLS的服务器基本是在启动时加载数字证书,对于指定的域名只能使用一个数字证书,数字证书一旦加载只能用证书里规定的摘要算法和签名算法来进行SSL/TLS握手协商。Currently, for servers that support SSL/TLS, the digital certificate is basically loaded at startup. Only one digital certificate can be used for the specified domain name. Once the digital certificate is loaded, the digest algorithm and signature algorithm specified in the certificate can only be used for SSL/TLS handshake. Negotiation.
如果某些旧版本的客户端无法支持证书里的较新的算法,则协商失败,从而导致客户端无法通过HTTPS访问网站,网站兼容性差,导致通信的安全性低。If some older versions of the client cannot support the newer algorithms in the certificate, the negotiation fails, resulting in the client not being able to access the website via HTTPS, and the website compatibility is poor, resulting in low communication security.
发明内容Summary of the invention
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解 决上述问题的一种在SSL或TLS通信中加载数字证书的方法和相应的一种在SSL或TLS通信中加载数字证书的装置。In view of the above problems, embodiments of the present application have been made in order to provide an overcoming of the above problems or at least partially A method for loading a digital certificate in SSL or TLS communication and a corresponding device for loading a digital certificate in SSL or TLS communication, which solve the above problems.
为了解决上述问题,本申请实施例公开了一种在SSL或TLS通信中加载数字证书的方法,包括:In order to solve the above problem, the embodiment of the present application discloses a method for loading a digital certificate in SSL or TLS communication, including:
接收客户端基于安全套接层协议SSL或传输层安全协议TLS发送的握手请求消息;Receiving a handshake request message sent by the client based on the Secure Sockets Layer protocol SSL or the Transport Layer Security Protocol TLS;
根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式;And verifying, according to the handshake request message, a key exchange manner supported by the client and a first signature manner;
判断所述密钥交换方式和所述第一签名方式是否与当前加载的数字证书匹配;若否,则加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书;Determining whether the key exchange mode and the first signature mode match the currently loaded digital certificate; if not, loading other digital certificates that match the key exchange mode and the first signature mode;
根据匹配数字证书成功的所述密钥交换方式和所述第一签名方式,向客户端返回握手响应消息。And returning a handshake response message to the client according to the key exchange manner that matches the success of the digital certificate and the first signature manner.
可选地,所述根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式的步骤包括:Optionally, the step of verifying the key exchange mode and the first signature mode supported by the client according to the handshake request message includes:
从所述握手请求消息中查找密码套件;Finding a cipher suite from the handshake request message;
从所述密码套件中识别客户端支持的密钥交换方式和第一签名方式;Identifying a key exchange mode and a first signature mode supported by the client from the cipher suite;
可选地,所述根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式的步骤还包括:Optionally, the step of verifying the key exchange mode and the first signature mode supported by the client according to the handshake request message further includes:
从所述握手请求中查找传输层安全协议TLS的扩展头;Finding an extension header of the transport layer security protocol TLS from the handshake request;
从所述扩展头中识别客户端支持的第一签名方式。A first signature mode supported by the client is identified from the extension header.
可选地,所验证的第一签名方式为客户端的加密强度最高的第一签名方式。Optionally, the first signature mode that is verified is the first signature mode with the highest encryption strength of the client.
可选地,所述数字证书按照公钥的类型划分分组,在每个分组中加载其中一个数字证书,当前加载的数字证书为所属分组中加密强度最高的数字证书。Optionally, the digital certificate is divided into groups according to the type of the public key, and one of the digital certificates is loaded in each group, and the currently loaded digital certificate is the highest-encrypted digital certificate in the group.
可选地,所述判断所述密钥交换方式和所述签名方式是否与当前加载的数字证书匹配的步骤包括:Optionally, the step of determining whether the key exchange mode and the signature mode match the currently loaded digital certificate comprises:
查找与所述密钥交换方式匹配的公钥;Finding a public key that matches the key exchange method;
识别在所述公钥所属的分组中当前加载的数字证书的第二签名方式;Identifying a second signature manner of the digital certificate currently loaded in the packet to which the public key belongs;
判断所述第一签名方式是否与所述第二签名方式匹配;Determining whether the first signature mode matches the second signature mode;
若是,则判定所述密钥交换方式和所述签名方式与当前加载的数字证书匹配;If yes, determining that the key exchange mode and the signature manner match the currently loaded digital certificate;
若否,则判定所述密钥交换方式和所述签名方式与当前加载的数字证书不匹配。If not, it is determined that the key exchange mode and the signature mode do not match the currently loaded digital certificate.
可选地,所述加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书的 步骤包括:Optionally, loading the other digital certificate that matches the key exchange manner and the first signature manner The steps include:
识别在所述公钥所属的分组中其他数字证书的第三签名方式;Identifying a third signature manner of other digital certificates in the group to which the public key belongs;
判断所述第三签名方式是否与所述第一签名方式匹配;Determining whether the third signature mode matches the first signature mode;
若是,则加载所述第三签名方式所属的数字证书,以替换在所述公钥所属的分组中当前加载的数字证书。If yes, the digital certificate to which the third signature mode belongs is loaded to replace the digital certificate currently loaded in the packet to which the public key belongs.
本申请实施例还公开了一种在SSL或TLS通信中加载数字证书的装置,包括:The embodiment of the present application further discloses an apparatus for loading a digital certificate in SSL or TLS communication, including:
握手请求消息接收模块,用于接收客户端基于安全套接层协议SSL或传输层安全协议TLS发送的握手请求消息;a handshake request message receiving module, configured to receive a handshake request message sent by the client based on a Secure Sockets Layer protocol SSL or a Transport Layer Security Protocol TLS;
客户端信息验证模块,用于根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式;a client information verification module, configured to verify, according to the handshake request message, a key exchange manner supported by the client and a first signature manner;
数字证书匹配模块,用于判断所述密钥交换方式和所述第一签名方式是否与当前加载的数字证书匹配;若否,则调用数字证书加载模块;a digital certificate matching module, configured to determine whether the key exchange mode and the first signature mode match the currently loaded digital certificate; if not, the digital certificate loading module is invoked;
数字证书加载模块,加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书;a digital certificate loading module, loading other digital certificates matching the key exchange manner and the first signature manner;
握手响应消息返回模块,用于根据匹配数字证书成功的所述密钥交换方式和所述第一签名方式,向客户端返回握手响应消息。The handshake response message returning module is configured to return a handshake response message to the client according to the key exchange manner that matches the success of the digital certificate and the first signature manner.
可选地,所述客户端信息验证模块包括:Optionally, the client information verification module includes:
密码套件查找子模块,用于从所述握手请求消息中查找密码套件;a cipher suite lookup submodule for finding a cipher suite from the handshake request message;
密码套件识别子模块,用于从所述密码套件中识别客户端支持的密钥交换方式和第一签名方式;a cipher suite identification submodule, configured to identify a key exchange mode and a first signature mode supported by the client from the cipher suite;
可选地,所述客户端信息验证模块还包括:Optionally, the client information verification module further includes:
扩展头查找子模块,用于从所述握手请求中查找传输层安全协议TLS的扩展头;An extension header search submodule, configured to search for an extension header of a transport layer security protocol TLS from the handshake request;
扩展头识别子模块,用于从所述扩展头中识别客户端支持的第一签名方式。The extended header identification submodule is configured to identify, from the extended header, a first signature manner supported by the client.
可选地,所验证的第一签名方式为客户端的加密强度最高的第一签名方式。Optionally, the first signature mode that is verified is the first signature mode with the highest encryption strength of the client.
可选地,所述数字证书按照公钥的类型划分分组,在每个分组中加载其中一个数字证书,当前加载的数字证书为所属分组中加密强度最高的数字证书。Optionally, the digital certificate is divided into groups according to the type of the public key, and one of the digital certificates is loaded in each group, and the currently loaded digital certificate is the highest-encrypted digital certificate in the group.
可选地,所述数字证书匹配模块包括:Optionally, the digital certificate matching module includes:
公钥查找子模块,用于查找与所述密钥交换方式匹配的公钥;a public key lookup submodule, configured to find a public key that matches the key exchange manner;
当前签名方式识别子模块,用于识别在所述公钥所属的分组中当前加载的数字证书 的第二签名方式;a current signature mode identification submodule, configured to identify a digital certificate currently loaded in a packet to which the public key belongs Second signature method;
第一签名方式匹配子模块,用于判断所述第一签名方式是否与所述第二签名方式匹配;若是,则调用第一判定子模块,若否,则调用第二判定子模块;a first signature matching submodule, configured to determine whether the first signature mode matches the second signature mode; if yes, the first determining submodule is invoked, and if not, the second determining submodule is invoked;
第一判定子模块,用于判定所述密钥交换方式和所述签名方式与当前加载的数字证书匹配;a first determining submodule, configured to determine that the key exchange mode and the signature manner match the currently loaded digital certificate;
第二判定子模块,用于判定所述密钥交换方式和所述签名方式与当前加载的数字证书不匹配。The second determining submodule is configured to determine that the key exchange mode and the signature manner do not match the currently loaded digital certificate.
可选地,所述数字证书加载模块包括:Optionally, the digital certificate loading module includes:
其他签名方式识别子模块,用于识别在所述公钥所属的分组中其他数字证书的第三签名方式;a further signature mode identifying submodule, configured to identify a third signature mode of other digital certificates in the group to which the public key belongs;
第二签名方式匹配子模块,用于判断所述第三签名方式是否与所述第一签名方式匹配;若是,则调用数字证书替换子模块;a second signature matching sub-module, configured to determine whether the third signature mode matches the first signature mode; if yes, calling a digital certificate replacement sub-module;
数字证书替换子模块,用于加载所述第三签名方式所属的数字证书,以替换在所述公钥所属的分组中当前加载的数字证书。And a digital certificate replacement submodule, configured to load the digital certificate to which the third signature mode belongs, to replace the digital certificate currently loaded in the packet to which the public key belongs.
本申请实施例包括以下优点:Embodiments of the present application include the following advantages:
本申请实施例数字证书与客户端支持的密钥交换方式和第一签名方式的匹配,实现了在握手协商过程中动态加载合适的数字证书,以保证成功完成SSL/TLS的握手协商,提高了网站的兼容性差,保证了客户端通过HTTPS等安全协议访问网站,提高了通信的安全性。In the embodiment of the present application, the digital certificate is matched with the key exchange mode supported by the client and the first signature mode, so that the appropriate digital certificate is dynamically loaded during the handshake negotiation process to ensure successful completion of the SSL/TLS handshake negotiation. The poor compatibility of the website ensures that the client accesses the website through a secure protocol such as HTTPS, which improves the security of the communication.
本申请实施例针对同一域名可以配置多种不同类型的数字证书,提高了数字证书的动态加载效率。The embodiment of the present application can configure multiple different types of digital certificates for the same domain name, which improves the dynamic loading efficiency of the digital certificate.
附图说明DRAWINGS
图1是本申请的一种在SSL/TLS通信中加载数字证书的方法实施例的步骤流程图;1 is a flow chart showing the steps of an embodiment of a method for loading a digital certificate in SSL/TLS communication according to the present application;
图2是本申请实施例的一种网络模型架构图;2 is a network model architecture diagram of an embodiment of the present application;
图3是本申请实施例的一种SSL的握手的信令图;FIG. 3 is a signaling diagram of an SSL handshake according to an embodiment of the present application; FIG.
图4是本申请的一种在SSL/TLS通信中加载数字证书的装置实施例的结构框图。4 is a structural block diagram of an embodiment of an apparatus for loading a digital certificate in SSL/TLS communication according to the present application.
具体实施方式 detailed description
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。The above described objects, features and advantages of the present application will become more apparent and understood.
SSL/TLS是安全网络传输协议,主要是为了保护在互联网中传递的机密信息,该协议包括两个过程:握手阶段,数据传输阶段。SSL/TLS is a secure network transmission protocol, mainly to protect confidential information transmitted over the Internet. The protocol includes two processes: a handshake phase and a data transmission phase.
数据传输阶段就是对传输的数据分别使用协商好的对称秘钥进行加解密和摘要秘钥进行摘要运算以保证数据的私密性和完整性。In the data transmission phase, the transmitted data is separately encrypted and decrypted using the negotiated symmetric key, and the digest key is digested to ensure the privacy and integrity of the data.
而握手阶段的主要目的就是为了确认对方身份的真实有效性并产生数据传输阶段所需要的秘钥。The main purpose of the handshake phase is to confirm the true validity of the identity of the other party and to generate the key required for the data transmission phase.
SSL握手过程如下:The SSL handshake process is as follows:
a.客户端项服务器端发送Client hello消息,消息主要包括SSL版本号,随机数、会回话ID、密码套件、压缩方法等信息。a client client sends a Client hello message. The message mainly includes the SSL version number, random number, callback ID, cipher suite, and compression method.
其中,密码套件表明了客户端所能支持的算法列表,其中包括密钥交换方式、签名方式和对此加密方式。Among them, the cipher suite indicates the list of algorithms that the client can support, including the key exchange method, the signature method, and the encryption method.
b.服务器返回给客户端Server hello消息,包括SSL版本号,服务器和客户端共同支持的密钥交换方式、签名方式和对此加密方式,以及用于后续生成秘钥的随机数。b. The server returns a hello message to the client, including the SSL version number, the key exchange mode supported by the server and the client, the signature mode, and the encryption method, and the random number used to generate the secret key.
这里服务器需要的通过预先加载的数字证书以及签名方式来和Client hello里的密码套件进行匹配,只有匹配成功才会返回Server hello消息,并在Client_hello里标识双方协商好的所使用的密码算法。Here, the server needs to match the cipher suite in the client hello through the pre-loaded digital certificate and signature method. Only when the match is successful, the server hello message is returned, and the cipher algorithm used by both parties is identified in Client_hello.
c.服务器发送指定的证书(证书链)给客户端,用于身份验证。c. The server sends the specified certificate (certificate chain) to the client for authentication.
d.客户端成功验证服务器证书后,发送client key exchange消息给服务器,用于将预主秘钥通过服务器的公钥加密后发送给服务器。d. After successfully verifying the server certificate, the client sends a client key exchange message to the server, which is used to encrypt the pre-master key through the server's public key and then send it to the server.
e.双方根据预主秘钥以及随机数生成用于传输阶段的主秘钥,从而完成SSL握手协商的过程。e. The two parties generate a master key for the transmission phase according to the pre-master key and the random number, thereby completing the SSL handshake negotiation process.
在步骤e中,客户端在验证服务器证书的时候根据证书里的签名方式以及签名所使用的哈希摘要算法对证书里的数字签名进行验证,如果客户端不支持响应的签名算法和摘要算法,则数字证书的验证就会失败,SSL握手就无法完成。In step e, when the client verifies the server certificate, the client verifies the digital signature in the certificate according to the signature method in the certificate and the hash digest algorithm used by the signature. If the client does not support the response signature algorithm and the digest algorithm, The verification of the digital certificate will fail and the SSL handshake will not be completed.
因此,提出了本申请实施例的构思之一,当客户端无法支持数字证书的签名算法和摘要算法时,动态加载客户端支持的数字证书进行握手,保证SSL/TLS的握手成功。 Therefore, one of the concepts of the embodiment of the present application is proposed. When the client cannot support the signature algorithm and the digest algorithm of the digital certificate, the digital certificate supported by the client is dynamically loaded to perform handshake to ensure the successful handshake of the SSL/TLS.
参照图1,示出了本申请的一种在SSL/TLS通信中加载数字证书的方法实施例的步骤流程图,具体可以包括如下步骤:1 is a flow chart showing the steps of an embodiment of a method for loading a digital certificate in an SSL/TLS communication, which may include the following steps:
步骤101,接收客户端基于安全套接层协议SSL或传输层安全协议TLS发送的握手请求消息;Step 101: Receive a handshake request message sent by the client according to a Secure Sockets Layer protocol SSL or a transport layer security protocol TLS.
如图2所示,SSL/TLS在应用层与TCP(Transmission Control Protocol传输控制协议)、IP(Internet Protocol,网络之间互连的协议)层之间。As shown in FIG. 2, the SSL/TLS is between the application layer and the TCP (Transmission Control Protocol) and IP (Internet Protocol) protocols.
应用层的数据不再直接传递给传输层,而是传递给SSL/TLS层,SSL/TLS层对从应用层收到的数据进行加密。The application layer data is no longer passed directly to the transport layer, but to the SSL/TLS layer, which encrypts the data received from the application layer.
SSL协议本身分为两层:The SSL protocol itself is divided into two layers:
上层为SSL握手协议(SSL handshake protocol)、SSL密码变化协议(SSL change cipher spec protocol)和SSL警告协议(SSL alert protocol);The upper layer is an SSL handshake protocol, an SSL change cipher spec protocol, and an SSL alert protocol.
底层为SSL记录协议(SSL record protocol)。The underlying layer is the SSL record protocol.
SSL握手协议:用来协商通信过程中使用的密码套件(加密算法、密钥交换算法和MAC算法等)、在服务器和客户端之间安全地交换密钥、实现服务器和客户端的身份验证。SSL handshake protocol: used to negotiate the cipher suite (encryption algorithm, key exchange algorithm, MAC algorithm, etc.) used in the communication process, securely exchange keys between the server and the client, and implement authentication of the server and the client.
SSL密码变化协议:客户端和服务器端通过密码变化协议通知对端,随后的报文都将使用新协商的密码套件和密钥进行保护和传输。SSL password change protocol: The client and server notify the peer through the password change protocol, and subsequent packets will be protected and transmitted using the newly negotiated cipher suite and key.
SSL警告协议:用来向通信对端报告告警信息,消息中包含告警的严重级别和描述。SSL warning protocol: used to report alarm information to the communication peer. The message contains the severity and description of the alarm.
SSL记录协议:主要负责对上层的数据(SSL握手协议、SSL密码变化协议、SSL警告协议和应用层协议报文)进行分块、计算并添加MAC值、加密,并把处理后的记录块传输给对端。SSL record protocol: It is mainly responsible for blocking, calculating, adding MAC value, encrypting, and transmitting the processed record block to the upper layer data (SSL handshake protocol, SSL password change protocol, SSL warning protocol, and application layer protocol message). Give the opposite end.
TLS协议包括两个协议组:TLS记录协议和TLS握手协议。The TLS protocol includes two protocol groups: the TLS Record Protocol and the TLS Handshake Protocol.
TLS记录协议是一种分层协议。每一层中的信息可能包含长度、描述和内容等字段。记录协议支持信息传输、将数据分段到可处理块、压缩数据、应用MAC、加密以及传输结果等。对接收到的数据进行解密、校验、解压缩、重组等,然后将它们传送到高层客户机。The TLS Recording Protocol is a layered protocol. The information in each layer may contain fields such as length, description, and content. The recording protocol supports information transfer, segmentation of data into processable blocks, compression of data, application of MAC, encryption, and transmission of results. The received data is decrypted, verified, decompressed, reorganized, etc., and then transmitted to the upper client.
TLS握手协议由三个子协议组构成,允许对等双方在记录层的安全参数上达成一致、自我认证、例示协商安全参数、互相报告出错条件。The TLS handshake protocol consists of three sub-protocol groups, allowing peers to agree on the security parameters of the record layer, self-certify, instantiate security parameters, and report error conditions to each other.
由于TLS是建立在SSL的基础上的,是SSL的后续版本,两者之间存在着差别,主要是它们所支持的加密算法不同,而整体的流程是基本相同的,因此,在本申请实施 例中,主要以SSL进行说明。Since TLS is based on SSL and is a subsequent version of SSL, there is a difference between the two, mainly because the encryption algorithms they support are different, and the overall process is basically the same. Therefore, in the implementation of this application In the example, it is mainly explained by SSL.
SSL握手的第一阶段启动逻辑连接,建立这个连接的安全能力。The first phase of the SSL handshake initiates a logical connection and establishes the security capabilities of the connection.
如图3所示,客户端(client)向服务器(server)发出Client hello消息(即握手请求消息)并等待服务器(server)的响应。As shown in FIG. 3, the client sends a Client hello message (ie, a handshake request message) to the server and waits for a response from the server.
步骤102,根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式;Step 102: Verify, according to the handshake request message, a key exchange mode and a first signature mode supported by the client.
Client hello消息通常包括Version(版本),Random(客户端随机数),Session id(会话ID),Cipher suite(客户端支持的密码套件),Compression method(客户端支持的压缩方法)等信息。Client hello messages usually include Version (version), Random (client random number), Session id (session ID), Cipher suite (client-supported cipher suite), Compression method (client-supported compression method) and other information.
具体而言,由于不同版本的客户端(如浏览器)对一些加解密算法的支持程度不一样,但是在SSL通信过程中使用同一套加解密算法才能保证数据能够正常的加解密。Specifically, since different versions of clients (such as browsers) support different encryption and decryption algorithms, the same set of encryption and decryption algorithms can be used to ensure data encryption and decryption in the SSL communication process.
因此,在SSL握手阶段,客户端告知服务端其所支持的签名方式,即客户端将本地支持的密码套件(Cipher Suite)的列表传送给服务器。Therefore, during the SSL handshake phase, the client informs the server of the signature mode it supports, that is, the client transmits a list of locally supported cipher suites (Cipher Suite) to the server.
则服务器可以从握手请求消息中查找密码套件,从密码套件中识别客户端支持的密钥交换方式和第一签名方式。The server can then look up the cipher suite from the handshake request message, and identify the key exchange mode and the first signature mode supported by the client from the cipher suite.
基于SSL的密码套件通常以“SSL”开头,基于TLS的密码套件通常以或“TLS”开头,紧跟着的是密钥交换阶段所使用密钥交换方式、传输数据所使用的对称加密方式、数据完整性验证所使用的MAC里所采用的签名方式(如哈希算法),用“With”这个词把密钥交换方式、对称加密方式、签名方式分开。SSL-based cipher suites usually start with "SSL". TLS-based cipher suites usually start with "TLS", followed by the key exchange method used in the key exchange phase, the symmetric encryption used to transfer data, The signature method used in the MAC used for data integrity verification (such as the hash algorithm) uses the word "With" to separate the key exchange method, the symmetric encryption method, and the signature method.
密码套件的示例下:Below the example of the cipher suite:
SSL_DHE_RSA_WITH_DES_CBC_SHASSL_DHE_RSA_WITH_DES_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
其中,DHE_RSA、ECDHE_ECDSA为密钥交换方式,DES_CBC、AES_128_GCM为对称加密方式,SHA、SHA256为签名方式(即不同版本的哈希算法)。Among them, DHE_RSA and ECDHE_ECDSA are key exchange modes, DES_CBC and AES_128_GCM are symmetric encryption modes, and SHA and SHA256 are signature modes (that is, different versions of hash algorithms).
为了进一步保证通信的安全性,所验证的第一签名方式可以为客户端的加密强度最高的第一签名方式。In order to further ensure the security of the communication, the first signature method verified may be the first signature mode with the highest encryption strength of the client.
因此,服务器在解析Client hello的时候,可以遍历密码套件的列表,从而记录加密强度最高的第一签名方式。Therefore, when the server parses the Client hello, it can traverse the list of cipher suites to record the first signature method with the highest encryption strength.
此外,如果是基于TLS进行通信并且含有TLS签名方式的扩展头,则可以从握手请求中查找传输层安全协议TLS的扩展头,这个扩展头里指明了客户端所能支持的签名方式的列表,从扩展头中可以读取客户端支持的签名方式,更新客户端支持的第一签名方 式。In addition, if it is an extension header based on TLS and containing a TLS signature, the extension header of the transport layer security protocol TLS can be looked up from the handshake request, and the extension header indicates a list of signature methods that the client can support. The signature mode supported by the client can be read from the extension header, and the first signature party supported by the client is updated. formula.
需要说明的是,某些使用了TLS的客户端,如IE浏览器,也可能没有按照TLS的规范增加扩展头,此种情况下,仍可以遍历密码套件列表来获取客户端所能支持的第一签名方式。It should be noted that some clients that use TLS, such as Internet Explorer, may not add extension headers according to the TLS specification. In this case, you can still traverse the cipher suite list to obtain the number supported by the client. A signature method.
步骤103,判断所述密钥交换方式和所述第一签名方式、是否与当前加载的数字证书匹配;若否,则执行步骤104; Step 103, determining the key exchange mode and the first signature mode, whether it matches the currently loaded digital certificate; if not, executing step 104;
数字证书的格式普遍采用的是X.509V3国际标准,一个标准的X.509数字证书包含以下一些内容:The format of digital certificates is generally based on the X.509V3 international standard. A standard X.509 digital certificate contains the following contents:
版本信息,序列号,所使用的签名方式,发行机构名,有效期,所有人名称,协商使用的公开秘钥,数字签名。Version information, serial number, signature method used, issuer name, expiration date, owner name, public key used for negotiation, digital signature.
通常情况下,数字证书是需要申请,并由专门的数字证书认证机构(CA)通过审核之后颁发的电子证书。Usually, a digital certificate is an electronic certificate that needs to be applied and issued by a specialized digital certificate authority (CA).
颁发数字证书的同时,会产生一个私钥和公钥。私钥由服务器保存,不可泄漏。公钥则是附带在数字证书的信息中,可以公开的。When a digital certificate is issued, a private key and a public key are generated. The private key is kept by the server and cannot be leaked. The public key is attached to the digital certificate and can be made public.
数字证书本身也附带一个证书电子签名,这个签名用来验证证书的完整性和真实性,可以防止证书被串改。The digital certificate itself is also accompanied by a certificate electronic signature, which is used to verify the integrity and authenticity of the certificate and to prevent the certificate from being serially altered.
在本申请实施例中,数字证书可以按照公钥的类型划分分组,目前OpenSSL(Open Secure Sockets Layer,开放式安全套接层协议)可以支持同时加载三种类型的数字证书,以便在协商的时候可以更好地支持不同类型的客户端,减少数字证书匹配的时间。In the embodiment of the present application, the digital certificate may be grouped according to the type of the public key. Currently OpenSSL (Open Secure Sockets Layer) can support three types of digital certificates at the same time, so that Better support for different types of clients and reduce the time to match digital certificates.
例如,服务器配置了如下数字证书:For example, the server is configured with the following digital certificates:
sha256WithRSAEncryption(公钥使用RSA)sha256WithRSAEncryption (public key using RSA)
sha1WithRSAEncryption(公钥使用RSA)sha1WithRSAEncryption (public key using RSA)
ecdsa-with-SHA256(公钥使用ECC)ecdsa-with-SHA256 (public key using ECC)
ecdsa-with-SHA1(公钥使用ECC)ecdsa-with-SHA1 (public key using ECC)
则可以将sha256WithRSAEncryption,sha1WithRSAEncryption划分为一个分组,即此组中所有数字证书的公钥使用RSA,将ecdsa-with-SHA256,ecdsa-with-SHA1划分为另一个分组,即此组中所有数字证书的公钥使用ECC。You can divide sha256WithRSAEncryption, sha1WithRSAEncryption into a group, that is, the public key of all digital certificates in this group uses RSA, and divides ecdsa-with-SHA256, ecdsa-with-SHA1 into another group, that is, all digital certificates in this group. The public key uses ECC.
在每个分组中可以加载其中一个数字证书。One of the digital certificates can be loaded in each group.
在一种情况中,服务器在启动的时候,可以将配置好的数字证书读入内存,并将指定的数字证书加载到SSL或TLS的上下文。 In one case, the server can read the configured digital certificate into memory and load the specified digital certificate into the context of SSL or TLS at startup.
在另一种情况中,若在SSL或TLS的通信时加载了其他数字证书,在结束该SSL或TLS的通信时,可以重新将指定的数字证书加载到SSL或TLS的上下文。In another case, if another digital certificate is loaded during communication of SSL or TLS, the specified digital certificate can be reloaded into the context of SSL or TLS when the communication of the SSL or TLS is ended.
由于数字证书加载操作较为简单,属于轻加载,即使频繁替换数字证书也不会对SSL或TLS的握手协商产生影响。Since the digital certificate loading operation is relatively simple and is lightly loaded, even if the digital certificate is frequently replaced, the handshake negotiation of SSL or TLS is not affected.
在实际应用中,可以对服务器(如Tengine)修改配置文件,可以允许配置多个数字证书,以及修改相应的存储结构。In practice, you can modify the configuration file for a server (such as Tengine), allow multiple digital certificates to be configured, and modify the corresponding storage structure.
本申请实施例针对同一域名可以配置多种不同类型的数字证书,提高了数字证书的动态加载效率。The embodiment of the present application can configure multiple different types of digital certificates for the same domain name, which improves the dynamic loading efficiency of the digital certificate.
为了进一步保证通信的安全性,当前加载的数字证书可以为所属分组中加密强度最高的数字证书。In order to further ensure the security of the communication, the currently loaded digital certificate may be the highest-encrypted digital certificate in the group to which it belongs.
例如,SHA256的加密强度比SHA1高,则对于上述示例的分组,在可以加载sha256WithRSAEncryption、ecdsa-with-SHA256。For example, SHA256 has a higher encryption strength than SHA1, so for the above example grouping, you can load sha256WithRSAEncryption, ecdsa-with-SHA256.
在本申请实施例中,服务器(如Tengine)在初始化SSL/TLS的时候,可以向SSL/TLS服务程序注册一个回调函数,用于在后续握手阶段根据签名方式动态选择数字证书。In the embodiment of the present application, when the server (such as Tengine) initializes SSL/TLS, a callback function may be registered with the SSL/TLS service program for dynamically selecting the digital certificate according to the signature mode in the subsequent handshake phase.
在握手阶段(即接收到Client hello消息进行解析的时候),调用这个回调函数,向回调函数传递的一个参数,即客户端所能支持的签名方式,如加密强度最高的哈希算法。During the handshake phase (that is, when the Client hello message is received for parsing), the callback function is called to pass a parameter to the callback function, that is, the signature mode supported by the client, such as the hash algorithm with the highest encryption strength.
回调函数执行对此哈希算法和当前同类型分组的的证书所使用的签名算法进行匹配,找到算法强度最高并且匹配客户端哈希算法强度的证书重新加载。The callback function performs a matching of the signature algorithm used by the hash algorithm with the certificate of the current same type of packet, and finds the certificate reload with the highest algorithm strength and matching the strength of the client hash algorithm.
具体而言,在匹配当前的数字证书时,可以查找与密钥交换方式匹配的公钥,识别在该公钥所属的分组中当前加载的数字证书的第二签名方式;Specifically, when matching the current digital certificate, the public key matching the key exchange manner may be searched for, and the second signature manner of the digital certificate currently loaded in the packet to which the public key belongs is identified;
从而,判断第一签名方式是否与第二签名方式匹配,所谓匹配,则第二签名方式的加密强度等于或低于第一签名方式的加密强度。Therefore, it is determined whether the first signature mode matches the second signature mode, and the so-called matching, the encryption strength of the second signature mode is equal to or lower than the encryption strength of the first signature mode.
例如,假设第一签名方式为SHA256,若第二签名方式为SHA224,则两者匹配,若第二签名方式为SHA512,则两者不匹配。For example, if the first signature mode is SHA256, if the second signature mode is SHA224, the two match. If the second signature mode is SHA512, the two do not match.
当第一签名方式与第二签名方式匹配时,则可以判定密钥交换方式和签名方式、是与当前加载的数字证书匹配;When the first signature mode matches the second signature mode, the key exchange mode and the signature mode may be determined to be matched with the currently loaded digital certificate;
当第一签名方式与第二签名方式不匹配时,则可以判定密钥交换方式和签名方式、与当前加载的数字证书不匹配。When the first signature mode does not match the second signature mode, the key exchange mode and the signature mode may be determined to not match the currently loaded digital certificate.
例如,若客户端的密码套件为SSL_DHE_RSA_WITH_DES_CBC_SHA,则其第一签名方式为SHA,若在RSA所属的分组中,当前加载的数字证书为 sha256WithRSAEncryption,则其第二签名方式为sha256,与SHA不匹配,需要重新加载其他匹配的数字证书。For example, if the cipher suite of the client is SSL_DHE_RSA_WITH_DES_CBC_SHA, the first signature mode is SHA. If the RSA belongs to the group, the currently loaded digital certificate is sha256WithRSAEncryption, its second signature is sha256, does not match SHA, and needs to reload other matching digital certificates.
步骤104,加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书;Step 104: Load other digital certificates that match the key exchange mode and the first signature mode.
在具体实现中,可以识别在公钥所属的分组中其他数字证书的第三签名方式,判断第三签名方式是否与第一签名方式匹配,若是,则加载第三签名方式所属的数字证书至SSL或TLS的上下文,以替换在在公钥所属的分组中当前加载的数字证书,后续的SSL或TLS的握手操作,将使用此新的数字证书发送给客户端以保证握手操作的正常进行。In a specific implementation, the third signature mode of the other digital certificate in the group to which the public key belongs may be identified, and whether the third signature mode matches the first signature mode is determined, and if yes, the digital certificate to which the third signature mode belongs is loaded to the SSL. Or the TLS context to replace the digital certificate currently loaded in the packet to which the public key belongs. The subsequent SSL or TLS handshake operation will be sent to the client using this new digital certificate to ensure the normal operation of the handshake operation.
为了进一步保证通信的安全性,若识别到多个匹配的数字证书,则可以加载其中签名方式的加密强度最高的数字证书。In order to further ensure the security of the communication, if multiple matching digital certificates are identified, the digital certificate with the highest encryption strength in the signature mode can be loaded.
步骤105,根据匹配数字证书成功的所述密钥交换方式和所述第一签名方式,向客户端返回握手响应消息。Step 105: Return a handshake response message to the client according to the key exchange mode that matches the success of the digital certificate and the first signature mode.
需要说明的是,在步骤103中,若判断所述密钥交换方式和所述第一签名方式、与当前加载的数字证书匹配,则可以直接执行步骤105,返回握手响应消息。It should be noted that, in step 103, if it is determined that the key exchange mode and the first signature mode match the currently loaded digital certificate, step 105 may be directly performed to return a handshake response message.
在步骤103中,若判断所述密钥交换方式和所述第一签名方式、与当前加载的数字证书不匹配,则执行步骤104,加载匹配的数字证书,再执行执行步骤105,返回握手响应消息。In step 103, if it is determined that the key exchange mode and the first signature mode do not match the currently loaded digital certificate, step 104 is executed, the matching digital certificate is loaded, and then step 105 is performed to return a handshake response. Message.
如图3所示,服务器(server)向客户端(client)返回Server hello消息(即握手响应消消息),对Client hello消息中的信息进行确认。As shown in FIG. 3, the server returns a Server hello message (ie, a handshake response message) to the client, and confirms the information in the Client hello message.
Server hello通常消息包括Version(版本,取客户端支持的最高版本号和服务端支持的最高版本号中的较低者),Random(服务器随机数),Session id(会话ID),Cipher suite(服务器选择的密码套件),Compression method(服务器选择的压缩方法)等信息。Server hello usually includes Version (version, the highest version number supported by the client and the lower version number supported by the server), Random (server random number), Session id (session ID), Cipher suite (server) Information such as the selected cipher suite), Compression method (server-selected compression method).
本申请实施例数字证书与客户端支持的密钥交换方式和第一签名方式的匹配,实现了在握手协商过程中动态加载合适的数字证书,以保证成功完成SSL/TLS的握手协商,提高了网站的兼容性差,保证了客户端通过HTTPS等安全协议访问网站,提高了通信的安全性。In the embodiment of the present application, the digital certificate is matched with the key exchange mode supported by the client and the first signature mode, so that the appropriate digital certificate is dynamically loaded during the handshake negotiation process to ensure successful completion of the SSL/TLS handshake negotiation. The poor compatibility of the website ensures that the client accesses the website through a secure protocol such as HTTPS, which improves the security of the communication.
这个阶段之后,客户端、服务器可以知道下列内容:After this phase, the client and server can know the following:
(1)SSL版本;(1) SSL version;
(2)密钥交换方式、签名方式和对称加密方式;(2) Key exchange mode, signature mode and symmetric encryption mode;
(3)压缩方法;(3) compression method;
(4)有关密钥生成的两个随机数。 (4) Two random numbers related to key generation.
步骤这个阶段之后,服务器和客户端可以按照SSL或TLS的规范进行握手操作和加解密的操作。After this phase of the step, the server and client can perform handshake operations and encryption and decryption operations according to the SSL or TLS specifications.
以下以SSL的规范进行讲解:The following is explained in the SSL specification:
服务器将携带自己公钥的数字证书通过Certificate消息发送给SSL客户端。The server sends the digital certificate carrying its own public key to the SSL client through a Certificate message.
服务器发送Server Hello Done消息,通知客户端版本和密码套件协商结束,开始进行密钥交换。The server sends a Server Hello Done message to notify the client that the version and cipher suite negotiation has ended and the key exchange begins.
客户端验证服务器的数字证书合法后,利用数字证书中的公钥加密客户端随机生成的premaster secret(预备主密钥),并通过Client Key Exchange消息发送给服务器。After the client verifies that the server's digital certificate is valid, the public key in the digital certificate is used to encrypt the premaster secret generated by the client, and is sent to the server through the Client Key Exchange message.
客户端发送Change Cipher Spec消息,通知服务器后续报文将采用协商好的密钥和密码套件进行加密和MAC计算。The client sends a Change Cipher Spec message to inform the server that subsequent packets will be encrypted and MAC calculated using the negotiated key and cipher suite.
客户端计算已交互的握手消息(除Change Cipher Spec消息外所有已交互的消息)的Hash值,利用协商好的密钥和密码套件处理Hash值(计算并添加MAC值、加密等),并通过Finished消息发送给SSL服务器。The client calculates the hash value of the interactive handshake message (all the interactive messages except the Change Cipher Spec message), processes the hash value (calculates and adds the MAC value, encryption, etc.) using the negotiated key and cipher suite, and passes The Finished message is sent to the SSL server.
服务器利用同样的方法计算已交互的握手消息的Hash值,并与Finished消息的解密结果比较,如果二者相同,且MAC值验证成功,则证明密钥和密码套件协商成功。The server uses the same method to calculate the hash value of the exchanged handshake message and compares it with the decrypted result of the Finished message. If the two are the same and the MAC value is successfully verified, the key and cipher suite negotiation is successful.
服务器发送Change Cipher Spec消息,通知SSL客户端后续报文将采用协商好的密钥和密码套件进行加密和MAC计算。The server sends a Change Cipher Spec message to inform the SSL client that the subsequent message will be encrypted and MAC calculated using the negotiated key and cipher suite.
服务器计算已交互的握手消息的Hash值,利用协商好的密钥和密码套件处理Hash值(计算并添加MAC值、加密等),并通过Finished消息发送给客户端。The server calculates the hash value of the handshake message that has been exchanged, processes the hash value (calculates and adds the MAC value, encryption, etc.) using the negotiated key and cipher suite, and sends the message to the client through the Finished message.
客户端利用同样的方法计算已交互的握手消息的Hash值,并与Finished消息的解密结果比较,如果二者相同,且MAC值验证成功,则证明密钥和密码套件协商成功。The client uses the same method to calculate the hash value of the exchanged handshake message and compares it with the decrypted result of the Finished message. If the two are the same and the MAC value is successfully verified, the key and cipher suite negotiation is successful.
客户端接收到服务器发送的Finished消息后,如果解密成功,则可以判断服务器是数字证书的拥有者,即服务器身份验证成功,因为只有拥有私钥的服务器才能从Client Key Exchange消息中解密得到premaster secret,从而间接地实现了客户端对服务器的身份验证。After receiving the Finished message sent by the server, if the decryption succeeds, the client can determine that the server is the owner of the digital certificate, that is, the server authentication succeeds, because only the server with the private key can decrypt the premaster secret from the Client Key Exchange message. Indirectly, the client-to-server authentication is implemented.
握手完成后,服务器和客户端分别用预备主密钥各自生成了加密所需要的对称主密钥,完整性验证所用的认证秘钥和初始化向量。After the handshake is completed, the server and the client respectively generate the symmetric master key required for encryption, the authentication key and the initialization vector used for integrity verification, respectively, using the preliminary master key.
在数据传输阶段,对于每一个数据分组,发送端(服务器或客户端)都会先用对称秘钥进行加密,用认证秘钥对数据分组按照握手时协商的签名方式(如基于MD5或SHA的MAC算法)进行签名,产生摘要。 In the data transmission phase, for each data packet, the sender (server or client) will first encrypt with the symmetric key, and use the authentication key to group the data according to the signature negotiated during the handshake (such as MD5 or SHA based MAC). Algorithm) to sign and generate a summary.
接收端(客户端或服务器)用对称秘钥进行解密,并且对解密数据用认证密钥按照握手时协商的签名方式(如基于MD5或SHA的MAC算法)进行签名,产生摘要并与接收得到的摘要作对比,校验数据的完整性。The receiving end (client or server) decrypts with a symmetric key, and uses the authentication key to sign the decrypted data according to the signature method negotiated during handshake (such as MD5 or SHA based MAC algorithm), generating a digest and receiving it. The summary is compared to verify the integrity of the data.
如果二者相同,则报文没有改变;否则,报文在传输过程中被修改,,接收端(客户端或服务器)将丢弃该报文。If the two are the same, the packet is not changed; otherwise, the packet is modified during transmission, and the receiver (client or server) will discard the packet.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the embodiments of the present application are not limited by the described action sequence, because In accordance with embodiments of the present application, certain steps may be performed in other sequences or concurrently. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required in the embodiments of the present application.
参照图4,示出了本申请的一种在SSL/TLS通信中加载数字证书的装置实施例的结构框图,具体可以包括如下模块:Referring to FIG. 4, a structural block diagram of an apparatus for loading a digital certificate in an SSL/TLS communication according to the present application is shown. Specifically, the following modules may be included:
握手请求消息接收模块401,用于接收客户端基于安全套接层协议SSL或传输层安全协议TLS发送的握手请求消息;The handshake request message receiving module 401 is configured to receive a handshake request message sent by the client according to the Secure Sockets Layer protocol SSL or the transport layer security protocol TLS;
客户端信息验证模块402,用于根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式;The client information verification module 402 is configured to verify, according to the handshake request message, a key exchange manner supported by the client and a first signature manner;
数字证书匹配模块403,用于判断所述密钥交换方式和所述第一签名方式、是否与当前加载的数字证书匹配;若否,则调用数字证书加载模块404;The digital certificate matching module 403 is configured to determine whether the key exchange mode and the first signature mode are matched with the currently loaded digital certificate; if not, the digital certificate loading module 404 is invoked;
数字证书加载模块404,加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书;The digital certificate loading module 404 loads other digital certificates that match the key exchange manner and the first signature manner;
握手响应消息返回模块405,用于根据匹配数字证书成功的所述密钥交换方式和所述第一签名方式,向客户端返回握手响应消息。The handshake response message returning module 405 is configured to return a handshake response message to the client according to the key exchange mode that matches the success of the digital certificate and the first signature mode.
在本申请的一个实施例中,所述客户端信息验证模块402可以包括如下子模块:In an embodiment of the present application, the client information verification module 402 may include the following sub-modules:
密码套件查找子模块,用于从所述握手请求消息中查找密码套件;a cipher suite lookup submodule for finding a cipher suite from the handshake request message;
密码套件识别子模块,用于从所述密码套件中识别客户端支持的密钥交换方式和第一签名方式;a cipher suite identification submodule, configured to identify a key exchange mode and a first signature mode supported by the client from the cipher suite;
在本申请的一个实施例中,所述客户端信息验证模块402还可以包括如下子模块:In an embodiment of the present application, the client information verification module 402 may further include the following sub-modules:
扩展头查找子模块,用于从所述握手请求中查找传输层安全协议TLS的扩展头; An extension header search submodule, configured to search for an extension header of a transport layer security protocol TLS from the handshake request;
扩展头识别子模块,用于从所述扩展头中识别客户端支持的第一签名方式。The extended header identification submodule is configured to identify, from the extended header, a first signature manner supported by the client.
在具体实现中,所验证的第一签名方式可以为客户端的加密强度最高的第一签名方式。In a specific implementation, the first signature mode that is verified may be the first signature mode with the highest encryption strength of the client.
在实际应用中,所述数字证书可以按照公钥的类型划分分组,在每个分组中加载其中一个数字证书,当前加载的数字证书可以为所属分组中加密强度最高的数字证书。In an actual application, the digital certificate may be grouped according to the type of the public key, and one of the digital certificates is loaded in each group, and the currently loaded digital certificate may be the digital certificate with the highest encryption strength in the group.
在本申请的一个实施例中,所述数字证书匹配模块404可以包括如下子模块:In an embodiment of the present application, the digital certificate matching module 404 may include the following sub-modules:
公钥查找子模块,用于查找与所述密钥交换方式匹配的公钥;a public key lookup submodule, configured to find a public key that matches the key exchange manner;
当前签名方式识别子模块,用于识别在所述公钥所属的分组中当前加载的数字证书的第二签名方式;a current signature mode identification submodule, configured to identify a second signature mode of the digital certificate currently loaded in the packet to which the public key belongs;
第一签名方式匹配子模块,用于判断所述第一签名方式是否与所述第二签名方式匹配;若是,则调用第一判定子模块,若否,则调用第二判定子模块;a first signature matching submodule, configured to determine whether the first signature mode matches the second signature mode; if yes, the first determining submodule is invoked, and if not, the second determining submodule is invoked;
第一判定子模块,用于判定所述密钥交换方式和所述签名方式、与当前加载的数字证书匹配;a first determining submodule, configured to determine the key exchange mode and the signature manner, and match the currently loaded digital certificate;
第二判定子模块,用于判定所述密钥交换方式和所述签名方式、与当前加载的数字证书不匹配。The second determining sub-module is configured to determine that the key exchange mode and the signature mode do not match the currently loaded digital certificate.
在本申请的一个实施例中,所述数字证书加载模块405可以包括如下子模块:In an embodiment of the present application, the digital certificate loading module 405 may include the following sub-modules:
其他签名方式识别子模块,用于识别在所述公钥所属的分组中其他数字证书的第三签名方式;a further signature mode identifying submodule, configured to identify a third signature mode of other digital certificates in the group to which the public key belongs;
第二签名方式匹配子模块,用于判断所述第三签名方式是否与所述第一签名方式匹配;若是,则调用数字证书替换子模块;a second signature matching sub-module, configured to determine whether the third signature mode matches the first signature mode; if yes, calling a digital certificate replacement sub-module;
数字证书替换子模块,用于加载所述第三签名方式所属的数字证书,以替换在所述公钥所属的分组中当前加载的数字证书。And a digital certificate replacement submodule, configured to load the digital certificate to which the third signature mode belongs, to replace the digital certificate currently loaded in the packet to which the public key belongs.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments can be referred to each other.
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软 件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, embodiments of the present application may adopt an entirely hardware embodiment, an entirely software embodiment, or a combination of soft A form of embodiment of hardware and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。In a typical configuration, the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium. Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device such that a series of operational steps are performed on the computer or other programmable terminal device to produce computer-implemented processing, such that the computer or other programmable terminal device The instructions executed above provide steps for implementing the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。While a preferred embodiment of the embodiments of the present application has been described, those skilled in the art can make further changes and modifications to the embodiments once they are aware of the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including all the modifications and the modifications
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. There is any such actual relationship or order between operations. Furthermore, the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, or terminal device that includes a plurality of elements includes not only those elements but also Other elements that are included, or include elements inherent to such a process, method, article, or terminal device. An element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that comprises the element, without further limitation.
以上对本申请所提供的一种在SSL/TLS通信中加载数字证书的方法和一种在SSL/TLS通信中加载数字证书的装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The above provides a method for loading a digital certificate in SSL/TLS communication and a device for loading a digital certificate in SSL/TLS communication provided by the present application, and a specific example is applied to the principle of the present application. The description of the above embodiments is only for helping to understand the method of the present application and its core ideas; at the same time, for those skilled in the art, according to the idea of the present application, in the specific implementation and application scope There are variations, and the contents of this specification should not be construed as limiting the application.

Claims (13)

  1. 一种在SSL或TLS通信中加载数字证书的方法,其特征在于,包括:A method for loading a digital certificate in an SSL or TLS communication, comprising:
    接收客户端基于安全套接层协议SSL或传输层安全协议TLS发送的握手请求消息;Receiving a handshake request message sent by the client based on the Secure Sockets Layer protocol SSL or the Transport Layer Security Protocol TLS;
    根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式;And verifying, according to the handshake request message, a key exchange manner supported by the client and a first signature manner;
    判断所述密钥交换方式和所述第一签名方式是否与当前加载的数字证书匹配;若否,则加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书;Determining whether the key exchange mode and the first signature mode match the currently loaded digital certificate; if not, loading other digital certificates that match the key exchange mode and the first signature mode;
    根据匹配数字证书成功的所述密钥交换方式和所述第一签名方式,向客户端返回握手响应消息。And returning a handshake response message to the client according to the key exchange manner that matches the success of the digital certificate and the first signature manner.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式的步骤包括:The method according to claim 1, wherein the step of verifying the key exchange mode and the first signature mode supported by the client according to the handshake request message comprises:
    从所述握手请求消息中查找密码套件;Finding a cipher suite from the handshake request message;
    从所述密码套件中识别客户端支持的密钥交换方式和第一签名方式。The key exchange mode and the first signature mode supported by the client are identified from the cipher suite.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式的步骤还包括:The method according to claim 2, wherein the step of verifying the key exchange mode and the first signature mode supported by the client according to the handshake request message further comprises:
    从所述握手请求中查找传输层安全协议TLS的扩展头;Finding an extension header of the transport layer security protocol TLS from the handshake request;
    从所述扩展头中识别客户端支持的第一签名方式。A first signature mode supported by the client is identified from the extension header.
  4. 根据权利要求1或2或3所述的方法,其特征在于,所验证的第一签名方式为客户端的加密强度最高的第一签名方式。The method according to claim 1 or 2 or 3, wherein the verified first signature mode is a first signature mode with the highest encryption strength of the client.
  5. 根据权利要求1或2或3所述的方法,其特征在于,所述数字证书按照公钥的类型划分分组,在每个分组中加载其中一个数字证书,当前加载的数字证书为所属分组中加密强度最高的数字证书。The method according to claim 1 or 2 or 3, wherein the digital certificate is divided into groups according to the type of the public key, and one of the digital certificates is loaded in each of the packets, and the currently loaded digital certificate is encrypted in the belonging group. The highest strength digital certificate.
  6. 根据权利要求5所述的方法,其特征在于,所述判断所述密钥交换方式和所述签名方式是否与当前加载的数字证书匹配的步骤包括:The method according to claim 5, wherein the step of determining whether the key exchange mode and the signature mode match the currently loaded digital certificate comprises:
    查找与所述密钥交换方式匹配的公钥;Finding a public key that matches the key exchange method;
    识别在所述公钥所属的分组中当前加载的数字证书的第二签名方式;Identifying a second signature manner of the digital certificate currently loaded in the packet to which the public key belongs;
    判断所述第一签名方式是否与所述第二签名方式匹配;Determining whether the first signature mode matches the second signature mode;
    若是,则判定所述密钥交换方式和所述签名方式与当前加载的数字证书匹配;If yes, determining that the key exchange mode and the signature manner match the currently loaded digital certificate;
    若否,则判定所述密钥交换方式和所述签名方式与当前加载的数字证书不匹配。If not, it is determined that the key exchange mode and the signature mode do not match the currently loaded digital certificate.
  7. 根据权利要求6所述的方法,其特征在于,所述加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书的步骤包括: The method according to claim 6, wherein the step of loading other digital certificates matching the key exchange mode and the first signature mode comprises:
    识别在所述公钥所属的分组中其他数字证书的第三签名方式;Identifying a third signature manner of other digital certificates in the group to which the public key belongs;
    判断所述第三签名方式是否与所述第一签名方式匹配;Determining whether the third signature mode matches the first signature mode;
    若是,则加载所述第三签名方式所属的数字证书,以替换在所述公钥所属的分组中当前加载的数字证书。If yes, the digital certificate to which the third signature mode belongs is loaded to replace the digital certificate currently loaded in the packet to which the public key belongs.
  8. 一种在SSL或TLS通信中加载数字证书的装置,其特征在于,包括:An apparatus for loading a digital certificate in an SSL or TLS communication, comprising:
    握手请求消息接收模块,用于接收客户端基于安全套接层协议SSL或传输层安全协议TLS发送的握手请求消息;a handshake request message receiving module, configured to receive a handshake request message sent by the client based on a Secure Sockets Layer protocol SSL or a Transport Layer Security Protocol TLS;
    客户端信息验证模块,用于根据所述握手请求消息验证客户端支持的密钥交换方式和第一签名方式;a client information verification module, configured to verify, according to the handshake request message, a key exchange manner supported by the client and a first signature manner;
    数字证书匹配模块,用于判断所述密钥交换方式和所述第一签名方式是否与当前加载的数字证书匹配;若否,则调用数字证书加载模块;a digital certificate matching module, configured to determine whether the key exchange mode and the first signature mode match the currently loaded digital certificate; if not, the digital certificate loading module is invoked;
    数字证书加载模块,加载其他与所述密钥交换方式和所述第一签名方式匹配的数字证书;a digital certificate loading module, loading other digital certificates matching the key exchange manner and the first signature manner;
    握手响应消息返回模块,用于根据匹配数字证书成功的所述密钥交换方式和所述第一签名方式,向客户端返回握手响应消息。The handshake response message returning module is configured to return a handshake response message to the client according to the key exchange manner that matches the success of the digital certificate and the first signature manner.
  9. 根据权利要求8所述的装置,其特征在于,所述客户端信息验证模块包括:The device according to claim 8, wherein the client information verification module comprises:
    密码套件查找子模块,用于从所述握手请求消息中查找密码套件;a cipher suite lookup submodule for finding a cipher suite from the handshake request message;
    密码套件识别子模块,用于从所述密码套件中识别客户端支持的密钥交换方式和第一签名方式。The cipher suite identification submodule is configured to identify, from the cipher suite, a key exchange mode and a first signature mode supported by the client.
  10. 根据权利要求9所述的装置,其特征在于,所述客户端信息验证模块还包括:The device according to claim 9, wherein the client information verification module further comprises:
    扩展头查找子模块,用于从所述握手请求中查找传输层安全协议TLS的扩展头;An extension header search submodule, configured to search for an extension header of a transport layer security protocol TLS from the handshake request;
    扩展头识别子模块,用于从所述扩展头中识别客户端支持的第一签名方式。The extended header identification submodule is configured to identify, from the extended header, a first signature manner supported by the client.
  11. 根据权利要求8或9或10所述的装置,其特征在于,所述数字证书按照公钥的类型划分分组,在每个分组中加载其中一个数字证书,当前加载的数字证书为所属分组中加密强度最高的数字证书。The apparatus according to claim 8 or 9 or 10, wherein the digital certificate is divided into groups according to the type of the public key, and one of the digital certificates is loaded in each of the packets, and the currently loaded digital certificate is encrypted in the belonging group. The highest strength digital certificate.
  12. 根据权利要求11所述的装置,其特征在于,所述数字证书匹配模块包括:The device according to claim 11, wherein the digital certificate matching module comprises:
    公钥查找子模块,用于查找与所述密钥交换方式匹配的公钥;a public key lookup submodule, configured to find a public key that matches the key exchange manner;
    当前签名方式识别子模块,用于识别在所述公钥所属的分组中当前加载的数字证书的第二签名方式; a current signature mode identification submodule, configured to identify a second signature mode of the digital certificate currently loaded in the packet to which the public key belongs;
    第一签名方式匹配子模块,用于判断所述第一签名方式是否与所述第二签名方式匹配;若是,则调用第一判定子模块,若否,则调用第二判定子模块;a first signature matching submodule, configured to determine whether the first signature mode matches the second signature mode; if yes, the first determining submodule is invoked, and if not, the second determining submodule is invoked;
    第一判定子模块,用于判定所述密钥交换方式和所述签名方式与当前加载的数字证书匹配;a first determining submodule, configured to determine that the key exchange mode and the signature manner match the currently loaded digital certificate;
    第二判定子模块,用于判定所述密钥交换方式和所述签名方式与当前加载的数字证书不匹配。The second determining submodule is configured to determine that the key exchange mode and the signature manner do not match the currently loaded digital certificate.
  13. 根据权利要求12所述的装置,其特征在于,所述数字证书加载模块包括:The device according to claim 12, wherein the digital certificate loading module comprises:
    其他签名方式识别子模块,用于识别在所述公钥所属的分组中其他数字证书的第三签名方式;a further signature mode identifying submodule, configured to identify a third signature mode of other digital certificates in the group to which the public key belongs;
    第二签名方式匹配子模块,用于判断所述第三签名方式是否与所述第一签名方式匹配;若是,则调用数字证书替换子模块;a second signature matching sub-module, configured to determine whether the third signature mode matches the first signature mode; if yes, calling a digital certificate replacement sub-module;
    数字证书替换子模块,用于加载所述第三签名方式所属的数字证书,以替换在所述公钥所属的分组中当前加载的数字证书。 And a digital certificate replacement submodule, configured to load the digital certificate to which the third signature mode belongs, to replace the digital certificate currently loaded in the packet to which the public key belongs.
PCT/CN2016/098186 2015-09-15 2016-09-06 Method and device for loading digital certificate in ssl or tls communication WO2017045552A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510587689.7A CN106533689B (en) 2015-09-15 2015-09-15 A kind of method and apparatus of the load digital certificates in SSL/TLS communication
CN201510587689.7 2015-09-15

Publications (1)

Publication Number Publication Date
WO2017045552A1 true WO2017045552A1 (en) 2017-03-23

Family

ID=58288106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/098186 WO2017045552A1 (en) 2015-09-15 2016-09-06 Method and device for loading digital certificate in ssl or tls communication

Country Status (2)

Country Link
CN (1) CN106533689B (en)
WO (1) WO2017045552A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040071A (en) * 2017-12-30 2018-05-15 深圳市潮流网络技术有限公司 A kind of VoIP audio-video encryptions key dynamic switching method
CN111771357A (en) * 2019-01-31 2020-10-13 深圳市汇顶科技股份有限公司 TLS certificate authentication method, device, equipment and storage medium
CN112235235A (en) * 2020-08-28 2021-01-15 中国大唐集团科学技术研究院有限公司 SDP authentication protocol implementation method based on state cryptographic algorithm
CN112532390A (en) * 2019-08-30 2021-03-19 华为技术有限公司 Method and device for loading certificate of digital certificate certification authority
CN113364776A (en) * 2021-06-04 2021-09-07 北银金融科技有限责任公司 Method and system for verifying block link point usage cryptographic algorithm communication
CN113746807A (en) * 2021-08-11 2021-12-03 北银金融科技有限责任公司 Block chain node point support cryptographic algorithm communication detection method
CN114448729A (en) * 2022-04-07 2022-05-06 中国信息通信研究院 Identity authentication method and device for client in industrial internet
CN114830602A (en) * 2019-12-17 2022-07-29 微芯片技术股份有限公司 Mutual authentication protocol for systems with low throughput communication links and apparatus for performing the protocol
CN115021932A (en) * 2022-05-30 2022-09-06 支付宝(杭州)信息技术有限公司 Authentication method for handshake process of TLCP protocol
CN117560718A (en) * 2024-01-11 2024-02-13 广东广宇科技发展有限公司 Fire control Internet of things remote monitoring method based on crowd sensing

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2561822B (en) * 2017-04-13 2020-02-19 Arm Ip Ltd Reduced bandwidth handshake communication
CN106936848A (en) * 2017-04-19 2017-07-07 武汉票据交易中心有限公司 A kind of socket encryption communication methods of server
CN109302369B (en) * 2017-07-24 2021-03-16 贵州白山云科技股份有限公司 Data transmission method and device based on key verification
CN108566361B (en) * 2018-01-05 2020-08-21 武汉信安珞珈科技有限公司 Security parameter negotiation method and system based on SSL/TLS protocol
CN108429615A (en) * 2018-01-10 2018-08-21 如般量子科技有限公司 A kind of Stunnel communication means and Stunnel communication systems based on quantum key
CN108833541A (en) * 2018-06-15 2018-11-16 北京奇安信科技有限公司 A kind of method and device of identification terminal information
CN109905239A (en) * 2019-03-07 2019-06-18 亚数信息科技(上海)有限公司 A kind of certificate management method and device
CN111917694B (en) * 2019-05-09 2023-02-28 中兴通讯股份有限公司 TLS encrypted traffic identification method and device
CN110971616B (en) * 2019-12-24 2022-04-01 广州市百果园信息技术有限公司 Connection establishing method based on secure transport layer protocol, client and server
CN111064738B (en) * 2019-12-26 2022-09-30 山东方寸微电子科技有限公司 TLS (transport layer Security) secure communication method and system
EP3866428B1 (en) * 2020-02-13 2021-12-29 Axis AB A method for re-provisioning a digital security certificate and a system and a non-transitory computer program product thereof
CN113328980B (en) * 2020-02-29 2022-05-17 杭州迪普科技股份有限公司 TLS authentication method, device and system, electronic equipment and readable medium
CN112422530B (en) * 2020-11-04 2023-05-30 无锡沐创集成电路设计有限公司 Key security protection method and password device for server in TLS handshake process
CN112637348B (en) * 2020-12-23 2022-05-10 北京金山云网络技术有限公司 Connection establishing method, device and system and electronic equipment
CN112906063A (en) * 2021-02-26 2021-06-04 杭州萤石软件有限公司 Digital abstract algorithm processing equipment method, device, system and equipment
CN113037480A (en) * 2021-03-25 2021-06-25 北京华宇信息技术有限公司 JSSE-based national secret encryption communication method and device and storage medium
CN114006724B (en) * 2021-09-18 2023-08-29 中国互联网络信息中心 Method and system for discovering and authenticating encryption DNS resolver
CN113872990B (en) * 2021-10-19 2023-06-30 南方电网数字电网研究院有限公司 VPN network certificate authentication method and device based on SSL protocol and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127604A (en) * 2007-09-25 2008-02-20 中兴通讯股份有限公司 Information secure transmission method and system
CN101770619A (en) * 2008-12-31 2010-07-07 中国银联股份有限公司 Multiple-factor authentication method for online payment and authentication system
CN103607417A (en) * 2012-12-03 2014-02-26 深圳市证通电子股份有限公司 Network server supporting SSL protocol
US8782774B1 (en) * 2013-03-07 2014-07-15 Cloudflare, Inc. Secure session capability using public-key cryptography without access to the private key
CN104639534A (en) * 2014-12-30 2015-05-20 北京奇虎科技有限公司 Website safety information uploading method and browser device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8793487B2 (en) * 2008-01-18 2014-07-29 Identrust, Inc. Binding a digital certificate to multiple trust domains
CN101325519B (en) * 2008-06-05 2011-02-16 成都市华为赛门铁克科技有限公司 Content auditing method, system based on safety protocol and content auditing equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127604A (en) * 2007-09-25 2008-02-20 中兴通讯股份有限公司 Information secure transmission method and system
CN101770619A (en) * 2008-12-31 2010-07-07 中国银联股份有限公司 Multiple-factor authentication method for online payment and authentication system
CN103607417A (en) * 2012-12-03 2014-02-26 深圳市证通电子股份有限公司 Network server supporting SSL protocol
US8782774B1 (en) * 2013-03-07 2014-07-15 Cloudflare, Inc. Secure session capability using public-key cryptography without access to the private key
CN104639534A (en) * 2014-12-30 2015-05-20 北京奇虎科技有限公司 Website safety information uploading method and browser device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108040071B (en) * 2017-12-30 2023-02-17 深圳市潮流网络技术有限公司 Dynamic switching method for VoIP audio and video encryption key
CN108040071A (en) * 2017-12-30 2018-05-15 深圳市潮流网络技术有限公司 A kind of VoIP audio-video encryptions key dynamic switching method
CN111771357B (en) * 2019-01-31 2022-05-24 深圳市汇顶科技股份有限公司 TLS certificate authentication method, device, equipment and storage medium
CN111771357A (en) * 2019-01-31 2020-10-13 深圳市汇顶科技股份有限公司 TLS certificate authentication method, device, equipment and storage medium
CN112532390A (en) * 2019-08-30 2021-03-19 华为技术有限公司 Method and device for loading certificate of digital certificate certification authority
CN114830602A (en) * 2019-12-17 2022-07-29 微芯片技术股份有限公司 Mutual authentication protocol for systems with low throughput communication links and apparatus for performing the protocol
CN112235235A (en) * 2020-08-28 2021-01-15 中国大唐集团科学技术研究院有限公司 SDP authentication protocol implementation method based on state cryptographic algorithm
CN112235235B (en) * 2020-08-28 2023-09-22 中国大唐集团科学技术研究院有限公司 SDP authentication protocol implementation method based on cryptographic algorithm
CN113364776A (en) * 2021-06-04 2021-09-07 北银金融科技有限责任公司 Method and system for verifying block link point usage cryptographic algorithm communication
CN113746807A (en) * 2021-08-11 2021-12-03 北银金融科技有限责任公司 Block chain node point support cryptographic algorithm communication detection method
CN114448729A (en) * 2022-04-07 2022-05-06 中国信息通信研究院 Identity authentication method and device for client in industrial internet
CN114448729B (en) * 2022-04-07 2022-06-07 中国信息通信研究院 Identity authentication method and device for client in industrial internet
CN115021932A (en) * 2022-05-30 2022-09-06 支付宝(杭州)信息技术有限公司 Authentication method for handshake process of TLCP protocol
CN117560718A (en) * 2024-01-11 2024-02-13 广东广宇科技发展有限公司 Fire control Internet of things remote monitoring method based on crowd sensing
CN117560718B (en) * 2024-01-11 2024-04-09 广东广宇科技发展有限公司 Fire control Internet of things remote monitoring method based on crowd sensing

Also Published As

Publication number Publication date
CN106533689B (en) 2019-07-30
CN106533689A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
WO2017045552A1 (en) Method and device for loading digital certificate in ssl or tls communication
JP7215684B2 (en) Key exchange through a partially trusted third party
KR102392420B1 (en) Program execution and data proof scheme using multi-key pair signatures
CN109347835B (en) Information transmission method, client, server, and computer-readable storage medium
US10826708B2 (en) Authenticating nonces prior to encrypting and decrypting cryptographic keys
EP3391620B1 (en) Systems and methods for secure multi-party communications using a proxy
RU2718689C2 (en) Confidential communication control
WO2016107320A1 (en) Website security information loading method, and browser device
US11533297B2 (en) Secure communication channel with token renewal mechanism
CN114651421B (en) Forward security in transport layer security using temporary keys
US20170346819A1 (en) Mutual authentication with symmetric secrets and signatures
WO2016107318A1 (en) Secure communication system
US11303431B2 (en) Method and system for performing SSL handshake
TW201742399A (en) Safe data transmission method, client end and service end method, device and system capable of safely and efficiently realizing negotiation process of data encryption cipher key
WO2016107322A1 (en) Implementation method for secure browser, and secure browser device
KR20210134655A (en) Security systems and related methods
AU2016287732A1 (en) Mutual authentication of confidential communication
JP2015115893A (en) Communication method, communication program, and relay device
US10963593B1 (en) Secure data storage using multiple factors
EP4022840A1 (en) Decentralized techniques for verification of data in transport layer security and other contexts
US20170317836A1 (en) Service Processing Method and Apparatus
KR102128244B1 (en) Ssl/tls based network security apparatus and method
JP2014147039A (en) Cryptocommunication device, proxy server, cryptocommunication system, cryptocommunication program and proxy server program
WO2019223232A1 (en) Method and device for realizing authentication of transaction information
WO2019223231A1 (en) Method and device for realizing authentication of transaction information

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16845666

Country of ref document: EP

Kind code of ref document: A1