WO2022111102A1 - Method, system and apparatus for establishing secure connection, electronic device, and machine-readable storage medium - Google Patents

Method, system and apparatus for establishing secure connection, electronic device, and machine-readable storage medium Download PDF

Info

Publication number
WO2022111102A1
WO2022111102A1 PCT/CN2021/123636 CN2021123636W WO2022111102A1 WO 2022111102 A1 WO2022111102 A1 WO 2022111102A1 CN 2021123636 W CN2021123636 W CN 2021123636W WO 2022111102 A1 WO2022111102 A1 WO 2022111102A1
Authority
WO
WIPO (PCT)
Prior art keywords
private key
management server
security certificate
client
target website
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2021/123636
Other languages
French (fr)
Chinese (zh)
Inventor
刘华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Publication of WO2022111102A1 publication Critical patent/WO2022111102A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L9/3268Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements using certificate validation, registration, distribution or revocation, e.g. certificate revocation list [CRL]

Definitions

  • the present application relates to the technical field of data security, and in particular, to a method, system, apparatus, electronic device, and machine-readable storage medium for establishing a secure connection.
  • HTTPS Hyper Text Transfer Protocol over SecureSocket Layer
  • PKI Public-Key Infrastructure
  • the origin site uses CDN (Content Delivery Network)
  • CDN Content Delivery Network
  • the HTTPS connection established by the client with the origin site is transferred from the origin site to the CDN node, that is, the CDN node handshakes on behalf of the origin site , therefore, it is necessary to deploy the certificate and private key of the origin site on the CDN node, but due to the large number of CDN nodes, the overall number of servers is huge, and the certificate and private key are stored on the cache server of each CDN node, which is easy to This results in the disclosure of private keys and certificates, which in turn threatens user data security.
  • the purpose of this application is to provide a method, system, apparatus, electronic device and machine-readable storage medium for establishing a secure connection, so as to reduce the risk of leakage of private keys and certificates, thereby ensuring user data security.
  • an embodiment of the present application provides a method for establishing a secure connection, the method includes: if an access request for a target website sent by a client is received, obtaining a security certificate of the target website from a management server; wherein the The security certificate of the target website and the private key corresponding to the security certificate are stored in the management server; the security certificate is sent to the client; when the private key corresponding to the security certificate needs to be used for signing or decryption, a private key use request is sent to the management server to sign or decrypt the private key use request by using the private key corresponding to the security certificate by the management server, and return the processing result; and receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.
  • the access request of the above-mentioned target website carries the domain name of the target website; if the above-mentioned access request for the target website sent by the client is received, the step of obtaining the security certificate of the target website from the management server includes: If an access request for the target website sent by the client is received, extract the domain name of the target website carried in the access request; send the domain name of the target website to the management server; and receive the security certificate of the target website returned by the management server according to the domain name of the target website .
  • the method further includes: receiving an encrypted pre-master key obtained by the client using the security certificate to encrypt the client's pre-master key;
  • sending a private key use request to the management server so that the management server uses the private key corresponding to the security certificate to sign or decrypt the private key use request, including: encrypting The obtained pre-master key is sent to the management server, so that the encrypted pre-master key is decrypted by the management server using the private key corresponding to the security certificate; the above-mentioned processing result returned by the management server is received, and the security is established with the client based on the processing result.
  • the step of connecting includes: receiving the decrypted pre-master key returned by the management server, and establishing a secure connection with the client based on the pre-master key.
  • the above-mentioned private key use request carries specified parameters; the above-mentioned steps of sending the private key use request to the management server to sign or decrypt the private key use request by using the private key corresponding to the security certificate by the management server , including: sending a private key use request carrying the specified parameters to the management server, so that the specified parameters are signed by the management server using the private key corresponding to the security certificate, and the signature information is returned; the above-mentioned processing results returned by the management server are received, based on the processing results
  • the step of establishing a secure connection with the client includes: receiving the signature information returned by the management server, and sending the signature information to the client, so that the client can verify the signature information through the security certificate and obtain specified parameters; and based on the specified parameters Establish a secure connection with the client.
  • the private key use request carries the target parameter contained in the access request; the above-mentioned private key use request is sent to the management server, so that the private key pair corresponding to the security certificate is used by the management server.
  • the step of signing or decrypting the private key use request includes: sending a private key use request to the management server, so that the management server uses the private key corresponding to the security certificate to sign the private key use request, and generates a temporary public key based on the target parameter.
  • the above-mentioned steps of receiving the processing result returned by the management server, and establishing a secure connection with the client based on the processing result include: : Receive the signature information, temporary public key and shared key returned by the management server, and send the signature information and temporary public key to the client, so that the client can verify the signature information through the security certificate. Generate a shared secret with target parameters; establish a secure connection with the client based on the shared secret.
  • the method before the step of obtaining the security certificate of the target website from the management server if an access request for the target website sent by the client is received, the method further includes: passing the saved first certificate and the first certificate The corresponding private key is authenticated with the second certificate stored by the management server and the private key corresponding to the second certificate, and a secure connection with the management server is established.
  • an embodiment of the present application provides a method for establishing a secure connection, including: if an access request for a target website sent by a web server is received, sending the saved security certificate of the target website to the web server; wherein the The access request is sent by the client to the web server; receiving the private key use request sent by the web server, using the private key corresponding to the stored security certificate, signing or decrypting the private key use request, and obtaining the processing result; and processing the request The result is sent to the web server, so that the web server establishes a secure connection with the client based on the processing result.
  • the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned steps of sending the saved security certificate of the target website to the web server if the access request for the target website sent by the web server is received, It includes: searching for the security certificate of the target website in the saved security certificate and the private key corresponding to the security certificate according to the domain name of the target website carried in the received access request; and sending the found security certificate to the web server.
  • an embodiment of the present application provides a system for establishing a secure connection, the system comprising: a management server and a web server connected in communication; the management server is set to save the security certificate of the website and the private key corresponding to the security certificate; the web server It is set to obtain the security certificate of the target website from the management server when receiving the access request for the target website sent by the client, and send the obtained security certificate to the client; the web server is also set to use the corresponding security certificate when necessary.
  • signing or decrypting the private key of the security certificate send a private key use request to the management server; the management server is set to receive the private key use request, use the private key corresponding to the security certificate to sign or decrypt the private key use request, and send the processing result. sending the data to the web server; the web server is further configured to establish a secure connection with the client based on the received processing result.
  • an embodiment of the present application provides a device for establishing a secure connection, comprising: a certificate obtaining module, configured to obtain a security certificate of the target website from a management server if an access request for a target website sent by a client is received ; wherein, the management server saves the security certificate of the target website and the private key corresponding to the security certificate; the certificate sending module is set to send the security certificate to the client, so that the client can use the security certificate to encrypt the client's pre-master key ;
  • the private key usage module is set to send a private key usage request to the management server when the private key corresponding to the security certificate needs to be used for signing or decryption, so that the private key usage request can be signed by the management server using the private key corresponding to the security certificate Or decryption processing, returning the processing result; and a connection establishment module, set to receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.
  • an embodiment of the present application provides an apparatus for establishing a secure connection, comprising: a certificate determination module, configured to send the saved security certificate of the target website to the target website if an access request for the target website sent by the web server is received.
  • the web server wherein, the access request is sent by the client to the web server;
  • the private key processing module is configured to receive the private key use request sent by the web server, and use the private key corresponding to the saved security certificate to process the private key use request.
  • Signature or decryption processing to obtain a processing result; and a result returning module, configured to send the processing result to the web server, so that the web server establishes a secure connection with the client based on the processing result.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the first aspect above
  • embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions.
  • the machine-executable instructions When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-mentioned first step.
  • FIG. 1 is a flowchart of a method for establishing a secure connection provided by an embodiment of the present application
  • FIG. 2 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application
  • FIG. 3 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a system for establishing a secure connection according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an apparatus for establishing a secure connection according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another apparatus for establishing a secure connection provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • HTTPS can encrypt HTTP requests and responses to ensure data integrity, privacy, and authentication.
  • the use of HTTPS complies with the requirements of PKI.
  • the service provider needs to provide a certificate and a private key corresponding to the certificate, and then establish a secure connection with the client.
  • the HTTPS connection established between the client and the website is transferred from the origin site to the CDN node, that is, the CDN node handshakes on behalf of the origin site. Therefore, the website certificate and private key need to be It is deployed on the CDN node so that the CDN node can complete the SSL (Secure Sockets Layer, Secure Sockets Layer)/TLS (Transport Layer Security, Transport Layer Security) handshake.
  • SSL Secure Sockets Layer
  • TLS Transport Layer Security
  • the source station needs to send both the certificate and the private key to the server (equivalent to the above CDN node), so that the server can perform SSL/TLS handshake with the client through the certificate and private key.
  • SSL/TLS handshake process of the encryption algorithm is:
  • Client hello which can be called “client hello”, that is, the client sends a domain name access request to the server, and the access request contains SNI (Server Name Indication, server name indication) information and the encryption algorithm supported by the client, etc. .
  • SNI Server Name Indication, server name indication
  • the server greeting can be called "sever hello", that is, after the server receives the access request, it gives the client response handshake information, including the matching negotiated encryption algorithm and digital certificate.
  • the digital certificate is actually the public key. It just contains a lot of information, such as the issuer of the certificate, the expiration time, the public key of the server, the signature of the third-party certificate certification authority, and the domain name information of the server.
  • the client parses the digital certificate, it first verifies whether the public key in the digital certificate is valid, such as the issuing authority, expiration time, etc.; if an abnormality is found, a warning box will pop up, indicating that there is a problem with the certificate. If there is no problem with the certificate, random Generate a pre-master key, encrypt the pre-master key with the public key in the digital certificate, and send the encrypted pre-master key to the server.
  • the server decrypts the received encrypted pre-master key with the private key corresponding to the digital certificate, and obtains the decrypted pre-master key. At this time, both the client and the server have the pre-master key. can jointly obtain a session key.
  • the client encrypts a message through the session key and sends it to the server, mainly to verify whether the server can normally receive the message encrypted by the client.
  • the server will also encrypt a message through the session key and send it back to the client. If the client can receive it normally, it indicates that the SSL/TLS layer connection is established.
  • the first two steps are the same as the handshake process based on the RSA algorithm.
  • the third step is that the server will sign the specified parameters through the private key corresponding to the digital certificate.
  • the signature information is sent to the client, so that the client can verify the signature information through the digital certificate. After the verification is successful, the client obtains the specified parameter, thereby establishing the session key between the client and the server through the specified parameter.
  • the client first sends a client hello message.
  • the client hello message mainly includes the protocol version, session identifier, cipher suite, compression algorithm, and extended message (key sharing, pre-shared key) supported by the client. , pre-shared key mode, etc.) and parameters to be encrypted; then the server replies with a sever hello message, including: the selected encryption suite, sending the certificate to the client; sign the handshake message with the private key corresponding to the certificate, and send the result to The client; selects the parameters provided by the client to generate a temporary public key, and calculates the shared key for encrypting the HTTP message in combination with the selected parameters; the temporary public key generated by the server is sent to the client through the KeyShare message.
  • the client receives the KeyShare message, it uses the certificate public key for signature verification, obtains the temporary public key of the server, and generates the shared key required for the session; both parties use the generated shared key to encrypt and transmit the message to ensure message security.
  • CDN nodes For customers with more stringent security requirements, they do not want to expose the private key to CDN nodes. If the security requirements are higher or the deployment conditions are more stringent, the customer wants to expose neither the certificate nor the private key. to CDN nodes.
  • the embodiments of the present application provide a method, system, apparatus, electronic device, and machine-readable storage medium for establishing a secure connection.
  • the technology can be applied to an HTTPS access scenario, especially an SSL/TSL handshake scenario.
  • a method for establishing a secure connection disclosed in this embodiment of the present application is first introduced in detail. The method is applied to a web server, and the web server is equivalent to the above-mentioned CDN node, and the web server is connected to the client respectively.
  • the client can be a mobile terminal, for example, a mobile phone, a tablet computer, a smart bracelet, etc., or a computer;
  • the management server can be a separate physical server, and at least one The security certificate of the website (equivalent to the above digital certificate), and the private key corresponding to the security certificate.
  • the above method for establishing a secure connection includes the following steps:
  • Step S102 if an access request for the target website sent by the client is received, obtain the security certificate of the target website from the management server.
  • the above target website is usually the website that the customer wants to visit, and the target website can provide the customer with corresponding services.
  • the specific service provided can be set according to the research and development requirements of the research and development personnel for the target website.
  • the web server when the web server receives the access request for the target website sent by the client, it will forward the access request of the target website to the management server, or send a certificate acquisition request to the management server based on the access request, so that the management server Find the security certificate of the target website from the saved security certificate, and return the found security certificate of the target website to the web server.
  • HTTPS GET request (equivalent to the above access request) is initiated to the web server.
  • HTTPS GET request according to the SSL/TLS protocol, a "handshake" is first performed.
  • the specific format of the access request of the target website can be a client hello message.
  • Step S104 sending the above-mentioned security certificate to the client.
  • the web server After the web server receives the security certificate of the target website, it will send the security certificate to the client.
  • the specific format of the security certificate sent by the web server to the client may be a server hello (sever hello) message.
  • Step S106 when the private key corresponding to the security certificate needs to be used for signature or decryption, a private key use request is sent to the management server, so that the management server uses the private key corresponding to the security certificate to sign or decrypt the private key use request, Return the processing result.
  • the web server When the web server establishes a secure connection with the client, it needs to use the private key corresponding to the security certificate to sign or decrypt, so the web server needs to send a private key usage request to the management server, and the private key usage request can carry the private key that needs to be signed. information or information that needs to be decrypted, so that the management server uses the private key corresponding to the security certificate to sign the information that needs to be signed, or decrypt the information that needs to be decrypted, and return the processing result to the web server.
  • Step S108 Receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.
  • the web server After receiving the processing result returned by the management server, the web server generates a session key based on the processing result, so as to establish a secure connection with the client through the session key.
  • a method for establishing a secure connection if an access request for a target website sent by a client is received, the target website is obtained from a management server that stores a security certificate of the target website and a private key corresponding to the security certificate Then send the obtained security certificate to the client; when the private key corresponding to the security certificate needs to be used for signing or decryption, send a private key use request to the management server to use the private key corresponding to the security certificate through the management server Sign or decrypt the private key use request, and return the processing result; then receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.
  • the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance.
  • the certificate and private key are used to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate and improving the security of user data.
  • the embodiment of the present application also provides another method for establishing a secure connection, which is implemented on the basis of the method in the above-mentioned embodiment; the method focuses on describing that if an access request for the target website sent by the client is received, the The specific process of obtaining the security certificate of the target website (implemented through the following steps S204-S208), when the private key corresponding to the security certificate needs to be used for signing or decryption, a private key use request is sent to the management server to use the management server.
  • the private key corresponding to the security certificate signs or decrypts the private key use request, returns the processing result (implemented by the following step S212), and receives the processing result returned by the management server, and establishes a secure connection with the client based on the processing result.
  • process (implemented through the following step S214); as shown in Figure 2, the method includes the following steps:
  • Step S202 Establish a secure connection with the management server by authenticating the stored first certificate and the private key corresponding to the first certificate with the second certificate stored by the management server and the private key corresponding to the second certificate.
  • the private key corresponding to the first certificate and the first certificate is set to certify the identity of the web server, and is stored in the web server in advance; in the management server.
  • the web server needs to send the first certificate to the management server, and the management server sends the second certificate to the web server for mutual authentication.
  • the private key of the second certificate encrypts the session information, so that the management server can decrypt the session information through the public key in the first certificate; the management server can also encrypt the session information through the private key corresponding to the second certificate, so that the web server can pass the public key in the second certificate. to decrypt.
  • Step S204 if an access request for the target website sent by the client is received, extract the domain name of the target website carried in the access request.
  • the access request of the target website may carry information such as the domain name and SNI information of the target website.
  • Step S206 sending the domain name of the target website to the management server.
  • Step S208 receiving the security certificate of the target website returned by the management server according to the domain name of the target website.
  • the management server When the management server receives the domain name of the target website, it can search for the security certificate corresponding to the domain name, that is, the security certificate of the target website, in the security certificate and the private key corresponding to the security certificate saved by the management server, and find the security certificate of the target website.
  • the security certificate is sent to the web server.
  • Step S210 Send the above-mentioned security certificate to the client, so that the client can use the security certificate to encrypt the pre-master key of the client.
  • the client When the client receives the security certificate, it will verify whether the public key in the security certificate is valid, such as the issuing authority, expiration time, etc. If an exception is found, a warning box will pop up, indicating that there is a problem with the security certificate; if the certificate is not If there is a problem, a pre-master key is randomly generated, the pre-master key is encrypted with the public key in the security certificate, and the encrypted pre-master key is sent to the web server.
  • the pre-master key is usually a 48-bit data block that randomly combines the client and the web server, and uses a pseudo-random function to randomly create a session key in the web server.
  • the security certificate is sent to the client, and the received security certificate of the target website can also be cached for a specified time, so that other clients have access to the security certificate.
  • the client sends the access request of the target website within the specified time, it will directly return it to the client.
  • Step S212 Receive the encrypted pre-master key sent by the client, and send the encrypted pre-master key to the management server, so that the encrypted pre-master key is processed by the management server using the private key corresponding to the security certificate. decrypt.
  • the web server When the web server receives the encrypted pre-master key sent by the client, it sends the encrypted pre-master key to the management server, and the management server will use the private key corresponding to the security certificate of the target website to pair the encrypted pre-master key
  • the master key is decrypted to obtain a decrypted pre-master key.
  • Step S214 Receive the decrypted pre-master key returned by the management server, and establish a secure connection with the client based on the pre-master key.
  • the web server After the web server receives the decrypted pre-master key returned by the management server, it will save the pre-master key. At this time, the client and the web server have the same pre-master key, and they can jointly obtain a session key. Then the client encrypts a message with the session key and sends it to the web server to verify whether the server can normally receive the encrypted message sent by the client; the web server also encrypts a message with the session key and sends it back to the client , if the client can receive it normally, it indicates that the SSL/TLS handshake is completed, that is, a secure connection between the web server and the client is established.
  • the SSL/TLS handshake phase is essentially to calculate the symmetric key, and the security certificate is to confirm the legitimacy of the target website to the client.
  • the private key corresponding to the certificate is used for the final calculation of the symmetric key.
  • the client initiates an HTTPS request to the web server (equivalent to the access request of the target website mentioned above), and the web server, as the server, aims to agree on a symmetric key with the client during the whole handshake process; In the process, it is necessary to use the relevant information to calculate some key information in the form of private key signature or private key decryption to generate the final symmetric key.
  • the process is: after the client receives the security certificate, it uses the The public key encrypts the randomly generated pre-master key, and then sends the encrypted pre-master key to the web server.
  • the management server completes the calculation (that is, uses the private key corresponding to the security certificate to decrypt the encrypted pre-master key to obtain the decrypted pre-master key), and then returns it to the web server.
  • the web server receives the decrypted pre-master key, and establishes a secure connection with the client based on the pre-master key.
  • the above-mentioned private agreement is usually a set of self-defined agreement standards within the enterprise, which is only applicable to the equipment products produced by the enterprise.
  • the security certificate and private key are stored through the management server instead of being issued and stored in the web server. It allows customers to fully control the management of security certificates and private keys; on the other hand, it also eliminates the possibility of web servers leaking security certificates and private keys.
  • the management server saves and manages the security certificate and private key of the website without providing the security certificate and private key to the web server.
  • the web server manages from Obtained from the server, thus avoiding the disclosure of security certificates and private keys, and customers can fully control the management of security certificates and private keys; at the same time, the deployment of web servers is also shorter and more secure.
  • both the website's security certificate and the private key of the security certificate are stored in the management server, and do not need to be issued to the web server in advance.
  • the web server communicates with the management server in real time to use the security certificate and private key to establish a secure connection with the client, thus avoiding the disclosure of private key and certificate and improving the security of user data.
  • the embodiment of the present application also provides another method for establishing a secure connection, which is implemented on the basis of the method in the above-mentioned embodiment;
  • the process of establishing a secure connection with the client based on the processing result (implemented by the following step S308); as shown in FIG. 3 , the method includes the following steps:
  • Step S302 if an access request for the target website sent by the client is received, obtain the security certificate of the target website from the management server.
  • Step S304 sending the above-mentioned security certificate to the client.
  • Step S306 sending a private key use request carrying the specified parameters to the management server, so that the management server uses the private key corresponding to the security certificate to sign the specified parameters, and returns the signature information.
  • the web server After the web server sends the security certificate to the client, it will send a private key usage request with the specified parameters to the management server; after receiving the private key usage request, the management server will use the private key corresponding to the security certificate to perform the specified parameters. Sign, get the signature information, and return the signature information to the web server.
  • the specified parameter may be a Herman parameter.
  • Step S308 Receive the signature information returned by the management server, and send the signature information to the client, so that the client can verify the signature information through the security certificate to obtain specified parameters; establish a secure connection with the client based on the specified parameters.
  • the web server sends the received signature information returned by the management server to the client, and the client will use the received security certificate to verify the signature information. After the verification is successful, the specified parameters are obtained, so that both the web server and the client store the specified parameters. , so that both the web server and the client can establish a session key according to the specified parameters, that is, a secure connection between the web server and the client is established.
  • the security certificate of the website and the private key of the security certificate are both stored in the management server, and do not need to be pre-delivered to the web server.
  • the web server communicates with the management server in real time. In this way, the security certificate and private key are used to establish a secure connection with the client, thereby avoiding the leakage of the private key and the certificate and improving the security of user data.
  • the embodiment of the present application also provides another method for establishing a secure connection, which is implemented on the basis of the method in the above-mentioned embodiment;
  • the process of establishing a secure connection with the client based on the processing result (implemented through the following step S406); as shown in FIG. 4 , the method includes the following steps:
  • Step S402 if an access request for the target website sent by the client is received, the security certificate of the target website is obtained from the management server, and the access request carries the target parameter.
  • the above target parameter is a parameter provided by the client and set to generate a session key between the client and the web server.
  • Step S404 sending the above-mentioned security certificate to the client, and sending the private key use request carrying the target parameters to the management server, so that the management server uses the private key corresponding to the security certificate to sign the private key use request, and generates the request based on the target parameters.
  • the temporary public key is calculated, and the shared key is calculated by combining the temporary public key and the target parameters, and the signature information, the temporary public key and the shared key are returned.
  • Step S406 Receive the signature information, the temporary public key and the shared key returned by the management server, and send the signature information and the temporary public key to the client, so that the client can verify the signature information through the security certificate.
  • the public key and target parameters generate a shared secret; based on the shared secret, a secure connection is established with the client.
  • both the client and the web server store the shared key, and the client and the web server can conduct a conversation according to the shared key.
  • the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance.
  • the method uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate, and improving the security of user data.
  • the embodiment of the present application also provides another method for establishing a secure connection.
  • the method is applied to the management server. As shown in FIG. 5 , the method includes the following steps:
  • Step S502 if an access request for the target website sent by the web server is received, the saved security certificate of the target website is sent to the web server.
  • the above access request is forwarded by the web server to the management server after the client sends the request to the web server.
  • Step S504 Receive the private key use request sent by the web server, and use the private key corresponding to the stored security certificate to sign or decrypt the private key use request to obtain a processing result.
  • Step S506 sending the above processing result to the web server, so that the web server establishes a secure connection with the client based on the processing result.
  • the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned step S502 can be realized by the following steps 10-11:
  • Step 10 according to the domain name of the target website carried in the received access request, in the stored security certificate and the private key corresponding to the security certificate, search for the security certificate of the target website.
  • Step 11 sending the found security certificate to the web server.
  • the above-mentioned method for establishing a secure connection if the access request for the target website sent by the web server is received, the security certificate of the saved target website is sent to the web server; and then the web server sends the received security certificate to the client; then Receive the private key use request sent by the web server, use the private key corresponding to the saved security certificate, sign or decrypt the private key use request, obtain the processing result, and send the processing result to the web server, so that the web server Establish a secure connection with the client based on the processing result.
  • the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to pre-issue the security certificate and private key value to the web server.
  • the web server communicates with the management server in real time.
  • the communication method uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate, and improving the security of user data.
  • the embodiments of the present application also provide a system for establishing a secure connection.
  • the system includes: a management server 60 and a web server 61 that are connected in communication, and the web server 61 also communicates with the client terminal communication connection; the management server 60 is set to save the security certificate of the website and the private key corresponding to the security certificate.
  • the above-mentioned web server 61 is configured to obtain the security certificate of the target website from the management server 60 when receiving an access request for the target website sent by the client, and send the obtained security certificate to the client.
  • the web server 61 is further configured to send a private key use request to the management server 60 when the private key corresponding to the security certificate needs to be used for signature or decryption.
  • the management server 60 is configured to receive the private key use request, use the private key corresponding to the security certificate to sign or decrypt the private key use request, and send the processing result to the web server 61 .
  • the web server 61 is also configured to establish a secure connection with the client based on the received processing result. After receiving the processing result returned by the management server 60, the web server 61 generates a session key based on the processing result, so as to establish a secure connection with the client through the session key.
  • the embodiment of the present application provides an apparatus for establishing a secure connection.
  • the apparatus is set on a web server. As shown in FIG. 7 , the apparatus includes:
  • the certificate obtaining module 70 is configured to obtain the security certificate of the target website from the management server if an access request for the target website sent by the client is received; wherein, the management server saves the security certificate of the target website and the corresponding security certificate. private key.
  • the certificate sending module 71 is configured to send the security certificate to the client.
  • the private key use module 72 is configured to send a private key use request to the management server when the private key corresponding to the security certificate needs to be used for signing or decryption, so that the private key use request can be processed by the management server using the private key corresponding to the security certificate. Signature or decryption processing, and the processing result is returned.
  • the connection establishment module 73 is configured to receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.
  • the above-mentioned device for establishing a secure connection if receiving an access request for the target website sent by the client, obtain the security certificate of the target website from the management server that preserves the security certificate of the target website and the private key corresponding to the security certificate; and then obtain The security certificate of the security certificate is sent to the client; when the private key corresponding to the security certificate needs to be used for signature or decryption, a private key use request is sent to the management server, so that the private key is used by the management server using the private key corresponding to the security certificate. Perform signature or decryption processing, and return the processing result; then receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.
  • both the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance.
  • the client accesses the target website, it communicates with the management server in real time. certificate and private key, establish a connection with the client, thus avoiding the leakage of the private key and certificate, and improving the security of user data.
  • the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned certificate obtaining module 70 is set to: if an access request for the target website sent by the client is received, extract the target website carried by the access request. the domain name of the target website; send the domain name of the target website to the management server; receive the security certificate of the target website returned by the management server according to the domain name of the target website.
  • the above-mentioned apparatus further includes a key receiving module 74, which is configured to receive the encrypted pre-master key obtained by encrypting the client's pre-master key using the security certificate by the client.
  • the above-mentioned private key using module 72 is set to: send the encrypted pre-master key to the management server, so as to decrypt the encrypted pre-master key by using the private key corresponding to the security certificate through the management server; the above-mentioned connection establishment module 73.
  • the above-mentioned private key use request carries specified parameters; the above-mentioned private key use module 72 is set to: send a private key use request carrying the specified parameters to the management server, so as to use the corresponding security certificate through the management server.
  • the private key signs the specified parameters, and returns the signature information;
  • the above-mentioned connection establishment module 73 is set to: receive the signature information returned by the management server, and send the signature information to the client, so that the client can verify the signature information through the security certificate. , get the specified parameters, and establish a secure connection with the client based on the specified parameters.
  • the above-mentioned private key use request carries the target parameter contained in the access request; the above-mentioned private key use module 72 is set to: send a private key use request to the management server, so as to use the private key corresponding to the security certificate by the management server.
  • the key-pair private key use request is signed, a temporary public key is generated based on the target parameters, and the shared key is calculated in combination with the temporary public key and the target parameters, and the signature information, the temporary public key and the shared key are returned; the above-mentioned connection establishment module 73 is set to : Receive the signature information, temporary public key and shared key returned by the management server, and send the signature information and temporary public key to the client, so that the client can verify the signature information through the security certificate. Generate a shared secret with target parameters; establish a secure connection with the client based on the shared secret.
  • the above-mentioned device further includes an authentication module 75, which is configured to: before obtaining the security certificate of the target website from the management server, through the stored first certificate and the private key corresponding to the first certificate, with the stored first certificate and the corresponding private key of the management server.
  • the second certificate and the private key corresponding to the second certificate are authenticated, and a secure connection with the management server is established.
  • the embodiment of the present application provides another apparatus for establishing a secure connection.
  • the apparatus is set on a management server. As shown in FIG. 8 , the apparatus includes:
  • the certificate determining module 80 is configured to send the saved security certificate of the target website to the web server if an access request for the target website sent by the web server is received; wherein, the access request is sent by the client to the web server.
  • the private key processing module 81 is configured to receive the private key usage request sent by the web server, and use the private key corresponding to the stored security certificate to sign or decrypt the private key usage request to obtain a processing result.
  • the result returning module 82 is configured to send the processing result to the web server, so that the web server establishes a secure connection with the client based on the processing result.
  • the management server saves and manages the security certificate and private key of the website, and does not need to provide the security certificate and private key to the web server.
  • the web server manages from Obtained from the server, thus avoiding the disclosure of security certificates and private keys, and customers can fully control the management of security certificates and private keys; and the deployment of web servers is also shorter and more secure.
  • the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key value to the web server in advance.
  • the web server communicates with the management server in real time through
  • the communication method uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate, and improving the security of user data.
  • the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned certificate determination module 80 is set to: according to the domain name of the target website carried in the received access request, in the saved security certificate and security certificate Find the security certificate of the target website in the corresponding private key; send the found security certificate to the web server.
  • the device for establishing a secure connection provided by the embodiment of the present application has the same implementation principle and technical effects as the foregoing method for establishing a secure connection. Corresponding content in the method embodiment.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 9 , the electronic device includes a processor 101 and a memory 100, where the memory 100 stores machine-executable instructions that can be executed by the processor 101, and the processor 101 Machine-executable instructions are executed to implement the above-described method of establishing a secure connection.
  • the electronic device shown in FIG. 9 further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected through the bus 102 .
  • the memory 100 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • the communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), which may use the Internet, a wide area network, a local network, a metropolitan area network, and the like.
  • the bus 102 may be an ISA bus, a PCI bus, an EISA bus, or the like.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one bidirectional arrow is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.
  • the processor 101 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method may be completed by an integrated logic circuit of hardware in the processor 101 or an instruction in the form of software.
  • the above-mentioned processor 101 may be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; may also be a digital signal processor (Digital Signal Processor, referred to as DSP) ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100, and completes the steps of the methods in the foregoing embodiments in combination with its hardware.
  • Embodiments of the present application further provide a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement
  • the machine-readable storage medium stores machine-executable instructions
  • the machine-executable instructions when invoked and executed by a processor, the machine-executable instructions cause the processor to implement
  • the method, system, device, and computer program product of an electronic device for establishing a secure connection provided by the embodiments of the present application include a machine-readable storage medium storing program codes, and the instructions included in the program codes can be configured to execute the implementation of the foregoing method.
  • program codes can be configured to execute the implementation of the foregoing method.
  • the functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a machine-readable storage medium.
  • a method, system, device, electronic device and machine-readable storage medium for establishing a secure connection provided by this application, if an access request for a target website sent by a client is received, the security certificate and security certificate of the target website are saved from the Obtain the security certificate of the target website from the management server of the corresponding private key; then send the obtained security certificate to the client; when the private key corresponding to the security certificate needs to be used to sign or decrypt, send a private key use request to the management server, The management server uses the private key corresponding to the security certificate to sign or decrypt the private key use request, and returns the processing result; and then receives the processing result returned by the management server, and establishes a secure connection with the client based on the processing result.
  • the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance.
  • certificate and private key establish a connection with the client, thus avoiding the leakage of the private key and certificate, and improving the security of user data.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
  • This application can be applied to the technical field of data security, and provides a method, system, device, electronic device and machine-readable storage medium for establishing a secure connection.
  • the security certificate of the website and the private key of the security certificate are only stored in the management server, without the need for The security certificate and private key are issued in advance.
  • the management server uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate and improving the data security.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present application provides a method, system and apparatus for establishing a secure connection, an electronic device, and a machine-readable storage medium. The method comprises: upon receipt of an access request to a target website sent by a client, obtaining a security certificate from a management server storing the security certificate of the target website and a private key of the security certificate; sending the security certificate to the client; when the private key of the security certificate needs to be used to sign or decrypt, sending a private key usage request to the management server, so that the management server uses the private key of the security certificate to sign or decrypt the private key usage request; and receiving a processing result returned by the management server, and establishing a secure connection with the client on the basis of the processing result. In this method, the security certificate of the website and the private key of the security certificate are only stored in the management server; it is unnecessary to deliver the security certificate and the private key in advance; when the client accesses a target website, a connection is established with the client by means of the management server using the security certificate and the private key, thereby avoiding leakage of the private key and the certificate, and improving the data security.

Description

建立安全连接的方法、系统、装置、电子设备和机器可读存储介质Method, system, apparatus, electronic device, and machine-readable storage medium for establishing a secure connection

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请要求于2020年11月24日提交中国专利局的申请号为202011341971.4、名称为“建立安全连接的方法、系统、装置和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011341971.4 and entitled "Method, System, Apparatus and Electronic Device for Establishing a Secure Connection" filed with the China Patent Office on November 24, 2020, the entire contents of which are incorporated by reference in this application.

技术领域technical field

本申请涉及数据安全技术领域,尤其是涉及一种建立安全连接的方法、系统、装置、电子设备和机器可读存储介质。The present application relates to the technical field of data security, and in particular, to a method, system, apparatus, electronic device, and machine-readable storage medium for establishing a secure connection.

背景技术Background technique

HTTPS(Hyper Text Transfer Protocol over SecureSocket Layer,超文本传输安全协议)是以安全为目标的HTTP(Hyper Text Transfer Protocol,超文本传输协议)通道,在HTTP的基础上通过传输加密和身份认证保证了传输过程的安全性。HTTPS的使用遵从PKI(Public-Key Infrastructure,公钥基础设施)的要求,需要服务的提供方提供证书和对应的私钥,然后同客户端建立安全连接。在实际应用中,当源站使用CDN(Content Delivery Network,内容分发网络)后,客户端同源站建立的HTTPS连接由源站转移到了CDN节点,也即是由CDN节点来代表源站进行握手,因此,需要将源站的证书和私钥部署在CDN节点上,但由于CDN节点数量较多,整体的服务器数量巨大,在每台CDN节点的缓存服务器上都保存有证书和私钥,容易造成私钥和证书的泄露,进而威胁到用户的数据安全。HTTPS (Hyper Text Transfer Protocol over SecureSocket Layer) is a secure HTTP (Hyper Text Transfer Protocol) channel. On the basis of HTTP, transmission encryption and authentication are used to ensure transmission. process security. The use of HTTPS complies with the requirements of PKI (Public-Key Infrastructure), which requires the service provider to provide a certificate and corresponding private key, and then establish a secure connection with the client. In practical applications, when the origin site uses CDN (Content Delivery Network), the HTTPS connection established by the client with the origin site is transferred from the origin site to the CDN node, that is, the CDN node handshakes on behalf of the origin site , therefore, it is necessary to deploy the certificate and private key of the origin site on the CDN node, but due to the large number of CDN nodes, the overall number of servers is huge, and the certificate and private key are stored on the cache server of each CDN node, which is easy to This results in the disclosure of private keys and certificates, which in turn threatens user data security.

发明内容SUMMARY OF THE INVENTION

本申请的目的在于提供一种建立安全连接的方法、系统、装置、电子设备和机器可读存储介质,以降低私钥和证书泄露的风险,进而保证用户的数据安全。The purpose of this application is to provide a method, system, apparatus, electronic device and machine-readable storage medium for establishing a secure connection, so as to reduce the risk of leakage of private keys and certificates, thereby ensuring user data security.

第一方面,本申请实施例提供了一种建立安全连接的方法,该方法包括:如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书;其中,该管理服务器中保存有目标网站的安全证书和安全证书对应的私钥;将该安全证书发送至客户端;在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,返回处理结果;以及接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接。In a first aspect, an embodiment of the present application provides a method for establishing a secure connection, the method includes: if an access request for a target website sent by a client is received, obtaining a security certificate of the target website from a management server; wherein the The security certificate of the target website and the private key corresponding to the security certificate are stored in the management server; the security certificate is sent to the client; when the private key corresponding to the security certificate needs to be used for signing or decryption, a private key use request is sent to the management server to sign or decrypt the private key use request by using the private key corresponding to the security certificate by the management server, and return the processing result; and receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.

在一实施方式中,上述目标网站的访问请求中携带有目标网站的域名;上述如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书的步骤,包括:如果接收到客户端发送的针对目标网站的访问请求,提取访问请求携带的目标网站的域名;将目标网站的域名发送至管理服务器;以及接收管理服务器根据目标网站的域名返回的目标网站的安全证书。In one embodiment, the access request of the above-mentioned target website carries the domain name of the target website; if the above-mentioned access request for the target website sent by the client is received, the step of obtaining the security certificate of the target website from the management server includes: If an access request for the target website sent by the client is received, extract the domain name of the target website carried in the access request; send the domain name of the target website to the management server; and receive the security certificate of the target website returned by the management server according to the domain name of the target website .

在一实施方式中,上述将安全证书发送至客户端的步骤之后,该方法还包括:接收客户端使用安全证书对客户端的预主密钥加密后得到的加密后的预主密钥;上述在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理的步骤,包括:将加密后的预主密钥发送至管理服务器,以通过管理服务器使用安全证书对应的私钥对加密后的预主密钥进行解密;上述接收管理服务器返回的处理结果,基于处理结果与客户端建立安全连接的步骤,包括:接收管理服务器返回的解密后的预主密钥,基于该预主密钥与客户端建立安全连接。In one embodiment, after the above-mentioned step of sending the security certificate to the client, the method further includes: receiving an encrypted pre-master key obtained by the client using the security certificate to encrypt the client's pre-master key; When signing or decrypting with the private key corresponding to the security certificate, sending a private key use request to the management server, so that the management server uses the private key corresponding to the security certificate to sign or decrypt the private key use request, including: encrypting The obtained pre-master key is sent to the management server, so that the encrypted pre-master key is decrypted by the management server using the private key corresponding to the security certificate; the above-mentioned processing result returned by the management server is received, and the security is established with the client based on the processing result. The step of connecting includes: receiving the decrypted pre-master key returned by the management server, and establishing a secure connection with the client based on the pre-master key.

在一实施方式中,上述私钥使用请求中携带有指定参数;上述向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理的步骤,包括:向管理服务器发送携带有指定参数的私钥使用请求,以通过管理服务器使用安全证书对应的私钥对指定参数进行签名,返回签名信息;上述接收管理服务器返回的处理结果,基于处理结果与客户端建立安全连接的步骤,包括:接收管理服务器返回的签名信息,并将该签名信息发送至客户端,以使客户端通过安全证书验签签名信息,得到指定参数;以及基于该指定参数与客户端建立安全连接。In one embodiment, the above-mentioned private key use request carries specified parameters; the above-mentioned steps of sending the private key use request to the management server to sign or decrypt the private key use request by using the private key corresponding to the security certificate by the management server , including: sending a private key use request carrying the specified parameters to the management server, so that the specified parameters are signed by the management server using the private key corresponding to the security certificate, and the signature information is returned; the above-mentioned processing results returned by the management server are received, based on the processing results The step of establishing a secure connection with the client includes: receiving the signature information returned by the management server, and sending the signature information to the client, so that the client can verify the signature information through the security certificate and obtain specified parameters; and based on the specified parameters Establish a secure connection with the client.

在一实施方式中,上述私钥使用请求中携带有访问请求中包含的目标参数;上述向所述管理服务器发送私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理的步骤,包括:向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对私钥使用请求进行签名,基于目标参数生成临时公钥,并结合临时公钥和目标参数计算出共享密钥,返回签名信息、临时公钥和共享密钥;上述接收管理服务器返回的处理结果,基于处理结果与客户端建立安全连接的步骤,包括:接收管理服务器返回的签名信息、临时公钥和共享密钥,将签名信息和临时公钥发送至客户端,以使客户端通过安全证书验签签名信息,验签成功后,基于临时公钥和目标参数生成共享密钥;基于共享密钥与客户端建立安全连接。In one embodiment, the private key use request carries the target parameter contained in the access request; the above-mentioned private key use request is sent to the management server, so that the private key pair corresponding to the security certificate is used by the management server. The step of signing or decrypting the private key use request includes: sending a private key use request to the management server, so that the management server uses the private key corresponding to the security certificate to sign the private key use request, and generates a temporary public key based on the target parameter. key, and combined with the temporary public key and target parameters to calculate the shared key, and return the signature information, the temporary public key and the shared key; the above-mentioned steps of receiving the processing result returned by the management server, and establishing a secure connection with the client based on the processing result, include: : Receive the signature information, temporary public key and shared key returned by the management server, and send the signature information and temporary public key to the client, so that the client can verify the signature information through the security certificate. Generate a shared secret with target parameters; establish a secure connection with the client based on the shared secret.

在一实施方式中,上述如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书的步骤之前,上述方法还包括:通过保存的第一证书和第一证书对应的私钥,与管理服务器保存的第二证书和第二证书对应的私钥进行认证,建立 与管理服务器的安全连接。In one embodiment, before the step of obtaining the security certificate of the target website from the management server if an access request for the target website sent by the client is received, the method further includes: passing the saved first certificate and the first certificate The corresponding private key is authenticated with the second certificate stored by the management server and the private key corresponding to the second certificate, and a secure connection with the management server is established.

第二方面,本申请实施例提供了一种建立安全连接的方法,包括:如果接收到网页服务器发送的针对目标网站的访问请求,将保存的目标网站的安全证书发送至网页服务器;其中,该访问请求为客户端发送至网页服务器的;接收网页服务器发送的私钥使用请求,使用保存的安全证书对应的私钥,对私钥使用请求进行签名或者解密处理,得到处理结果;以及将该处理结果发送至网页服务器,以使网页服务器基于该处理结果与客户端建立安全连接。In a second aspect, an embodiment of the present application provides a method for establishing a secure connection, including: if an access request for a target website sent by a web server is received, sending the saved security certificate of the target website to the web server; wherein the The access request is sent by the client to the web server; receiving the private key use request sent by the web server, using the private key corresponding to the stored security certificate, signing or decrypting the private key use request, and obtaining the processing result; and processing the request The result is sent to the web server, so that the web server establishes a secure connection with the client based on the processing result.

在一实施方式中,上述目标网站的访问请求中携带有目标网站的域名;上述如果接收到网页服务器发送的针对目标网站的访问请求,将保存的目标网站的安全证书发送至网页服务器的步骤,包括:根据接收到的访问请求中携带的目标网站的域名,在保存的安全证书和安全证书对应的私钥中,查找目标网站的安全证书;以及将查找到的安全证书发送至网页服务器。In one embodiment, the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned steps of sending the saved security certificate of the target website to the web server if the access request for the target website sent by the web server is received, It includes: searching for the security certificate of the target website in the saved security certificate and the private key corresponding to the security certificate according to the domain name of the target website carried in the received access request; and sending the found security certificate to the web server.

第三方面,本申请实施例提供了一种建立安全连接的系统,该系统包括:通信连接的管理服务器和网页服务器;管理服务器设置为保存网站的安全证书和安全证书对应的私钥;网页服务器设置为在接收到客户端发送的针对目标网站的访问请求时,从管理服务器中获取目标网站的安全证书,并将获取的安全证书发送至客户端;网页服务器还设置为在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求;管理服务器设置为接收私钥使用请求,使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,并将处理结果发送至所述网页服务器;网页服务器还设置为基于接收的处理结果与客户端建立安全连接。In a third aspect, an embodiment of the present application provides a system for establishing a secure connection, the system comprising: a management server and a web server connected in communication; the management server is set to save the security certificate of the website and the private key corresponding to the security certificate; the web server It is set to obtain the security certificate of the target website from the management server when receiving the access request for the target website sent by the client, and send the obtained security certificate to the client; the web server is also set to use the corresponding security certificate when necessary. When signing or decrypting the private key of the security certificate, send a private key use request to the management server; the management server is set to receive the private key use request, use the private key corresponding to the security certificate to sign or decrypt the private key use request, and send the processing result. sending the data to the web server; the web server is further configured to establish a secure connection with the client based on the received processing result.

第四方面,本申请实施例提供了一种建立安全连接的装置,包括:证书获取模块,设置为如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书;其中,该管理服务器中保存有目标网站的安全证书和安全证书对应的私钥;证书发送模块,设置为将安全证书发送至客户端,以通过客户端使用安全证书加密客户端的预主密钥;私钥使用模块,设置为在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,返回处理结果;以及连接建立模块,设置为接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接。In a fourth aspect, an embodiment of the present application provides a device for establishing a secure connection, comprising: a certificate obtaining module, configured to obtain a security certificate of the target website from a management server if an access request for a target website sent by a client is received ; wherein, the management server saves the security certificate of the target website and the private key corresponding to the security certificate; the certificate sending module is set to send the security certificate to the client, so that the client can use the security certificate to encrypt the client's pre-master key ;The private key usage module is set to send a private key usage request to the management server when the private key corresponding to the security certificate needs to be used for signing or decryption, so that the private key usage request can be signed by the management server using the private key corresponding to the security certificate Or decryption processing, returning the processing result; and a connection establishment module, set to receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.

第五方面,本申请实施例提供了一种建立安全连接的装置,包括:证书确定模块,设置为如果接收到网页服务器发送的针对目标网站的访问请求,将保存的目标网站的安全证书发送至网页服务器;其中,该访问请求为客户端发送至网页服务器的;私钥处理模块,设置为接收网页服务器发送的私钥使用请求,使用保存的安全证书对应的私钥,对私钥使 用请求进行签名或者解密处理,得到处理结果;以及结果返回模块,设置为将处理结果发送至网页服务器,以使该网页服务器基于处理结果与客户端建立安全连接。In a fifth aspect, an embodiment of the present application provides an apparatus for establishing a secure connection, comprising: a certificate determination module, configured to send the saved security certificate of the target website to the target website if an access request for the target website sent by the web server is received. The web server; wherein, the access request is sent by the client to the web server; the private key processing module is configured to receive the private key use request sent by the web server, and use the private key corresponding to the saved security certificate to process the private key use request. Signature or decryption processing to obtain a processing result; and a result returning module, configured to send the processing result to the web server, so that the web server establishes a secure connection with the client based on the processing result.

第六方面,本申请实施例提供了一种电子设备,包括处理器和存储器,该存储器存储有能够被处理器执行的机器可执行指令,该处理器执行机器可执行指令以实现上述第一方面所述的建立安全连接的方法或者第二方面所述的建立安全连接的方法。In a sixth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the first aspect above The method for establishing a secure connection or the method for establishing a secure connection described in the second aspect.

第七方面,本申请实施例提供了一种机器可读存储介质,存储有机器可执行指令,该机器可执行指令在被处理器调用和执行时,该机器可执行指令促使处理器实现上述第一方面所述的建立安全连接的方法或者第二方面所述的建立安全连接的方法。In a seventh aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-mentioned first step. The method for establishing a secure connection described in one aspect or the method for establishing a secure connection described in the second aspect.

本申请的其他特征和优点将在随后的说明书中阐述,或者,部分特征和优点可以从说明书推知或毫无疑义地确定,或者通过实施本申请的上述技术即可得知。Additional features and advantages of the present application will be set forth in the description that follows, or some of the features and advantages may be inferred or unambiguously determined from the description, or may be learned by practicing the above-described techniques of the present application.

为使本申请的上述目的、特征和优点能更明显易懂,下文特举较佳实施方式,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the accompanying drawings that need to be used in the description of the specific embodiments or the prior art will be briefly introduced below. The drawings are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1为本申请实施例提供的一种建立安全连接的方法的流程图;FIG. 1 is a flowchart of a method for establishing a secure connection provided by an embodiment of the present application;

图2为本申请实施例提供的另一种建立安全连接的方法的流程图;2 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application;

图3为本申请实施例提供的另一种建立安全连接的方法的流程图;3 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application;

图4为本申请实施例提供的另一种建立安全连接的方法的流程图;4 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application;

图5为本申请实施例提供的另一种建立安全连接的方法的流程图;5 is a flowchart of another method for establishing a secure connection provided by an embodiment of the present application;

图6为本申请实施例提供的一种建立安全连接的系统的结构示意图;6 is a schematic structural diagram of a system for establishing a secure connection according to an embodiment of the present application;

图7为本申请实施例提供的一种建立安全连接的装置的结构示意图;7 is a schematic structural diagram of an apparatus for establishing a secure connection according to an embodiment of the present application;

图8为本申请实施例提供的另一种建立安全连接的装置的结构示意图;FIG. 8 is a schematic structural diagram of another apparatus for establishing a secure connection provided by an embodiment of the present application;

图9为本申请实施例提供的一种电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例 的组件可以以各种不同的配置来布置和设计。In order to make the purposes, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations.

因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。Thus, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

HTTPS可以对HTTP请求和应答实施加密,从而保证数据的完整性、私密性以及认证性。HTTPS的使用遵从PKI的要求,需要服务的提供方提供证书和该证书对应的私钥,然后同客户端建立安全连接。在实际应用中,当网站使用CDN后,客户端同网站建立的HTTPS连接由源站转移到了CDN节点,也即是由CDN节点来代表源站进行握手,因此,需要将网站的证书和私钥部署在CDN节点上,以便CDN节点完成SSL(Secure Sockets Layer,安全套接字协议)/TLS(Transport Layer Security,传输层安全)握手。但由于CDN节点数量较多,整体的服务器数量巨大,在每台CDN节点的缓存服务器上都保存证书和私钥,导致私钥和证书被攻击的几率变大,存在泄露的风险,进而也威胁到了用户的数据安全。HTTPS can encrypt HTTP requests and responses to ensure data integrity, privacy, and authentication. The use of HTTPS complies with the requirements of PKI. The service provider needs to provide a certificate and a private key corresponding to the certificate, and then establish a secure connection with the client. In practical applications, after the website uses CDN, the HTTPS connection established between the client and the website is transferred from the origin site to the CDN node, that is, the CDN node handshakes on behalf of the origin site. Therefore, the website certificate and private key need to be It is deployed on the CDN node so that the CDN node can complete the SSL (Secure Sockets Layer, Secure Sockets Layer)/TLS (Transport Layer Security, Transport Layer Security) handshake. However, due to the large number of CDN nodes and the huge number of overall servers, certificates and private keys are stored on the cache server of each CDN node, which increases the probability of private keys and certificates being attacked, and there is a risk of leakage, which in turn threatens to the user's data security.

相关技术中,需要源站将证书和私钥均发送给服务端(相当于上述CDN节点),以使服务端通过证书和私钥与客户端进行SSL/TLS握手,基于RSA(RivestShamirAdleman,一种加密算法)算法的握手过程为:In the related art, the source station needs to send both the certificate and the private key to the server (equivalent to the above CDN node), so that the server can perform SSL/TLS handshake with the client through the certificate and private key. Based on RSA (RivestShamirAdleman, a The handshake process of the encryption algorithm) algorithm is:

1、客户端问候,可称为“client hello”,即客户端向服务端发送域名访问请求,该访问请求中包含有SNI(Server Name Indication,服务器名称指示)信息和客户端支持的加密算法等。1. Client hello, which can be called "client hello", that is, the client sends a domain name access request to the server, and the access request contains SNI (Server Name Indication, server name indication) information and the encryption algorithm supported by the client, etc. .

2、服务端问候,可称为“sever hello”,即服务端接收到访问请求后,给予客户端响应握手信息,包括匹配好的协商加密算法和数字证书等,该数字证书其实就是公钥,只是包含了很多信息,如证书的颁发机构、过期时间、服务端的公钥、第三方证书认证机构的签名和服务端的域名信息等内容。2. The server greeting can be called "sever hello", that is, after the server receives the access request, it gives the client response handshake information, including the matching negotiated encryption algorithm and digital certificate. The digital certificate is actually the public key. It just contains a lot of information, such as the issuer of the certificate, the expiration time, the public key of the server, the signature of the third-party certificate certification authority, and the domain name information of the server.

3、客户端解析数字证书,首先验证数字证书中的公钥是否有效,比如颁发机构、过期时间等;如果发现异常,则会弹出一个警告框,提示证书存在问题,如果证书没有问题,则随机生成一个预主密钥,并通过数字证书中的公钥加密该预主密钥,将加密后的预主密钥发送至服务端。3. When the client parses the digital certificate, it first verifies whether the public key in the digital certificate is valid, such as the issuing authority, expiration time, etc.; if an abnormality is found, a warning box will pop up, indicating that there is a problem with the certificate. If there is no problem with the certificate, random Generate a pre-master key, encrypt the pre-master key with the public key in the digital certificate, and send the encrypted pre-master key to the server.

4、服务端用该数字证书对应的私钥解密接收到的加密后的预主密钥,得到解密后的预主密钥,此时,客户端和服务端都有了预主密钥,它们能共同获得一个会话密钥。4. The server decrypts the received encrypted pre-master key with the private key corresponding to the digital certificate, and obtains the decrypted pre-master key. At this time, both the client and the server have the pre-master key. can jointly obtain a session key.

5、客户端通过会话密钥加密一条消息发送给服务端,主要验证服务端是否可以正常接收客户端加密的消息。5. The client encrypts a message through the session key and sends it to the server, mainly to verify whether the server can normally receive the message encrypted by the client.

6、服务端也会通过会话密钥加密一条消息回传给客户端,如果客户端能够正常接收的话,表明SSL/TLS层连接建立完成了。6. The server will also encrypt a message through the session key and send it back to the client. If the client can receive it normally, it indicates that the SSL/TLS layer connection is established.

基于DH(Diffie-Hellman,密钥交换)算法的握手过程中,前两个步骤与基于RSA算法的握手过程相同,第三步为服务端会通过数字证书对应的私钥对指定参数进行签名,并将签名信息发送至客户端,以使客户端通过数字证书验证签名信息,验证成功后客户端得到指定参数,从而通过该指定参数建立客户端与服务端的会话密钥。In the handshake process based on the DH (Diffie-Hellman, key exchange) algorithm, the first two steps are the same as the handshake process based on the RSA algorithm. The third step is that the server will sign the specified parameters through the private key corresponding to the digital certificate. The signature information is sent to the client, so that the client can verify the signature information through the digital certificate. After the verification is successful, the client obtains the specified parameter, thereby establishing the session key between the client and the server through the specified parameter.

基于TLS1.3算法的握手过程中,首先客户端发送client hello,该client hello消息主要包括客户端支持的协议版本、会话标识、密码套件、压缩算法、扩展消息(密钥共享、预共享密钥、预共享密钥模式等)和待加密参数;然后服务端回复sever hello消息,包含:选定的加密套件、发送证书给客户端;使用证书对应的私钥对握手消息签名,将结果发送给客户端;选用客户端提供的参数生成临时公钥,结合选定的参数计算出对HTTP消息进行加密的共享密钥;服务端生成的临时公钥通过KeyShare消息发送给客户端。客户端接收到KeyShare消息后,使用证书公钥进行签名验证,获取服务器端的临时公钥,生成会话所需要的共享密钥;双方使用生成的共享密钥对消息加密传输,保证消息安全。In the handshake process based on the TLS1.3 algorithm, the client first sends a client hello message. The client hello message mainly includes the protocol version, session identifier, cipher suite, compression algorithm, and extended message (key sharing, pre-shared key) supported by the client. , pre-shared key mode, etc.) and parameters to be encrypted; then the server replies with a sever hello message, including: the selected encryption suite, sending the certificate to the client; sign the handshake message with the private key corresponding to the certificate, and send the result to The client; selects the parameters provided by the client to generate a temporary public key, and calculates the shared key for encrypting the HTTP message in combination with the selected parameters; the temporary public key generated by the server is sent to the client through the KeyShare message. After the client receives the KeyShare message, it uses the certificate public key for signature verification, obtains the temporary public key of the server, and generates the shared key required for the session; both parties use the generated shared key to encrypt and transmit the message to ensure message security.

一般来讲,对于安全要求更为严苛的客户,不希望将私钥暴露给CDN节点,如果对于安全要求更高或者部署条件更为苛刻的情况下,客户希望将证书和私钥都不暴露给CDN节点。Generally speaking, for customers with more stringent security requirements, they do not want to expose the private key to CDN nodes. If the security requirements are higher or the deployment conditions are more stringent, the customer wants to expose neither the certificate nor the private key. to CDN nodes.

基于上述问题,本申请实施例提供了一种建立安全连接的方法、系统、装置、电子设备和机器可读存储介质,该技术可以应用于HTTPS接入场景中,尤其是SSL/TSL握手场景。为便于对本实施例进行理解,首先对本申请实施例所公开的一种建立安全连接的方法进行详细介绍,该方法应用于网页服务器,该网页服务器相当于上述CDN节点,该网页服务器分别与客户端和管理服务器通信,该客户端可以是移动终端,例如,手机、平板电脑、智能手环等,也可以是计算机;管理服务器可以是一台单独的物理服务器,该管理服务器中预先保存有至少一个网站的安全证书(相当于上述数字证书),以及该安全证书对应的私钥。Based on the above problems, the embodiments of the present application provide a method, system, apparatus, electronic device, and machine-readable storage medium for establishing a secure connection. The technology can be applied to an HTTPS access scenario, especially an SSL/TSL handshake scenario. In order to facilitate the understanding of this embodiment, a method for establishing a secure connection disclosed in this embodiment of the present application is first introduced in detail. The method is applied to a web server, and the web server is equivalent to the above-mentioned CDN node, and the web server is connected to the client respectively. Communicate with the management server, the client can be a mobile terminal, for example, a mobile phone, a tablet computer, a smart bracelet, etc., or a computer; the management server can be a separate physical server, and at least one The security certificate of the website (equivalent to the above digital certificate), and the private key corresponding to the security certificate.

如图1所示,上述建立安全连接的方法包括如下步骤:As shown in Figure 1, the above method for establishing a secure connection includes the following steps:

步骤S102,如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书。Step S102, if an access request for the target website sent by the client is received, obtain the security certificate of the target website from the management server.

上述目标网站通常是客户想要访问的网站,该目标网站可以为客户提供相应的服务,具体提供什么服务可以根据研发人员对目标网站的研发需求设定。在实现时,当网页服务器接收到客户端发送的针对目标网站的访问请求后,会向管理服务器转发该目标网站的访问请求,或者基于该访问请求向管理服务器发送证书获取请求,以使管理服务器从保存的安全证书中查找目标网站的安全证书,并将查找到的目标网站的安全证书返回给网页服务器。The above target website is usually the website that the customer wants to visit, and the target website can provide the customer with corresponding services. The specific service provided can be set according to the research and development requirements of the research and development personnel for the target website. During implementation, when the web server receives the access request for the target website sent by the client, it will forward the access request of the target website to the management server, or send a certificate acquisition request to the management server based on the access request, so that the management server Find the security certificate of the target website from the saved security certificate, and return the found security certificate of the target website to the web server.

在实现时,用户通过客户端访问目标网站时,向网页服务器发起HTTPS GET请求(相当于上述访问请求)。HTTPS GET请求的过程中,根据SSL/TLS协议,首先要进行“握手”,在SSL/TLS握手过程中,目标网站的访问请求的具体格式可以为一个客户端问候(client hello)消息。During implementation, when the user accesses the target website through the client, an HTTPS GET request (equivalent to the above access request) is initiated to the web server. In the process of HTTPS GET request, according to the SSL/TLS protocol, a "handshake" is first performed. During the SSL/TLS handshake process, the specific format of the access request of the target website can be a client hello message.

步骤S104,将上述安全证书发送至客户端。Step S104, sending the above-mentioned security certificate to the client.

网页服务器接收到目标网站的安全证书后,会将该安全证书发送至客户端。在SSL/TLS握手过程中,网页服务器向客户端发送的安全证书的具体格式可以为一个服务端问候(sever hello)消息。After the web server receives the security certificate of the target website, it will send the security certificate to the client. During the SSL/TLS handshake process, the specific format of the security certificate sent by the web server to the client may be a server hello (sever hello) message.

步骤S106,在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过该管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,返回处理结果。Step S106, when the private key corresponding to the security certificate needs to be used for signature or decryption, a private key use request is sent to the management server, so that the management server uses the private key corresponding to the security certificate to sign or decrypt the private key use request, Return the processing result.

由于在网页服务器建立与客户端的安全连接时,需要使用安全证书对应的私钥进行签名或者解密,因而网页服务器需要向管理服务器发送私钥使用请求,该私钥使用请求中可以携带有需要签名的信息或者需要解密的信息,以使管理服务器使用安全证书对应的私钥对需要签名的信息进行签名处理,或者对需要解密的信息进行解密处理,并将处理结果返回给网页服务器。When the web server establishes a secure connection with the client, it needs to use the private key corresponding to the security certificate to sign or decrypt, so the web server needs to send a private key usage request to the management server, and the private key usage request can carry the private key that needs to be signed. information or information that needs to be decrypted, so that the management server uses the private key corresponding to the security certificate to sign the information that needs to be signed, or decrypt the information that needs to be decrypted, and return the processing result to the web server.

步骤S108,接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接。Step S108: Receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.

网页服务器接收到管理服务器返回的处理结果后,会基于该处理结果生成会话密钥,从而通过该会话密钥建立与客户端的安全连接。After receiving the processing result returned by the management server, the web server generates a session key based on the processing result, so as to establish a secure connection with the client through the session key.

本申请实施例提供的一种建立安全连接的方法,如果接收到客户端发送的针对目标网站的访问请求,从保存有目标网站的安全证书和安全证书对应的私钥的管理服务器中获取目标网站的安全证书;进而将获取的安全证书发送至客户端;在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理,返回处理结果;然后接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接。该方式中,网站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发安全证书和私钥,当客户端访问目标网站时,通过与管理服务器实时通信的方式使用安全证书和私钥,建立与客户端的连接,从而避免了私钥和证书的泄露,提高了用户数据的安全性。In a method for establishing a secure connection provided by an embodiment of the present application, if an access request for a target website sent by a client is received, the target website is obtained from a management server that stores a security certificate of the target website and a private key corresponding to the security certificate Then send the obtained security certificate to the client; when the private key corresponding to the security certificate needs to be used for signing or decryption, send a private key use request to the management server to use the private key corresponding to the security certificate through the management server Sign or decrypt the private key use request, and return the processing result; then receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result. In this method, the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance. The certificate and private key are used to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate and improving the security of user data.

本申请实施例还提供了另一种建立安全连接的方法,该方法在上述实施例方法的基础上实现;该方法重点描述如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书的具体过程(通过下述步骤S204-S208实现),在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过该管理 服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,返回处理结果的过程(通过下述步骤S212实现),以及接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接的过程(通过下述步骤S214实现);如图2所示,该方法包括如下步骤:The embodiment of the present application also provides another method for establishing a secure connection, which is implemented on the basis of the method in the above-mentioned embodiment; the method focuses on describing that if an access request for the target website sent by the client is received, the The specific process of obtaining the security certificate of the target website (implemented through the following steps S204-S208), when the private key corresponding to the security certificate needs to be used for signing or decryption, a private key use request is sent to the management server to use the management server. The private key corresponding to the security certificate signs or decrypts the private key use request, returns the processing result (implemented by the following step S212), and receives the processing result returned by the management server, and establishes a secure connection with the client based on the processing result. process (implemented through the following step S214); as shown in Figure 2, the method includes the following steps:

步骤S202,通过保存的第一证书和第一证书对应的私钥,与管理服务器保存的第二证书和第二证书对应的私钥进行认证,建立与管理服务器的安全连接。Step S202: Establish a secure connection with the management server by authenticating the stored first certificate and the private key corresponding to the first certificate with the second certificate stored by the management server and the private key corresponding to the second certificate.

上述第一证书和第一证书对应的私钥设置为证明网页服务器的身份,预先保存在网页服务器中;上述第二证书和第二证书对应的私钥设置为证明管理服务器的身份,预先保存在管理服务器中。在建立网页服务器和管理服务器的安全连接时,需要网页服务器将第一证书发送至管理服务器,管理服务器将第二证书发送至网页服务器进行互相认证,认证通过后,网页服务器可以通过第一证书对应的私钥加密会话信息,以使管理服务器通过第一证书中的公钥进行解密;管理服务器也可以通过第二证书对应的私钥加密会话信息,以使网页服务器通过第二证书中的公钥进行解密。The private key corresponding to the first certificate and the first certificate is set to certify the identity of the web server, and is stored in the web server in advance; in the management server. When establishing a secure connection between the web server and the management server, the web server needs to send the first certificate to the management server, and the management server sends the second certificate to the web server for mutual authentication. The private key of the second certificate encrypts the session information, so that the management server can decrypt the session information through the public key in the first certificate; the management server can also encrypt the session information through the private key corresponding to the second certificate, so that the web server can pass the public key in the second certificate. to decrypt.

步骤S204,如果接收到客户端发送的针对目标网站的访问请求,提取该访问请求携带的目标网站的域名。Step S204, if an access request for the target website sent by the client is received, extract the domain name of the target website carried in the access request.

在实现时,上述目标网站的访问请求中可以携带有目标网站的域名和SNI信息等信息。During implementation, the access request of the target website may carry information such as the domain name and SNI information of the target website.

步骤S206,将目标网站的域名发送至管理服务器。Step S206, sending the domain name of the target website to the management server.

步骤S208,接收管理服务器根据目标网站的域名返回的目标网站的安全证书。Step S208, receiving the security certificate of the target website returned by the management server according to the domain name of the target website.

当管理服务器接收到目标网站的域名时,可以在管理服务器保存的安全证书和安全证书对应的私钥中,查找该域名对应的安全证书,也即是目标网站的安全证书,并将查找到的安全证书发送至网页服务器。When the management server receives the domain name of the target website, it can search for the security certificate corresponding to the domain name, that is, the security certificate of the target website, in the security certificate and the private key corresponding to the security certificate saved by the management server, and find the security certificate of the target website. The security certificate is sent to the web server.

步骤S210,将上述安全证书发送至客户端,以通过客户端使用该安全证书加密该客户端的预主密钥。Step S210: Send the above-mentioned security certificate to the client, so that the client can use the security certificate to encrypt the pre-master key of the client.

当客户端接收到安全证书后,会验证该安全证书中的公钥是否有效,比如颁发机构、过期时间等等,如果发现异常,则会弹出一个警告框,提示安全证书存在问题;如果证书没有问题,则会随机生成一个预主密钥,并通过安全证书中的公钥加密该预主密钥,将加密后的预主密钥发送至网页服务器。该预主密钥通常是一个48位的数据块,它能随机合并客户端和网页服务器,并且用伪随机函数在网页服务器中随机创建一个会话密钥。When the client receives the security certificate, it will verify whether the public key in the security certificate is valid, such as the issuing authority, expiration time, etc. If an exception is found, a warning box will pop up, indicating that there is a problem with the security certificate; if the certificate is not If there is a problem, a pre-master key is randomly generated, the pre-master key is encrypted with the public key in the security certificate, and the encrypted pre-master key is sent to the web server. The pre-master key is usually a 48-bit data block that randomly combines the client and the web server, and uses a pseudo-random function to randomly create a session key in the web server.

在实现时,网页服务器在接收到管理服务器发送的目标网站的安全证书时,将该安全证书发送至客户端,并且,也可以将接收到的目标网站的安全证书缓存指定时间,以便有其他客户端在该指定时间内发送目标网站的访问请求时,直接返回给客户端。In the implementation, when the web server receives the security certificate of the target website sent by the management server, the security certificate is sent to the client, and the received security certificate of the target website can also be cached for a specified time, so that other clients have access to the security certificate. When the client sends the access request of the target website within the specified time, it will directly return it to the client.

步骤S212,接收客户端发送的加密后的预主密钥,将加密后的预主密钥发送至管理服 务器,以通过该管理服务器使用安全证书对应的私钥对加密后的预主密钥进行解密。Step S212: Receive the encrypted pre-master key sent by the client, and send the encrypted pre-master key to the management server, so that the encrypted pre-master key is processed by the management server using the private key corresponding to the security certificate. decrypt.

当网页服务器接收客户端发送的加密后的预主密钥后,将该加密后的预主密钥发送至管理服务器,该管理服务器将使用目标网站的安全证书对应的私钥对加密后的预主密钥进行解密,得到解密后的预主密钥。When the web server receives the encrypted pre-master key sent by the client, it sends the encrypted pre-master key to the management server, and the management server will use the private key corresponding to the security certificate of the target website to pair the encrypted pre-master key The master key is decrypted to obtain a decrypted pre-master key.

步骤S214,接收管理服务器返回的解密后的预主密钥,基于该预主密钥与客户端建立安全连接。Step S214: Receive the decrypted pre-master key returned by the management server, and establish a secure connection with the client based on the pre-master key.

网页服务器接收到管理服务器返回的解密后的预主密钥后,会保存该预主密钥,此时,客户端和网页服务器中拥有了相同的预主密钥,他们可以共同获得一个会话密钥,然后客户端通过该会话密钥加密一条消息发送给网页服务器,以验证服务端是否可以正常接收客户端发送的加密消息;网页服务器也会通过该会话密钥加密一条消息回传给客户端,如果客户端能够正常接收的话,表明SSL/TLS握手完成,也即是建立了网页服务器与客户端的安全连接。After the web server receives the decrypted pre-master key returned by the management server, it will save the pre-master key. At this time, the client and the web server have the same pre-master key, and they can jointly obtain a session key. Then the client encrypts a message with the session key and sends it to the web server to verify whether the server can normally receive the encrypted message sent by the client; the web server also encrypts a message with the session key and sends it back to the client , if the client can receive it normally, it indicates that the SSL/TLS handshake is completed, that is, a secure connection between the web server and the client is established.

在实现时,上述步骤S204-S214是在整个SSL/TLS握手阶段插入的逻辑,SSL/TLS握手阶段本质上是为了计算对称密钥,安全证书是为了向客户端确认目标网站的合法性,安全证书对应的私钥是为了最终计算对称密钥。在握手阶段,客户端向网页服务器发起HTTPS请求(相当于上述目标网站的访问请求),网页服务器作为服务端在整个握手过程中的目的是和客户端约定对称密钥;在计算对称密钥的过程中,需要以私钥签名或私钥解密的方式用相关信息去计算一些关键信息,来生成最终的对称密钥,其过程为:客户端在接收到安全证书后,使用该安全证书中的公钥加密该随机生成的预主密钥,然后将该加密后的预主密钥发送至网页服务器,网页服务器会将加密后的预主密钥和相关密钥唯一标识通过私有协议编码后传给管理服务器,管理服务器计算完成(也即是使用安全证书对应的私钥对加密后的预主密钥进行解密,得到解密后的预主密钥)后回传给网页服务器。网页服务器接收到解密后的预主密钥,基于该预主密钥与客户端建立安全连接。上述私有协议通常是一套企业内部自定的协议标准,只适用于本企业生产的设备产品。When implemented, the above steps S204-S214 are logic inserted in the entire SSL/TLS handshake phase. The SSL/TLS handshake phase is essentially to calculate the symmetric key, and the security certificate is to confirm the legitimacy of the target website to the client. The private key corresponding to the certificate is used for the final calculation of the symmetric key. In the handshake phase, the client initiates an HTTPS request to the web server (equivalent to the access request of the target website mentioned above), and the web server, as the server, aims to agree on a symmetric key with the client during the whole handshake process; In the process, it is necessary to use the relevant information to calculate some key information in the form of private key signature or private key decryption to generate the final symmetric key. The process is: after the client receives the security certificate, it uses the The public key encrypts the randomly generated pre-master key, and then sends the encrypted pre-master key to the web server. For the management server, the management server completes the calculation (that is, uses the private key corresponding to the security certificate to decrypt the encrypted pre-master key to obtain the decrypted pre-master key), and then returns it to the web server. The web server receives the decrypted pre-master key, and establishes a secure connection with the client based on the pre-master key. The above-mentioned private agreement is usually a set of self-defined agreement standards within the enterprise, which is only applicable to the equipment products produced by the enterprise.

在整个握手过程中,将安全证书和私钥通过管理服务器保存,而不是下发并保存在网页服务器中,一方面将安全证书和私钥的管理权限交给了管理服务器,便于管理,从而也可以让客户完全掌握安全证书和私钥的管理;另一方面也杜绝了网页服务器泄露安全证书进和私钥的可能性。During the whole handshake process, the security certificate and private key are stored through the management server instead of being issued and stored in the web server. It allows customers to fully control the management of security certificates and private keys; on the other hand, it also eliminates the possibility of web servers leaking security certificates and private keys.

上述建立安全连接的方法,该方式由管理服务器对网站的安全证书和私钥进行保存并管理,无需向网页服务器提供安全证书和私钥,在使用安全证书和私钥时,由网页服务器从管理服务器中获取,从而避免了安全证书和私钥的泄露,且客户可以完全掌控安全证书和私钥的管理;同时,对于网页服务器的部署也更为简短,安全性也更高。该方式中,网 站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发给网页服务器,当客户端访问目标网站时,网页服务器通过与管理服务器实时通信的方式使用安全证书和私钥,以建立与客户端的安全连接,从而可以避免私钥和证书的泄露,提高用户数据的安全性。The above method of establishing a secure connection, the management server saves and manages the security certificate and private key of the website without providing the security certificate and private key to the web server. When the security certificate and private key are used, the web server manages from Obtained from the server, thus avoiding the disclosure of security certificates and private keys, and customers can fully control the management of security certificates and private keys; at the same time, the deployment of web servers is also shorter and more secure. In this method, both the website's security certificate and the private key of the security certificate are stored in the management server, and do not need to be issued to the web server in advance. When the client accesses the target website, the web server communicates with the management server in real time to use the security certificate and private key to establish a secure connection with the client, thus avoiding the disclosure of private key and certificate and improving the security of user data.

本申请实施例还提供了另一种建立安全连接的方法,该方法在上述实施例方法的基础上实现;该方法重点描述在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过该管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,返回处理结果的过程(通过下述步骤S306实现),以及接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接的过程(通过下述步骤S308实现);如图3所示,该方法包括如下步骤:The embodiment of the present application also provides another method for establishing a secure connection, which is implemented on the basis of the method in the above-mentioned embodiment; The process of sending a private key use request to use the private key corresponding to the security certificate to sign or decrypt the private key use request through the management server, returning the processing result (implemented by the following step S306), and receiving the processing returned by the management server As a result, the process of establishing a secure connection with the client based on the processing result (implemented by the following step S308); as shown in FIG. 3 , the method includes the following steps:

步骤S302,如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书。Step S302, if an access request for the target website sent by the client is received, obtain the security certificate of the target website from the management server.

步骤S304,将上述安全证书发送至客户端。Step S304, sending the above-mentioned security certificate to the client.

步骤S306,向管理服务器发送携带有指定参数的私钥使用请求,以通过管理服务器使用安全证书对应的私钥对指定参数进行签名,返回签名信息。Step S306, sending a private key use request carrying the specified parameters to the management server, so that the management server uses the private key corresponding to the security certificate to sign the specified parameters, and returns the signature information.

当网页服务器向客户端发送安全证书后,会向管理服务器发送携带有指定参数的私钥使用请求;该管理服务器接收到该私钥使用请求后,会使用安全证书对应的私钥对指定参数进行签名,得到签名信息,并将该签名信息返回给网页服务器。该指定参数可以是赫尔曼参数。After the web server sends the security certificate to the client, it will send a private key usage request with the specified parameters to the management server; after receiving the private key usage request, the management server will use the private key corresponding to the security certificate to perform the specified parameters. Sign, get the signature information, and return the signature information to the web server. The specified parameter may be a Herman parameter.

步骤S308,接收管理服务器返回的签名信息,并将该签名信息发送至客户端,以使该客户端通过安全证书验签签名信息,得到指定参数;基于该指定参数与客户端建立安全连接。Step S308: Receive the signature information returned by the management server, and send the signature information to the client, so that the client can verify the signature information through the security certificate to obtain specified parameters; establish a secure connection with the client based on the specified parameters.

网页服务器将接收到的管理服务器返回的签名信息发送至客户端,客户端将使用接收的安全证书验签签名信息,验签成功后,得到指定参数,从而网页服务器和客户端都保存有指定参数,以使网页服务器和客户端均可根据指定参数建立会话密钥,也即是建立了网页服务器与客户端的安全连接。The web server sends the received signature information returned by the management server to the client, and the client will use the received security certificate to verify the signature information. After the verification is successful, the specified parameters are obtained, so that both the web server and the client store the specified parameters. , so that both the web server and the client can establish a session key according to the specified parameters, that is, a secure connection between the web server and the client is established.

上述建立安全连接的方法,网站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发给网页服务器,当客户端访问目标网站时,网页服务器通过与管理服务器实时通信的方式使用安全证书和私钥,以建立与客户端的安全连接,从而可以避免私钥和证书的泄露,提高用户数据的安全性。In the above method of establishing a secure connection, the security certificate of the website and the private key of the security certificate are both stored in the management server, and do not need to be pre-delivered to the web server. When the client accesses the target website, the web server communicates with the management server in real time. In this way, the security certificate and private key are used to establish a secure connection with the client, thereby avoiding the leakage of the private key and the certificate and improving the security of user data.

本申请实施例还提供了另一种建立安全连接的方法,该方法在上述实施例方法的基础上实现;该方法重点描述在需要使用安全证书对应的私钥进行签名或者解密时,向管理服 务器发送私钥使用请求,以通过该管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,返回处理结果的过程(通过下述步骤S404实现),以及接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接的过程(通过下述步骤S406实现);如图4所示,该方法包括如下步骤:The embodiment of the present application also provides another method for establishing a secure connection, which is implemented on the basis of the method in the above-mentioned embodiment; The process of sending a private key use request to use the private key corresponding to the security certificate to sign or decrypt the private key use request through the management server, returning the processing result (implemented by the following step S404), and receiving the processing returned by the management server As a result, the process of establishing a secure connection with the client based on the processing result (implemented through the following step S406); as shown in FIG. 4 , the method includes the following steps:

步骤S402,如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书,该访问请求中携带有目标参数。Step S402, if an access request for the target website sent by the client is received, the security certificate of the target website is obtained from the management server, and the access request carries the target parameter.

上述目标参数是客户端提供的设置为生成客户端与网页服务器的会话密钥的参数。The above target parameter is a parameter provided by the client and set to generate a session key between the client and the web server.

步骤S404,将上述安全证书发送至客户端,并向管理服务器发送携带有目标参数的私钥使用请求,以通过管理服务器使用安全证书对应的私钥对私钥使用请求进行签名,基于目标参数生成临时公钥,并结合该临时公钥和目标参数计算出共享密钥,返回签名信息、临时公钥和共享密钥。Step S404, sending the above-mentioned security certificate to the client, and sending the private key use request carrying the target parameters to the management server, so that the management server uses the private key corresponding to the security certificate to sign the private key use request, and generates the request based on the target parameters. The temporary public key is calculated, and the shared key is calculated by combining the temporary public key and the target parameters, and the signature information, the temporary public key and the shared key are returned.

步骤S406,接收管理服务器返回的签名信息、临时公钥和共享密钥,将签名信息和临时公钥发送至客户端,以使客户端通过安全证书验签签名信息,验签成功后,基于临时公钥和目标参数生成共享密钥;基于该共享密钥与客户端建立安全连接。Step S406: Receive the signature information, the temporary public key and the shared key returned by the management server, and send the signature information and the temporary public key to the client, so that the client can verify the signature information through the security certificate. The public key and target parameters generate a shared secret; based on the shared secret, a secure connection is established with the client.

当客户端生成共享密钥后,客户端和网页服务器中均保存有共享密钥,客户端和网页服务器可以根据该共享密钥进行会话。After the client generates the shared key, both the client and the web server store the shared key, and the client and the web server can conduct a conversation according to the shared key.

上述建立安全连接的方法,网站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发安全证书和私钥,当客户端访问目标网站时,通过与管理服务器实时通信的方式使用安全证书和私钥,建立与客户端的连接,从而避免了私钥和证书的泄露,提高了用户数据的安全性。In the above-mentioned method of establishing a secure connection, the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance. The method uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate, and improving the security of user data.

针对于上述实施例,本申请实施例还提供了另一种建立安全连接的方法,该方法应用于管理服务器,如图5所示,该方法包括如下步骤:For the above-mentioned embodiment, the embodiment of the present application also provides another method for establishing a secure connection. The method is applied to the management server. As shown in FIG. 5 , the method includes the following steps:

步骤S502,如果接收到网页服务器发送的针对目标网站的访问请求,将保存的目标网站的安全证书发送至网页服务器。Step S502, if an access request for the target website sent by the web server is received, the saved security certificate of the target website is sent to the web server.

上述访问请求是客户端发送至网页服务器后,该网页服务器转发给管理服务器的。The above access request is forwarded by the web server to the management server after the client sends the request to the web server.

步骤S504,接收网页服务器发送的私钥使用请求,使用保存的安全证书对应的私钥,对私钥使用请求进行签名或者解密处理,得到处理结果。Step S504: Receive the private key use request sent by the web server, and use the private key corresponding to the stored security certificate to sign or decrypt the private key use request to obtain a processing result.

步骤S506,将上述处理结果发送至网页服务器,以使该网页服务器基于处理结果与客户端建立安全连接。Step S506, sending the above processing result to the web server, so that the web server establishes a secure connection with the client based on the processing result.

在实现时,上述目标网站的访问请求中携带有目标网站的域名;上述步骤S502,可以通过下述步骤10-11实现:When implemented, the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned step S502 can be realized by the following steps 10-11:

步骤10,根据接收到的访问请求中携带的目标网站的域名,在保存的安全证书和安全 证书对应的私钥中,查找目标网站的安全证书。Step 10, according to the domain name of the target website carried in the received access request, in the stored security certificate and the private key corresponding to the security certificate, search for the security certificate of the target website.

步骤11,将查找到的安全证书发送至网页服务器。Step 11, sending the found security certificate to the web server.

上述建立安全连接的方法,如果接收到网页服务器发送的针对目标网站的访问请求,将保存的目标网站的安全证书发送至网页服务器;进而该网页服务器将接收到的安全证书发送至客户端;然后接收网页服务器发送的私钥使用请求,使用保存的安全证书对应的私钥,对私钥使用请求进行签名或者解密处理,得到处理结果,并将该处理结果发送至网页服务器,以使该网页服务器基于处理结果与客户端建立安全连接。该方式中,网站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发安全证书和私钥值网页服务器,当客户端访问目标网站时,网页服务器通过与管理服务器实时通信的方式使用安全证书和私钥,建立与客户端的连接,从而避免了私钥和证书的泄露,提高了用户数据的安全性。The above-mentioned method for establishing a secure connection, if the access request for the target website sent by the web server is received, the security certificate of the saved target website is sent to the web server; and then the web server sends the received security certificate to the client; then Receive the private key use request sent by the web server, use the private key corresponding to the saved security certificate, sign or decrypt the private key use request, obtain the processing result, and send the processing result to the web server, so that the web server Establish a secure connection with the client based on the processing result. In this method, the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to pre-issue the security certificate and private key value to the web server. When the client accesses the target website, the web server communicates with the management server in real time. The communication method uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate, and improving the security of user data.

对应于上述方法实施例,本申请实施例还提供了一种建立安全连接的系统,如图6所示,该系统包括:通信连接的管理服务器60和网页服务器61,该网页服务器61还与客户端通信连接;该管理服务器60设置为保存网站的安全证书和安全证书对应的私钥。Corresponding to the above method embodiments, the embodiments of the present application also provide a system for establishing a secure connection. As shown in FIG. 6 , the system includes: a management server 60 and a web server 61 that are connected in communication, and the web server 61 also communicates with the client terminal communication connection; the management server 60 is set to save the security certificate of the website and the private key corresponding to the security certificate.

上述网页服务器61设置为在接收到客户端发送的针对目标网站的访问请求时,从管理服务器60中获取目标网站的安全证书,并将获取的安全证书发送至客户端。The above-mentioned web server 61 is configured to obtain the security certificate of the target website from the management server 60 when receiving an access request for the target website sent by the client, and send the obtained security certificate to the client.

网页服务器61还设置为在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器60发送私钥使用请求。The web server 61 is further configured to send a private key use request to the management server 60 when the private key corresponding to the security certificate needs to be used for signature or decryption.

管理服务器60设置为接收私钥使用请求,使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,并将处理结果发送至网页服务器61。The management server 60 is configured to receive the private key use request, use the private key corresponding to the security certificate to sign or decrypt the private key use request, and send the processing result to the web server 61 .

网页服务器61还设置为基于接收的处理结果与客户端建立安全连接。网页服务器61接收到管理服务器60返回的处理结果后,会基于该处理结果生成会话密钥,从而通过该会话密钥建立与客户端的安全连接。The web server 61 is also configured to establish a secure connection with the client based on the received processing result. After receiving the processing result returned by the management server 60, the web server 61 generates a session key based on the processing result, so as to establish a secure connection with the client through the session key.

本申请实施例所提供的建立安全连接的系统,其实现原理及产生的技术效果和前述方法实施例相同,为简要描述,系统实施例部分未提及之处,可参考前述方法实施例中相应内容。The implementation principle and technical effects of the system for establishing a secure connection provided by the embodiments of the present application are the same as those of the foregoing method embodiments. content.

对应于上述图1-图4所述的方法实施例,本申请实施例提供了一种建立安全连接的装置,该装置设置于网页服务器,如图7所示,该装置包括:Corresponding to the method embodiments described in FIG. 1 to FIG. 4 , the embodiment of the present application provides an apparatus for establishing a secure connection. The apparatus is set on a web server. As shown in FIG. 7 , the apparatus includes:

证书获取模块70,设置为如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取目标网站的安全证书;其中,该管理服务器中保存有目标网站的安全证书和安全证书对应的私钥。The certificate obtaining module 70 is configured to obtain the security certificate of the target website from the management server if an access request for the target website sent by the client is received; wherein, the management server saves the security certificate of the target website and the corresponding security certificate. private key.

证书发送模块71,设置为将所述安全证书发送至客户端。The certificate sending module 71 is configured to send the security certificate to the client.

私钥使用模块72,设置为在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过该管理服务器使用安全证书对应的私钥对私钥使用请求进行签名或者解密处理,返回处理结果。The private key use module 72 is configured to send a private key use request to the management server when the private key corresponding to the security certificate needs to be used for signing or decryption, so that the private key use request can be processed by the management server using the private key corresponding to the security certificate. Signature or decryption processing, and the processing result is returned.

连接建立模块73,设置为接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接。The connection establishment module 73 is configured to receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result.

上述建立安全连接的装置,如果接收到客户端发送的针对目标网站的访问请求,从保存有目标网站的安全证书和安全证书对应的私钥的管理服务器中获取目标网站的安全证书;进而将获取的安全证书发送至客户端;在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理,返回处理结果;然后接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接。该方式中,网站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发安全证书和私钥,当客户端访问目标网站时,通过与管理服务器实时通信的方式使用安全证书和私钥,建立与客户端的连接,从而避免了私钥和证书的泄露,提高了用户数据的安全性。The above-mentioned device for establishing a secure connection, if receiving an access request for the target website sent by the client, obtain the security certificate of the target website from the management server that preserves the security certificate of the target website and the private key corresponding to the security certificate; and then obtain The security certificate of the security certificate is sent to the client; when the private key corresponding to the security certificate needs to be used for signature or decryption, a private key use request is sent to the management server, so that the private key is used by the management server using the private key corresponding to the security certificate. Perform signature or decryption processing, and return the processing result; then receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result. In this method, both the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance. When the client accesses the target website, it communicates with the management server in real time. certificate and private key, establish a connection with the client, thus avoiding the leakage of the private key and certificate, and improving the security of user data.

在一实施方式中,上述目标网站的访问请求中携带有目标网站的域名;上述证书获取模块70设置为:如果接收到客户端发送的针对目标网站的访问请求,提取该访问请求携带的目标网站的域名;将该目标网站的域名发送至管理服务器;接收管理服务器根据目标网站的域名返回的目标网站的安全证书。In one embodiment, the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned certificate obtaining module 70 is set to: if an access request for the target website sent by the client is received, extract the target website carried by the access request. the domain name of the target website; send the domain name of the target website to the management server; receive the security certificate of the target website returned by the management server according to the domain name of the target website.

在一实施方式中,上述装置还包括密钥接收模块74,设置为:接收客户端使用安全证书对客户端的预主密钥加密后得到的加密后的所述预主密钥。上述私钥使用模块72,设置为:将加密后的预主密钥发送至管理服务器,以通过该管理服务器使用安全证书对应的私钥对加密后的预主密钥进行解密;上述连接建立模块73,设置为:接收管理服务器返回的解密后的预主密钥,基于该预主密钥与客户端建立安全连接。In one embodiment, the above-mentioned apparatus further includes a key receiving module 74, which is configured to receive the encrypted pre-master key obtained by encrypting the client's pre-master key using the security certificate by the client. The above-mentioned private key using module 72 is set to: send the encrypted pre-master key to the management server, so as to decrypt the encrypted pre-master key by using the private key corresponding to the security certificate through the management server; the above-mentioned connection establishment module 73. Set to: receive the decrypted pre-master key returned by the management server, and establish a secure connection with the client based on the pre-master key.

在一实施方式中,上述私钥使用请求中携带有指定参数;上述私钥使用模块72设置为:向管理服务器发送携带有指定参数的私钥使用请求,以通过该管理服务器使用安全证书对应的私钥对指定参数进行签名,返回签名信息;上述连接建立模块73设置为:接收管理服务器返回的签名信息,并将该签名信息发送至客户端,以使该客户端通过安全证书验签签名信息,得到指定参数,基于该指定参数与客户端建立安全连接。In one embodiment, the above-mentioned private key use request carries specified parameters; the above-mentioned private key use module 72 is set to: send a private key use request carrying the specified parameters to the management server, so as to use the corresponding security certificate through the management server. The private key signs the specified parameters, and returns the signature information; the above-mentioned connection establishment module 73 is set to: receive the signature information returned by the management server, and send the signature information to the client, so that the client can verify the signature information through the security certificate. , get the specified parameters, and establish a secure connection with the client based on the specified parameters.

在一实施方式中,上述私钥使用请求中携带有访问请求中包含的目标参数;上述私钥使用模块72设置为:向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对私钥使用请求进行签名,基于目标参数生成临时公钥,并结合临时公钥和目标参数计算出共享密钥,返回签名信息、临时公钥和共享密钥;上述连接建立模块73设置为: 接收管理服务器返回的签名信息、临时公钥和共享密钥,将签名信息和临时公钥发送至客户端,以使客户端通过安全证书验签签名信息,验签成功后,基于临时公钥和目标参数生成共享密钥;基于共享密钥与客户端建立安全连接。In one embodiment, the above-mentioned private key use request carries the target parameter contained in the access request; the above-mentioned private key use module 72 is set to: send a private key use request to the management server, so as to use the private key corresponding to the security certificate by the management server. The key-pair private key use request is signed, a temporary public key is generated based on the target parameters, and the shared key is calculated in combination with the temporary public key and the target parameters, and the signature information, the temporary public key and the shared key are returned; the above-mentioned connection establishment module 73 is set to : Receive the signature information, temporary public key and shared key returned by the management server, and send the signature information and temporary public key to the client, so that the client can verify the signature information through the security certificate. Generate a shared secret with target parameters; establish a secure connection with the client based on the shared secret.

在一实施方式中,上述装置还包括认证模块75,设置为:在从管理服务器中获取目标网站的安全证书之前,通过保存的第一证书和第一证书对应的私钥,与管理服务器保存的第二证书和第二证书对应的私钥进行认证,建立与管理服务器的安全连接。In one embodiment, the above-mentioned device further includes an authentication module 75, which is configured to: before obtaining the security certificate of the target website from the management server, through the stored first certificate and the private key corresponding to the first certificate, with the stored first certificate and the corresponding private key of the management server. The second certificate and the private key corresponding to the second certificate are authenticated, and a secure connection with the management server is established.

本申请实施例所提供的建立安全连接的装置,其实现原理及产生的技术效果和前述方法实施例相同,为简要描述,装置实施例部分未提及之处,可参考前述方法实施例中相应内容。The implementation principle and the technical effect of the device for establishing a secure connection provided by the embodiment of the present application are the same as those in the foregoing method embodiments. content.

对应于上述图5所述的方法实施例,本申请实施例提供了另一种建立安全连接的装置,该装置设置于管理服务器,如图8所示,该装置包括:Corresponding to the method embodiment described above in FIG. 5 , the embodiment of the present application provides another apparatus for establishing a secure connection. The apparatus is set on a management server. As shown in FIG. 8 , the apparatus includes:

证书确定模块80,设置为如果接收到网页服务器发送的针对目标网站的访问请求,将保存的目标网站的安全证书发送至网页服务器;其中,该访问请求为客户端发送至网页服务器的。The certificate determining module 80 is configured to send the saved security certificate of the target website to the web server if an access request for the target website sent by the web server is received; wherein, the access request is sent by the client to the web server.

私钥处理模块81,设置为接收网页服务器发送的私钥使用请求,使用保存的安全证书对应的私钥,对私钥使用请求进行签名或者解密处理,得到处理结果。The private key processing module 81 is configured to receive the private key usage request sent by the web server, and use the private key corresponding to the stored security certificate to sign or decrypt the private key usage request to obtain a processing result.

结果返回模块82,设置为将处理结果发送至网页服务器,以网页服务器基于处理结果与客户端建立安全连接。The result returning module 82 is configured to send the processing result to the web server, so that the web server establishes a secure connection with the client based on the processing result.

上述建立安全连接的装置,该方式由管理服务器对网站的安全证书和私钥进行保存和管理,无需向网页服务器提供安全证书和私钥,在使用安全证书和私钥时,由网页服务器从管理服务器中获取,从而避免了安全证书和私钥的泄露,且客户可以完全掌控安全证书和私钥的管理;并且,对于网页服务器的部署也更为简短,安全性也更高。该方式中,网站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发安全证书和私钥值网页服务器,当客户端访问目标网站时,网页服务器通过与管理服务器实时通信的方式使用安全证书和私钥,建立与客户端的连接,从而避免了私钥和证书的泄露,提高了用户数据的安全性。The above-mentioned device for establishing a secure connection, in this way, the management server saves and manages the security certificate and private key of the website, and does not need to provide the security certificate and private key to the web server. When using the security certificate and private key, the web server manages from Obtained from the server, thus avoiding the disclosure of security certificates and private keys, and customers can fully control the management of security certificates and private keys; and the deployment of web servers is also shorter and more secure. In this method, the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key value to the web server in advance. When the client accesses the target website, the web server communicates with the management server in real time through The communication method uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate, and improving the security of user data.

在一实施方式中,上述目标网站的访问请求中携带有目标网站的域名;上述证书确定模块80设置为:根据接收到的访问请求中携带的目标网站的域名,在保存的安全证书和安全证书对应的私钥中,查找目标网站的安全证书;将查找到的安全证书发送至网页服务器。In one embodiment, the access request of the above-mentioned target website carries the domain name of the target website; the above-mentioned certificate determination module 80 is set to: according to the domain name of the target website carried in the received access request, in the saved security certificate and security certificate Find the security certificate of the target website in the corresponding private key; send the found security certificate to the web server.

本申请实施例所提供的建立安全连接的装置,其实现原理及产生的技术效果和前述的建立安全连接的方法实施例相同,为简要描述,装置实施例部分未提及之处,可参考前述方法实施例中相应内容。The device for establishing a secure connection provided by the embodiment of the present application has the same implementation principle and technical effects as the foregoing method for establishing a secure connection. Corresponding content in the method embodiment.

本申请实施例还提供了一种电子设备,参见图9所示,该电子设备包括处理器101和存储器100,该存储器100存储有能够被处理器101执行的机器可执行指令,该处理器101执行机器可执行指令以实现上述建立安全连接的方法。The embodiment of the present application further provides an electronic device, as shown in FIG. 9 , the electronic device includes a processor 101 and a memory 100, where the memory 100 stores machine-executable instructions that can be executed by the processor 101, and the processor 101 Machine-executable instructions are executed to implement the above-described method of establishing a secure connection.

在一实施方式中,图9所示的电子设备还包括总线102和通信接口103,处理器101、通信接口103和存储器100通过总线102连接。In one embodiment, the electronic device shown in FIG. 9 further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected through the bus 102 .

其中,存储器100可能包含高速随机存取存储器(RAM,Random Access Memory),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。通过至少一个通信接口103(可以是有线或者无线)实现该系统网元与至少一个其他网元之间的通信连接,可以使用互联网、广域网、本地网、城域网等。总线102可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。The memory 100 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), which may use the Internet, a wide area network, a local network, a metropolitan area network, and the like. The bus 102 may be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one bidirectional arrow is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.

处理器101可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器101中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器101可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processor,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器100,处理器101读取存储器100中的信息,结合其硬件完成前述实施例的方法的步骤。The processor 101 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method may be completed by an integrated logic circuit of hardware in the processor 101 or an instruction in the form of software. The above-mentioned processor 101 may be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; may also be a digital signal processor (Digital Signal Processor, referred to as DSP) ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100, and completes the steps of the methods in the foregoing embodiments in combination with its hardware.

本申请实施例还提供一种机器可读存储介质,该机器可读存储介质存储有机器可执行指令,该机器可执行指令在被处理器调用和执行时,该机器可执行指令促使处理器实现上述建立安全连接的方法,其实现可参见方法实施例,在此不再赘述。Embodiments of the present application further provide a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement For the above-mentioned method for establishing a secure connection, reference may be made to the method embodiment for implementation, and details are not described herein again.

本申请实施例所提供的建立安全连接的方法、系统、装置和电子设备的计算机程序产品,包括存储了程序代码的机器可读存储介质,所述程序代码包括的指令可设置为执行前面方法实施例中所述的方法,具体实现可参见方法实施例,在此不再赘述。所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个机器可读取存储介质中。The method, system, device, and computer program product of an electronic device for establishing a secure connection provided by the embodiments of the present application include a machine-readable storage medium storing program codes, and the instructions included in the program codes can be configured to execute the implementation of the foregoing method. For the specific implementation of the method described in the example, reference may be made to the method embodiment, which will not be repeated here. The functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a machine-readable storage medium.

本申请提供的一种建立安全连接的方法、系统、装置、电子设备和机器可读存储介质,如果接收到客户端发送的针对目标网站的访问请求,从保存有目标网站的安全证书和安全证书对应的私钥的管理服务器中获取目标网站的安全证书;进而将获取的安全证书发送至客户端;在需要使用安全证书对应的私钥进行签名或者解密时,向管理服务器发送私钥使用请求,以通过管理服务器使用安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理,返回处理结果;然后接收管理服务器返回的处理结果,基于该处理结果与客户端建立安全连接。该方式中,网站的安全证书和该安全证书的私钥均保存在管理服务器中,无需预先下发安全证书和私钥,当客户端访问目标网站时,通过与管理服务器实时通信的方式使用安全证书和私钥,建立与客户端的连接,从而避免了私钥和证书的泄露,提高了用户数据的安全性。A method, system, device, electronic device and machine-readable storage medium for establishing a secure connection provided by this application, if an access request for a target website sent by a client is received, the security certificate and security certificate of the target website are saved from the Obtain the security certificate of the target website from the management server of the corresponding private key; then send the obtained security certificate to the client; when the private key corresponding to the security certificate needs to be used to sign or decrypt, send a private key use request to the management server, The management server uses the private key corresponding to the security certificate to sign or decrypt the private key use request, and returns the processing result; and then receives the processing result returned by the management server, and establishes a secure connection with the client based on the processing result. In this method, the security certificate of the website and the private key of the security certificate are stored in the management server, and there is no need to issue the security certificate and private key in advance. certificate and private key, establish a connection with the client, thus avoiding the leakage of the private key and certificate, and improving the security of user data.

基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、电子设备、或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

最后应说明的是:以上所述实施例,仅为本申请的具体实施方式,用以说明本申请的技术方案,而非对其限制,本申请的保护范围并不局限于此,尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本申请实施例技术方案的精神和范围,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that the above-mentioned embodiments are only specific implementations of the present application, and are used to illustrate the technical solutions of the present application, rather than limit them. The embodiments describe the application in detail, and those of ordinary skill in the art should understand that: any person skilled in the art can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed in the application. Or can easily think of changes, or equivalently replace some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be covered in this application. within the scope of protection. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

工业实用性Industrial Applicability

本申请能够应用于数据安全技术领域,提供一种建立安全连接的方法、系统、装置、电子设备和机器可读存储介质,网站的安全证书和该安全证书的私钥仅保存在管理服务器,无需预先下发安全证书和私钥,当客户端访问目标网站时,通过管理服务器使用安全证书和私钥与客户端建立连接,从而避免了私钥和证书的泄露,提高了数据的安全性。This application can be applied to the technical field of data security, and provides a method, system, device, electronic device and machine-readable storage medium for establishing a secure connection. The security certificate of the website and the private key of the security certificate are only stored in the management server, without the need for The security certificate and private key are issued in advance. When the client accesses the target website, the management server uses the security certificate and private key to establish a connection with the client, thereby avoiding the leakage of the private key and the certificate and improving the data security.

Claims (13)

一种建立安全连接的方法,包括:A method of establishing a secure connection comprising: 如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取所述目标网站的安全证书;其中,所述管理服务器中保存有所述目标网站的安全证书和所述安全证书对应的私钥;If receiving the access request for the target website sent by the client, obtain the security certificate of the target website from the management server; wherein, the management server saves the security certificate of the target website and the corresponding security certificate private key; 将所述安全证书发送至所述客户端;sending the security certificate to the client; 在需要使用所述安全证书对应的私钥进行签名或者解密时,向所述管理服务器发送私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理,返回处理结果;以及When the private key corresponding to the security certificate needs to be used for signature or decryption, a private key use request is sent to the management server, so that the management server uses the private key corresponding to the security certificate to use the private key Perform signature or decryption processing and return the processing result; and 接收所述管理服务器返回的处理结果,基于所述处理结果与所述客户端建立安全连接。Receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result. 根据权利要求1所述的方法,其中,所述目标网站的访问请求中携带有所述目标网站的域名;The method according to claim 1, wherein the access request of the target website carries the domain name of the target website; 所述如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取所述目标网站的安全证书的步骤,包括:The step of obtaining the security certificate of the target website from the management server if an access request for the target website sent by the client is received, including: 如果接收到所述客户端发送的针对目标网站的访问请求,提取所述访问请求携带的目标网站的域名;If an access request for the target website sent by the client is received, extract the domain name of the target website carried in the access request; 将所述目标网站的域名发送至所述管理服务器;以及sending the domain name of the target website to the management server; and 接收所述管理服务器根据所述目标网站的域名返回的所述目标网站的安全证书。The security certificate of the target website returned by the management server according to the domain name of the target website is received. 根据权利要求1所述的方法,其中,所述将所述安全证书发送至所述客户端的步骤之后,所述方法还包括:The method of claim 1, wherein after the step of sending the security certificate to the client, the method further comprises: 接收所述客户端使用所述安全证书对所述客户端的预主密钥加密后得到的加密后的预主密钥;receiving the encrypted pre-master key obtained by the client using the security certificate to encrypt the pre-master key of the client; 所述在需要使用所述安全证书对应的私钥进行签名或者解密时,向所述管理服务器发送私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理的步骤,包括:When the private key corresponding to the security certificate needs to be used for signing or decryption, sending a private key use request to the management server, so that the management server uses the private key corresponding to the security certificate to pair the private key with the private key. The steps for signing or decrypting a request, including: 将加密后的所述预主密钥发送至所述管理服务器,以通过所述管理服务器使用所述安全证书对应的私钥对加密后的所述预主密钥进行解密;sending the encrypted pre-master key to the management server, so that the encrypted pre-master key is decrypted by the management server using the private key corresponding to the security certificate; 所述接收所述管理服务器返回的处理结果,基于所述处理结果与所述客户端建立安全连接的步骤,包括:The step of receiving the processing result returned by the management server and establishing a secure connection with the client based on the processing result includes: 接收所述管理服务器返回的解密后的所述预主密钥,基于所述预主密钥与所述客户端建立安全连接。Receive the decrypted pre-master key returned by the management server, and establish a secure connection with the client based on the pre-master key. 根据权利要求1所述的方法,其中,所述私钥使用请求中携带有指定参数;所述向 所述管理服务器发送私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理的步骤,包括:The method according to claim 1, wherein the private key use request carries specified parameters; and the private key use request is sent to the management server, so as to use the private key corresponding to the security certificate through the management server The steps of signing or decrypting the request for using the private key with the key include: 向所述管理服务器发送携带有所述指定参数的私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述指定参数进行签名,返回签名信息;sending a private key use request carrying the specified parameter to the management server, so that the specified parameter is signed by the management server using the private key corresponding to the security certificate, and signature information is returned; 所述接收所述管理服务器返回的处理结果,基于所述处理结果与所述客户端建立安全连接的步骤,包括:The step of receiving the processing result returned by the management server and establishing a secure connection with the client based on the processing result includes: 接收所述管理服务器返回的签名信息,并将所述签名信息发送至所述客户端,以使所述客户端通过所述安全证书验签所述签名信息,得到所述指定参数;以及receiving the signature information returned by the management server, and sending the signature information to the client, so that the client verifies the signature information through the security certificate to obtain the specified parameters; and 基于所述指定参数与所述客户端建立安全连接。A secure connection is established with the client based on the specified parameters. 根据权利要求1所述的方法,其中,所述私钥使用请求中携带有所述访问请求中包含的目标参数;The method according to claim 1, wherein the private key use request carries the target parameter contained in the access request; 所述向所述管理服务器发送私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理的步骤,包括:The step of sending a private key use request to the management server to sign or decrypt the private key use request by using the private key corresponding to the security certificate by the management server includes: 向所述管理服务器发送所述私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述私钥使用请求进行签名,基于所述目标参数生成临时公钥,并结合所述临时公钥和所述目标参数计算出共享密钥,返回签名信息、所述临时公钥和所述共享密钥;Send the private key use request to the management server, so that the management server uses the private key corresponding to the security certificate to sign the private key use request, generates a temporary public key based on the target parameter, and combines with Calculate the shared key from the temporary public key and the target parameter, and return signature information, the temporary public key and the shared key; 所述接收所述管理服务器返回的处理结果,基于所述处理结果与所述客户端建立安全连接的步骤,包括:The step of receiving the processing result returned by the management server and establishing a secure connection with the client based on the processing result includes: 接收所述管理服务器返回的签名信息、所述临时公钥和所述共享密钥,将所述签名信息和所述临时公钥发送至所述客户端,以使所述客户端通过所述安全证书验签所述签名信息,验签成功后,基于所述临时公钥和所述目标参数生成所述共享密钥;以及Receive the signature information, the temporary public key and the shared key returned by the management server, and send the signature information and the temporary public key to the client, so that the client can pass the security The certificate verifies the signature information, and after the verification is successful, the shared key is generated based on the temporary public key and the target parameter; and 基于所述共享密钥与所述客户端建立安全连接。A secure connection is established with the client based on the shared key. 根据权利要求1至5中任一项所述的方法,其中,所述如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取所述目标网站的安全证书的步骤之前,所述方法还包括:The method according to any one of claims 1 to 5, wherein, before the step of acquiring the security certificate of the target website from the management server if an access request for the target website sent by the client is received, the The method also includes: 通过保存的第一证书和所述第一证书对应的私钥,与所述管理服务器保存的第二证书和所述第二证书对应的私钥进行认证,建立与所述管理服务器的安全连接。A secure connection with the management server is established by authenticating the stored first certificate and the private key corresponding to the first certificate with the second certificate stored by the management server and the private key corresponding to the second certificate. 一种建立安全连接的方法,包括:A method of establishing a secure connection comprising: 如果接收到网页服务器发送的针对目标网站的访问请求,将保存的所述目标网站的安全证书发送至所述网页服务器;其中,所述访问请求为客户端发送至所述网页服务器的;If an access request for the target website sent by the web server is received, the saved security certificate of the target website is sent to the web server; wherein, the access request is sent by the client to the web server; 接收所述网页服务器发送的私钥使用请求,使用保存的所述安全证书对应的私钥,对所述私钥使用请求进行签名或者解密处理,得到处理结果;以及Receive the private key usage request sent by the web server, and use the stored private key corresponding to the security certificate to sign or decrypt the private key usage request to obtain a processing result; and 将所述处理结果发送至所述网页服务器,以使所述网页服务器基于所述处理结果与所述客户端建立安全连接。The processing result is sent to the web server, so that the web server establishes a secure connection with the client based on the processing result. 根据权利要求7所述的方法,其中,所述目标网站的访问请求中携带有所述目标网站的域名;The method according to claim 7, wherein the access request of the target website carries the domain name of the target website; 所述如果接收到网页服务器发送的针对目标网站的访问请求,将保存的所述目标网站的安全证书发送至所述网页服务器的步骤,包括:The step of sending the saved security certificate of the target website to the webpage server if an access request for the target website sent by the webpage server is received, including: 根据接收到的所述访问请求中携带的目标网站的域名,在保存的安全证书和所述安全证书对应的私钥中,查找所述目标网站的安全证书;以及According to the domain name of the target website carried in the received access request, in the saved security certificate and the private key corresponding to the security certificate, look up the security certificate of the target website; and 将查找到的所述安全证书发送至所述网页服务器。Sending the found security certificate to the web server. 一种建立安全连接的系统,包括:通信连接的管理服务器和网页服务器;A system for establishing a secure connection, comprising: a communication connection management server and a web server; 所述管理服务器设置为保存网站的安全证书和所述安全证书对应的私钥;The management server is set to save the security certificate of the website and the private key corresponding to the security certificate; 所述网页服务器设置为在接收到客户端发送的针对目标网站的访问请求时,从管理服务器中获取所述目标网站的安全证书,并将获取的所述安全证书发送至所述客户端;The web server is configured to obtain the security certificate of the target website from the management server when receiving the access request for the target website sent by the client, and send the obtained security certificate to the client; 所述网页服务器还设置为在需要使用所述安全证书对应的私钥进行签名或者解密时,向所述管理服务器发送私钥使用请求;The web server is further configured to send a private key use request to the management server when the private key corresponding to the security certificate needs to be used for signature or decryption; 所述管理服务器设置为接收所述私钥使用请求,使用所述安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理,并将处理结果发送至所述网页服务器;The management server is configured to receive the private key use request, use the private key corresponding to the security certificate to sign or decrypt the private key use request, and send the processing result to the web server; 所述网页服务器还设置为基于接收的所述处理结果与所述客户端建立安全连接。The web server is further configured to establish a secure connection with the client based on the received processing result. 一种建立安全连接的装置,包括:An apparatus for establishing a secure connection, comprising: 证书获取模块,设置为如果接收到客户端发送的针对目标网站的访问请求,从管理服务器中获取所述目标网站的安全证书;其中,所述管理服务器中保存有所述目标网站的安全证书和所述安全证书对应的私钥;A certificate obtaining module, configured to obtain the security certificate of the target website from the management server if an access request for the target website sent by the client is received; wherein, the management server saves the security certificate of the target website and the private key corresponding to the security certificate; 证书发送模块,设置为将所述安全证书发送至所述客户端;a certificate sending module, configured to send the security certificate to the client; 私钥使用模块,设置为在需要使用所述安全证书对应的私钥进行签名或者解密时,向所述管理服务器发送私钥使用请求,以通过所述管理服务器使用所述安全证书对应的私钥对所述私钥使用请求进行签名或者解密处理,返回处理结果;以及A private key use module, configured to send a private key use request to the management server when the private key corresponding to the security certificate needs to be used for signature or decryption, so as to use the private key corresponding to the security certificate through the management server Signing or decrypting the private key use request, and returning the processing result; and 连接建立模块,设置为接收所述管理服务器返回的处理结果,基于所述处理结果与所述客户端建立安全连接。The connection establishment module is configured to receive the processing result returned by the management server, and establish a secure connection with the client based on the processing result. 一种建立安全连接的装置,包括:An apparatus for establishing a secure connection, comprising: 证书确定模块,设置为如果接收到网页服务器发送的针对目标网站的访问请求,将保存的所述目标网站的安全证书发送至所述网页服务器;其中,所述访问请求为客户端发送至所述网页服务器的;A certificate determination module, configured to send the saved security certificate of the target website to the webpage server if an access request for the target website sent by the webpage server is received; wherein, the access request is sent by the client to the webpage server. web server; 私钥处理模块,设置为接收所述网页服务器发送的私钥使用请求,使用保存的所述安全证书对应的私钥,对所述私钥使用请求进行签名或者解密处理,得到处理结果;以及A private key processing module, configured to receive a private key usage request sent by the web server, and use the stored private key corresponding to the security certificate to sign or decrypt the private key usage request to obtain a processing result; and 结果返回模块,设置为将所述处理结果发送至所述网页服务器,以使所述网页服务器基于所述处理结果与所述客户端建立安全连接。The result returning module is configured to send the processing result to the web server, so that the web server establishes a secure connection with the client based on the processing result. 一种电子设备,包括处理器和存储器,所述存储器存储有能够被所述处理器执行的机器可执行指令,所述处理器执行所述机器可执行指令以实现权利要求1至6中任一项所述的建立安全连接的方法,或者权利要求7-8中任一项所述的建立安全连接的方法。An electronic device comprising a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement any one of claims 1 to 6 The method for establishing a secure connection described in item 7, or the method for establishing a secure connection according to any one of claims 7-8. 一种机器可读存储介质,存储有机器可执行指令,所述机器可执行指令在被处理器调用和执行时,所述机器可执行指令促使处理器实现权利要求1至6中任一项所述的建立安全连接的方法,或者权利要求7-8中任一项所述的建立安全连接的方法。A machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the implementation of any one of claims 1 to 6. The method for establishing a secure connection described above, or the method for establishing a secure connection described in any one of claims 7-8.
PCT/CN2021/123636 2020-11-24 2021-10-13 Method, system and apparatus for establishing secure connection, electronic device, and machine-readable storage medium Ceased WO2022111102A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011341971.4 2020-11-24
CN202011341971.4A CN112564912B (en) 2020-11-24 2020-11-24 Method, system and device for establishing secure connection and electronic equipment

Publications (1)

Publication Number Publication Date
WO2022111102A1 true WO2022111102A1 (en) 2022-06-02

Family

ID=75043803

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123636 Ceased WO2022111102A1 (en) 2020-11-24 2021-10-13 Method, system and apparatus for establishing secure connection, electronic device, and machine-readable storage medium

Country Status (2)

Country Link
CN (1) CN112564912B (en)
WO (1) WO2022111102A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115333748A (en) * 2022-07-26 2022-11-11 深圳市明源云科技有限公司 Anti-counterfeiting communication method, system, electronic device and computer readable storage medium
CN116015961A (en) * 2023-01-05 2023-04-25 中国联合网络通信集团有限公司 Control and processing method, security CPE, system and medium of downlink terminal equipment
CN116546523A (en) * 2023-05-09 2023-08-04 深圳开鸿数字产业发展有限公司 Network configuration method, system and storage medium
CN116647379A (en) * 2023-05-26 2023-08-25 支付宝(杭州)信息技术有限公司 Service providing method and device for third-party applet
CN116707974A (en) * 2023-07-05 2023-09-05 中国电信股份有限公司技术创新中心 A secure socket layer SSL communication method and related equipment
CN117375863A (en) * 2022-06-30 2024-01-09 中国移动通信集团广东有限公司 A data encryption method, data decryption method and device
WO2024212846A1 (en) * 2023-04-11 2024-10-17 支付宝(杭州)信息技术有限公司 Security environment identity verification method and system based on wireless signal
CN119051989A (en) * 2024-10-30 2024-11-29 天津中远海运散运数字科技有限公司 User identity-based secure certificate communication method, device, equipment and medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112564912B (en) * 2020-11-24 2023-03-24 北京金山云网络技术有限公司 Method, system and device for establishing secure connection and electronic equipment
CN113346990B (en) * 2021-05-11 2022-12-23 科大讯飞股份有限公司 Secure communication method and system, and related equipment and device
CN115460083B (en) * 2021-06-09 2024-04-19 贵州白山云科技股份有限公司 Security acceleration service deployment method, device, medium and equipment
CN113381855B (en) * 2021-06-11 2022-12-27 上海哔哩哔哩科技有限公司 Communication method and system
CN115622719B (en) * 2021-07-13 2024-07-02 中移物联网有限公司 A method, device and system for processing data of Internet of Things
CN114090981B (en) * 2021-11-29 2023-04-07 深圳前海微众银行股份有限公司 Access method and device for remote host
CN115643248B (en) * 2022-09-30 2025-11-07 厦门安胜网络科技有限公司 A method and system for accelerating HTTPS
CN116800499A (en) * 2023-06-26 2023-09-22 奇安信科技集团股份有限公司 Encrypted data transmission methods and devices, equipment and storage media

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871797A (en) * 2015-11-19 2016-08-17 乐视云计算有限公司 Handshake method, device and system of client and server
CN105993146A (en) * 2013-03-07 2016-10-05 云耀公司 Secure session capability using public-key cryptography without access to the private key
CN105991622A (en) * 2015-03-05 2016-10-05 阿里巴巴集团控股有限公司 Message authentication method and device
US9531691B2 (en) * 2011-12-16 2016-12-27 Akamai Technologies, Inc. Providing forward secrecy in a terminating TLS connection proxy
CN107707517A (en) * 2017-05-09 2018-02-16 贵州白山云科技有限公司 A kind of HTTPs handshake methods, device and system
CN108200104A (en) * 2018-03-23 2018-06-22 网宿科技股份有限公司 The method and system that a kind of progress SSL shakes hands
CN109417536A (en) * 2016-04-15 2019-03-01 高通股份有限公司 Techniques for managing secure content delivery in a content delivery network
CN112564912A (en) * 2020-11-24 2021-03-26 北京金山云网络技术有限公司 Method, system and device for establishing secure connection and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60307652T2 (en) * 2003-11-24 2007-08-09 Akamai Technologies, Inc., Cambridge Method and system for secure content delivery
CN108234114A (en) * 2016-12-22 2018-06-29 中标软件有限公司 A kind of implementation method of the SSL based on hardware encryption algorithm

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9531691B2 (en) * 2011-12-16 2016-12-27 Akamai Technologies, Inc. Providing forward secrecy in a terminating TLS connection proxy
CN105993146A (en) * 2013-03-07 2016-10-05 云耀公司 Secure session capability using public-key cryptography without access to the private key
CN105991622A (en) * 2015-03-05 2016-10-05 阿里巴巴集团控股有限公司 Message authentication method and device
CN105871797A (en) * 2015-11-19 2016-08-17 乐视云计算有限公司 Handshake method, device and system of client and server
CN109417536A (en) * 2016-04-15 2019-03-01 高通股份有限公司 Techniques for managing secure content delivery in a content delivery network
CN107707517A (en) * 2017-05-09 2018-02-16 贵州白山云科技有限公司 A kind of HTTPs handshake methods, device and system
CN108200104A (en) * 2018-03-23 2018-06-22 网宿科技股份有限公司 The method and system that a kind of progress SSL shakes hands
CN112564912A (en) * 2020-11-24 2021-03-26 北京金山云网络技术有限公司 Method, system and device for establishing secure connection and electronic equipment

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117375863A (en) * 2022-06-30 2024-01-09 中国移动通信集团广东有限公司 A data encryption method, data decryption method and device
CN115333748A (en) * 2022-07-26 2022-11-11 深圳市明源云科技有限公司 Anti-counterfeiting communication method, system, electronic device and computer readable storage medium
CN115333748B (en) * 2022-07-26 2023-10-10 深圳市明源云科技有限公司 Anti-counterfeiting communication method, system, electronic equipment and computer readable storage medium
CN116015961A (en) * 2023-01-05 2023-04-25 中国联合网络通信集团有限公司 Control and processing method, security CPE, system and medium of downlink terminal equipment
CN116015961B (en) * 2023-01-05 2024-05-28 中国联合网络通信集团有限公司 Control processing method for downstream terminal equipment, secure CPE, system and medium
WO2024212846A1 (en) * 2023-04-11 2024-10-17 支付宝(杭州)信息技术有限公司 Security environment identity verification method and system based on wireless signal
CN116546523A (en) * 2023-05-09 2023-08-04 深圳开鸿数字产业发展有限公司 Network configuration method, system and storage medium
CN116647379A (en) * 2023-05-26 2023-08-25 支付宝(杭州)信息技术有限公司 Service providing method and device for third-party applet
CN116707974A (en) * 2023-07-05 2023-09-05 中国电信股份有限公司技术创新中心 A secure socket layer SSL communication method and related equipment
CN119051989A (en) * 2024-10-30 2024-11-29 天津中远海运散运数字科技有限公司 User identity-based secure certificate communication method, device, equipment and medium

Also Published As

Publication number Publication date
CN112564912A (en) 2021-03-26
CN112564912B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
WO2022111102A1 (en) Method, system and apparatus for establishing secure connection, electronic device, and machine-readable storage medium
CN110380852B (en) Two-way authentication method and communication system
US7899185B2 (en) Real privacy management authentication system
US11303431B2 (en) Method and system for performing SSL handshake
CN103229452B (en) The identification of mobile hand-held device and communication authentication
CN111953705A (en) Internet of things identity authentication method, device and power Internet of things identity authentication system
CN111030814B (en) Secret key negotiation method and device
CN106788989B (en) A method and device for establishing a secure encrypted channel
WO2022100356A1 (en) Identity authentication system, method and apparatus, device, and computer readable storage medium
CN105871797A (en) Handshake method, device and system of client and server
CN110839240B (en) Method and device for establishing connection
WO2017045552A1 (en) Method and device for loading digital certificate in ssl or tls communication
WO2010078755A1 (en) Method and system for transmitting electronic mail, wlan authentication and privacy infrastructure (wapi) terminal thereof
CN114244502B (en) Signature key generation method, device and computer equipment based on SM9 algorithm
CN113382002A (en) Data request method, request response method, data communication system, and storage medium
CN115766119A (en) Communication method, device, communication system and storage medium
US12362924B2 (en) Identity authentication method and apparatus, device, chip, storage medium, and program
CN116800499A (en) Encrypted data transmission methods and devices, equipment and storage media
CN106130724A (en) Internet of things terminal security implementation method adopting key agreement
CN112511550B (en) Communication method, communication device, electronic device and storage medium
CN105471896A (en) Agent method, device and system based on SSL (Secure Sockets Layer)
CN109995723A (en) A kind of method, apparatus and system of the interaction of domain name analysis system DNS information
US10044682B2 (en) Technique for distributing a piece of content in a content distribution network
WO2020037958A1 (en) Gba-based client registration and key sharing method, device, and system
CN117714086A (en) Login verification method and device, storage medium and electronic equipment

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

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

Country of ref document: EP

Kind code of ref document: A1