Communication method, apparatus and device based on a cryptographic infrastructure system and medium

By employing a three-level key distribution model and token bucket/key pool technology, combined with classic commercial cryptographic algorithms and PQC algorithms, the problems of low key generation rate and high networking cost in quantum key distribution technology are solved, and a secure and reliable session key distribution process is achieved.

CN120896694BActive Publication Date: 2026-01-23中电信量子信息科技集团有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511427677.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-01-23
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

Existing quantum key distribution technologies suffer from low key generation rates and high networking costs. Furthermore, the continuity of key distribution services is affected when there is a large demand for keys or when the QKD link fails.

Method used

A three-level key distribution model is adopted, combining classical commercial cryptography algorithms, post-quantum cryptography (PQC) algorithms, and quantum key distribution (QKD). Utilizing token bucket and key pool technologies, three modes are designed: QKD key relay, QKD key negotiation, and PQC key negotiation, to ensure the sustainability and high availability of the secure distribution process of session keys.

Benefits of technology

It improves the reliability and business continuity of quantum key distribution, reduces networking costs, and ensures secure communication under the threat of quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120896694B_ABST
    Figure CN120896694B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a communication method, device and equipment based on a cryptographic infrastructure system and a medium, relating to the technical field of quantum secure communication, comprising: a calling KMS determining a key distribution mode in response to a session key application, determining a session key using the key distribution mode, encrypting the session key to obtain an encrypted session key, and sending the encrypted session key to the calling terminal, so that the calling terminal decrypts the encrypted session key to obtain the session key and uses the session key to perform encrypted communication with a called terminal. The classical commercial algorithm, PQC algorithm and quantum key distribution are combined, a three-level key distribution mode is designed, and technologies such as token bucket and key pool are combined to ensure the business sustainability and high availability of the session key security distribution process based on QKD.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of quantum secure communication, and in particular to a communication method based on a cryptographic infrastructure system, a communication device based on a cryptographic infrastructure system, an electronic device and a computer readable storage medium. BACKGROUND

[0002] With the rapid development of mobile communication technologies such as IP-based 4G, 5G networks, modern telecommunications operators are facing information security challenges. Traditional cryptographic methods, such as the encryption system based on the Public Key Infrastructure (PKI), have provided reliable security for data transmission in the past few decades, but its security is threatened by the rapid progress of quantum computing technology. The powerful computing power of quantum computers may crack existing asymmetric encryption algorithms such as RSA and ECC in the future, which makes the traditional PKI system that relies on these algorithms face the risk of failure. Therefore, it is urgent to explore a new generation of cryptographic infrastructure that can resist quantum attacks.

[0003] Quantum Key Distribution (QKD) as a new key exchange technology based on quantum mechanics, with its core advantage of "unconditional security", provides an important idea to solve this problem. QKD uses the non-cloning and measurement disturbance characteristics of quantum states to ensure the security of the key distribution process, which is difficult to be cracked even in the face of quantum computer attacks. This technology not only provides long-term security in theory, but also lays a solid foundation for building the next generation of cryptographic infrastructure.

[0004] The current quantum key distribution has a relatively low coding rate, and the networking mode is to connect one-to-one QKD devices plus key relays and classical network topology, which has a high networking cost. When the demand for keys is large or the QKD link fails, it will affect the continuity of the key distribution service. SUMMARY

[0005] In view of the above problems, the present application embodiments are proposed in order to provide a communication method based on a cryptographic infrastructure system, a communication device based on a cryptographic infrastructure system, an electronic device and a computer readable storage medium which overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problems, the present application embodiments disclose a communication method based on a cryptographic infrastructure system, applied to a calling key management system KMS to which a calling terminal belongs, and the method comprises:

[0007] In response to the session key application, the key distribution mode is determined;

[0008] determining a session key according to the key distribution mode;

[0009] encrypting the session key to obtain an encrypted session key;

[0010] sending the encrypted session key to the calling terminal, so that the calling terminal decrypts the encrypted session key to obtain the session key, and uses the session key to perform encrypted communication with the called terminal.

[0011] In one or more embodiments, when the key distribution mode is a quantum key distribution (QKD) key relay mode, the determining a session key according to the key distribution mode comprises:

[0012] sending a key relay application to a quantum key manager (QKM), so that the QKM takes N key tokens from a token bucket, when the number of key tokens remaining in the token bucket meets a first condition, generating N session keys and sending them to the calling KMS and the called KMS to which the called terminal belongs, or, generating N session keys through the calling KMS; when the number of remaining key tokens meets a second condition, returning the N key tokens, setting the key distribution mode to a quantum key distribution (QKD) key negotiation mode, performing a key protection key generation process to obtain a key protection key, and sending the key protection key to the calling KMS; wherein N is a positive integer;

[0013] obtaining the key protection key, and performing a QKD key negotiation process using the key protection key to obtain a session key.

[0014] In one or more embodiments, when the key distribution mode is a quantum key distribution (QKD) key negotiation mode, the determining a session key according to the key distribution mode comprises:

[0015] querying the number of key tokens in the token bucket through the QKM;

[0016] when the number of key tokens is greater than an upper threshold, setting the key distribution mode to a QKD key relay mode, and jumping to the determining a key distribution mode;

[0017] when the number of key tokens and the counter are both 0, setting the key distribution mode to a post-quantum cryptography (PQC) key negotiation mode, and performing a PQC key negotiation process to obtain a session key;

[0018] when the number of key tokens is greater than 0 and the counter is 0, obtaining a key protection key through a calling QKM to which the calling KMS belongs, and performing a QKD key negotiation process using the key protection key to obtain a session key;

[0019] When the number of key tokens belongs to other cases, a QKD key negotiation process is performed by using the key protection key to obtain a session key.

[0020] In one or more embodiments, when the key distribution mode is a PQC key negotiation mode, the determination of the session key by using the key distribution mode comprises:

[0021] The number of key tokens in the token bucket is queried by the QKM;

[0022] When the number of key tokens is greater than the upper threshold, the key distribution mode is set to a QKD key relay mode, and the determination of the key distribution mode is jumped to;

[0023] When the number of key tokens is greater than 0 and less than the lower threshold, the key distribution is set to a QKD key negotiation mode, a key protection key is obtained by a calling QKM to which the calling KMS belongs, and a QKD key negotiation process is performed by using the key protection key to obtain a session key;

[0024] When the number of key tokens belongs to other cases, a PQC key negotiation process is performed to obtain a session key.

[0025] In one or more embodiments, before the response to the session key application, further comprising:

[0026] An SM2 signature key pair and a PQC signature key pair are generated, and a signature certificate is applied for issuance to a certificate authentication system CAS;

[0027] An SM2 encryption key pair and a PQC encryption key pair are sent to the calling terminal; the SM2 encryption key pair and the PQC encryption key pair are used for negotiating a session key;

[0028] Identity authentication is performed between the calling KMS to which the calling terminal belongs and the called KMS to which the called terminal belongs, and between the calling terminal by using the SM2 signature key pair and the PQC signature key pair, and a secure channel is established.

[0029] In one or more embodiments, the QKD key negotiation process is performed by using the key protection key to obtain a session key, comprising:

[0030] A counter is started for the key protection key, and a first random number is generated;

[0031] The first random number is encrypted by using the key protection key to obtain an encrypted first random number;

[0032] The encrypted first random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted first random number, generate a second random number, decrypt the encrypted first random number using the key protection key to obtain the first random number, perform a calculation on the first random number and the second random number to obtain a session key, and encrypt the second random number using the key protection key to obtain an encrypted second random number, and send the encrypted second random number to the calling KMS;

[0033] Obtain the encrypted second random number, decrypt the encrypted second random number using the key protection key to obtain the second random number, and perform a calculation between the first random number and the second random number to obtain the session key.

[0034] In one or more embodiments, the step of performing the PQC key negotiation process to obtain the session key includes:

[0035] A third random number is generated, and the third random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the called terminal to obtain an encrypted third random number;

[0036] The encrypted third random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted third random number, generate a fourth random number, decrypt the encrypted third random number using the SM2 encryption private key and PQC encryption private key corresponding to the called terminal to obtain the third random number, and perform a calculation on the third random number and the fourth random number to obtain a session key. Then, the fourth random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the calling terminal to obtain an encrypted fourth random number, and the encrypted fourth random number is sent to the calling KMS.

[0037] Obtain the encrypted fourth random number, decrypt the encrypted fourth random number using the SM2 encryption private key and PQC encryption private key corresponding to the calling terminal to obtain the fourth random number, and perform a calculation on the third random number and the fourth random number to obtain the session key.

[0038] Accordingly, this invention discloses a communication method based on a cryptographic infrastructure system, applied to a calling quantum key manager (QKM) to which the calling KMS belongs, the method comprising:

[0039] In response to a key relay request, retrieve N key tokens from the token bucket;

[0040] When the number of remaining key tokens in the token bucket meets the first condition, N session keys are generated and sent to the calling KMS and the called KMS to which the called terminal belongs; or, the calling KMS generates N session keys and sends the N session keys to the called KMS, so that the calling KMS and the called KMS respectively send the N session keys to the calling terminal and the called terminal, so that the calling terminal and the called terminal use the N session keys for encrypted communication; where N is a positive integer;

[0041] When the remaining N key tokens meet the second condition, return the N key tokens, set the key distribution mode to Quantum Key Distribution (QKD) key negotiation mode, execute the key protection key generation process, obtain the key protection key, send the key protection key to the calling KMS, so that the calling KMS can obtain the key protection key, use the key protection key to execute the QKD key negotiation process, obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

[0042] In one or more embodiments, the step of generating N session keys when the number of remaining key tokens in the token bucket meets a first condition includes:

[0043] When the number of remaining key tokens in the token bucket is not less than the lower threshold, N QKD keys are taken from the key pool as relay keys, and N session keys are generated; the N relay keys are used to relay keys to the N session keys.

[0044] In one or more embodiments, the step of executing the key protection key generation process to obtain the key protection key and sending the key protection key to the calling KMS includes:

[0045] Consume a key token from the token bucket and retrieve a QKD key from the key pool as a relay key;

[0046] Generate any random number as the key protection key, and use the relay key to send the key protection key to the calling KMS.

[0047] In one or more embodiments, prior to the response to the key relay request, the method further includes:

[0048] Generate SM2 signature key pairs and PQC signature key pairs, and apply to the Certificate Authority (CAS) for a signature certificate;

[0049] The called KMS and the called QKM to which the called KMS belongs, as well as the calling KMS, use the SM2 signature key pair and the PQC signature key pair to perform identity authentication and establish a secure channel.

[0050] Accordingly, embodiments of the present invention disclose a communication device based on a cryptographic infrastructure system, applied to calling KMS, the device comprising:

[0051] The first determining module is used to determine the key distribution mode in response to a session key request;

[0052] The second determining module is used to determine the session key using the key distribution mode;

[0053] An encryption module is used to encrypt the session key to obtain an encrypted session key;

[0054] The sending module is used to send the encrypted session key to the calling terminal, so that the calling terminal can decrypt the encrypted session key to obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

[0055] In one or more embodiments, when the key distribution mode is a quantum key distribution (QKD) key relay mode, the second determining module is specifically used for:

[0056] A key relay request is sent to the Quantum Key Manager (QKM) so that the QKM retrieves N key tokens from the token bucket. When the number of remaining key tokens in the token bucket meets a first condition, N session keys are generated and sent to the calling KMS and the called KMS to which the called terminal belongs, or the calling KMS generates N session keys. When the number of remaining key tokens meets a second condition, the N key tokens are returned, the key distribution mode is set to the Quantum Key Distribution (QKD) key negotiation mode, the key protection key generation process is executed to obtain the key protection key, and the key protection key is sent to the calling KMS; where N is a positive integer.

[0057] Obtain the key protection key and use it to perform the QKD key negotiation process to obtain the session key.

[0058] In one or more embodiments, when the key distribution mode is a quantum key distribution (QKD) key negotiation mode, the second determining module is specifically used for:

[0059] Query the number of key tokens in the token bucket using QKM;

[0060] When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode.

[0061] When both the number of key tokens and the counter are 0, the key distribution mode is set to the post-quantum cryptography PQC key negotiation mode, and the PQC key negotiation process is executed to obtain the session key.

[0062] When the number of key tokens is greater than 0 and the counter is 0, the key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key;

[0063] When the number of key tokens is other than the specified number, the QKD key negotiation process is performed using the key protection key to obtain the session key.

[0064] In one or more embodiments, when the key distribution mode is PQC key negotiation mode, the second determining module is specifically used for:

[0065] Query the number of key tokens in the token bucket using QKM;

[0066] When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode.

[0067] When the number of key tokens is greater than 0 and less than the lower threshold, the key distribution is set to QKD key negotiation mode. The key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key.

[0068] When the number of key tokens is otherwise specified, the PQC key negotiation process is executed to obtain the session key.

[0069] In one or more embodiments, it further includes:

[0070] The first generation module is used to generate an SM2 signature key pair and a PQC signature key pair before responding to the session key request;

[0071] The first application module is used to apply to the Certificate Authentication System (CAS) for the issuance of a signature certificate;

[0072] The sending module is further configured to send an SM2 encryption key pair and a PQC encryption key pair to the calling terminal; the SM2 encryption key pair and the PQC encryption key pair are used to negotiate the session key;

[0073] The first authentication module is used to perform identity authentication with the called KMS to which the called terminal belongs, and with the calling terminal, using the SM2 signature key pair and the PQC signature key pair, and to establish a secure channel.

[0074] In one or more embodiments, the step of performing a QKD key negotiation process using the key protection key to obtain a session key includes:

[0075] Start a counter for the key protection key and generate a first random number;

[0076] The first random number is encrypted using the key protection key to obtain an encrypted first random number;

[0077] The encrypted first random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted first random number, generate a second random number, decrypt the encrypted first random number using the key protection key to obtain the first random number, perform a calculation on the first random number and the second random number to obtain a session key, and encrypt the second random number using the key protection key to obtain an encrypted second random number, and send the encrypted second random number to the calling KMS;

[0078] Obtain the encrypted second random number, decrypt the encrypted second random number using the key protection key to obtain the second random number, and perform a calculation between the first random number and the second random number to obtain the session key.

[0079] In one or more embodiments, the step of performing the PQC key negotiation process to obtain the session key includes:

[0080] A third random number is generated, and the third random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the called terminal to obtain an encrypted third random number;

[0081] The encrypted third random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted third random number, generate a fourth random number, decrypt the encrypted third random number using the SM2 encryption private key and PQC encryption private key corresponding to the called terminal to obtain the third random number, and perform a calculation on the third random number and the fourth random number to obtain a session key. Then, the fourth random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the calling terminal to obtain an encrypted fourth random number, and the encrypted fourth random number is sent to the calling KMS.

[0082] Obtain the encrypted fourth random number, decrypt the encrypted fourth random number using the SM2 encryption private key and PQC encryption private key corresponding to the calling terminal to obtain the fourth random number, and perform a calculation on the third random number and the fourth random number to obtain the session key.

[0083] Accordingly, embodiments of the present invention disclose a communication device based on a cryptographic infrastructure system, applied to a calling QKM, the device comprising:

[0084] The acquisition module is used to retrieve N key tokens from the token bucket in response to a key relay request;

[0085] The first processing module is configured to, when the number of remaining key tokens in the token bucket meets a first condition, generate N session keys and send them to the calling KMS and the called KMS to which the called terminal belongs, or generate N session keys through the calling KMS and send the N session keys to the called KMS so that the calling KMS and the called KMS respectively send the N session keys to the calling terminal and the called terminal, so that the calling terminal and the called terminal use the N session keys for encrypted communication; wherein, N is a positive integer;

[0086] The second processing module is used to return the N key tokens when the remaining conditions are met, set the key distribution mode to the quantum key distribution (QKD) key negotiation mode, execute the key protection key generation process to obtain the key protection key, send the key protection key to the calling KMS so that the calling KMS can obtain the key protection key, use the key protection key to execute the QKD key negotiation process to obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

[0087] In one or more embodiments, the first processing module is specifically used for:

[0088] When the number of remaining key tokens in the token bucket is not less than the lower threshold, N QKD keys are taken from the key pool as relay keys, and N session keys are generated; the N relay keys are used to relay keys to the N session keys.

[0089] In one or more embodiments, the second processing module is specifically used for:

[0090] Consume a key token from the token bucket and retrieve a QKD key from the key pool as a relay key;

[0091] Generate any random number as the key protection key, and use the relay key to send the key protection key to the calling KMS.

[0092] In one or more embodiments, prior to the response to the key relay request, the method further includes:

[0093] The second generation module is used to generate SM2 signature key pairs and PQC signature key pairs;

[0094] The second application module is used to apply to the Certificate Authentication System (CAS) for the issuance of a signature certificate;

[0095] The second authentication module is used to perform identity authentication with the called QKM to which the called KMS belongs, and with the calling KMS, using the SM2 signature key pair and the PQC signature key pair, and to establish a secure channel.

[0096] Accordingly, embodiments of the present invention disclose an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various steps of the above-described communication method embodiments based on a cryptographic infrastructure system.

[0097] Accordingly, embodiments of the present invention disclose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the various steps of the above-described communication method embodiments based on a cryptographic infrastructure system.

[0098] The embodiments of the present invention have the following advantages:

[0099] In response to a session key request, the calling KMS determines a key distribution mode, uses that mode to determine a session key, encrypts the session key to obtain an encrypted session key, and sends the encrypted session key to the calling terminal. The calling terminal then decrypts the encrypted session key to obtain the encrypted session key and uses it for encrypted communication with the called terminal. This system integrates classical commercial cryptography algorithms, PQC algorithms, and quantum key distribution. Furthermore, it employs a three-level key distribution mode and incorporates token buckets and key pools to ensure the business sustainability and high availability of the QKD-based secure session key distribution process. Attached Figure Description

[0100] Figure 1 This is an architecture diagram of a cryptographic infrastructure system according to the present invention;

[0101] Figure 2 This is a flowchart illustrating the steps of a communication method based on a cryptographic infrastructure system according to the present invention.

[0102] Figure 3 This is a flowchart illustrating the steps of a second embodiment of a communication method based on a cryptographic infrastructure system according to the present invention.

[0103] Figure 4 This is a structural block diagram of a communication device based on a cryptographic infrastructure system according to the present invention.

[0104] Figure 5This is a structural block diagram of a second embodiment of a communication device based on a cryptographic infrastructure system according to the present invention. Detailed Implementation

[0105] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0106] One of the core concepts of this invention is that it integrates classical commercial cryptographic algorithms, PQC algorithms, and quantum key distribution, and designs a three-level key distribution mode, combining technologies such as token buckets and key pools to ensure the business sustainability and high availability of the QKD-based session key secure distribution process.

[0107] Reference Figure 1 This diagram illustrates an architecture of a cryptographic infrastructure system according to the present invention. Cryptographic infrastructure is a collection of hardware, software, personnel, policies, and procedures used to implement functions such as key and digital certificate generation, management, storage, distribution, and revocation. Specifically, this cryptographic infrastructure system may include:

[0108] The quantum communication layer is used to implement quantum key distribution. It includes a quantum key manager (QKM), a quantum key distributor (QKD), and a quantum key distribution network controller (QKDNC). It executes the QKD protocol through QKD links and generates QKD keys in conjunction with key relays.

[0109] The key management system (KMS) obtains and provides QKD-distributed session keys to the terminals from the quantum communication layer. The cryptography management service platform (CMSP) provides cryptographic service resource management and routing for the system. The certificate authority system (CAS) provides digital certificate issuance and query for users and various components of the system. The identity and access management system (IAM) provides identity management and access authorization for users and various components of the system.

[0110] The terminal is equipped with a secure SIM (Subscriber Identification Module) card or software cryptographic module, and interacts with a secure middleware and key management system, certificate authentication system, and identity and access management system.

[0111] Reference Figure 2 The diagram illustrates a flowchart of a communication method based on a cryptographic infrastructure system according to the present invention. This method is applied to a calling key management system (KMS) to which the calling terminal belongs, and specifically includes the following steps:

[0112] Step 201: In response to the session key request, determine the key distribution mode.

[0113] Specifically, a user can initiate a communication command to another user's terminal (referred to as the "calling terminal" for ease of description) through a terminal (referred to as the "called terminal"). In response to the communication command, the calling terminal can apply to the KMS (referred to as the "calling KMS") to which the calling terminal belongs for a session key to communicate with the called terminal, that is, to initiate a session key application to the calling KMS.

[0114] When the calling KMS receives a session key request, it can determine the key distribution mode for the session key at the current moment through a query. The key distribution mode can include three types: QKD key relay mode, QKD key negotiation mode, and PQC key negotiation mode. The default key distribution mode can be set to QKD key relay mode. That is, if not set, the calling KMS can determine the key distribution mode as QKD key relay mode after receiving the session key request.

[0115] Step 202: Determine the session key using the key distribution mode.

[0116] Once the key distribution mode at the current moment is determined, the session key can be generated using that mode. In other words, if the current key distribution mode is QKD key relay mode, then the process corresponding to QKD key relay mode can be used to determine the session key; if the current key distribution mode is PQC key negotiation mode, then the process corresponding to PQC key negotiation mode can be used to determine the session key, and so on.

[0117] In this embodiment of the invention, when the key distribution mode is a quantum key distribution (QKD) key relay mode, determining the session key using the key distribution mode includes:

[0118] A key relay request is sent to the Quantum Key Manager (QKM) so that the QKM retrieves N key tokens from the token bucket. When the number of remaining key tokens in the token bucket meets a first condition, N session keys are generated and sent to the calling KMS and the called KMS to which the called terminal belongs, or the calling KMS generates N session keys. When the number of remaining key tokens meets a second condition, the N key tokens are returned, the key distribution mode is set to the Quantum Key Distribution (QKD) key negotiation mode, the key protection key generation process is executed to obtain the key protection key, and the key protection key is sent to the calling KMS; where N is a positive integer.

[0119] Obtain the key protection key and use it to perform the QKD key negotiation process to obtain the session key.

[0120] Specifically, the calling KMS sends a key relay request to its affiliated QKM (referred to as "calling QKM"). The key relay request may include the number of session keys to be requested. This number can be determined based on the number of session keys requested by the terminal. In other words, the calling KMS can request the same number of session keys from the calling QKM as the calling terminal requests from the calling KMS.

[0121] The calling QKM retrieves N key tokens from the token bucket according to the number requested in the key relay application, where N is a positive integer. Then, it checks the number of remaining key tokens in the token bucket. If this number meets a preset first condition, the calling QKM can retrieve N QKD keys from the key pool as relay keys, and generate N random numbers as session keys. Each session key is then used as a trusted relay in the quantum key distribution process using a relay key, thereby sending the N session keys to the calling KMS, and also to the called KMS through the QKM to which the called KMS belongs (denoted as the "called QKM").

[0122] Alternatively, the calling QKM can retrieve N QKD keys from the key pool as relay keys and then notify the calling KMS to directly generate N session keys. In this way, the calling KMS can relay the session keys to the called KMS through the calling QKM and the called QKM.

[0123] The first condition can be that the number of remaining key tokens in the token bucket is not less than a preset lower threshold.

[0124] Furthermore, if the number of remaining key tokens in the token bucket meets the preset second condition, the calling QKM can return N key tokens to the token bucket, then set the key distribution mode to QKD key negotiation mode, and then execute the key protection key generation process to obtain the key protection key, and send the key protection key to the calling KMS.

[0125] After obtaining the key protection key, the calling KMS uses the key protection key to perform the QKD key negotiation process, thereby obtaining the session key.

[0126] The second condition can be that the number of remaining key tokens in the token bucket is less than a preset lower threshold.

[0127] It's important to note that after changing the key distribution mode, the process corresponding to the changed key distribution mode is not immediately executed to determine the session key. Instead, subsequent processes continue. The changed key distribution mode takes effect in the next round of processes. For example, in the statement "When the number of remaining key tokens meets the second condition, return the N key tokens, set the key distribution mode to Quantum Key Distribution (QKD) key negotiation mode, execute the key protection key generation process, obtain the key protection key, and send the key protection key to the calling KMS," after the calling QKM sets the key distribution mode to QKD key negotiation mode, it does not execute the process corresponding to the QKD key negotiation mode to determine the session key. Instead, it continues to execute the "key protection key generation process." In the next round of processes, the calling KMS can determine the key distribution mode as "QKD key negotiation mode" by "determining the key distribution mode," and then execute the process corresponding to the QKD key negotiation mode to determine the session key.

[0128] Furthermore, in practical applications, the specific content of the first and second conditions can be adjusted according to actual needs, and the embodiments of the present invention do not impose any restrictions on this.

[0129] In this embodiment of the invention, the step of performing a QKD key negotiation process using the key protection key to obtain a session key includes:

[0130] Start a counter for the key protection key and generate a first random number;

[0131] The first random number is encrypted using the key protection key to obtain an encrypted first random number;

[0132] The encrypted first random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted first random number, generate a second random number, decrypt the encrypted first random number using the key protection key to obtain the first random number, perform a calculation on the first random number and the second random number to obtain a session key, and encrypt the second random number using the key protection key to obtain an encrypted second random number, and send the encrypted second random number to the calling KMS;

[0133] Obtain the encrypted second random number, decrypt the encrypted second random number using the key protection key to obtain the second random number, and perform a calculation between the first random number and the second random number to obtain the session key.

[0134] Specifically, after obtaining the key protection key, the calling KMS can start a counter or timer for the key protection key, which can be set to a time or number as the lifespan, either counting down or decrementing by 1 with each use. At the same time, a random number (denoted as the "first random number") is generated.

[0135] The first random number is encrypted using a key protection key to obtain the encrypted first random number (denoted as "encrypted first random number"). The encrypted first random number is then sent to the called terminal's KMS through a secure channel.

[0136] After obtaining the key protection key, the called KMS can also generate a random number (denoted as the "second random number"). It then encrypts the second random number using the key protection key to obtain an encrypted second random number (denoted as the "encrypted second random number"). This encrypted second random number is then sent to the calling KMS through a secure channel. Simultaneously, the called KMS also receives the encrypted first random number sent by the calling KMS. It then decrypts the encrypted first random number using the key protection key to obtain the first random number. Finally, it performs a calculation, such as an XOR operation, between the first and second random numbers to obtain the session key.

[0137] Similarly, after obtaining the encrypted second random number, the calling KMS can decrypt the encrypted second random number using the key protection key to obtain the second random number. Then, it can perform a calculation, such as an XOR operation, between the first and second random numbers to obtain the session key. In this way, the calling KMS and the called KMS obtain the same session key.

[0138] It should be noted that when encrypting random numbers using a key-protected key, block symmetric encryption can be used if the key includes additional information such as a key identifier. For example, AES or SM4 algorithms can be used with key wrap mode. Of course, in practical applications, the specific encryption method can be set according to actual needs, and this embodiment of the invention does not impose any restrictions on it.

[0139] Furthermore, in addition to using a key protection key to encrypt random numbers, the key protection key can also be used to perform operations on random numbers, such as an XOR operation (to encrypt truly random numbers), to obtain the operation result. In other words, in practical applications, the specific method of protecting random numbers can be set according to actual needs, and this embodiment of the invention does not limit this.

[0140] In this embodiment of the invention, when the key distribution mode is a quantum key distribution (QKD) key negotiation mode, determining the session key using the key distribution mode includes:

[0141] Query the number of key tokens in the token bucket using QKM;

[0142] When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode.

[0143] When both the number of key tokens and the counter are 0, the key distribution mode is set to the post-quantum cryptography PQC key negotiation mode, and the PQC key negotiation process is executed to obtain the session key.

[0144] When the number of key tokens is greater than 0 and the counter is 0, the key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key;

[0145] When the number of key tokens is other than the specified number, the QKD key negotiation process is performed using the key protection key to obtain the session key.

[0146] Specifically, the calling KMS can query the number of key tokens in the token bucket through the calling QKM. When the number of key tokens exceeds a preset upper limit threshold, the key distribution mode can be set to QKD key relay mode, and the process will jump to the step of determining the key distribution mode. In other words, after jumping, the key distribution mode is determined to be QKD key relay mode, and the process corresponding to QKD key relay mode will continue to be executed to determine the session key.

[0147] When both the key token count and the counter corresponding to the key protection key are 0, the key distribution mode is set to PQC key negotiation mode, and the PQC key negotiation process is executed to obtain the session key.

[0148] When the number of key tokens is greater than 0 and the counter is 0, the calling QKM executes the key protection key generation process to obtain the key protection key, and then sends the key protection key to the calling KMS. After obtaining the key protection key, the calling KMS uses the key protection key to execute the QKD key negotiation process to obtain the session key.

[0149] When the number of key tokens falls under other circumstances, i.e., none of the above circumstances apply, the QKD key negotiation process is performed using the key protection key to obtain the session key.

[0150] The specific method for executing the QKD key negotiation process is as described above and will not be repeated here.

[0151] In this embodiment of the invention, the step of performing the PQC key negotiation process to obtain the session key includes:

[0152] A third random number is generated, and the third random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the called terminal to obtain an encrypted third random number;

[0153] The encrypted third random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted third random number, generate a fourth random number, decrypt the encrypted third random number using the SM2 encryption private key and PQC encryption private key corresponding to the called terminal to obtain the third random number, and perform a calculation on the third random number and the fourth random number to obtain a session key. Then, the fourth random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the calling terminal to obtain an encrypted fourth random number, and the encrypted fourth random number is sent to the calling KMS.

[0154] Obtain the encrypted fourth random number, decrypt the encrypted fourth random number using the SM2 encryption private key and PQC encryption private key corresponding to the calling terminal to obtain the fourth random number, and perform a calculation on the third random number and the fourth random number to obtain the session key.

[0155] Specifically, the calling party generates a random number (denoted as "third random number"), encrypts the third random number using the SM2 encryption public key and PQC encryption public key corresponding to the called terminal, and obtains the encrypted third random number (denoted as "encrypted third random number"). Then, the encrypted third random number is sent to the called KMS to which the called terminal belongs through a secure channel.

[0156] The called KMS can also generate a random number (denoted as the "fourth random number"). This fourth random number is encrypted using the SM2 and PQC encryption public keys corresponding to the calling terminal, resulting in an encrypted fourth random number (denoted as the "encrypted fourth random number"). This encrypted fourth random number is then sent to the calling KMS through a secure channel. Simultaneously, the called KMS also receives the encrypted third random number sent by the calling KMS. At this point, the encrypted third random number is decrypted using the SM2 and PQC encryption private keys corresponding to the called terminal, yielding the third random number. This third random number is then combined with the fourth random number using a computational operation, such as an XOR operation, to obtain the session key.

[0157] Similarly, after obtaining the encrypted fourth random number, the calling KMS can decrypt it using the SM2 and PQC encryption private keys corresponding to the calling terminal, obtaining the fourth random number. Then, it performs a calculation, such as an XOR operation, between the third and fourth random numbers to obtain the session key. In this way, the calling KMS and the called KMS obtain the same session key.

[0158] In this embodiment of the invention, when the key distribution mode is PQC key negotiation mode, determining the session key using the key distribution mode includes:

[0159] Query the number of key tokens in the token bucket using QKM;

[0160] When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode.

[0161] When the number of key tokens is greater than 0 and less than the lower threshold, the key distribution is set to QKD key negotiation mode. The key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key.

[0162] When the number of key tokens is otherwise specified, the PQC key negotiation process is executed to obtain the session key.

[0163] Specifically, the calling KMS can query the number of key tokens in the token bucket through the calling QKM. When the number of key tokens exceeds a preset upper limit threshold, the key distribution mode can be set to QKD key relay mode, and the process will jump to the step of determining the key distribution mode. In other words, after jumping, the key distribution mode is determined to be QKD key relay mode, and the process corresponding to QKD key relay mode will continue to be executed to determine the session key.

[0164] When the number of key tokens is greater than 0 and less than a preset lower threshold, the key distribution mode can be set to QKD key negotiation mode. Then, the calling QKM executes the key protection key generation process to obtain the key protection key, which is then sent to the calling KMS. After obtaining the key protection key, the calling KMS uses it to execute the QKD key negotiation process to obtain the session key. The specific method for executing the QKD key negotiation process is as described above and will not be repeated here.

[0165] When the number of key tokens falls under other circumstances, i.e., none of the above circumstances apply, the PQC key negotiation process is executed to obtain the session key. The specific method for executing the PQC key negotiation process has been described previously and will not be repeated here.

[0166] Step 203: Encrypt the session key to obtain an encrypted session key.

[0167] To ensure the security of the session key, it can be encrypted to obtain the encrypted session key (denoted as the "encrypted session key"). For example, it can be protected by a symmetric encryption algorithm using a key provided by the calling terminal and by HMAC (Hash-based Message Authentication Code) with key hash integrity protection. Similarly, the called party's KMS can also encrypt the session key to obtain the encrypted session key.

[0168] Of course, in practical applications, other methods can also be used to encrypt the session key. The specific encryption method can be set according to actual needs, and this embodiment of the invention does not limit it.

[0169] Step 204: Send the encrypted session key to the calling terminal so that the calling terminal can decrypt the encrypted session key to obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

[0170] After obtaining the encrypted session key, the calling KMS can send it to the calling terminal, which can then decrypt it to obtain the session key. Similarly, the called KMS can send the encrypted session key to the called terminal, which can then decrypt it to obtain the session key. In this way, the calling terminal can use the session key to conduct encrypted communication with the called terminal, thus achieving end-to-end encrypted communication.

[0171] In this embodiment of the invention, prior to the response to the session key request, the method further includes:

[0172] Generate SM2 signature key pairs and PQC signature key pairs, and apply to the Certificate Authority (CAS) for a signature certificate;

[0173] Send an SM2 encryption key pair and a PQC encryption key pair to the calling terminal; the SM2 encryption key pair and the PQC encryption key pair are used to negotiate the session key;

[0174] The system authenticates itself with the called terminal's KMS and establishes a secure channel with the calling terminal using the SM2 signature key pair and the PQC signature key pair.

[0175] Specifically, before the calling terminal sends a session key request to the calling KMS, the calling KMS can also generate an SM2 signature key pair and a PQC signature key pair, and apply to the CAS for a signature certificate. Of course, each terminal, each KMS, each QKM, the Cryptographic Management Service Platform (CMSP), and the Quantum Network Controller (QKDNC) in the cryptographic infrastructure system will generate their own SM2 signature key pair and PQC signature key pair, and apply to the CAS for a signature certificate.

[0176] Then, the calling terminal obtains the SM2 encryption key pair and the PQC encryption key pair from the calling KMS, and fills multiple keys with a security medium (a security medium with more than 2M of storage space can be filled with more than 100,000 128-bit keys), and other terminals in the cryptographic infrastructure system follow the same procedure.

[0177] In the cryptographic infrastructure system, each terminal and its respective KMS, each KMS and its respective QKM, and each KMS (when there is no direct network connection, CMSP acts as a network connection proxy) perform two-way dual authentication using SM2 signature key pairs and PQC signature key pairs. They negotiate keys using SM2 encryption key pairs and PQC encryption key pairs (when neither party has the other's encryption public key, they exchange encryption public keys and use their own SM2 signature key and PQC signature key to perform dual signature authentication on the encryption public key), and establish a secure channel for key negotiation or distribution (both key negotiation and channel data encryption can use the TLS transport layer security protocol). This secure channel updates the key periodically according to the above method.

[0178] Furthermore, since continuous quantum key distribution can be performed between adjacent QKDs, for each 128-bit (or an integer multiple of 128, 128*N) QKD key formed, a key token is added to the token bucket, and the QKD key is stored in the key pool. When the number of key tokens in the token bucket exceeds the maximum capacity CM, a key replacement mode is activated, deleting the first key token added to the bucket and its corresponding QKD key in the key pool. The value of CM is related to the key validity period Tk, the quantum key distribution rate Rk, and the key pool storage capacity Ct: CM = MIN(Rk*Tk, Ct) / (128*N).

[0179] In this embodiment of the invention, the calling KMS responds to a session key request, determines a key distribution mode, uses the key distribution mode to determine a session key, encrypts the session key to obtain an encrypted session key, and sends the encrypted session key to the calling terminal. The calling terminal then decrypts the encrypted session key to obtain the encrypted session key and uses the session key to conduct encrypted communication with the called terminal. This invention integrates classical commercial cryptography algorithms, PQC algorithms, and quantum key distribution, and designs a three-level key distribution mode, combining token bucket and key pool technologies to ensure the business sustainability and high availability of the QKD-based secure session key distribution process.

[0180] Reference Figure 3 The diagram illustrates a second embodiment of a communication method based on a cryptographic infrastructure system according to the present invention, applied to a calling quantum key manager (QKM) to which the calling KMS belongs, and specifically includes the following steps:

[0181] Step 301: In response to the key relay request, retrieve N key tokens from the token bucket.

[0182] Step 302: When the number of remaining key tokens in the token bucket meets the first condition, generate N session keys and send them to the calling KMS and the called KMS to which the called terminal belongs; or, generate N session keys through the calling KMS and send the N session keys to the called KMS so that the calling KMS and the called KMS respectively send the N session keys to the calling terminal and the called terminal, so that the calling terminal and the called terminal use the N session keys for encrypted communication; where N is a positive integer.

[0183] Specifically, the calling QKM retrieves N key tokens from the token bucket based on the number requested in the key relay application, where N is a positive integer. Then, it checks the number of remaining key tokens in the token bucket. If this number meets a preset first condition, the calling QKM can retrieve N QKD keys from the key pool as relay keys, and generate N random numbers as session keys. Each session key is then used as a trusted relay in the quantum key distribution process, with a relay key for each session key. This allows the calling KMS and the called KMS to send the session keys to their respective terminals, enabling encrypted communication between them.

[0184] Alternatively, the calling QKM can retrieve N QKD keys from the key pool as relay keys and then notify the calling KMS to directly generate N session keys. In this way, the calling KMS can relay the session keys to the called KMS through both the calling and called QKMs. This allows the calling and called KMSs to send the session keys to the calling and called terminals respectively, enabling encrypted communication between them.

[0185] The first condition can be that the number of remaining key tokens in the token bucket is not less than a preset lower threshold; the N relay keys are used to relay N session keys.

[0186] Step 303: When the remaining N key tokens meet the second condition, return the N key tokens, set the key distribution mode to Quantum Key Distribution (QKD) key negotiation mode, execute the key protection key generation process to obtain the key protection key, send the key protection key to the calling KMS so that the calling KMS can obtain the key protection key, use the key protection key to execute the QKD key negotiation process to obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

[0187] If the number of remaining key tokens in the token bucket meets the preset second condition, the calling QKM can return N key tokens to the token bucket, then set the key distribution mode to QKD key negotiation mode, and then execute the key protection key generation process to obtain the key protection key, and send the key protection key to the calling KMS.

[0188] After obtaining the key protection key, the calling KMS uses the key protection key to perform the QKD key negotiation process, thereby obtaining the session key.

[0189] The second condition can be that the number of remaining key tokens in the token bucket is less than a preset lower threshold.

[0190] In this embodiment of the invention, the step of executing the key protection key generation process to obtain the key protection key and sending the key protection key to the calling KMS includes:

[0191] Consume a key token from the token bucket and retrieve a QKD key from the key pool as a relay key;

[0192] Generate any random number as the key protection key, and use the relay key to send the key protection key to the calling KMS.

[0193] Specifically, the calling QKM can consume a key token from the token bucket, take a QKD key from the key pool as a relay key, generate any random number as a key protection key, and use the relay key as a trusted relay in the quantum key distribution process. The random number is sent to the calling KMS and also sent to the called KMS through the called QKM.

[0194] In this embodiment of the invention, prior to the response to the key relay request, the method further includes:

[0195] Generate SM2 signature key pairs and PQC signature key pairs, and apply to the Certificate Authority (CAS) for a signature certificate;

[0196] The called KMS and the called QKM to which the called KMS belongs, as well as the calling KMS, use the SM2 signature key pair and the PQC signature key pair to perform identity authentication and establish a secure channel.

[0197] Specifically, before the calling KMS sends a key relay request to the calling QKM, the calling QKM can also generate an SM2 signature key pair and a PQC signature key pair, and apply to the CAS for a signature certificate. Of course, each terminal, each KMS, each QKM, the cryptographic management service platform CMSP, and the quantum network controller QKDNC in the cryptographic infrastructure system will generate their own SM2 signature key pair and PQC signature key pair, and apply to the CAS for a signature certificate.

[0198] In the cryptographic infrastructure system, each terminal and its respective KMS, each KMS and its respective QKM, and each KMS (when there is no direct network connection, CMSP acts as a network connection proxy) perform two-way dual authentication using SM2 signature key pairs and PQC signature key pairs. They negotiate keys using SM2 encryption key pairs and PQC encryption key pairs (when neither party has the other's encryption public key, they exchange encryption public keys and use their own SM2 signature key and PQC signature key to perform dual signature authentication on the encryption public key), and establish a secure channel for key negotiation or distribution (both key negotiation and channel data encryption can use the TLS transport layer security protocol). This secure channel updates the key periodically according to the above method.

[0199] Furthermore, since continuous quantum key distribution can be performed between adjacent QKDs, for each 128-bit (or an integer multiple of 128, 128*N) QKD key formed, a key token is added to the token bucket, and the QKD key is stored in the key pool. When the number of key tokens in the token bucket exceeds the maximum capacity CM, a key replacement mode is activated, deleting the first key token added to the bucket and its corresponding QKD key in the key pool. The value of CM is related to the key validity period Tk, the quantum key distribution rate Rk, and the key pool storage capacity Ct: CM = MIN(Rk*Tk, Ct) / (128*N).

[0200] In this embodiment of the invention, the calling QKM responds to a key relay request by retrieving N key tokens from the token bucket; when the number of remaining key tokens in the token bucket meets a first condition, it generates N session keys and sends them to the calling KMS and the called KMS to which the called terminal belongs, or, the calling KMS generates N session keys and sends the N session keys to the called KMS, so that the calling KMS and the called KMS respectively send the N session keys to the calling terminal and the called terminal, so that the calling terminal and the called terminal can communicate with the calling KMS. The called terminal uses the N session keys for encrypted communication; where N is a positive integer. When the remaining N key tokens meet the second condition, the N key tokens are returned, the key distribution mode is set to Quantum Key Distribution (QKD) key negotiation mode, the key protection key generation process is executed, the key protection key is obtained, and the key protection key is sent to the calling KMS so that the calling KMS can obtain the key protection key, use the key protection key to execute the QKD key negotiation process to obtain the session key, and use the session key to conduct encrypted communication with the called terminal. This system integrates classical commercial cryptography algorithms, PQC algorithms, and quantum key distribution, and designs a three-level key distribution mode, combining token buckets and key pools to ensure the business sustainability and high availability of the QKD-based session key secure distribution process.

[0201] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0202] Reference Figure 4 The diagram illustrates a structural block diagram of a communication device based on a cryptographic infrastructure system according to the present invention, applied to calling KMS, and specifically includes the following modules:

[0203] The first determining module 401 is used to determine the key distribution mode in response to a session key request;

[0204] The second determining module 402 is used to determine the session key using the key distribution mode;

[0205] Encryption module 403 is used to encrypt the session key to obtain an encrypted session key;

[0206] The sending module 404 is used to send the encrypted session key to the calling terminal, so that the calling terminal can decrypt the encrypted session key to obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

[0207] In this embodiment of the invention, when the key distribution mode is a quantum key distribution (QKD) key relay mode, the second determining module is specifically used for:

[0208] A key relay request is sent to the Quantum Key Manager (QKM) so that the QKM retrieves N key tokens from the token bucket. When the number of remaining key tokens in the token bucket meets a first condition, N session keys are generated and sent to the calling KMS and the called KMS to which the called terminal belongs, or the calling KMS generates N session keys. When the number of remaining key tokens meets a second condition, the N key tokens are returned, the key distribution mode is set to the Quantum Key Distribution (QKD) key negotiation mode, the key protection key generation process is executed to obtain the key protection key, and the key protection key is sent to the calling KMS; where N is a positive integer.

[0209] Obtain the key protection key and use it to perform the QKD key negotiation process to obtain the session key.

[0210] In this embodiment of the invention, when the key distribution mode is a quantum key distribution (QKD) key negotiation mode, the second determining module is specifically used for:

[0211] Query the number of key tokens in the token bucket using QKM;

[0212] When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode.

[0213] When both the number of key tokens and the counter are 0, the key distribution mode is set to the post-quantum cryptography PQC key negotiation mode, and the PQC key negotiation process is executed to obtain the session key.

[0214] When the number of key tokens is greater than 0 and the counter is 0, the key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key;

[0215] When the number of key tokens is other than the specified number, the QKD key negotiation process is performed using the key protection key to obtain the session key.

[0216] In this embodiment of the invention, when the key distribution mode is PQC key negotiation mode, the second determining module is specifically used for:

[0217] Query the number of key tokens in the token bucket using QKM;

[0218] When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode.

[0219] When the number of key tokens is greater than 0 and less than the lower threshold, the key distribution is set to QKD key negotiation mode. The key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key.

[0220] When the number of key tokens is otherwise specified, the PQC key negotiation process is executed to obtain the session key.

[0221] In this embodiment of the invention, it further includes:

[0222] The first generation module is used to generate an SM2 signature key pair and a PQC signature key pair before responding to the session key request;

[0223] The first application module is used to apply to the Certificate Authentication System (CAS) for the issuance of a signature certificate;

[0224] The sending module is further configured to send an SM2 encryption key pair and a PQC encryption key pair to the calling terminal; the SM2 encryption key pair and the PQC encryption key pair are used to negotiate the session key;

[0225] The first authentication module is used to perform identity authentication with the called KMS to which the called terminal belongs, and with the calling terminal, using the SM2 signature key pair and the PQC signature key pair, and to establish a secure channel.

[0226] In this embodiment of the invention, the step of performing a QKD key negotiation process using the key protection key to obtain a session key includes:

[0227] Start a counter for the key protection key and generate a first random number;

[0228] The first random number is encrypted using the key protection key to obtain an encrypted first random number;

[0229] The encrypted first random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted first random number, generate a second random number, decrypt the encrypted first random number using the key protection key to obtain the first random number, perform a calculation on the first random number and the second random number to obtain a session key, and encrypt the second random number using the key protection key to obtain an encrypted second random number, and send the encrypted second random number to the calling KMS;

[0230] Obtain the encrypted second random number, decrypt the encrypted second random number using the key protection key to obtain the second random number, and perform a calculation between the first random number and the second random number to obtain the session key.

[0231] In this embodiment of the invention, the step of performing the PQC key negotiation process to obtain the session key includes:

[0232] A third random number is generated, and the third random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the called terminal to obtain an encrypted third random number;

[0233] The encrypted third random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted third random number, generate a fourth random number, decrypt the encrypted third random number using the SM2 encryption private key and PQC encryption private key corresponding to the called terminal to obtain the third random number, and perform a calculation on the third random number and the fourth random number to obtain a session key. Then, the fourth random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the calling terminal to obtain an encrypted fourth random number, and the encrypted fourth random number is sent to the calling KMS.

[0234] Obtain the encrypted fourth random number, decrypt the encrypted fourth random number using the SM2 encryption private key and PQC encryption private key corresponding to the calling terminal to obtain the fourth random number, and perform a calculation on the third random number and the fourth random number to obtain the session key.

[0235] Reference Figure 5 The diagram illustrates a structural block diagram of a communication device based on a cryptographic infrastructure system according to a second embodiment of the present invention, applied to a calling QKM, and specifically includes the following modules:

[0236] The acquisition module 501 is used to retrieve N key tokens from the token bucket in response to a key relay request;

[0237] The first processing module 502 is configured to, when the number of remaining key tokens in the token bucket meets a first condition, generate N session keys and send them to the calling KMS and the called KMS to which the called terminal belongs, or generate N session keys through the calling KMS and send the N session keys to the called KMS so that the calling KMS and the called KMS respectively send the N session keys to the calling terminal and the called terminal, so that the calling terminal and the called terminal use the N session keys for encrypted communication; wherein, N is a positive integer;

[0238] The second processing module 503 is used to return the N key tokens when the remaining conditions are met, set the key distribution mode to the quantum key distribution (QKD) key negotiation mode, execute the key protection key generation process to obtain the key protection key, send the key protection key to the calling KMS so that the calling KMS can obtain the key protection key, use the key protection key to execute the QKD key negotiation process to obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

[0239] In this embodiment of the invention, the first processing module is specifically used for:

[0240] When the number of remaining key tokens in the token bucket is not less than the lower threshold, N QKD keys are taken from the key pool as relay keys, and N session keys are generated; the N relay keys are used to relay keys to the N session keys.

[0241] In this embodiment of the invention, the second processing module is specifically used for:

[0242] Consume a key token from the token bucket and retrieve a QKD key from the key pool as a relay key;

[0243] Generate any random number as the key protection key, and use the relay key to send the key protection key to the calling KMS.

[0244] In this embodiment of the invention, it further includes:

[0245] The second generation module is used to generate an SM2 signature key pair and a PQC signature key pair before responding to the key relay request;

[0246] The second application module is used to apply to the Certificate Authentication System (CAS) for the issuance of a signature certificate;

[0247] The second authentication module is used to perform identity authentication with the called QKM to which the called KMS belongs, and with the calling KMS, using the SM2 signature key pair and the PQC signature key pair, and to establish a secure channel.

[0248] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0249] This invention also provides an electronic device, comprising:

[0250] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When executed by the processor, the computer program implements the various processes of the above-described communication method embodiments based on a cryptographic infrastructure system and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0251] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described communication method embodiments based on a cryptographic infrastructure system and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0252] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0253] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0254] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0255] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0256] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0257] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0258] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0259] The foregoing has provided a detailed description of a communication method and a communication device based on a cryptographic infrastructure system provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A communication method based on a cryptographic infrastructure system, characterized in that, The method, applied to a calling key management system (KMS) to which the calling terminal belongs, includes: In response to a session key request, determine the key distribution mode; The session key is determined using the key distribution mode described above; The session key is encrypted to obtain an encrypted session key; The encrypted session key is sent to the calling terminal, so that the calling terminal can decrypt the encrypted session key to obtain the session key, and use the session key to conduct encrypted communication with the called terminal; Wherein, when the key distribution mode is a quantum key distribution (QKD) key relay mode, the step of determining the session key using the key distribution mode includes: A key relay request is sent to the Quantum Key Manager (QKM) so that the QKM retrieves N key tokens from the token bucket. When the number of remaining key tokens in the token bucket meets a first condition, N session keys are generated and sent to the calling KMS and the called KMS to which the called terminal belongs, or the calling KMS generates N session keys. When the number of remaining key tokens meets a second condition, the N key tokens are returned, the key distribution mode is set to the Quantum Key Distribution (QKD) key negotiation mode, the key protection key generation process is executed to obtain the key protection key, and the key protection key is sent to the calling KMS. Here, N is a positive integer, the first condition includes that the number of remaining key tokens in the token bucket is not less than a preset lower threshold, and the second condition includes that the number of remaining key tokens in the token bucket is less than the preset lower threshold. Obtain the key protection key and use it to perform the QKD key negotiation process to obtain the session key.

2. The communication method based on a cryptographic infrastructure system according to claim 1, characterized in that, When the key distribution mode is the quantum key distribution (QKD) key negotiation mode, determining the session key using the key distribution mode includes: Query the number of key tokens in the token bucket using QKM; When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode. When both the number of key tokens and the counter are 0, the key distribution mode is set to the post-quantum cryptography PQC key negotiation mode, the PQC key negotiation process is executed, and the session key is obtained. When the number of key tokens is greater than 0 and the counter is 0, the key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key; When the number of key tokens is other than the specified number, the QKD key negotiation process is performed using the key protection key to obtain the session key.

3. The communication method based on a cryptographic infrastructure system according to claim 1, characterized in that, When the key distribution mode is PQC key negotiation mode, determining the session key using the key distribution mode includes: Query the number of key tokens in the token bucket using QKM; When the number of key tokens exceeds the upper limit threshold, the key distribution mode is set to QKD key relay mode, and the process jumps to the determined key distribution mode. When the number of key tokens is greater than 0 and less than the lower threshold, the key distribution is set to QKD key negotiation mode. The key protection key is obtained through the calling QKM to which the calling KMS belongs, and the QKD key negotiation process is performed using the key protection key to obtain the session key. When the number of key tokens is otherwise specified, the PQC key negotiation process is executed to obtain the session key.

4. The communication method based on a cryptographic infrastructure system according to claim 1, characterized in that, Prior to responding to the session key request, the following is also included: Generate SM2 signature key pairs and PQC signature key pairs, and apply to the Certificate Authority (CAS) for a signature certificate; Send an SM2 encryption key pair and a PQC encryption key pair to the calling terminal; the SM2 encryption key pair and the PQC encryption key pair are used to negotiate the session key; The system authenticates itself with the called terminal's KMS and establishes a secure channel with the calling terminal using the SM2 signature key pair and the PQC signature key pair.

5. The communication method based on a cryptographic infrastructure system according to any one of claims 2 to 3, characterized in that, The step of using the key protection key to perform the QKD key negotiation process to obtain the session key includes: Start a counter for the key protection key and generate a first random number; The first random number is encrypted using the key protection key to obtain an encrypted first random number; The encrypted first random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted first random number, generate a second random number, decrypt the encrypted first random number using the key protection key to obtain the first random number, perform a calculation on the first random number and the second random number to obtain a session key, and encrypt the second random number using the key protection key to obtain an encrypted second random number, and send the encrypted second random number to the calling KMS; Obtain the encrypted second random number, decrypt the encrypted second random number using the key protection key to obtain the second random number, and perform a calculation between the first random number and the second random number to obtain the session key.

6. The communication method based on a cryptographic infrastructure system according to claim 2 or 3, characterized in that, The execution of the PQC key negotiation process to obtain the session key includes: A third random number is generated, and the third random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the called terminal to obtain an encrypted third random number; The encrypted third random number is sent to the called KMS to which the called terminal belongs, so that the called KMS can obtain the encrypted third random number, generate a fourth random number, decrypt the encrypted third random number using the SM2 encryption private key and PQC encryption private key corresponding to the called terminal to obtain the third random number, and perform a calculation on the third random number and the fourth random number to obtain a session key. Then, the fourth random number is encrypted using the SM2 encryption public key and PQC encryption public key corresponding to the calling terminal to obtain an encrypted fourth random number, and the encrypted fourth random number is sent to the calling KMS. Obtain the encrypted fourth random number, decrypt the encrypted fourth random number using the SM2 encryption private key and PQC encryption private key corresponding to the calling terminal to obtain the fourth random number, and perform a calculation on the third random number and the fourth random number to obtain the session key.

7. A communication method based on a cryptographic infrastructure system, characterized in that, The method, applied to the calling quantum key manager (QKM) to which the calling KMS belongs, includes: In response to a key relay request, retrieve N key tokens from the token bucket; When the number of remaining key tokens in the token bucket meets the first condition, N session keys are generated and sent to the calling KMS and the called KMS to which the called terminal belongs; or, the calling KMS generates N session keys and sends the N session keys to the called KMS so that the calling KMS and the called KMS respectively send the N session keys to the calling terminal and the called terminal, so that the calling terminal and the called terminal use the N session keys for encrypted communication; wherein, N is a positive integer, the first condition includes that the number of remaining key tokens in the token bucket is not less than a preset lower threshold, and the second condition includes that the number of remaining key tokens in the token bucket is less than the preset lower threshold; When the number of remaining key tokens meets the second condition, the N key tokens are returned, the key distribution mode is set to the quantum key distribution (QKD) key negotiation mode, the key protection key generation process is executed, the key protection key is obtained, the key protection key is sent to the calling KMS, so that the calling KMS can obtain the key protection key, use the key protection key to execute the QKD key negotiation process to obtain the session key, and use the session key to conduct encrypted communication with the called terminal.

8. The communication method based on a cryptographic infrastructure system according to claim 7, characterized in that, When the number of remaining key tokens in the token bucket meets the first condition, N session keys are generated, including: When the number of remaining key tokens in the token bucket is not less than the lower threshold, N QKD keys are taken from the key pool as relay keys, and N session keys are generated; the N relay keys are used to relay keys to the N session keys.

9. The communication method based on a cryptographic infrastructure system according to claim 7, characterized in that, The process of generating a key protection key, obtaining a key protection key, and sending the key protection key to the calling KMS includes: Consume a key token from the token bucket and retrieve a QKD key from the key pool as a relay key; Generate any random number as the key protection key, and use the relay key to send the key protection key to the calling KMS.

10. The communication method based on a cryptographic infrastructure system according to claim 7, characterized in that, Prior to the response to the key relay request, the following is also included: Generate SM2 signature key pairs and PQC signature key pairs, and apply to the Certificate Authority (CAS) for a signature certificate; The called KMS and the called QKM to which the called KMS belongs, as well as the calling KMS, use the SM2 signature key pair and the PQC signature key pair to perform identity authentication and establish a secure channel.

11. A communication device based on a cryptographic infrastructure system, characterized in that, The device, applied to calling KMS, includes: The first determining module is used to determine the key distribution mode in response to a session key request; The second determining module is used to determine the session key using the key distribution mode; An encryption module is used to encrypt the session key to obtain an encrypted session key; The sending module is used to send the encrypted session key to the calling terminal, so that the calling terminal can decrypt the encrypted session key to obtain the session key, and use the session key to conduct encrypted communication with the called terminal. Wherein, when the key distribution mode is the quantum key distribution (QKD) key relay mode, the second determining module is specifically used for: A key relay request is sent to the Quantum Key Manager (QKM) so that the QKM retrieves N key tokens from the token bucket. When the number of remaining key tokens in the token bucket meets a first condition, N session keys are generated and sent to the calling KMS and the called KMS to which the called terminal belongs, or the calling KMS generates N session keys. When the number of remaining key tokens meets a second condition, the N key tokens are returned, the key distribution mode is set to the Quantum Key Distribution (QKD) key negotiation mode, the key protection key generation process is executed to obtain the key protection key, and the key protection key is sent to the calling KMS. Here, N is a positive integer, the first condition includes that the number of remaining key tokens in the token bucket is not less than a preset lower threshold, and the second condition includes that the number of remaining key tokens in the token bucket is less than the preset lower threshold. Obtain the key protection key and use it to perform the QKD key negotiation process to obtain the session key.

12. A communication device based on a cryptographic infrastructure system, characterized in that, Applied to calling QKM, the device includes: The acquisition module is used to retrieve N key tokens from the token bucket in response to a key relay request; The first processing module is configured to, when the number of remaining key tokens in the token bucket meets a first condition, generate N session keys and send them to the calling KMS and the called KMS to which the called terminal belongs, or, generate N session keys through the calling KMS and send the N session keys to the called KMS so that the calling KMS and the called KMS respectively send the N session keys to the calling terminal and the called terminal, so that the calling terminal and the called terminal use the N session keys for encrypted communication; wherein, N is a positive integer; The second processing module is used to return the N key tokens when the number of remaining key tokens meets the second condition, set the key distribution mode to quantum key distribution (QKD) key negotiation mode, execute the key protection key generation process to obtain the key protection key, send the key protection key to the calling KMS so that the calling KMS can obtain the key protection key, use the key protection key to execute the QKD key negotiation process to obtain the session key, and use the session key to perform encrypted communication with the called terminal; the first condition includes that the number of remaining key tokens in the token bucket is not less than a preset lower threshold, and the second condition includes that the number of remaining key tokens in the token bucket is less than the preset lower threshold.

13. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the communication method based on a cryptographic infrastructure system as described in any one of claims 1 to 6 or 7 to 10.

14. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the communication method based on a cryptographic infrastructure system as described in any one of claims 1 to 6 or 7 to 10.

Citation Information

Patent Citations

  • Quantum secret communication technology-based work key distribution system in financial field and application method thereof

    CN111865590A

  • Encrypted call method based on quantum key distribution, SIP business server and medium

    CN118944866A