A method and device for dynamic migration of TLS protocol supporting quantum security
The management platform controls message and configuration file-driven TLS protocol switching, which solves the problem of insufficient agility in the migration process of traditional security protocols, realizes the dynamic migration of quantum security TLS protocols, and improves the security and reliability of the communication system.
Patent Information
- Application Number
- CN202410807080.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-21
AI Technical Summary
When traditional security protocols face the threat of quantum computers, it is difficult to achieve simple and efficient dynamic migration of the TLS protocol, resulting in insufficient application agility, protocol agility, and algorithm agility, affecting the security and reliability of the communication system.
Control messages are sent through the management platform, and the application receives and determines the target configuration from the preset configuration file according to the target TLS protocol version, switches the current version of the TLS protocol connection to the target version of the connection, and implements the TLS protocol and the target version without modifying the application. Migration of quantum-safe algorithms.
It achieves application agility, protocol agility and algorithm agility, ensuring that the communication system supports the dynamic migration of the quantum-safe TLS protocol without modifying the application, improving security and reliability.
Smart Images

Figure CN118381668B
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum security technology and, in particular, to a method and device for dynamic migration of TLS protocols that support quantum security. Background Art
[0002] At present, traditional security protocols used in communication networks, such as the Transport Layer Security (TLS) protocol and its encryption algorithm, are threatened by quantum computers. While quantum security technology is developing rapidly, it will take time for standardization and maturity.
[0003] Therefore, in the process of transitioning from traditional security protocols to quantum security protocols, a simple and efficient method for dynamically migrating TLS protocols that support quantum security is needed. Summary of the invention
[0004] In order to solve the above problems, the present application proposes a method and device for dynamic migration of TLS protocol supporting quantum security, a device, a computer-readable storage medium and an electronic device, which can simply and efficiently realize the dynamic migration of TLS protocol supporting quantum security, and provide higher security and reliability for the application programs of the communication system.
[0005] In a first aspect, the present application provides a method for dynamic migration of a TLS protocol supporting quantum security, which is applied to either party in a peer-to-peer communication, and the method includes:
[0006] The application receives control messages from the management platform; the management platform is used to monitor and manage the TLS protocol versions used by both communicating parties;
[0007] According to the target version of the TLS protocol included in the control message, determine a target configuration corresponding to the target version of the TLS protocol from a preset configuration file; the target configuration includes a type of quantum-safe encryption algorithm used by the target version of the TLS protocol;
[0008] Based on the target configuration, the current version of the TLS protocol connection established between the application and the other party in the communication is switched to the target version of the TLS protocol connection; the current version of the TLS protocol connection and the target version of the TLS protocol connection are both used for data transmission between the two communicating parties.
[0009] Therefore, based on the setting of the quantum-safe encryption algorithm type in the target configuration, this application switches the connection of the current version of the TLS protocol established in the application with the other party in the communication to the connection of the target version of the TLS protocol. Since the new TLS protocol and quantum-safe algorithm can be migrated without modifying the application, the communication system has application agility, protocol agility and algorithm agility, thereby realizing the dynamic migration of the TLS protocol that supports quantum security in a simple and efficient manner, providing higher security and reliability for the application of the communication system.
[0010] In a second aspect, the present application provides a quantum-safe TLS protocol dynamic migration device, which is deployed on either party in peer communication, and the device includes:
[0011] The receiving module is used to receive control messages from the management platform using the application; the management platform is used to monitor and manage the TLS protocol versions used by both communicating parties;
[0012] A configuration module, configured to determine, from a preset configuration file, a target configuration corresponding to the target version of the TLS protocol according to the target version of the TLS protocol included in the control message; the target configuration includes a type of quantum-safe encryption algorithm used by the target version of the TLS protocol;
[0013] The processing module is used to switch the connection of the current version of the TLS protocol established in the application with the other party of the communication to the connection of the target version of the TLS protocol based on the target configuration; the connection of the current version of the TLS protocol and the connection of the target version of the TLS protocol are both used for data transmission between the two communicating parties.
[0014] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect or any possible implementation of the first aspect.
[0015] In a fourth aspect, the present application provides an electronic device, comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory; wherein, when the programs stored in the memory are executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect, and execute the method described in the second aspect or any possible implementation of the second aspect.
[0016] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 This is a schematic diagram of a method for dynamic migration of a quantum-safe TLS protocol provided in an embodiment of the present application;
[0019] Figure 2 This is a flow chart of a method for dynamic migration of a TLS protocol supporting quantum security provided by an embodiment of the present application;
[0020] Figure 3 This is a schematic diagram of a TLS protocol dynamic migration device supporting quantum security provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0022] In the description of the embodiments of the present application, words such as "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a concrete way.
[0023] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "multiple" means two or more. For example, multiple systems refers to two or more systems, and multiple screen terminals refers to two or more screen terminals.
[0024] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0025] Generally, in the process of transitioning from traditional security protocols to quantum security protocols, it is necessary to support multiple agility aspects such as application agility, protocol agility, and algorithm agility in order to complete the migration smoothly.
[0026] At present, some research and solutions have made contributions in this regard. However, these solutions still have some problems and shortcomings, such as:
[0027] Application agility: Some solutions require modifying applications to support new protocols and algorithms, which increases the complexity of application development and maintenance.
[0028] Protocol agility: Some solutions only support a single protocol version and cannot flexibly switch protocol versions.
[0029] Algorithm agility: Some solutions only support a few algorithms and cannot fully leverage the potential of quantum security technology.
[0030] In view of this, this solution uses an application to receive a control message from a management platform, and according to the target version of the TLS protocol included in the control message, determines the target configuration of the TLS protocol corresponding to the target version from a preset configuration file. Based on the setting of the quantum-safe encryption algorithm type in the target configuration, the connection of the current version of the TLS protocol established with the other party in the communication in the application is switched to the connection of the target version of the TLS protocol. Since the new TLS protocol and quantum-safe algorithm can be migrated without modifying the application, the communication system has application agility, protocol agility, and algorithm agility, thereby realizing the dynamic migration of the TLS protocol that supports quantum security in a simple and efficient manner, providing higher security and reliability for the application of the communication system.
[0031] For example, Figure 1 A schematic diagram of a method for dynamic migration of a quantum-safe TLS protocol provided by an embodiment of the present application is shown in FIG. Figure 1 As shown, the dynamic migration method of the TLS protocol supporting quantum security is implemented by the message interaction between the control platform and the peer communication parties. The communication parties in the communication parties can be deployed in different information rooms respectively, and multiple information rooms can share a control platform.
[0032] The control platform is a service platform used to monitor and manage the TLS protocol versions used by both communicating parties. It usually sends control messages to either of the communicating parties in an active or passive response to the request of the communicating party, notifying the communicating party's application of the target TLS protocol version to be migrated. The application is the application software in the communicating party that performs data communication based on the TLS connection.
[0033] The architecture of the communication party includes the application agility layer, the protocol agility layer, and the algorithm agility layer. The application of the application agility layer can flexibly select the protocol version and algorithm suite to establish a secure channel by calling the OpenSSL function interface. On a computer network, OpenSSL is an open source software library package that applications can use for secure communication to avoid eavesdropping and confirm the identity of the other end of the connection. The protocol agility layer includes the libssl dynamic library, which includes three different protocol versions, TLS 1.1, TLS 1.2, and TLS1.3, in addition to some legacy old protocol versions (such as SSL xx, TLS1.0), and makes corresponding modifications to make them correspond to the national secret, international, and quantum security versions of the TLS protocol. The algorithm agility layer contains the libcrypto dynamic library, and provides support for the national secret algorithm and post-quantum cryptography algorithm through the engine and provider provided by OpenSSL.
[0034] In the preparation stage, the protocol agility layer has been implemented according to the specifications or standards. For example, TLS 1.1 already supports national secret algorithms and protocols, TLS 1.2 complies with international standards, and TLS 1.3 supports the integration of quantum security algorithms (such as post-quantum cryptography). The algorithm agility layer has been supported by national secret algorithms, post-quantum cryptography algorithms, other default / third-party algorithms (such as Blowfish, Twofish), etc. through the engine and provider provided by OpenSSL (using the oqsprovider plug-in) or other methods. Generally, the algorithm agility layer has been supported by international algorithms through the libcrypto dynamic library provided by OpenSSL.
[0035] In the dynamic migration phase of the TLS protocol, first, a configuration file needs to be pre-written in the application agility layer to specify the options of various TLS protocols and algorithm suites. When the application starts, the configuration file needs to be loaded and the options of the TLS protocol and algorithm suite need to be parsed.
[0036] For example, in a JSON-formatted configuration file, the protocol configuration and algorithm configuration used by different TLS connections are included. For example, it can include three TLS protocols (national encryption, international, and post-quantum cryptography), as well as their respective algorithm suites and groups options. Each TLS protocol corresponds to a sub-object, which includes four options: min_version, max_version, ciphers, and groups. Among them, min_version and max_version specify the minimum and maximum versions of the TLS protocol; ciphers specifies the algorithm suite list, such as configuring the encryption algorithm and HMAC algorithm used for TLS connections; groups specifies the parameter selection list of asymmetric algorithms in the algorithm suite list, such as configuring the elliptic curve and key exchange algorithm used for TLS connections.
[0037] During the operation of the application, on the one hand, the communication party uses an encrypted communication protocol (such as TLS) to receive a control message from the control platform, which contains the target version of the TLS protocol to be migrated. Next, the target configuration corresponding to the target version is searched based on the configuration file, and the algorithm suite required to establish the connection of the target version of the TLS protocol is prepared according to the target configuration, and the connection of the current version of the TLS protocol is released, and the connection of the target version of the TLS protocol is re-established with the other party based on the quantum security encryption algorithm type (such as post-quantum cryptography type) included in the target configuration. Finally, a feedback message needs to be sent to the control platform to indicate whether the migration of the target version of the TLS protocol is successful, that is, whether the connection of the target version of the TLS protocol is successfully switched. After the migration is successful, the new connection based on the target version of the TLS protocol is used for data transmission between the two communicating parties until the next TLS protocol version migration or the connection of the target version of the TLS protocol is closed. In this way, the protocol agility and algorithm agility of the communication party are achieved.
[0038] On the other hand, without modifying or restarting the application, the configuration file can be dynamically loaded or updated in response to the user's switching operation on the configuration file, thereby achieving application agility of the communication party.
[0039] In summary, since new TLS protocols and quantum-safe algorithms can be migrated without modifying the application, the communication system has application agility, protocol agility, and algorithm agility, thereby realizing dynamic migration of TLS protocols that support quantum security simply and efficiently.
[0040] Next, based on the above analysis, a method for dynamic migration of TLS protocol supporting quantum security provided in an embodiment of the present application is introduced in detail.
[0041] For example, Figure 2The flowchart of a quantum-safe TLS protocol dynamic migration method provided by an embodiment of the present application is shown. It can be understood that the method can be executed by any device, equipment, platform, server, equipment cluster, server cluster, etc. with computing processing capabilities. The method is applied to either party in a peer-to-peer communication and mainly includes the following steps:
[0042] Step S201: using an application to receive a control message from a management platform. The management platform is used to monitor and manage the TLS protocol versions used by both communicating parties.
[0043] In this embodiment, the control platform is a service platform for monitoring and managing the use of the TLS protocol by both communicating parties. It usually sends a control message to the communicating party in an active or passive response to the request of the communicating party, notifying the communicating party's application of the target version of the TLS protocol that needs to be migrated. The application is the application software of the communicating party that performs data communication based on the TLS connection.
[0044] Exemplarily, the application of the communication party uses an encrypted communication protocol (such as TLS) to receive the control message from the management platform, and the process includes: using the OpenSSL library to establish a TLS connection, establishing a socket connection, connecting to the server where the management platform is located, and establishing a TLS session. The control message from the management platform is received using the TLS session.
[0045] Step S202: According to the target version of the TLS protocol included in the control message, a target configuration corresponding to the target version of the TLS protocol is determined from a preset configuration file. The target configuration includes the type of quantum-safe encryption algorithm used by the target version of the TLS protocol.
[0046] In this embodiment, a preset configuration file is used to specify the options of the algorithm suites included in various TLS protocols. When the application starts, the configuration file needs to be loaded and the options of the algorithm suites included in the TLS protocol need to be parsed. The target configuration includes the type of quantum-safe encryption algorithm used by the target version of the TLS protocol.
[0047] Exemplarily, after receiving the control message from the management platform, the validity of the control message is verified, including checking whether the control message comes from a trusted management and control platform, whether the message is complete, whether the signature is correct, etc.
[0048] For the control message whose verification result is valid, further check its legitimacy, including parsing the control message to obtain the target version of the TLS protocol, checking whether the target version is within the version range defined in the configuration file, and refusing to switch if the TLS version is not within the range defined in the configuration file. Otherwise, refusing to switch if the target version is the same as the current version.
[0049] In the dynamic migration phase of the TLS protocol, first, a configuration file needs to be pre-written in the application agility layer to specify the options of various TLS protocols and algorithm suites. When the application starts, the configuration file needs to be loaded and the options of the TLS protocol and algorithm suite need to be parsed.
[0050] When writing configuration files, you can manage them in layers, such as global configuration, application configuration, user configuration, etc., to achieve flexible configuration management. You can also provide a template-based configuration file generation method to support dynamic generation of configuration files required by specific applications. And you can support configuration file version management, so that applications can choose which version of configuration information to use based on the version number of the configuration file.
[0051] During the running of the application, the configuration file can be dynamically loaded or updated in response to the user's switching operation on the configuration file without modifying the application or restarting the application, thereby achieving application agility of the communication party.
[0052] In one implementation, determining a target configuration of the TLS protocol corresponding to the target version from a preset configuration file includes: parsing a configuration file in JSON format and converting it into a data structure supported by memory. Based on the configuration file of the data structure supported by memory, determining the target configuration of the TLS protocol. In addition, other configuration file formats such as XML, YAML, and INI can also be preset to meet the needs of different application scenarios.
[0053] For example, in a JSON-formatted configuration file, the protocol configuration and algorithm configuration used by different TLS connections are included. For example, it can include three TLS protocols (national encryption, international, and post-quantum cryptography), as well as their respective algorithm suites and groups options. Each TLS protocol corresponds to a sub-object, which includes four options: min_version, max_version, ciphers, and groups. Among them, min_version and max_version specify the minimum and maximum versions of the TLS protocol; ciphers specifies the algorithm suite list, such as configuring the encryption algorithm and HMAC algorithm used for TLS connections; groups specifies the parameter selection list of asymmetric algorithms in the algorithm suite list, such as configuring the elliptic curve and key exchange algorithm used for TLS connections.
[0054] In another embodiment, a dynamic configuration solution based on containerization can also be used, and its implementation steps are roughly as follows: create multiple Dockerfile files, which are used to build container images that support different TLS versions and algorithm suites, and the ENV instruction can be used to set environment variables. Create a docker-compose.yml file to define three containers. In the docker-compose.yml file, use the environment parameter to specify the environment variables in the container, which will overwrite the environment variables set in the Dockerfile. In the C language code, the getenv function can be used to obtain the value of the environment variable, and then dynamically set the target configuration of the TLS protocol according to the value of the environment variable. The details will not be repeated here.
[0055] Step S203, based on the target configuration, the connection of the current version of TLS protocol established in the application with the other party of the communication is switched to the connection of the target version of TLS protocol. The connection of the current version of TLS protocol and the connection of the target version of TLS protocol are both used for data transmission between the two parties of the communication.
[0056] In this embodiment, the connection of the current version of the TLS protocol is an existing connection established in the application with the other party of the communication. The connection of the target version of the TLS protocol is a new connection to be established in the application with the other party of the communication. The target configuration is the protocol configuration and algorithm configuration adopted by the connection of the target version of the TLS protocol to be established. It can be understood that the connection of the current version of the TLS protocol and the connection of the target version of the TLS protocol are both used for data transmission between the two communicating parties.
[0057] In the preparation stage, the protocol agility layer has been implemented according to the specifications or standards. For example, TLS 1.1 already supports national secret algorithms and protocols, TLS 1.2 complies with international standards, and TLS 1.3 supports the integration of quantum security algorithms (such as post-quantum cryptography). The algorithm agility layer has been supported by national secret algorithms, post-quantum cryptography algorithms, other default / third-party algorithms (such as Blowfish, Twofish), etc. through the engine and provider provided by OpenSSL (using the oqsprovider plug-in) or other methods. Generally, the algorithm agility layer has been supported by international algorithms through the libcrypto dynamic library provided by OpenSSL.
[0058] During the application operation, the communication party also uses an encrypted communication protocol (such as TLS) to receive a control message from the control platform, which contains the target version of the TLS protocol to be migrated. Next, the target configuration corresponding to the target version is searched based on the configuration file, and the algorithm suite required to establish the connection of the target version of the TLS protocol is prepared according to the target configuration, and the connection of the current version of the TLS protocol is released, and the connection of the target version of the TLS protocol is re-established with the other party based on the quantum security encryption algorithm type (such as post-quantum cryptography type) included in the target configuration. Finally, a feedback message needs to be sent to the control platform to indicate whether the migration of the target version of the TLS protocol is successful, that is, whether the connection of the target version of the TLS protocol is successfully switched. After the migration is successful, the new connection based on the target version of the TLS protocol is used for data transmission between the two communicating parties until the next TLS protocol version migration or the connection of the target version of the TLS protocol is closed. In this way, the protocol agility and algorithm agility of the communication party are achieved.
[0059] In some embodiments, Figure 1 The protocol agility layer shown includes, in addition to some legacy old protocol versions (such as SSL xx, TLS1.0), three different protocol versions: TLS 1.1, TLS 1.2 and TLS1.3, and corresponding modifications are made to make them correspond to the national secret, international and quantum security versions of TLS protocols respectively.
[0060] Among them, the national secret version corresponding to TLS 1.1 is implemented based on the "GM / T 0024-2014 SSL VPN Technical Specification" to support national secret algorithms. The international version corresponding to TLS 1.2 is implemented based on the RFC 5246 standard and supports common asymmetric encryption algorithms such as RSA and ECC. The quantum security version corresponding to TLS 1.3 is implemented based on the IETF draft "draft-ietf-tls-hybrid-design-09" and supports post-quantum cryptography algorithms. By modifying the source code of the Openssl program and the libssl dynamic library, three versions of the protocol can be supported simultaneously by compiling a set of code. In this way, applications can flexibly select different protocol versions according to the needs of the scenario, thereby achieving protocol agility.
[0061] In such Figure 1 In the algorithm agility layer shown, by modifying the source code of the OpenSSL program and the libcrypto dynamic library, multiple algorithm protocols can be supported, such as international algorithms, national secret algorithms, post-quantum cryptography algorithms, and implementation specifications and standards corresponding to other default / third-party algorithms, thereby achieving algorithm agility.
[0062] Specifically, in order to support the agility of the algorithm, the national secret algorithm can be added in the following ways:
[0063] In one implementation, the engine is used to add it. Engine is an extension mechanism provided by OpenSSL, which can dynamically load encryption algorithm libraries implemented by third parties. By writing an Engine module that implements the national encryption algorithm and loading it into OpenSSL, the national encryption algorithm can be used.
[0064] In another implementation, the national encryption algorithm can be added to OpenSSL by directly modifying the OpenSSL source code. This method requires a good understanding of the OpenSSL source code and requires recompiling OpenSSL.
[0065] In another implementation, you can use OpenSSL extension to add it. OpenSSL supports dynamic loading of external encryption algorithm libraries. You can write an OpenSSL extension that implements the national encryption algorithm and load it into OpenSSL. This method is much simpler than directly modifying the OpenSSL source code.
[0066] For example, for post-quantum cryptography algorithms, due to the protocol agility layer (such as Figure 1 As shown in the figure, it is based on TLS 1.3 version to support post-quantum cryptography algorithms. Therefore, a post-quantum cryptography provider plug-in based on OpenSSL, named oqsprovider, can be used to support different post-quantum cryptography algorithms. In this way, applications can flexibly select different encryption algorithms according to the needs of the scenario, thereby achieving algorithm agility.
[0067] Therefore, based on the setting of the quantum-safe encryption algorithm type in the target configuration, this solution switches the connection of the current version of the TLS protocol established in the application with the other party in the communication to the connection of the target version of the TLS protocol. Since the new TLS protocol and quantum-safe algorithm can be migrated without modifying the application, the communication system has application agility, protocol agility and algorithm agility, thereby realizing the dynamic migration of the quantum-safe TLS protocol in a simple and efficient manner, providing higher security and reliability for the application of the communication system.
[0068] Therefore, compared with the prior art, the solution involved in this application mainly includes the following advantages:
[0069] 1. Support application agility: Using a dynamic switching solution based on configuration files (or a dynamic configuration solution based on containerization), applications can switch TLS protocol versions and algorithm suites without modifying the code or recompiling.
[0070] 2. Support protocol agility: Design multiple different TLS protocol versions, including national secret version, international version and quantum security version, and support migration between multiple versions.
[0071] 3. Support algorithm agility: Use the oqsprovider plug-in provided by OpenSSL to support multiple quantum security algorithms in quantum security projects.
[0072] 4. By combining the agility of applications, protocols, and algorithms, a smooth migration from the classic TLS protocol to the quantum-safe TLS protocol is achieved, providing higher security and reliability for applications.
[0073] Based on the method in the above embodiment, illustratively, Figure 3 The schematic diagram of a quantum-safe TLS protocol dynamic migration device provided in an embodiment of the present application is shown. The device is deployed on either party in a peer-to-peer communication, such as Figure 3 As shown, the TLS protocol dynamic migration device 300 includes:
[0074] The receiving module 310 is used to receive the control message from the management platform by using the application. The management platform is used to monitor and manage the TLS protocol version used by both communicating parties;
[0075] A configuration module 320 is used to determine a target configuration of the TLS protocol corresponding to the target version from a preset configuration file according to the target version of the TLS protocol included in the control message. The target configuration includes the type of quantum-safe encryption algorithm used by the target version of the TLS protocol;
[0076] The processing module 330 is used to switch the connection of the current version of the TLS protocol established between the application and the other party of the communication to the connection of the target version of the TLS protocol based on the target configuration. The connection of the current version of the TLS protocol and the connection of the target version of the TLS protocol are both used for data transmission between the two parties of the communication.
[0077] Based on the method in the above embodiment, an embodiment of the present application provides an electronic device. The electronic device may include: at least one memory for storing a program; at least one processor for executing the program stored in the memory. Wherein, when the program stored in the memory is executed, the processor is used to execute the method described in the above embodiment. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a server, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, and a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) device, a virtual reality (virtual reality, VR) device, an artificial intelligence (artificial intelligence, AI) device, a wearable device, a vehicle-mounted device, a smart home device and / or a smart city device. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.
[0078] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0079] It is understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. It should be understood that in the embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0080] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.
Claims
1. A method for dynamic migration of TLS protocol supporting quantum security, characterized in that: The method is applied to any one of two parties in peer-to-peer communication, and the method includes: Using an application to receive a control message from a management platform; the management platform is used to monitor and manage the TLS protocol version used by the communicating parties; After receiving the control message from the management platform, it also includes: verifying the validity of the control message; the validity verification includes whether the control message comes from a trusted management platform, whether the message is complete, and whether the signature is correct; checking the legitimacy of the control message whose verification result is valid; the legitimacy check includes whether the target version included in the control message is within the version range defined in the preset configuration file, and whether the target version is different from the current version; the target version is the target version of the TLS protocol included in the control message whose check result is legal; According to the target version of the TLS protocol included in the control message, determining a target configuration corresponding to the target version of the TLS protocol from the preset configuration file; the target configuration includes a type of quantum-safe encryption algorithm used by the target version of the TLS protocol; the determining the target configuration corresponding to the target version of the TLS protocol from the preset configuration file includes: parsing a configuration file in JSON format and converting it into a memory-supported data structure; determining a target configuration for the TLS protocol based on the configuration file of the memory-supported data structure; Based on the target configuration, the connection of the current version of the TLS protocol established in the application with the other of the communicating parties is switched to the connection of the target version of the TLS protocol; the connection of the current version of the TLS protocol and the connection of the target version of the TLS protocol are both used for data transmission between the communicating parties.
2. The method according to claim 1, characterized in that The method also includes: sending a feedback message to the management platform to switch to the target version TLS protocol connection.
3. The method according to claim 1, characterized in that The receiving of the control message from the management platform includes: receiving the control message from the management platform using an encrypted communication protocol.
4. The method according to claim 1, characterized in that: The connection switched to the target version of TLS protocol includes: Release the connection of the current version of TLS protocol; A connection of the target version of the TLS protocol is established with the other party based on the quantum-safe encryption algorithm type.
5. The method according to claim 1, characterized in that The target configuration also includes the HMAC algorithm, elliptic algorithm and key exchange algorithm type used by the target version TLS protocol.
6. The method according to claim 1, characterized in that The method further includes: during the running of the application, in response to a user's switching operation on the configuration file, dynamically loading or updating the configuration file.
7. A quantum-safe TLS protocol dynamic migration device, characterized in that: The device is deployed on either of two peer communication parties, and the device includes: A receiving module, used to receive a control message from a management platform using an application; the management platform is used to monitor and manage the TLS protocol version used by the communicating parties; After receiving the control message from the management platform, the receiving module is also used to: verify the validity of the control message; the validity verification includes whether the control message comes from a trusted management platform, whether the message is complete, and whether the signature is correct; check the legitimacy of the control message whose verification result is valid; the legitimacy check includes whether the target version included in the control message is within the version range defined in the preset configuration file, and whether the target version is different from the current version; the target version is the target version of the TLS protocol included in the control message whose check result is legal; A configuration module, configured to determine, from the preset configuration file, a target configuration corresponding to the target version of the TLS protocol according to the target version of the TLS protocol included in the control message; the target configuration includes the type of quantum-safe encryption algorithm used by the target version of the TLS protocol; the determining the target configuration corresponding to the target version of the TLS protocol from the preset configuration file comprises: parsing the configuration file in JSON format and converting it into a memory-supported data structure; determining the target configuration of the TLS protocol based on the configuration file of the memory-supported data structure; A processing module is used to switch the connection of the current version of the TLS protocol established in the application with the other of the communicating parties to the connection of the target version of the TLS protocol based on the target configuration; the connection of the current version of the TLS protocol and the connection of the target version of the TLS protocol are both used for data transmission between the communicating parties.
8. An electronic device, characterized in that: include: at least one memory for storing a program; At least one processor, configured to execute the program stored in the memory; wherein, when the program stored in the memory is executed, the processor is configured to execute the method according to any one of claims 1 to 6.
