CN109302369B - Data transmission method and device based on key verification - Google Patents
- ️Tue Mar 16 2021
CN109302369B - Data transmission method and device based on key verification - Google Patents
Data transmission method and device based on key verification Download PDFInfo
-
Publication number
- CN109302369B CN109302369B CN201710606031.5A CN201710606031A CN109302369B CN 109302369 B CN109302369 B CN 109302369B CN 201710606031 A CN201710606031 A CN 201710606031A CN 109302369 B CN109302369 B CN 109302369B Authority
- CN
- China Prior art keywords
- server
- client
- key
- digital certificate
- information Prior art date
- 2017-07-24 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000012795 verification Methods 0.000 title claims abstract description 41
- 230000005540 biological transmission Effects 0.000 title claims description 36
- 230000003993 interaction Effects 0.000 claims abstract description 44
- 238000004891 communication Methods 0.000 claims description 6
- 230000002452 interceptive effect Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 6
- 238000012790 confirmation Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0823—Network architectures or network communication protocols for network security for authentication of entities using certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3247—Cryptographic 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3263—Cryptographic 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a method and a device based on key verification, wherein the method comprises the following steps: the server side sends the digital certificate information to the client side, and sends the summary information of the digital certificate information and the combined unique identification value containing the handshake information context information identification and the digital certificate information identification to the key server; the key server determines a private key corresponding to the digital certificate information according to the summary information, signs the combined unique identification value by using the private key, sends the signature value to the server side, and the server side sends the signature value to the client side; and after the client side verifies that the signature value is legal by using the public key corresponding to the digital certificate information, the client side and the server side perform data interaction. The method and the system solve the problem that the private key is required to be deployed to a server which executes TLS1.3 handshake between a front end and a client, and deploy the private key and the certificate to different devices, so that the server cannot read the content of the private key, the probability of disclosure of the private key is reduced, and the safety of the private key is ensured.
Description
Technical Field
The invention relates to the technical field of internet, in particular to a data transmission method and device based on key verification.
Background
A handshake link exists in the current Secure Socket Layer (SSL)/Transport Layer Security (TLS) protocols (including the following versions: SSL3.0, TLS1.0, TLS1.1 and TLS 1.2).
The main idea of the solution method without private key proposed for SSL/TLS protocols of TLS1.2 and previous versions (SSL3.0, TLS1.0, TLS1.1) in some related technologies in the prior art is to perform processing based on a specific protocol flow in the protocol handshake process, so as to achieve the purpose that a server does not need to deploy private key text locally.
In other related technologies, in the handshake link, server sides of two handshake parties need to use a private key corresponding to a digital certificate to complete the handshake. Wherein the digital certificate and its corresponding private key are deployed onto a server providing a service, thereby completing a handshake phase specified in the SSL/TLS protocol. The method for using the private key by the server side is determined according to a specific handshake algorithm, and mainly comprises two modes of private key decryption and private key signature.
Fig. 1 is a schematic diagram of a handshake procedure using private key decryption in the prior art, and the procedure includes:
step 101, the client sends a client hello message to the server.
Step 102, the server sends a server hello message, a Certificate (Certificate), and a server hello complete message to the client.
103, the client encrypts the PreMasterSecret message by using the public key in the certificate;
step 104, the client includes the encrypted information in a client key exchange (ClientKeyExchange) message and sends the client to the server.
And 105, the server side decrypts the encrypted PreMasterSecret message by using a private key corresponding to the certificate to obtain the PreMasterSecret.
And
step106, the server side and the client side generate a symmetric key by using the same PreMasterSecret.
Step 107, the server and the client respectively send ChangeCipherSpec and Finished (Finished) messages to the other side, and respectively verify the messages of the other side.
And step 108, the server and the client encrypt data by using the negotiated symmetric key and transmit the data.
Fig. 2 is another schematic flow chart of a handshake procedure using private key decryption in the prior art, which includes:
step 201, the client sends a client hello message to the server.
Step 202, the server sends a server hello message, a Certificate (Certificate), and a server hello complete message to the client.
In step 203, the client encrypts the PreMasterSecret message with the public key in the certificate.
In step 204, the client includes the encrypted information in a client key exchange (ClientKeyExchange) message and sends the client to the server.
In step 205, the server parses the client key exchange (ClientKeyExchange) message to obtain the encrypted PreMasterSecret and sends the PreMasterSecret to the key server, and the key server decrypts the encrypted PreMasterSecret by using the private key corresponding to the certificate and sends the PreMasterSecret to the server.
In
step206, the server and the client use the same PreMasterSecret to generate a symmetric key.
And step 207, the server side and the client side respectively send ChangeCipherSpec and Finished messages to the opposite side and respectively verify the messages of the opposite side.
And step 208, the server and the client encrypt data by using the negotiated symmetric key and transmit the encrypted data.
Fig. 3 is a schematic diagram of a handshake procedure using private key signature in the prior art, and the procedure includes:
step 301, the client sends a client hello message to the server.
Step 302, the server sends a server hello message and a Certificate (Certificate) to the client.
Step 303, the server signs the selected DH or EC (elliptic curve) parameter with a private key to obtain a signature value.
Step 304, the server side places the parameter and the signature value thereof in a server side key exchange (ServerKeyExchange) message and sends the message to the client side.
Step 305, the server sends a server hello complete (ServerHelloDone) message to the client.
In step 306, the client sends a client key exchange (ClientKeyExchange) message to the server.
307, the server and the client generate a symmetric key based on the same DH or EC parameters.
Step 308, the server and the client respectively send ChangeCipherSpec and Finished (Finished) messages to the other side, and respectively verify the messages of the other side.
And 309, encrypting and transmitting data by using the negotiated symmetric key by the server and the client.
Fig. 4 is another schematic diagram of a handshake procedure using private key signature in the prior art, and the procedure includes:
step 401, the client sends a client hello message to the server.
Step 402, the server sends a server hello message and a Certificate (Certificate) to the client.
In step 403, the server side sends the signature parameters (DH or EC (elliptic curve)) to the key server.
Step 404, the key server signs the signature parameter by using a private key corresponding to the certificate;
step 405, the key server sends the signature value to the server;
step 406, the server sets the signature parameter and the signature value in a server key exchange (ServerKeyExchange) message, and sends the message to the client.
Step 407, the server sends a server hello done message to the client.
In step 408, the client sends a client key exchange (ClientKeyExchange) message to the server.
Step 409, the server and the client respectively send ChangeCipherSpec and Finished messages to the other side and respectively verify the messages of the other side.
And step 410, the server and the client encrypt data by using the negotiated symmetric key and transmit the encrypted data.
Because the TLS1.2 and the previous protocol version are very different from the TLS1.3 protocol, and the protocol flows are not compatible, the existing method has no way to be applied to the TLS1.3 protocol. Moreover, the private key corresponding to the certificate is deployed to the server directly connected with the client, so that the following problems exist:
1) copies of the private key are widely available in multiple servers, and the possibility of exposure of the private key to attacks increases.
2) For CDNs and other types of network service providers, as the services of the SSL/TLS protocol are provided by these vendors, the user providing the service provider with the private key increases the potential for private key leakage.
The TLS1.3 protocol is a vast variation from previous versions of the protocol, including but not limited to the following:
1) the RSA handshake as a whole no longer supports the sequence of flows shown in fig. 1 and 2
2) Remove the ClientKeyExchange and ServerKeyExchange messages
3) Remove the ServerHelloDone message
4) Removing ChangeCipherSpec message
5) Method for DHE/ECDHE handshake to no longer use related parameters for signature
6) The server starts using the CertificateVerify message (this message can only be used by the client before TLS1.2)
In summary, due to the huge change of the protocol itself, neither of the above two (RSA and DH) types of remote private key usage methods can be applied to TLS1.3, that is, from both the server and the key server, if the handshake between the client and the server is TLS1.3, the server cannot communicate with the key server, or even cannot correctly process the data to be sent to the key server. The key server cannot properly process the received data.
Although the latest TLS1.3 protocol (draft stage) is very different from the existing standardized SSL/TLS protocol, both key exchange procedures (and corresponding no-private key deployment methods) are no longer applicable.
FIG. 5 is a diagram illustrating a data transmission flow applied to the TLS1.3 protocol in the prior art; the process comprises the following steps:
in step 501, the client generates a client shared key (key _ share), and determines a signature algorithm (signature _ algorithm). The client initiates the TLS1.3 handshake, sending a client hello message to the server with the client shared key and signature algorithm (signature _ algorithm) in this message.
In step 502, the server receives a client hello message, and parses a client shared key (key _ share) and a signature algorithm (signature _ algorithm) from the message. The server generates a server shared key, and sends a server hello message to the client, wherein the server shared key is carried in the message.
In step 503, the client and the server both generate a Handshake key (Handshake Secret) and an application key (ApplicationSecret) according to the shared key received from the other party and the method specified in the TLS1.3 protocol.
In step 504, the server selects appropriate digital Certificate information (including a digital Certificate and a Certificate chain thereof) according to a signature algorithm (signature _ algorithm) supported by the client, sends a Certificate (Certificate) message to the client, where the message carries the digital Certificate information, and encrypts the message using the Handshake key (Handshake Secret) generated in step 503.
Step 505, the server determines a combined hash value of the Handshake Context (Handshake Context) and the hash value of the Certificate (Certificate) message, signs with a private key corresponding to the digital Certificate, and sends the signed data (i.e. signature value) to the client, where the signed data is carried in the Certificate confirmation (Certificate verification) message. Wherein the Handshake Context (handwake Context) comprises interactive messages from the client hello message up to the Certificate message.
In step 506, the server encrypts the merged hash value by using the Handshake key (handbreak Secret) generated in step 503, and sends the encrypted merged hash value to the client in a Finished message.
In step 507, the client verifies the validity of the signature value carried in the certificate verification (CertificateVerify) message received from the server by using the public key in the digital certificate, and if the verification is passed, the client and the server generate a Finished (Finished) message in the same way and send the Finished message to the server.
In step 508, the client and the server encrypt and transmit subsequent Application layer data using the Application key (Application Secret) generated in step 503.
The existing data transmission process applied to the TLS1.3 protocol has the problem that a private key is easy to leak, and the existing process needs to be improved to ensure the security of the private key.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a device based on key verification.
The data transmission method based on the key verification comprises the following steps:
the server side sends the digital certificate information to the client side, and sends the summary information of the digital certificate information and the combined unique identification value containing the handshake information context information identification and the digital certificate information identification to the key server;
the key server determines a private key corresponding to the digital certificate information according to the digest information, signs the combined unique identification value by using the private key, and sends a signature value to the server side, and the server side sends the signature value to the client side;
and after the client side verifies that the signature value is legal by using the public key corresponding to the digital certificate information, the client side and the server side carry out data interaction.
The data transmission method based on the key verification also has the following characteristics:
the method further comprises the following steps: the client and the server respectively generate handshake keys;
the server sends the digital certificate information to the client side, wherein the server encrypts the digital certificate information by using the handshake key and sends the encrypted digital certificate information to the client side; the client uses the handshake secret key to decrypt the encrypted digital certificate information to obtain a public key corresponding to the digital certificate information;
the server side sends the signature value to the client side comprises the following steps: encrypting the signature value by using the handshake key, and sending the encrypted signature value to the client; the client decrypts the encrypted signature value using the handshake key.
The data transmission method based on the key verification also has the following characteristics:
the method further comprises the following steps: the client sends a client hello message to the server, wherein the message carries a client shared secret key and a signature algorithm, and the server sends a server hello message to the client, wherein the message carries the server shared secret key;
the sending the digital certificate information to the client comprises: the server side selects digital certificate information according to a signature algorithm supported by the client side, and sends a certificate message to the key server, wherein the message carries the digital certificate information;
the handshake information context information includes the client hello message, the server hello message, and the certificate message.
The data transmission method based on the key verification also has the following characteristics:
the client and the server both generate handshake keys, including: and the client and the server generate the handshake key according to the shared key received from the other party.
The data transmission method based on the key verification also has the following characteristics:
the handshake information context information identifier refers to a hash value of the handshake information context information, the digital certificate information identifier refers to a hash value of the digital certificate information, and the combined unique identifier value is a hash value.
The data transmission method based on the key verification also has the following characteristics:
before the server side sends the digital certificate information to the client side, the method further comprises the following steps: the client and the server generate an application key;
the data interaction between the client and the server comprises the following steps: and the client and the server encrypt and decrypt the interactive information by using the application key.
The data transmission method based on the key verification also has the following characteristics:
the method further comprises the following steps: the key server defaults to be provided with abstract information of a public key corresponding to the digital certificate information and a private key corresponding to the abstract information; or the key server obtains the summary information of the public key corresponding to the digital certificate information and the private key corresponding to the summary information from the server side.
The invention also provides a data transmission device based on key verification, which comprises: the system comprises a client, a server and a key server;
the server side comprises a digital certificate information management module, a first interaction module, an identification management module and a second interaction module;
the digital certificate information management module is used for selecting digital certificate information and determining summary information of the digital certificate information;
the first interaction module is used for sending the digital certificate information to the client; the client is also used for interacting with client data after the client uses the public key corresponding to the digital certificate information to verify that the signature value is legal;
the identification management module is used for determining a combined unique identification value containing a handshake information context information identification and a digital certificate information identification;
the second interaction module is used for sending the combined unique identification value to a key server; the key server is also used for sending the signature value received from the key server to the client;
the key server comprises a signature module and a communication module, wherein the signature module is used for determining a private key corresponding to the digital certificate information according to the digest information and using the private key to sign the combined unique identification value; the communication module is used for sending the signature value to the server side;
the client comprises a client interaction module and a verification module;
the client interaction module is used for receiving the signature value; the verification module is also used for carrying out data interaction with the server side after verifying that the signature value is legal;
and the verification module is used for verifying whether the signature value is legal or not by using the public key corresponding to the digital certificate information.
The data transmission device based on the key verification also has the following characteristics:
the server side also comprises a key generation module and an encryption module which are used for generating handshake keys;
the encryption module is used for encrypting the digital certificate information by using the handshake key and encrypting the signature value by using the handshake key;
the first interaction module is used for sending the encrypted digital certificate information to the client; the client is also used for sending the encrypted signature value to the client;
the client further comprises a key generation module and a decryption module for generating handshake keys;
the decryption module is configured to decrypt the encrypted digital certificate information using the handshake key to obtain a public key corresponding to the digital certificate information, and is further configured to decrypt the encrypted digital certificate information using the handshake key and obtain a public key corresponding to the digital certificate information.
The data transmission device based on the key verification also has the following characteristics:
the client interaction module is also used for sending a client hello message to the server, wherein the message carries a client shared secret key and a signature algorithm;
the first interaction module is further configured to send a server hello message to the client, where the server shared key is carried in the message;
the second interaction module is further configured to send a certificate message to the key server, where the certificate message carries digital certificate information;
the identifier management module is further configured to use the client hello message, the server hello message, and the certificate message as handshake information context information, and generate a handshake information context information identifier.
In order to solve the problem, the invention provides a method for deploying a private key to a key server under the TLS1.3 protocol (a front-end server has no capability of reading the content of the private key), and the function of SSL/TLS handshake can be completed without deploying the private key on a server providing services.
In the scheme, the private key is changed from being deployed on the server side to being deployed on the key server and the key server provides private key signature service to the outside, so that the problem that the private key needs to be deployed on a server for TLS1.3 handshake execution by the front end and the client is solved, the private key and the certificate are deployed on different devices, the server cannot read the content of the private key, the probability of private key leakage is reduced, and the safety of the private key is guaranteed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic diagram of a data transmission flow using private key decryption in the prior art;
FIG. 2 is another schematic diagram of a data transmission flow using private key decryption in the prior art;
FIG. 3 is a schematic diagram of a data transmission flow using private key signature in the prior art;
FIG. 4 is another schematic diagram of a data transmission flow using private key signature in the prior art;
FIG. 5 is a diagram illustrating a data transmission flow applied to the TLS1.3 protocol in the prior art;
FIG. 6 is a flow chart of a data transmission method based on key verification according to an embodiment of the present invention;
FIG. 7 is a block diagram of a data transmission apparatus based on key authentication in an embodiment of the present invention;
fig. 8 is a flow chart of a method for data transmission based on key verification in an exemplary embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 6 is a flow chart of a data transmission method based on key verification, the method comprising:
601, the server side sends the digital certificate information to the client side, and sends the summary information of the digital certificate information and the combined unique identification value containing the handshake information context information identification and the digital certificate information identification to the key server;
602, the key server determines a private key corresponding to the digital certificate information according to the digest information, signs the merged unique identification value by using the private key, sends the signature value to the server side, and the server side sends the signature value to the client side;
603, after the client verifies that the signature value is legal by using the public key corresponding to the digital certificate information, the client and the server perform data interaction.
Wherein,
the key server defaults to be provided with abstract information of a public key corresponding to the digital certificate information and a private key corresponding to the abstract information; or the key server obtains the summary information of the public key corresponding to the digital certificate information and the private key corresponding to the summary information from the server side.
Step 601 is preceded by: the client and the server respectively generate handshake keys, and the generated handshake keys are the same. In
step601, the server sending the digital certificate information to the client comprises encrypting the digital certificate information by using the handshake key and sending the encrypted digital certificate information to the client; and the client decrypts the encrypted digital certificate information by using the handshake key to obtain a public key corresponding to the digital certificate information. In
step602, the sending, by the server, the signature value to the client includes: encrypting the signature value by using the handshake key, and sending the encrypted signature value to the client; the client decrypts the encrypted signature value using the handshake key.
Before
step601, the client sends a client hello message to the server, where the message carries a client shared key and a signature algorithm, and the server sends a server hello message to the client, where the message carries the server shared key. Sending the digital certificate information to the client in
step601 includes: the server side selects digital certificate information according to a signature algorithm supported by the client side, and sends certificate information to the key server, wherein the information carries the digital certificate information. The handshake information context information in
step601 includes the client hello message, the server hello message, and the certificate message. The handshake information context information identifier is a hash value of the handshake information context information, the digital certificate information identifier is a hash value of the digital certificate information, and the unique identifier value is combined to be the hash value. The generating of the handshake key by both the client and the server specifically includes: the client and the server generate a handshake key according to the shared key received from the other party.
Step 601 is preceded by: the client and the server generate an application key; the
step603 of performing data interaction between the client and the server includes: the client and the server use the application key to encrypt and decrypt the interactive information.
Fig. 7 is a block diagram of a data transmission apparatus based on key authentication, the apparatus including: client, server, key server. The server side comprises a digital certificate information management module, a first interaction module, an identification management module and a second interaction module. The key server includes a signature module and a communication module. The client comprises a client interaction module and a verification module.
The digital certificate information management module is used for selecting the digital certificate information and determining the summary information of the digital certificate information. The first interaction module is used for sending the digital certificate information to the client; and the client is also used for interacting with client data after the client uses the public key corresponding to the digital certificate information to verify that the signature value is legal. The identification management module is used for determining a combined unique identification value containing a handshake information context information identification and a digital certificate information identification. The second interaction module is used for sending the combined unique identification value to a key server; and is also used to send the signature value received from the key server to the client.
The signature module is used for determining a private key corresponding to the digital certificate information according to the summary information and using the private key to sign the merged unique identification value; the communication module is used for sending the signature value to the server side.
The client interaction module is used for receiving the signature value; and the verification module is also used for carrying out data interaction with the server side after verifying that the signature value is legal. And the verification module is used for verifying whether the signature value is legal or not by using the public key corresponding to the digital certificate information.
Further, the server also comprises a key generation module and an encryption module for generating handshake keys. The encryption module is configured to encrypt the digital certificate information using the handshake key and to encrypt the signature value using the handshake key. The first interaction module is used for sending the encrypted digital certificate information to the client; and the server is also used for sending the encrypted signature value to the client. The client also comprises a key generation module and a decryption module for generating the handshake key. The decryption module is used for decrypting the encrypted digital certificate information by using the handshake key to obtain a public key corresponding to the digital certificate information, and is also used for decrypting the encrypted digital certificate information by using the handshake key and obtaining a public key corresponding to the digital certificate information.
The client interaction module is further configured to send a client hello message to the server, where the message carries the client shared key and the signing algorithm. The first interaction module is further configured to send a server hello message to the client, where the server shared key is carried in the message. The second interaction module is further configured to send a certificate message to the key server, where the message carries digital certificate information. The identification management module is further configured to use the client hello message, the server hello message, and the certificate message as handshake information context information, and generate a handshake information context information identification.
The handshake information context information identifier refers to a hash value of the handshake information context information, the digital certificate information identifier refers to a hash value of the digital certificate information, and the combined unique identifier value is a hash value.
When the client and the server perform data interaction, the client interaction module and the first interaction module are further used for encrypting and decrypting the interaction information by using the pre-generated application key.
The key server in the invention also has at least one of the following characteristics:
1) all types of private keys specified by the TLS1.3 protocol are supported.
2) And the signature operation of the private key of the type is supported.
3) The necessary security mechanisms. For example, the front-end server may be authenticated to prevent unauthorized private key service invocation.
4) The key server may or may not use an encrypted connection for external services, and no limitation is imposed on the actual functions.
In the scheme, the private key is changed from being deployed on the server side to being deployed on the key server and the key server provides private key signature service to the outside, so that the problem that the private key needs to be deployed on a server for TLS1.3 handshake execution by the front end and the client is solved, the private key and the certificate are deployed on different devices, the server cannot read the content of the private key, the probability of private key leakage is reduced, and the safety of the private key is guaranteed.
The process is illustrated by the following specific examples.
The specific embodiment is as follows:
as shown in fig. 8, the data transmission method based on key verification in this embodiment includes the following steps:
in step 801, the client generates a client shared key (key _ share), and determines a signature algorithm (signature _ algorithm). The client initiates the TLS1.3 handshake, sending a client hello message to the server with the client shared key and signature algorithm (signature _ algorithm) in this message.
Step 802, the server receives a client hello message, and parses a client shared key (key _ share) and a signature algorithm (signature _ algorithm) from the message. The server generates a server shared key, and sends a server hello message to the client, wherein the server shared key is carried in the message.
In step 803, the client and the server respectively generate a Handshake key (Handshake Secret) and an application key (ApplicationSecret) according to the shared key received from the other party and the method specified in the TLS1.3 protocol.
Step 804, the server side selects proper digital Certificate information (including digital Certificate and Certificate chain thereof) according to a signature algorithm (signature _ algorithm) supported by the client side, sends a Certificate (Certificate) message to the key server, the message carries the digital Certificate information, and encrypts the message by using the Handshake key (Handshake Secret) generated in step 803.
In step 805, the server determines a combined hash value of the Handshake Context (Handshake Context) and the hash value of the Certificate message (Certificate), and sends the combined hash value to the key server. The Handshake Context (Handshake Context) includes interactive messages from the client hello message up to the Certificate message.
In step 805 or before step 801, the server side sends digest information of the public key corresponding to the digital certificate information to the key server.
In step 806, the key server calculates a private key using the digest information of the public key, and signs the received merged hash value using the private key to obtain a signature value.
In step 807, the key server sends the signature value to the server.
Step 808, the server sends a certificate confirm (CertificateVerify) message carrying the signature value to the client.
Step 809, the server determines a combined hash value of the handshake context, the hash value of the Certificate (Certificate) message, and the hash value of the Certificate validation (Certificate verify) message, encrypts the combined hash value by using the handshake key in step 803, and sends the combined hash value carried in the Finished (Finished) message to the client.
Step 810, the client verifies the validity of the signature value in the certificate confirmation (CertificateVerify) message of the server by using the public key in the digital certificate, and generates a Finished (Finished) message of the client by using the same method as that of the server and sends the Finished message to the server after the verification is passed.
In step 811, the client and the server encrypt and transmit subsequent Application layer data using the Application key (Application Secret) generated in step 803.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
It is to be noted that, in this document, the terms "comprises", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, so that an article or apparatus including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional like elements in the article or device comprising the element.
The above embodiments are merely to illustrate the technical solutions of the present invention and not to limit the present invention, and the present invention has been described in detail with reference to the preferred embodiments. It will be understood by those skilled in the art that various modifications and equivalent arrangements may be made without departing from the spirit and scope of the present invention and it should be understood that the present invention is to be covered by the appended claims.
Claims (10)
1. A data transmission method based on key verification is characterized by comprising the following steps:
the server side sends digital certificate information to the client side, the digital certificate information comprises a digital certificate and a certificate chain thereof, and the summary information of the digital certificate information and a combined unique identification value containing a handshake information context information identification and a digital certificate information identification are sent to a key server;
the key server determines a private key corresponding to the digital certificate information according to the digest information, signs the combined unique identification value by using the private key, and sends a signature value to the server side, and the server side sends the signature value to the client side;
and after the client side verifies that the signature value is legal by using the public key corresponding to the digital certificate information, the client side and the server side carry out data interaction.
2. The data transmission method based on key verification according to claim 1,
the method further comprises the following steps: the client and the server respectively generate handshake keys;
the server sends the digital certificate information to the client side, wherein the server encrypts the digital certificate information by using the handshake key and sends the encrypted digital certificate information to the client side; the client uses the handshake secret key to decrypt the encrypted digital certificate information to obtain a public key corresponding to the digital certificate information;
the server side sends the signature value to the client side comprises the following steps: encrypting the signature value by using the handshake key, and sending the encrypted signature value to the client; the client decrypts the encrypted signature value using the handshake key.
3. The data transmission method based on key verification according to claim 2,
the method further comprises the following steps: the client sends a client hello message to the server, wherein the message carries a client shared secret key and a signature algorithm, and the server sends a server hello message to the client, wherein the message carries the server shared secret key;
the sending the digital certificate information to the client comprises: the server side selects digital certificate information according to a signature algorithm supported by the client side, and sends a certificate message to the key server, wherein the message carries the digital certificate information;
the handshake information context information includes the client hello message, the server hello message, and the certificate message.
4. The data transmission method based on key verification according to claim 3,
the client and the server both generate handshake keys, including: and the client and the server generate the handshake key according to the shared key received from the other party.
5. The data transmission method based on key verification according to claim 1,
the handshake information context information identifier refers to a hash value of the handshake information context information, the digital certificate information identifier refers to a hash value of the digital certificate information, and the combined unique identifier value is a hash value.
6. The data transmission method based on key verification according to claim 1,
before the server side sends the digital certificate information to the client side, the method further comprises the following steps: the client and the server generate an application key;
the data interaction between the client and the server comprises the following steps: and the client and the server encrypt and decrypt the interactive information by using the application key.
7. The data transmission method based on key verification according to claim 1,
the method further comprises the following steps: the key server defaults to be provided with abstract information of a public key corresponding to the digital certificate information and a private key corresponding to the abstract information; or the key server obtains the summary information of the public key corresponding to the digital certificate information and the private key corresponding to the summary information from the server side.
8. A data transmission apparatus based on key authentication, comprising: the system comprises a client, a server and a key server;
the server side comprises a digital certificate information management module, a first interaction module, an identification management module and a second interaction module;
the digital certificate information management module is used for selecting digital certificate information and determining summary information of the digital certificate information;
the first interaction module is used for sending digital certificate information to the client, wherein the digital certificate information comprises a digital certificate and a certificate chain thereof; the client is also used for interacting with client data after the client verifies that the signature value is legal by using the public key corresponding to the digital certificate information;
the identification management module is used for determining a combined unique identification value containing a handshake information context information identification and a digital certificate information identification;
the second interaction module is used for sending the combined unique identification value to a key server; the key server is also used for sending the signature value received from the key server to the client;
the key server comprises a signature module and a communication module, wherein the signature module is used for determining a private key corresponding to the digital certificate information according to the digest information and using the private key to sign the combined unique identification value; the communication module is used for sending the signature value to the server side;
the client comprises a client interaction module and a verification module;
the client interaction module is used for receiving the signature value; the verification module is also used for carrying out data interaction with the server side after verifying that the signature value is legal;
and the verification module is used for verifying whether the signature value is legal or not by using the public key corresponding to the digital certificate information.
9. The data transmission apparatus based on key verification according to claim 8,
the server side also comprises a key generation module and an encryption module which are used for generating handshake keys;
the encryption module is used for encrypting the digital certificate information by using the handshake key and encrypting the signature value by using the handshake key;
the first interaction module is used for sending the encrypted digital certificate information to the client; the client is also used for sending the encrypted signature value to the client;
the client further comprises a key generation module and a decryption module for generating handshake keys;
the decryption module is configured to decrypt the encrypted digital certificate information using the handshake key to obtain a public key corresponding to the digital certificate information, and is further configured to decrypt the encrypted digital certificate information using the handshake key and obtain a public key corresponding to the digital certificate information.
10. The data transmission apparatus based on key verification according to claim 9,
the client interaction module is also used for sending a client hello message to the server, wherein the message carries a client shared secret key and a signature algorithm;
the first interaction module is further configured to send a server hello message to the client, where the server shared key is carried in the message;
the second interaction module is further configured to send a certificate message to the key server, where the certificate message carries digital certificate information;
the identifier management module is further configured to use the client hello message, the server hello message, and the certificate message as handshake information context information, and generate a handshake information context information identifier.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710606031.5A CN109302369B (en) | 2017-07-24 | 2017-07-24 | Data transmission method and device based on key verification |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710606031.5A CN109302369B (en) | 2017-07-24 | 2017-07-24 | Data transmission method and device based on key verification |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109302369A CN109302369A (en) | 2019-02-01 |
CN109302369B true CN109302369B (en) | 2021-03-16 |
Family
ID=65167489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710606031.5A Active CN109302369B (en) | 2017-07-24 | 2017-07-24 | Data transmission method and device based on key verification |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109302369B (en) |
Families Citing this family (13)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111245786B (en) * | 2019-12-31 | 2023-02-28 | 深圳前海智安信息科技有限公司 | DDoS attack prevention method |
CN114124423B (en) * | 2020-08-31 | 2023-04-07 | Oppo广东移动通信有限公司 | Authentication method, client, server and storage medium |
US11968293B2 (en) * | 2020-11-18 | 2024-04-23 | International Business Machines Corporation | Private key management |
CN112632585B (en) * | 2020-12-31 | 2022-04-01 | 北京海泰方圆科技股份有限公司 | Webpage data transmission system, method, device, medium and equipment |
CN112291774B (en) * | 2020-12-31 | 2021-03-16 | 飞天诚信科技股份有限公司 | Method and system for communicating with authenticator |
CN113381855B (en) * | 2021-06-11 | 2022-12-27 | 上海哔哩哔哩科技有限公司 | Communication method and system |
CN113904773B (en) * | 2021-10-11 | 2023-07-07 | 博雅中科(北京)信息技术有限公司 | SSL connection establishment method, SSL connection establishment device, electronic equipment and computer readable storage medium |
CN114039752A (en) * | 2021-10-27 | 2022-02-11 | 贵州电网有限责任公司 | Data information transmission method, relay protection device and master station |
CN114513639A (en) * | 2022-02-24 | 2022-05-17 | 杭州登虹科技有限公司 | Data transmission control system of video monitoring system |
CN115150099B (en) * | 2022-07-06 | 2023-02-17 | 渔翁信息技术股份有限公司 | Data anti-repudiation transmission method, data sending end and data receiving end |
CN115567288A (en) * | 2022-09-22 | 2023-01-03 | 山东中睿天下信息技术有限公司 | A dynamic certificate proxy method based on openresty |
CN117749413B (en) * | 2023-11-15 | 2024-09-27 | 中金金融认证中心有限公司 | Secure communication method and secure communication system based on TLCP (transport layer control protocol) business-to-business protocol |
CN118573483B (en) * | 2024-08-01 | 2024-11-19 | 泉州信息工程学院 | A network security management method and related equipment |
Citations (6)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103338215A (en) * | 2013-07-26 | 2013-10-02 | 中金金融认证中心有限公司 | Method for establishing TLS (Transport Layer Security) channel based on state secret algorithm |
US8644516B1 (en) * | 2003-04-29 | 2014-02-04 | Actividentity, Inc. | Universal secure messaging for cryptographic modules |
CN105871797A (en) * | 2015-11-19 | 2016-08-17 | 乐视云计算有限公司 | Handshake method, device and system of client and server |
CN106060070A (en) * | 2016-07-01 | 2016-10-26 | 中国人民解放军国防科学技术大学 | TLS handshake protocol for identity-based cryptosystem |
CN106533689A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Method and device for loading digital certificate in SSL/TLS communication |
CN106790090A (en) * | 2016-12-23 | 2017-05-31 | 北京奇虎科技有限公司 | Communication means, apparatus and system based on SSL |
-
2017
- 2017-07-24 CN CN201710606031.5A patent/CN109302369B/en active Active
Patent Citations (6)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8644516B1 (en) * | 2003-04-29 | 2014-02-04 | Actividentity, Inc. | Universal secure messaging for cryptographic modules |
CN103338215A (en) * | 2013-07-26 | 2013-10-02 | 中金金融认证中心有限公司 | Method for establishing TLS (Transport Layer Security) channel based on state secret algorithm |
CN106533689A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Method and device for loading digital certificate in SSL/TLS communication |
CN105871797A (en) * | 2015-11-19 | 2016-08-17 | 乐视云计算有限公司 | Handshake method, device and system of client and server |
CN106060070A (en) * | 2016-07-01 | 2016-10-26 | 中国人民解放军国防科学技术大学 | TLS handshake protocol for identity-based cryptosystem |
CN106790090A (en) * | 2016-12-23 | 2017-05-31 | 北京奇虎科技有限公司 | Communication means, apparatus and system based on SSL |
Also Published As
Publication number | Publication date |
---|---|
CN109302369A (en) | 2019-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109302369B (en) | 2021-03-16 | Data transmission method and device based on key verification |
CN114651421B (en) | 2022-12-27 | Forward security in transport layer security using temporary keys |
CN110380852B (en) | 2023-06-16 | Two-way authentication method and communication system |
WO2018000886A1 (en) | 2018-01-04 | Application program communication processing system, apparatus, method, and client terminal, and server terminal |
WO2022111102A1 (en) | 2022-06-02 | Method, system and apparatus for establishing secure connection, electronic device, and machine-readable storage medium |
CN106788989B (en) | 2020-01-21 | Method and equipment for establishing secure encrypted channel |
KR20010108150A (en) | 2001-12-07 | Authentication enforcement using decryption and authentication in a single transaction in a secure microprocessor |
US10075439B1 (en) | 2018-09-11 | Programmable format for securely configuring remote devices |
CN111935712A (en) | 2020-11-13 | Data transmission method, system and medium based on NB-IoT communication |
CN112766962A (en) | 2021-05-07 | Method for receiving and sending certificate, transaction system, storage medium and electronic device |
US9559737B2 (en) | 2017-01-31 | Telecommunications chip card |
EP3476097A1 (en) | 2019-05-01 | Technique for downloading a network access profile |
EP3375133B1 (en) | 2020-01-01 | Method for securing and authenticating a telecommunication |
CN114143082B (en) | 2023-10-13 | Encryption communication method, system and device |
CN116781292A (en) | 2023-09-19 | Data processing method, device, equipment and readable storage medium |
CN111884810A (en) | 2020-11-03 | Transaction signature method, device, mobile terminal and system |
CN115834055A (en) | 2023-03-21 | Vehicle OTA (over the air) upgrading method, OTA upgrading packet encryption method and device |
KR100876320B1 (en) | 2008-12-31 | Web service security system and method using an embedded security server. |
CN116800499A (en) | 2023-09-22 | Encrypted data transmission methods and devices, equipment and storage media |
CN116366262A (en) | 2023-06-30 | Double SSL certificate web server setting method and web service system |
CN113381855A (en) | 2021-09-10 | Communication method and system |
CN115914192B (en) | 2025-02-11 | Plug-in downloading method, device, and electronic device |
CN114915487B (en) | 2023-10-03 | Terminal authentication method, system, device, equipment and storage medium |
CN115996126B (en) | 2023-11-03 | Information interaction method, application device, auxiliary platform and electronic device |
CN117081802A (en) | 2023-11-17 | Encryption communication method, device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2019-02-01 | PB01 | Publication | |
2019-02-01 | PB01 | Publication | |
2019-03-01 | SE01 | Entry into force of request for substantive examination | |
2019-03-01 | SE01 | Entry into force of request for substantive examination | |
2021-03-16 | GR01 | Patent grant | |
2021-03-16 | GR01 | Patent grant |