Load balancing method based on negotiated certificate and algorithm in SSL / TLS handshake process

By negotiating the use of certificates and algorithms for load balancing during the SSL/TLS handshake process, it solves the problem that existing equipment cannot isolate different algorithms and certificate configurations, achieves business isolation and maintenance convenience, and improves the flexibility and reliability of the system. Maintainability.

CN118631441APending Publication Date: 2024-09-10AIRUMENG TECH (NANJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410799932.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing equipment cannot configure different back-end server groups for different algorithms and certificates. As a result, services remain unchanged after algorithm upgrades. It is impossible to isolate new and old services or commercial secret services from state secret services, which affects debugging, operation, and maintenance.

Method used

Load balancing is performed by negotiating the use of certificates and algorithms during the SSL/TLS handshake process, selecting the appropriate certificate and algorithm based on the client's SNI extension information or the default domain name service, determining the corresponding server group, and performing load balancing within the group.

Benefits of technology

It realizes load balancing based on certificates and algorithms in the HTTPS reverse proxy scenario, ensuring that the business can remain unchanged after the algorithm is upgraded or the national secret algorithm is used, and the isolation of new and old businesses or commercial secret services from the national secret business facilitates debugging and Operations and Maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631441A
    Figure CN118631441A
Patent Text Reader

Abstract

According to the method for carrying out load balancing based on the negotiated certificate and algorithm in the SSL / TLS handshake process disclosed by the invention, after one server group is determined according to the negotiated certificate and algorithm information in the SSL / TLS handshake process, load balancing is carried out among the selected server groups; different servers are selected according to different certificates and algorithms, and then load balancing is completed. The invention belongs to the technical field of reverse proxy, load balancing and ADC, and particularly relates to a load balancing method based on a certificate and an algorithm used in negotiation in an SSL / TLS handshake process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of reverse proxy, load balancing and ADC technology, and in particular relates to a method for load balancing based on certificates and algorithms negotiated during an SSL / TLS handshake process. Background Art

[0002] With the increasing attention to data privacy and security, and the popularity and maturity of TLS / SSL technology, HTTPS (HTTP over SSL) has gradually become one of the most common and standard communication protocols on the Internet today. Many websites, applications and services use HTTPS to protect the security and privacy of user data.

[0003] With the rapid growth of Internet traffic and network applications, and the increasing demand for performance, high availability, and fault tolerance, load balancing technology came into being. It distributes traffic to multiple servers to balance server loads, improve performance and availability, ensure the stable operation of network services, and solve the risks of insufficient performance of a single server and single point failure. According to the load balancing technology, there are two types of load balancing: two-layer load balancing, network layer load balancing, and application layer load balancing methods.

[0004] Application layer load balancing methods are mostly based on the content involved in the HTTP protocol. In recent years, there have been a small number of methods and patents proposed for load balancing based on SNI at the TLS / SSL layer (SSL / TLS also belongs to the application layer in the TCP / IP architecture). This method determines which domain name service is hit based on the SNI information carried in the TLS extension, and then performs load balancing between the server groups configured on this selected domain name service. There are also solutions (based on open source reverse proxy programs such as nginx) and patents that distinguish between national secret protocol numbers and commercial secret protocol numbers based on the SSL / TLS protocol number field to determine whether to use national secret certificates or commercial secret certificates for TLS / SSL handshakes to complete TLS / SSL offloading. This method is the same as the load balancing method based on SNI. The prerequisite (the protocol number here) determines which certificate is used to complete SSL / TLS offloading, and then load balancing is performed between the server groups configured on this selected domain name service. Summary of the invention

[0005] The technical problem to be solved by the present invention is that the existing equipment is unable to configure different back-end server groups for different algorithms and certificates, so as to achieve the goal of keeping the existing services unchanged after the algorithm is upgraded or the national secret algorithm is used, and using a new back-end server group for the services using the newly upgraded algorithm or the national secret algorithm, so as to achieve isolation of new and old services or commercial secret services and national secret services, thereby facilitating debugging, operation and maintenance.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows: a method for load balancing based on the certificates and algorithms negotiated during the SSL / TLS handshake process, characterized in that:

[0007] Step 101: The client (browser or other program) sends a ClientHello message to the reverse proxy device, and the message either carries SNI extension information or does not carry the extension information;

[0008] Step 102, the reverse proxy device obtains the Ciphersuites and SNI extension information carried in step 101, and selects a default domain name service if the SNI extension information is not carried;

[0009] Step 103, the reverse proxy device determines which algorithm and its certificate to use according to the information in step 102 and the cipher suite and certificate configured on the device;

[0010] Step 104, the reverse proxy device constructs ServerHello information and Certificate information respectively according to the algorithm and certificate selected in step 103 and sends them to the client;

[0011] Step 105, the client and the reverse proxy device complete the subsequent TLS / SSL handshake process;

[0012] Step 106, the reverse proxy device determines the corresponding server group according to the certificate and algorithm selected in step 103;

[0013] Step 107: the reverse proxy device selects a specific server from the server group determined in step 106 according to the load balancing algorithm defined by the server group and establishes a connection with the server to complete the proxy work.

[0014] After adopting the above structure, the beneficial effects of the present invention are as follows:

[0015] (1) A method for load balancing based on the selected certificate in an HTTPS reverse proxy scenario.

[0016] (2) A method for load balancing based on a negotiated algorithm in an HTTPS reverse proxy scenario.

[0017] (3) In the reverse proxy equipment, load balancing equipment, and ADC equipment, a technical method of using a method of load balancing based on selected certificates and a method of load balancing based on negotiated algorithms is used to cooperate with each other, so that the existing services remain unchanged after the algorithm is upgraded or the national secret algorithm is used, and the services using the newly upgraded algorithm or the national secret algorithm use a new back-end server group, so as to achieve the isolation of old and new services or commercial secret services and national secret services, and facilitate debugging, operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0019] Figure 1 This is an interaction sequence diagram involved in the present invention.

[0020] In the attached figure: 1. client, 2. reverse proxy device, 3. server. DETAILED DESCRIPTION

[0021] like Figure 1 As shown, a method for load balancing based on the certificate and algorithm negotiated during the SSL / TLS handshake process, step 101, client 1 (browser or other program) sends a Client Hello message to reverse proxy device 2, the message either carries SNI extension information or does not carry the extension information;

[0022] Step 102, the reverse proxy device 2 obtains the Ciphersuites and SNI extension information carried in step 101, and if the SNI extension information is not carried, the default domain name service is selected;

[0023] Step 103, the reverse proxy device 2 determines which algorithm and its certificate to use according to the information in step 102 and the cipher suite and certificate configured on the device;

[0024] Step 104, the reverse proxy device 2 constructs ServerHello information and Certificate information respectively according to the algorithm and certificate selected in step 103 and sends them to the client 1;

[0025] Step 105, the client 1 and the reverse proxy device 2 complete the subsequent TLS / SSL handshake process;

[0026] Step 106, the reverse proxy device 2 determines the corresponding server 3 group according to the certificate and algorithm selected in step 103;

[0027] Step 107 , the reverse proxy device 2 selects a specific server 3 from the server group 3 determined in step 106 according to the load balancing algorithm defined for the server group 3 and establishes a connection with the server 3 to complete the proxy work.

[0028] In the existing solutions, one can use SNI to determine a group of 3 servers, or use different protocol numbers to distinguish between national encryption protocols and commercial encryption protocols to support different types of certificates on the same server group. The first solution is to use SNI information to determine a group of 3 servers, and the second solution is to support both national encryption and commercial encryption algorithms on a certain service without involving the selection of 3 server groups.

[0029] The basic idea of ​​the present invention is to find a domain name service based on the SNI information (if the information exists, if not, match the default domain name service), and then select a corresponding group of services for the final load balancing based on the certificate and algorithm used in the TLS / SSL handshake negotiation. Taking the national secret and commercial secret processes as an example: if the commercial secret algorithm and certificate are used in the handshake negotiation, this algorithm and certificate are used to determine a group of 3 servers Group A for load balancing. If the national secret algorithm and certificate are used, then the server 3 Group B is used for load balancing.

[0030] And a variety of alternatives are as follows:

[0031] Alternative Solution 1: Bypass this solution by using the asymmetric algorithm of SSL / TLS handshake negotiation to implement different algorithms and use different 3 server groups. If the alternative solution uses RSA, ECDHE, and SM2 as asymmetric algorithms for distinction, it is actually still a method of determining the 3 server groups based on different certificates and then completing load balancing.

[0032] Alternative Solution 2: Bypass this solution by distinguishing the symmetric algorithms in the SSL / TLS handshake negotiation to implement different algorithms using three different server groups. The commercial symmetric algorithms are RC4, 3DES, and AES, and the national secret algorithm is SM4. If the alternative solution uses the national secret symmetric algorithm and other commercial secret symmetric algorithms as a distinction, it is actually still a method of determining the three server groups based on different algorithms and certificates and then completing load balancing.

[0033] Alternative solution 3: Bypass this solution by using the SSL / TLS protocol distinction to implement different protocols using three different server groups. The commercial protocol values ​​SSL3.0 / TLS1.0 / TLS1.1 / TLS1.2 / TLS1.3 have protocol numbers 3.0 / 3.1 / 3.2 / 3.3 / 3.4, and the national secret protocol is 1.1. If the national secret protocol number and other protocol numbers are used as distinctions in the alternative solution, it is actually still a method of determining the three server groups based on different algorithms and certificates and then completing load balancing.

[0034] Alternative Solution 4: Bypass this solution by using the hash algorithm of SSL / TLS handshake negotiation as an excuse to use different algorithms and certificates to use three different server groups. The commercial hash algorithms include MD5, SHA1, SHA2, SHA384, and SHA512, and the national hash algorithms include SM3. The alternative solution uses the national hash algorithm and the commercial hash algorithm as a distinction, which is actually still a method of determining the three server groups based on different algorithms and certificates and then completing load balancing.

[0035] Alternative Solution 5: Bypass this solution by using session reuse or session tickets during the SSL / TLS handshake process to implement 3 different server groups with different algorithms and certificates. This method reuses the information established during the previous complete SSL / TLS handshake process with certificate transfer and algorithm negotiation to quickly complete the establishment of this secure transmission channel. In the alternative solution, after the secure transmission channel is established, the 3 backend server groups with different algorithms and different backend servers are used as a distinction. In fact, it is still a method of determining the 3 server groups based on different algorithms and certificates and then completing load balancing.

[0036] Alternative solution 6: Bypass this solution by combining two or more of the alternative solutions in the above 5 to achieve different combinations and use different 3 groups of servers to complete load balancing.

[0037] The following are some explanations of terms:

[0038] SSL: Secure Sockets Layer, used to provide encryption and authentication between two communicating applications, to protect data transmission security to prevent eavesdropping or tampering. Protocol version numbers include SSL2.0 and SSL3.0. SSL has been replaced by TLS, but its name is still widely used.

[0039] TLS: Transport Layer Security, TLS is the successor to SSL and is used to provide secure communications. It works at the transport layer of network communications and is used to ensure that communications between two applications are encrypted, complete, and mutually authenticated. TLS protocol versions include TLS1.0, TLS1.1, TLS1.2, and TLS1.3, and each version has different security features and improvements.

[0040] TCP: Transmission Control Protocol, TCP is a connection-oriented protocol used to reliably transmit data on the network, ensuring reliable transmission of data between senders and receivers, and handling problems such as lost packets, duplicate packets, and network congestion.

[0041] SNI: Server Name Indication is an extension of the Transport Layer Security protocol that allows the client 1 to specify the target host name to connect to when establishing an encrypted connection with the server 3, providing a method to provide secure services with different domain names on a single IP at the TLS / SSL level.

[0042] RSA is an asymmetric encryption algorithm that uses public and private keys for encryption and decryption. It is widely used in applications such as encrypted communications and digital signatures. It is an early and commonly used algorithm in the SSL / TLS protocol and is currently obsoleted by the latest TLS1.3 algorithm.

[0043] ECC is an elliptic curve-based encryption algorithm that uses a shorter key length than RSA at the same security level, thereby providing higher efficiency and performance. It is an asymmetric encryption algorithm that uses points on an elliptic curve for encryption and decryption operations. Due to its short key length, ECC is particularly useful in resource-constrained environments, such as mobile devices and IoT devices.

[0044] National cryptography (SM2 / SM3 / SM4) is a cryptographic algorithm standard promoted by the Chinese government, aiming to improve the level of domestic information security. National cryptography algorithms include SM2 (asymmetric encryption algorithm), SM3 (hash algorithm) and SM4 (symmetric encryption algorithm), which are used for asymmetric encryption and symmetric encryption respectively, while SM3 is used for message digests and digital signatures.

[0045] Commercial encryption is in contrast to national encryption. Commercial encryption is mainly an algorithm negotiated during the TLS / SSL asymmetric negotiation phase using ECC certificates and RSA certificates.

[0046] LB / SLB: Load Balance / Server Load Balance, load balancing / service load balancing is a network device that is designed to distribute traffic between balanced objects (usually application servers 3) using different algorithms according to different requirements, so that the objects can achieve the required workload.

[0047] HTTP: Hypertext Transfer Protocol is a protocol used to transmit hypertext on the Internet between client 1 and server 3.

[0048] HTTP SHTTP Secure is a combination of HTTP and TLS / SSL. It uses TLS or SSL protocol to encrypt the content of HTTP communication, thus providing a higher level of security.

[0049] Although the embodiments of the present invention have been shown and described, it is understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents. In short, if those skilled in the art are inspired by them and design structural modes and embodiments similar to the technical solution without creativity without departing from the purpose of the present invention, they shall all fall within the scope of protection of the present invention.

Claims

1. A method for load balancing based on the certificates and algorithms negotiated during the SSL / TLS handshake process. Features: Step 101: The client (browser or other program) sends a ClientHello message to the reverse proxy device, and the message either carries SNI extension information or does not carry the extension information; Step 102, the reverse proxy device obtains the Ciphersuites and SNI extension information carried in step 101, and selects a default domain name service if the SNI extension information is not carried; Step 103, the reverse proxy device determines which algorithm and its certificate to use according to the information in step 102 and the cipher suite and certificate configured on the device; Step 104, the reverse proxy device constructs ServerHello information and Certificate information respectively according to the algorithm and certificate selected in step 103 and sends them to the client; Step 105, the client and the reverse proxy device complete the subsequent TLS / SSL handshake process; Step 106, the reverse proxy device determines the corresponding server group according to the certificate and algorithm selected in step 103; Step 107: the reverse proxy device selects a specific server from the server group determined in step 106 according to the load balancing algorithm defined by the server group and establishes a connection with the server to complete the proxy work.

2. According to claim 1, a method for load balancing based on the certificate and algorithm negotiated during the SSL / TLS handshake process, Features: In steps 103, 106, and 107, a set of server groups is determined based on the selected certificates and algorithms, and then load balancing is performed on the selected set of server groups.

3. A method for load balancing based on the certificate and algorithm negotiated during the SSL / TLS handshake process according to claim 1, Features: Instead of solution 1, the asymmetric algorithm of SSL / TLS handshake negotiation is used as an excuse to bypass this solution and implement different algorithms using different server groups. If the alternative solution uses RSA, ECDHE, and SM2 as asymmetric algorithms for distinction, it is actually still a method of determining the server group based on different certificates and then completing load balancing.

4. According to claim 1, a method for load balancing based on the certificate and algorithm negotiated during the SSL / TLS handshake process, Features: Instead of solution 2, the symmetric algorithm distinction of SSL / TLS handshake negotiation is used as an excuse to bypass this solution and implement different algorithms using different server groups. The commercial symmetric algorithms are RC4, 3DES, and AES, and the national secret algorithm is SM4. If the alternative solution uses the national secret symmetric algorithm and other commercial secret symmetric algorithms as a distinction, it is actually still a method of determining the server group based on different algorithms and certificates and then completing load balancing.

5. A method for load balancing based on the certificate and algorithm negotiated during the SSL / TLS handshake process according to claim 1, Features: Instead of solution 3, this solution is bypassed on the grounds of distinguishing between SSL / TLS protocols to implement different protocols using different server groups. The protocol numbers of commercial secret protocols SSL3.0 / TLS1.0 / TLS1.1 / TLS1.2 / TLS1.3 are 3.0 / 3.1 / 3.2 / 3.3 / 3.4, and the national secret protocol is 1.

1. If the national secret protocol number and other protocol numbers are used as distinctions in the alternative solution, it is actually still a method of determining the server group based on different algorithms and certificates and then completing load balancing.

6. A method for load balancing based on the certificate and algorithm negotiated during the SSL / TLS handshake process according to claim 1, Features: Alternative solution 4 uses the hash algorithm of SSL / TLS handshake negotiation as an excuse to bypass this solution and implement different algorithms and certificates using different server groups. The commercial hash algorithms include MD5, SHA1, SHA2, SHA384, and SHA512, and the national hash algorithms include SM3. The alternative solution uses the national hash algorithm and the commercial hash algorithm as a distinction, which is actually still a method of determining the server group based on different algorithms and certificates and then completing load balancing.

7. A method for load balancing based on certificates and algorithms negotiated during an SSL / TLS handshake according to claim 1, Features: Alternative solution 5 bypasses this solution to implement different protocols using different server groups by distinguishing through methods such as session reuse or session tickets. This method uses the information established during the previous complete SSL / TLS handshake process with certificate transfer and algorithm negotiation to quickly complete the establishment of this secure transmission channel. If the alternative solution uses the reuse of the previous negotiation information to complete the SSL / TLS handshake and then perform service load balancing as a distinction, it is actually still a method of determining the server group based on different algorithms and certificates and then completing load balancing.

8. A method for load balancing based on the certificate and algorithm negotiated during the SSL / TLS handshake process according to claim 1, Features: Alternative solution 6 is a method of bypassing this solution by combining two or more of the alternative solutions in the above 5 to implement different combinations and use different server groups to complete load balancing.