Quantum security key management method and system based on homomorphic encryption

By adopting a quantum secure key management method based on homomorphic encryption in the key management system, the problems of inaccurate and insufficient security in the prior art are solved, and accurate prediction of key requirements and secure management of keys throughout the life cycle are realized.

CN119865317AActive Publication Date: 2025-04-22JIANGSU IDEABANK MICROELECTRONICS TECH

Patent Information

Application Number
CN202510345654.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The existing key management systems have shortcomings in terms of dynamics and security, including inaccurate capture of seasonality and trends by the key demand prediction model, failure to fully utilize the quantum entanglement characteristics to detect eavesdropping behavior, and homomorphic encryption has not yet been widely used in key management, especially when combining quantum technology, how to ensure the security of keys throughout the life cycle is still a challenge.

Method used

The quantum security key management method based on homomorphic encryption is adopted. By initializing the quantum key pool, configuring multi-dimensional quantum state encoding parameters, collecting and preprocessing historical key usage data, building a key demand prediction model, generating multi-dimensional quantum states as the initial key allocation scheme, and encrypting and transmitting the key through homomorphic encryption.

Benefits of technology

Improve the prediction accuracy of the key demand prediction model, captures seasonality and trend changes in key demand, ensures the security of the key throughout the life cycle, and prevents eavesdropping through encrypted transmission of quantum channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865317A_ABST
    Figure CN119865317A_ABST
Patent Text Reader

Abstract

The invention discloses a homomorphic encryption-based quantum security key management method and system, and relates to the technical field of network security, and the method comprises the steps: configuring multi-dimensional quantum state coding parameters, collecting and preprocessing the use data of historical keys, and constructing a key demand prediction model; encoding the multi-dimensional quantum state by using the multi-dimensional quantum state encoding parameter to generate a high-dimensional quantum state; monitoring the key use condition of each node in the quantum key pool in real time, collecting feedback information, generating a visual report, generating a new key distribution scheme based on a key demand prediction model, and storing the new key distribution scheme in the quantum key pool; and the secret key of the new secret key distribution scheme is encrypted by using homomorphic encryption, the encrypted secret key is decrypted after being received by the receiver, the original secret key is recovered, and the received secret key is verified by using the multi-dimensional quantum state coding parameter. According to the method, the SARIMA model is selected as a basic framework of the key demand prediction model, so that accurate modeling of the key use condition is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to a quantum security key management method and system based on homomorphic encryption. Background Art

[0002] With the rapid development of quantum computing technology, traditional encryption algorithms face the potential threat of being cracked, which has promoted the research and development of quantum secure key management systems. Modern key management methods usually rely on classical encryption algorithms such as RSA and AES, but these methods may no longer be safe in the face of quantum computing. At the same time, quantum key distribution has been proven to provide absolute security in theory, but its practical application is limited by transmission distance and cost. Therefore, researchers have begun to explore key management methods that combine homomorphic encryption and quantum technology, in order to achieve secure key distribution and management without leaking information.

[0003] However, existing key management has shortcomings in terms of dynamics and security. First, the traditional key demand prediction model lacks accurate capture of seasonality and trends, resulting in inefficient key distribution. Second, the existing key transmission and verification mechanisms lack the use of quantum states and fail to fully utilize the characteristics of quantum entanglement to detect eavesdropping. In addition, homomorphic encryption has not been widely used in key management, especially when combined with quantum technology. How to ensure the security of keys throughout their life cycle remains a challenge. Summary of the invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a quantum secure key management method based on homomorphic encryption to solve the key lifecycle management problem.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a quantum security key management method based on homomorphic encryption, which includes initializing a quantum key pool, configuring multi-dimensional quantum state encoding parameters, collecting and preprocessing usage data of historical keys, constructing a key demand prediction model based on the preprocessed usage data, and outputting a predicted key demand; generating a multi-dimensional quantum state as an initial key distribution scheme based on the predicted key demand, encoding the multi-dimensional quantum state using the multi-dimensional quantum state encoding parameters to generate a high-dimensional quantum state, converting the key format and storing it in the quantum key pool, and distributing the key to each node in the quantum key pool according to the predicted key demand; real-time monitoring of the key usage of each node in the quantum key pool, collecting feedback information, generating a visualization report, generating a new key distribution scheme based on the key demand prediction model and storing it in the quantum key pool; extracting a key of the new key distribution scheme from the quantum key pool, encrypting the key of the new key distribution scheme using homomorphic encryption, transmitting the encrypted key through a quantum channel, and decrypting the encrypted key after receiving it by the receiver to restore the original key, and verifying the received key using the multi-dimensional quantum state encoding parameters.

[0007] As a preferred solution of the quantum security key management method based on homomorphic encryption described in the present invention, wherein: the multi-dimensional quantum state encoding parameters refer to the photon polarization state, photon phase and photon time characteristics; The usage data includes key time period, key usage times, key usage change rate and key average amount; The preprocessing includes removing outliers, standardization and feature engineering.

[0008] As a preferred solution of the quantum secure key management method based on homomorphic encryption described in the present invention, wherein: based on the pre-processed usage data, a key demand prediction model is constructed to output the predicted key demand, and the specific steps are: Select the SARIMA model as the basic framework of the key demand prediction model; Define the key demand prediction model with usage data as input and predicted key demand as output; Divide the preprocessed usage data into a training set and a test set; Use statsmodels to plot ACF and PACF graphs, view the time series data of the data used in the ACF and PACF graphs, and obtain the non-seasonal parameters of the key demand prediction model; On the ACF and PACF graphs, focus on the time series data of the key usage change rate and obtain the seasonal parameters of the key demand prediction model; Use the training set to train the key demand prediction model, and adjust the non-seasonal parameters and seasonal parameters to optimize the key demand prediction model; Use the test set to verify the prediction ability of the key demand prediction model; The future key time period is predicted based on the trained key demand prediction model to generate the predicted key demand.

[0009] As a preferred solution of the quantum security key management method based on homomorphic encryption described in the present invention, wherein: the multi-dimensional quantum state encoding parameters are used to encode the multi-dimensional quantum state to generate a high-dimensional quantum state, and the key format is converted and stored in the quantum key pool. The specific steps are: By changing the polarization direction of photons through the polarization state of photons, quantum states of different polarization states are generated; The photon phase angle is set by the photon phase to generate quantum states with different phase angles; Controlling the photon propagation time through the photon time characteristics generates a quantum state based on the time characteristics; Combining different quantum states generated based on photon polarization state, photon phase and photon time characteristics into a high-dimensional quantum state; Convert the high-dimensional quantum state into a binary key through a mapping rule, and convert the binary key into an AES key and an RSA key respectively; The converted AES keys and RSA keys are further encrypted using Paillier homomorphic encryption and stored in the quantum key pool.

[0010] As a preferred solution of the quantum secure key management method based on homomorphic encryption described in the present invention, wherein: the real-time monitoring of the key usage of each node in the quantum key pool, collecting feedback information, generating a visual report, generating a new key distribution scheme based on the key demand prediction model and storing it in the quantum key pool, the specific steps are: Deploy Prometheus to monitor each node of the key management center and obtain new key usage data; Configure Kafka to collect key usage feedback from each node; Check the number of available keys in the quantum key pool through SQL query statements; Use Grafana to generate visualization reports combining new key usage data, key usage feedback, and the number of available keys, and connect to Prometheus for real-time monitoring; Use Python scripts combined with key demand prediction models to predict key demand in real time and generate new key distribution plans; The keys in the new key distribution scheme are transmitted and stored in each node in the quantum key pool using SSH tunnel.

[0011] As a preferred solution of the quantum secure key management method based on homomorphic encryption described in the present invention, wherein: the key of the new key distribution scheme is encrypted by homomorphic encryption, the encrypted key is transmitted through the quantum channel, and the receiving party decrypts the encrypted key after receiving it to restore the original key. The specific steps are: The sender uses Paillier homomorphic encryption to generate a pair of public and private keys; Converting the keys in the new key distribution scheme into binary numbers; Use the public key to encrypt the binary number and generate encrypted ciphertext; The sender transmits the encrypted ciphertext to the receiver through quantum communication; After receiving the encrypted ciphertext, the receiver uses the private key to decrypt it and recover the original key.

[0012] As a preferred solution of the quantum secure key management method based on homomorphic encryption described in the present invention, wherein: the received key is verified using multi-dimensional quantum state encoding parameters, and the specific steps are as follows: The receiver uses a quantum photon detector to receive the high-dimensional quantum state and measures the high-dimensional quantum state according to the multi-dimensional quantum state encoding parameters; Compare the measured high-dimensional quantum state with the decrypted key to check the consistency; If the measurement result is consistent with the decrypted key, the key can be used; If the measurement result is inconsistent with the decrypted key, a security alarm is triggered and the key is refused to be used; The key expires after use and is destroyed by physical destruction.

[0013] In a second aspect, the present invention provides a quantum security key management system based on homomorphic encryption, including a building module, an encoding module, a monitoring module and a verification module; the building module is used to initialize a quantum key pool, configure multi-dimensional quantum state encoding parameters, collect and pre-process historical key usage data, build a key demand prediction model based on the pre-processed usage data, and output a predicted key demand; the encoding module is used to generate a multi-dimensional quantum state as an initial key distribution scheme based on the predicted key demand, use the multi-dimensional quantum state encoding parameters to encode the multi-dimensional quantum state to generate a high-dimensional quantum state, and convert the key format to store it in the quantum key pool In the method, keys are allocated to each node of the quantum key pool according to the predicted key demand; the monitoring module is used to monitor the key usage of each node in the quantum key pool in real time, collect feedback information, generate a visual report, generate a new key distribution scheme based on the key demand prediction model and store it in the quantum key pool; the verification module is used to extract the key of the new key distribution scheme from the quantum key pool, encrypt the key of the new key distribution scheme using homomorphic encryption, transmit the encrypted key through the quantum channel, and the receiver decrypts the encrypted key after receiving it to restore the original key, and uses multi-dimensional quantum state encoding parameters to verify the received key.

[0014] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the quantum secure key management method based on homomorphic encryption as described in the first aspect of the present invention is implemented.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the quantum secure key management method based on homomorphic encryption as described in the first aspect of the present invention.

[0016] The beneficial effects of the present invention are as follows: the present invention selects the SARIMA model as the basic framework of the key demand prediction model, defines a clear input-output relationship, and divides the preprocessed usage data into a training set and a test set, thereby realizing accurate modeling of key usage, which not only improves the prediction accuracy of the key demand prediction model, but also captures the seasonality and trend changes of key demand. By drawing ACF and PACF graphs through statsmodels, non-seasonal and seasonal parameters are obtained through analysis, so that the key demand prediction model can adapt to the complexity and periodicity of key usage patterns, which is crucial for predicting future key demand. The repeated adjustment and verification of the training set and the test set ensure the generalization ability of the key demand prediction model and the reliability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0018] Figure 1 This is a flow chart of the quantum secure key management method based on homomorphic encryption in Example 1.

[0019] Figure 2 This is a module diagram of the quantum secure key management system based on homomorphic encryption in Example 1. DETAILED DESCRIPTION

[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0022] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0023] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides a quantum security key management method based on homomorphic encryption, comprising the following steps: S1. Initialize the quantum key pool, configure multi-dimensional quantum state encoding parameters, collect and preprocess historical key usage data, build a key demand prediction model based on the preprocessed usage data, and output the predicted key demand.

[0024] Furthermore, the multidimensional quantum state encoding parameters refer to the photon polarization state, photon phase, and photon time characteristics; Specifically, a series of photon polarization states are defined to encode quantum information, such as horizontal polarization, vertical polarization, diagonal polarization, etc. Each photon polarization state can be used as a basic state of a quantum bit. In actual operation, the photon polarization state is manipulated through a polarization filter or wave plate to ensure stability and repeatability. The phase difference of photons is used to distinguish different quantum states. The phase can be encoded into various phase angles such as 0 degrees, 90 degrees, and 180 degrees. A phase modulator (such as a Pockels unit) is used to change the phase of photons to ensure accurate transmission and detection of phase information. Encoding quantum information through time differences or time delays, for example, photons arriving at different times can represent different quantum states; Use optical delay lines or fiber delay lines to control the photon time characteristics of the photon arrival time to ensure the accuracy and stability of time encoding; The usage data are key time period, key usage times, key usage change rate and key average amount; The key time period is to determine the range of historical data, such as historical data of the past year or historical data of the past three months, and all key usage records of the historical key time period are extracted from the database or log file; The number of times a key is used is the total number of times the key is used during this time period, which may include each communication, each encryption operation, etc., and the number of occurrences of each event is counted; The usage change rate is to analyze how the frequency of key usage changes over time, perhaps by calculating the frequency of usage on a daily, weekly, or monthly basis, using time series analysis tools (such as FFT or trend analysis) to identify seasonal or cyclical changes in usage frequency; The average amount of keys is to calculate the average number of keys used in each event, which involves keeping detailed records of each usage event and calculating the average number of keys used in each event; Preprocessing includes outlier removal, standardization, and feature engineering; Specifically, identify and delete obvious erroneous data or outliers, such as data where the number of key usages is suddenly higher or lower than the normal range. Use statistical methods such as Z-scores and IQR (interquartile range) to identify outliers, and then remove them manually or automatically. Convert data of different dimensions to a unified scale, usually between 0 and 1 or -1 and 1. Common methods include minimum-maximum standardization or Z-score standardization. After processing, the mean and variance of the data will be unified. Create new features or combine existing features to better reveal data patterns, for example, create features for time windows or convert time series data into frequency domain features; Based on the preprocessed data, create or extract new features to enhance the predictive power of the data; Analyze the key time period and key usage times to create sliding window features, such as the average daily usage times in the past 7 days and the average weekly usage times in the past month. Further analyze the changing trend of the key usage frequency by calculating the moving average (such as a 3-day moving average) or using more complex time series analysis methods; For the average amount of keys, aggregate different time periods to calculate more meaningful statistics, such as total usage, maximum usage, minimum usage, median, etc. within a certain time period; Use Fourier transform or periodic decomposition methods to analyze the rate of change in key usage frequency and identify whether there is a weekly, monthly, or other periodic usage pattern; Create new features by combining existing features, such as estimating the total key consumption by multiplying the number of times a key is used by the average amount of keys, or create special flag features based on different business scenarios (such as holiday effects); The SARIMA model (Seasonal Autoregressive Integrated Moving Average model) is selected as the basic framework of the key demand prediction model; Define the key demand prediction model with usage data as input and predicted key demand as output; Divide the preprocessed usage data into a training set and a test set, usually 80% for training and 20% for testing, and ensure that the test set contains at least one complete seasonal cycle; Use statsmodels to draw ACF and PACF graphs, view the time series data of the data used in the ACF and PACF graphs, and obtain the non-seasonal parameters (p, d, q) of the key demand prediction model, where p is the non-seasonal autoregressive parameter, which is how many past observations are used in the key demand prediction model to predict the current value, d is the non-seasonal difference parameter, which indicates how many times the difference operation is performed to make the time series data stable, and q is the non-seasonal moving average parameter, which indicates how many past error terms are considered by the key demand prediction model for prediction; Specifically, use time series analysis tools (such as statsmodels in Python) to draw ACF graphs and observe at which lags the autocorrelation is significant; If there is significant autocorrelation at lag k (i.e., outside the confidence interval), it is possible that q ≥ k. Observe how the autocorrelation decreases as lag increases, where k represents a specific number of time steps or delays. The specific value of k depends on the time resolution of the data. For example, if the data is recorded daily, k=1 is a delay of one day. If it is recorded hourly, k=1 is a delay of one hour. In time series analysis, lag refers to the time step or delay. For example, if a time series is observed today, lag 1 refers to yesterday and lag 2 refers to the day before yesterday. Also use the time series analysis tool to draw the PACF graph and observe the partial autocorrelation; If there is significant partial autocorrelation at lag k, it is possible that p ≥ k, especially when the PACF drops to 0 quickly after a certain lag, which usually indicates the order of the AR part; Check the stationarity of the time series data in the data used by ADF or KPSS test. If the time series data in the data used shows a trend or non-stationarity, it is necessary to perform differentiation until the time series data in the data used is stable. The number of differences is the non-seasonal parameter d value; On the ACF and PACF graphs, pay attention to the time series data of the key usage change rate, especially the autocorrelation and partial autocorrelation at multiples of m, and obtain the seasonal parameters (P, D, Q, m) of the key demand prediction model, where P is the seasonal regression parameter, which indicates the order of the seasonal autoregressive part, that is, how many past values ​​of the seasonal cycle are considered to predict the current value, D is the seasonal difference parameter, which is the number of times the seasonal component is differentiated, usually 0 or 1 times is enough to make the seasonal component stable, Q is the seasonal moving average parameter, which indicates the order of the seasonal moving average part, pay attention to the autocorrelation at multiples of the seasonal cycle in the ACF graph, and m is the seasonal cycle (for example, a week or a month); Specifically, analyze the time series graph of the key usage change rate, look for obvious periodic patterns, such as weekly or monthly peaks, and determine m as the length of the period (for example, if there is obvious weekly periodicity, m=7); In the ACF and PACF graphs, pay attention to the autocorrelation and partial autocorrelation at multiples of m. If there is significant autocorrelation at multiples of period m, it may be Q ≥ 1. If there is significant partial autocorrelation at multiples of period m, it may be P ≥ 1. If the seasonal component causes the time series data to be non-stationary, seasonal differences may be required. Usually, 0 or 1 seasonal differences are sufficient to determine the value of D. Use the training set to train the key demand prediction model, and adjust the non-seasonal parameters and seasonal parameters to optimize the key demand prediction model; Specifically, according to the results of the ACF and PACF graphs, an initial key demand prediction model (i.e., the SARIMA (p, d, q) (P, D, Q, m) model) is set; Use the training set to fit the key demand prediction model through software or programming libraries (such as Python's statsmodels). Input the training set and the key demand prediction model will automatically calculate parameter estimates. Try different combinations of p, d, q, P, D, Q values ​​to observe the performance of the key demand prediction model fit; Perform multiple iterations and gradually fine-tune parameters to ensure that the key demand prediction model performs well on the training set while avoiding overfitting; The test set is used to verify the prediction ability of the key demand prediction model, and error indicators such as MAE and RMSE are calculated to evaluate the accuracy of the key demand prediction model. The expression is: ; ; Among them, MAE is the mean absolute error, is the root mean square error, is the number of samples in the test set, that is, the total number of observations of the key demand prediction model, is the actual value of the ith observation, that is, the actual key demand at the ith time point in the test set, represents the predicted value of the i-th observation, that is, the prediction of the key demand prediction model for the i-th time point. is the absolute value function, which represents the absolute difference between the predicted value and the actual value, ensuring that the error is non-negative. i is the index of the observation, which is used to traverse each observation in the test set. is the square of the prediction error. By squaring the error, large errors will be amplified, thus having a greater impact on the overall error. Comparing the values ​​of MAE and RMSE, the smaller the value, the closer the prediction of the key demand prediction model is to the actual situation; If the value of MAE or RMSE is very low, such as close to 0, it means that the prediction of the key demand prediction model is very close to the actual value, and the accuracy of the key demand prediction model is high; According to the trained key demand prediction model, the future key time period is predicted to generate the predicted key demand, which is expressed as: ; in, To predict the key demand, is the key time length, which is used to consider the impact of time scale on prediction. is the key usage change rate, using and To reflect the complexity of periodic changes, The tangent function is used here to model the nonlinear effect of frequency variation. is the tangent function, is the value of pi, which is approximately 3.1415926. is the number of times the key has been used, as part of the denominator, to adjust the predicted key demand, taking into account the logarithmic relationship of the number of past uses, is the key average, and the cube root is used to smooth its effect because the average may have large fluctuations; It should be noted that by initializing the quantum key pool and configuring multi-dimensional quantum state encoding parameters, combined with the preprocessing of historical key usage data, an accurate key demand prediction model was constructed, which makes it possible to identify the seasonality and trend of key usage and optimize the generation and distribution of keys. The preprocessing ensures the quality of the data, provides stable and reliable input, and enhances the accuracy of the prediction. The key demand prediction model captures the complex dynamics of key demand by adjusting non-seasonal and seasonal parameters. The generated prediction expression takes into account the interaction of time, usage change rate and usage amount.

[0025] S2. Generate a multidimensional quantum state as an initial key distribution scheme based on the predicted key demand, use the multidimensional quantum state encoding parameters to encode the multidimensional quantum state to generate a high-dimensional quantum state, convert the key format and store it in the quantum key pool, and distribute the key to each node in the quantum key pool according to the predicted key demand.

[0026] Furthermore, the number of quantum states to be generated is determined based on the predicted key demand, for example, if the predicted key demand predicts a future demand of 1000 keys, then at least 1000 multidimensional quantum states are generated; By changing the polarization direction of photons through the polarization state of photons, quantum states of different polarization states are generated; Specifically, a polarization filter or wave plate (such as a half-wave plate or a quarter-wave plate) is used to define a set of polarization states of horizontal polarization, vertical polarization, diagonal polarization, and circular polarization to manipulate the polarization state of photons. The polarization direction of photons is changed by rotating the wave plate. For example, a wave plate can convert horizontal polarization into vertical polarization or diagonal polarization. Each polarization state can represent one of the basic states of the quantum state, ensuring that the generated polarization states are sufficiently diverse. The photon phase angle is set by the photon phase to generate quantum states with different phase angles; Specifically, a phase modulator (such as a Pockels unit) or a phase converter is used to change the phase of a photon, and different phase angles are set, such as 0 degrees, 90 degrees, 180 degrees, and other angles. Each phase angle corresponds to a specific quantum state. The refractive index of the photon is changed by applying an electric field, thereby changing the phase of the photon, adding an extra dimension to the generated quantum state. Controlling the photon propagation time through the photon time characteristics generates a quantum state based on the time characteristics; Specifically, an optical delay line or a fiber delay line is used to control the propagation time of photons to generate a time difference. The arrival of photons at different times can represent different quantum states. For example, the arrival of photons at time t1 and t2 represent different quantum states. The time when photons arrive at the detector is adjusted by precisely controlling the length of the optical path to ensure that the time difference is significant enough to distinguish different quantum states. Combining different quantum states generated based on photon polarization state, photon phase and photon time characteristics into a high-dimensional quantum state; Specifically, different quantum states generated by combining photon polarization states, photon phases, and photon time characteristics are high-dimensional quantum states. For example, a three-dimensional quantum state may be composed of a photon polarization state (such as horizontal or vertical polarization), a photon phase (such as a 0-degree or 90-degree phase angle), and a photon time characteristic (such as arrival time t1 or t2). The combination of each quantum state needs to ensure that all characteristics are measured simultaneously in the same quantum to maintain the superposition state of the quantum state, and the combination of high-dimensional quantum states is achieved by direct combination or tensor product of these characteristics. Convert the high-dimensional quantum state into a binary key through a mapping rule, and convert the binary key into an AES key and an RSA key respectively; The converted AES key and RSA key are further encrypted using Paillier homomorphic encryption and stored in the quantum key pool; Specifically, first, a mapping table is designed, which maps each high-dimensional quantum state (such as a quantum state composed of photon polarization state, photon phase and photon time characteristics) to a specific binary sequence; for example: polarization H, phase 0°, time t1 may be mapped to the binary sequence "000"; Polarization V, phase 90°, time t2, may be mapped to "001"; We can continue to define mappings until all possible combinations of quantum states correspond to a unique binary sequence; When measuring a high-dimensional quantum state, according to the measurement result (for example, polarization H, phase 0°, time t1), the corresponding binary sequence is found through the mapping table; These binary sequences are concatenated to form a complete binary key. For example, if multiple quantum states are measured, the resulting binary sequence may be "000101011"; And convert the binary key into a computer-recognizable key format, which refers to the key format required by a certain symmetric or asymmetric encryption algorithm, such as AES symmetric encryption, which usually uses 128-bit, 192-bit or 256-bit keys, which means that the binary sequence needs to be adjusted or extended to these lengths. For example, AES-128 requires a 16-byte (128-bit) key; RSA asymmetric encryption, the key is based on a large prime number, usually requires converting the binary key into a large integer or part of the public and private keys; If the binary sequence length does not match the target key length, it can be adjusted by padding or truncation, for example, padding a shorter binary key to 128 bits; For AES symmetric encryption, the binary string can be directly converted into the required byte array; For RSA asymmetric encryption, you may need to convert the binary sequence into a large integer, and then use these integers to generate part of the key pair (such as the public key ); For example, if you have a binary key of "1010101010101010", for AES-128, you may just need to extend it or use it directly (if the length is already 128 bits); For RSA, this binary number may need to be converted into a large integer and then used to generate a key pair; Use Paillier homomorphic encryption to encrypt binary keys or keys converted from AES key format to RSA key format to prevent unauthorized access; Specifically, use Paillier homomorphic encryption to generate a new pair of public and private keys as the key; Assuming that the AES key exists in 128-bit binary form, it is regarded as an integer. Paillier homomorphic encryption is suitable for encrypting integers. The public key of an RSA key consists of a modulus and a public key exponent, which are both large integers, and the private key consists of a modulus and a private key exponent, which are also large integers; Encrypt the AES key integer with the public key of Paillier homomorphic encryption. For example, if the AES key is "1010101010101010", convert it to the corresponding integer, and then encrypt it with the public key using Paillier homomorphic encryption to obtain a Paillier homomorphic encrypted ciphertext. Encrypt each part of the RSA key independently, namely, encrypt the public key exponent with the Paillier homomorphically encrypted public key to obtain a ciphertext, and encrypt the public key exponent (if it is a public key) or the private key exponent (if it is a private key) with the Paillier homomorphically encrypted public key to obtain another ciphertext; And store these Paillier homomorphically encrypted ciphertexts in a quantum key pool. Each key (part of AES or RSA) now exists in an encrypted form; It should be noted that through prediction-based quantum state generation and multi-dimensional encoding, high-dimensional quantum states are created for key distribution, ensuring the complexity and security of the keys. The polarization, phase and time characteristics of photons are utilized to increase the dimension and difficulty of cracking the keys. The high-dimensional quantum states are converted into AES and RSA formats, and Paillier homomorphic encryption is used to protect storage, achieving secure storage and distribution under the threat of quantum computing.

[0027] S3: Monitor the key usage of each node in the quantum key pool in real time, collect feedback information, generate a visualization report, generate a new key distribution plan based on the key demand prediction model and store it in the quantum key pool.

[0028] Furthermore, Prometheus is deployed to monitor each node of the key management center and obtain new key usage data; Specifically, deploy a Prometheus node exporter on each node and configure it to expose key usage data, such as usage frequency, number of remaining keys, etc. Set up a Prometheus server to pull key usage data every hour or other appropriate frequency to ensure that the latest usage is captured; The node exporter exposes the latest key usage data to Prometheus through the HTTP API. The Prometheus configuration file defines how to capture key usage data and set alert rules, such as when the key usage reaches a certain threshold; Configure Kafka to collect key usage feedback from each node; Specifically, a Kafka cluster is deployed in the monitoring key management center, and a client or script is configured on each node to set an inventory threshold. When the key usage reaches the set inventory threshold (such as inventory below 10%), feedback data is sent to Kafka. The sender of Kafka is used to collect these feedback data to ensure that these feedback data can be transmitted in real time. The Kafka receiver (which may be another service or script) receives and processes the feedback data to provide real-time usage data for dynamically adjusting key allocation. Check the number of available keys in the quantum key pool through SQL query statements; Specifically, use predefined SQL query statements (such as SELECT COUNT (*) FROM key_pool WHERE status = 'available') to query the database regularly or on demand to check the current status of the quantum key pool. The query results will show the number and type of currently available keys to ensure that there are enough keys in the quantum key pool to meet demand; Use Grafana to generate visualization reports combining new key usage data, key usage feedback, and the number of available keys, and connect to Prometheus for real-time monitoring; Specifically, create a new Grafana dashboard or add new charts and panels to the existing dashboard, and use the Prometheus query language (PromQL) to query and display new key usage data. For example, you can create a chart to show the key usage trend of each node. The chart may include a time series chart showing the frequency of key usage, a single value panel showing the current number of available keys, and an alert panel showing alerts when key usage reaches certain thresholds. Kafka feedback data can be imported into a database or log system and used through Grafana plugins (such as Grafana Loki or GrafanaEnterprise plugin) or custom data sources to integrate these key usage feedbacks, for example, create a panel to show the latest key usage feedback, such as which nodes reported key shortages or abnormal usage, configure Grafana to connect to the database (if the number of available keys for SQL queries is stored in the database), or if the number of available keys has been imported through Prometheus, you can directly use PromQL to query the number of available keys, create a panel specifically to show the current status of the quantum key pool, display the number and type of available keys (that is, the number of available keys), set the Grafana panel to automatically refresh regularly to ensure that the report continues to reflect the latest monitoring data, and you can also configure alerts to send notifications when specific conditions are met (for example, when the number of keys is lower than a certain value); Use Python scripts combined with key demand prediction models to predict key demand in real time and generate new key distribution plans; Specifically, the Python script extracts the latest data from Prometheus and makes predictions based on the key demand prediction model. Based on the predicted key demand, the Python script calculates the key changes required for each node and generates a new key distribution plan (including adjusting the existing key distribution or generating new keys to ensure that the key supply of each node is consistent with the predicted demand). The script may involve data preprocessing, key demand prediction model loading, and prediction execution; Use SSH tunnel to transmit the keys in the new key distribution scheme to each node of the quantum key pool; Specifically, the keys in the new key distribution scheme are securely transmitted to each node in the quantum key pool that needs to be adjusted using an SSH tunnel. The key scheme for executing the new key distribution is to add new keys to nodes or recycle keys from nodes through scripts or manual operations to ensure the security of keys during transmission. SSH provides an encrypted channel. It should be noted that through the real-time monitoring and feedback mechanism, combined with the use of Prometheus, Kafka, and Grafana, accurate monitoring and analysis of the use of the quantum key pool is achieved. Based on the dynamically adjusted key demand prediction model, a new allocation plan is generated through Python scripts to ensure the timeliness and accuracy of key supply.

[0029] S4. Extract the key of the new key distribution scheme from the quantum key pool, encrypt the key of the new key distribution scheme using homomorphic encryption, transmit the encrypted key through the quantum channel, and the receiver decrypts the encrypted key after receiving it, restores the original key, and verifies the received key using multi-dimensional quantum state encoding parameters.

[0030] Furthermore, the sender generates a pair of public and private keys using Paillier homomorphic encryption; Specifically, the sender uses Paillier homomorphic encryption to select two very large prime numbers a and b as the basis of the public key and private key; The public key is calculated by the formula, the expression is: ; in, is the public key, is the initial prime number, is an auxiliary prime number; Then the private key is calculated, the expression is: ; ; in, Is the main parameter of the private key, indicating the least common multiple of the initial prime number minus one and the auxiliary prime number minus one. is the least common multiple, is the secondary parameter of the private key. Auxiliary functions defined for Paillier homomorphic encryption are used to calculate private key parameters, which are ultimately used in decryption. is a generator, usually c+1 or other suitable number, Generator according to The main parameters of the private key are raised to the power and then modulo the public key The square of It is a modulo operation; Converting the keys in the new key distribution scheme into binary numbers; Use the public key to encrypt the binary number and generate encrypted ciphertext; Specifically, the key in the new key distribution scheme is converted into a series of binary numbers; Using Public Key Encrypt a series of binary numbers. For each key, generate a random number as the encrypted ciphertext. The sender transmits the encrypted ciphertext to the receiver through quantum communication; Specifically, the sender and receiver establish a secure communication channel through quantum key distribution (QKD), which involves generating and exchanging a new shared key for verification of subsequent communications; Encrypted ciphertext is transmitted through this quantum communication, and using the characteristics of quantum entanglement, any attempt to eavesdrop will cause a change in the quantum state and thus be detected; After receiving the encrypted ciphertext, the receiver uses the private key to decrypt it and recover the original key; Specifically, after the recipient receives the encrypted ciphertext, the auxiliary function defined by the Paillier homomorphic encryption in the private key is used. Decrypt and restore the original key format, such as binary; The receiver uses a quantum photon detector to receive the high-dimensional quantum state and measures the high-dimensional quantum state according to the multi-dimensional quantum state encoding parameters; Specifically, the receiver uses a dedicated quantum receiving device (such as a quantum photon detector) to receive the high-dimensional quantum state transmitted through the quantum channel; Based on the multi-dimensional quantum state encoding parameters (photon polarization state, photon phase and photon time characteristics), each quantum state is accurately measured, for example, the polarization angle, phase change and arrival time of the photon are measured to reconstruct these high-dimensional quantum states; Compare the measured high-dimensional quantum state with the decrypted key to check the consistency; Specifically, the measured high-dimensional quantum state is converted into the corresponding binary or other key format, and then compared with the decrypted key. This comparison can be a bit-by-bit comparison to ensure that each bit matches. If there is any mismatch, it indicates that there may be a transmission error or eavesdropping attack. If the measurement result is consistent with the decrypted key, the key can be used; Specifically, if the measurement result is completely consistent with the decrypted key, the key management center marks the key as available, records the time when the key verification passed and which node or task it was used for, and allows it to be used for encryption or decryption operations; If the measurement result is inconsistent with the decrypted key, a security alarm is triggered and the key is refused to be used; Specifically, if any inconsistency is found, the key management center will immediately trigger a security alert (including notifying the security team, recording in the log, or automatically starting a security protocol such as re-requesting the key), record the event, and refuse to use the key to prevent possible security risks; The key expires after use, and is destroyed by physical destruction to ensure that the key cannot be recovered; Specifically, when a key reaches its scheduled usage period or is triggered by a specific condition (such as the key usage frequency reaches a certain threshold), the key management center marks it as expired and ensures that the key cannot be recovered by using physical destruction methods, such as destroying the hardware device storing the key (such as the physical destruction of the dongle), or in a digital environment, physical destruction may include smashing the hard disk, etc.; It should be noted that by extracting the key from the quantum key pool, using Paillier homomorphic encryption to protect the key, and transmitting it through the quantum channel, the absolute security of the key during the transmission process is ensured. The receiver uses quantum state measurement and comparison to verify the consistency of the key, achieving efficient key verification and preventing eavesdropping and tampering. After the key expires, it is physically destroyed, completely eliminating the risk of key leakage.

[0031] The present embodiment also provides a quantum security key management system based on homomorphic encryption, including: a construction module, an encoding module, a monitoring module and a verification module; the construction module is used to initialize the quantum key pool, configure the multi-dimensional quantum state encoding parameters, collect and pre-process the usage data of the historical key, build a key demand prediction model based on the pre-processed usage data, and output the predicted key demand; the encoding module is used to generate a multi-dimensional quantum state as an initial key distribution scheme based on the predicted key demand, encode the multi-dimensional quantum state using the multi-dimensional quantum state encoding parameters to generate a high-dimensional quantum state, convert the key format and store it in the quantum key pool, and distribute the key to each node in the quantum key pool according to the predicted key demand; the monitoring module is used to monitor the key usage of each node in the quantum key pool in real time, collect feedback information, generate a visual report, generate a new key distribution scheme based on the key demand prediction model and store it in the quantum key pool; the verification module is used to extract the key of the new key distribution scheme from the quantum key pool, encrypt the key of the new key distribution scheme using homomorphic encryption, transmit the encrypted key through the quantum channel, and the receiver decrypts the encrypted key after receiving it to restore the original key, and verifies the received key using the multi-dimensional quantum state encoding parameters.

[0032] This embodiment also provides a computer device, which is applicable to the case of a quantum secure key management method based on homomorphic encryption, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the quantum secure key management method based on homomorphic encryption proposed in the above embodiment.

[0033] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0034] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the quantum secure key management method based on homomorphic encryption proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0035] In summary, the present invention selects the SARIMA model as the basic framework of the key demand prediction model, defines a clear input-output relationship, and divides the preprocessed usage data into a training set and a test set, thereby realizing accurate modeling of key usage. It not only improves the prediction accuracy of the key demand prediction model, but also captures the seasonality and trend changes of key demand. By drawing the ACF and PACF graphs through statsmodels, the non-seasonal and seasonal parameters are analyzed, so that the key demand prediction model can adapt to the complexity and periodicity of the key usage pattern, which is crucial for predicting future key demand. The repeated adjustment and verification of the training set and the test set ensure the generalization ability of the key demand prediction model and the reliability of the prediction.

[0036] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A quantum secure key management method based on homomorphic encryption, characterized in that: include, Initialize the quantum key pool, configure the multi-dimensional quantum state encoding parameters, collect and preprocess the usage data of historical keys, build a key demand prediction model based on the preprocessed usage data, and output the predicted key demand. The expression for the predicted key demand is: ; in, To predict the key demand, is the key time length, is the key usage change rate, is the tangent function, is the circumference of a circle, is the number of times the key is used, is the average amount of key; Based on the predicted key demand, a multi-dimensional quantum state is generated as the initial key distribution scheme, and the multi-dimensional quantum state is encoded using the multi-dimensional quantum state encoding parameters to generate a high-dimensional quantum state, and the key format is converted and stored in the quantum key pool, and the key is distributed to each node of the quantum key pool according to the predicted key demand; Monitor the key usage of each node in the quantum key pool in real time, collect feedback information, generate visual reports, generate new key distribution plans based on the key demand prediction model and store them in the quantum key pool; The key of the new key distribution scheme is extracted from the quantum key pool, encrypted using homomorphic encryption, and transmitted through the quantum channel. After receiving the encrypted key, the receiver decrypts it, restores the original key, and verifies the received key using multi-dimensional quantum state encoding parameters.

2. The quantum secure key management method based on homomorphic encryption according to claim 1, characterized in that: The multi-dimensional quantum state encoding parameters refer to the photon polarization state, photon phase and photon time characteristics; The usage data includes key time period, key usage times, key usage change rate and key average amount; The preprocessing includes removing outliers, standardization and feature engineering.

3. The quantum secure key management method based on homomorphic encryption as claimed in claim 2, characterized in that: The key demand prediction model is constructed based on the preprocessed usage data to output the predicted key demand. The specific steps are: Select the SARIMA model as the basic framework of the key demand prediction model; Define the key demand prediction model with usage data as input and predicted key demand as output; Divide the preprocessed usage data into a training set and a test set; Use statsmodels to plot ACF and PACF graphs, view the time series data of the data used in the ACF and PACF graphs, and obtain the non-seasonal parameters of the key demand prediction model; On the ACF and PACF graphs, focus on the time series data of the key usage change rate and obtain the seasonal parameters of the key demand prediction model; Use the training set to train the key demand prediction model, and adjust the non-seasonal parameters and seasonal parameters to optimize the key demand prediction model; Use the test set to verify the prediction ability of the key demand prediction model; The future key time period is predicted based on the trained key demand prediction model to generate the predicted key demand.

4. The quantum secure key management method based on homomorphic encryption as claimed in claim 3, characterized in that: The method of using multi-dimensional quantum state encoding parameters to encode multi-dimensional quantum states to generate high-dimensional quantum states, and converting the key format to be stored in a quantum key pool, specifically comprises the following steps: By changing the polarization direction of photons through the polarization state of photons, quantum states of different polarization states are generated; The photon phase angle is set by the photon phase to generate quantum states with different phase angles; Controlling the photon propagation time through the photon time characteristics generates a quantum state based on the time characteristics; Combining different quantum states generated based on photon polarization state, photon phase and photon time characteristics into a high-dimensional quantum state; Convert the high-dimensional quantum state into a binary key through a mapping rule, and convert the binary key into an AES key and an RSA key respectively; The converted AES keys and RSA keys are further encrypted using Paillier homomorphic encryption and stored in the quantum key pool.

5. The quantum secure key management method based on homomorphic encryption according to claim 4, characterized in that: The specific steps of real-time monitoring of the key usage of each node in the quantum key pool, collecting feedback information, generating a visual report, generating a new key distribution scheme based on the key demand prediction model and storing it in the quantum key pool are as follows: Deploy Prometheus to monitor each node of the key management center and obtain new key usage data; Configure Kafka to collect key usage feedback from each node; Check the number of available keys in the quantum key pool through SQL query statements; Use Grafana to generate visualization reports combining new key usage data, key usage feedback, and the number of available keys, and connect to Prometheus for real-time monitoring; Use Python scripts combined with key demand prediction models to predict key demand in real time and generate new key distribution plans; The keys in the new key distribution scheme are transmitted and stored in each node in the quantum key pool using SSH tunnel.

6. The quantum secure key management method based on homomorphic encryption according to claim 5, characterized in that: The key of the new key distribution scheme is encrypted using homomorphic encryption, and the encrypted key is transmitted through the quantum channel. After receiving the encrypted key, the receiver decrypts it and recovers the original key. The specific steps are: The sender uses Paillier homomorphic encryption to generate a pair of public and private keys; Converting the keys in the new key distribution scheme into binary numbers; Use the public key to encrypt the binary number and generate encrypted ciphertext; The sender transmits the encrypted ciphertext to the receiver through quantum communication; After receiving the encrypted ciphertext, the receiver uses the private key to decrypt it and recover the original key.

7. The quantum secure key management method based on homomorphic encryption according to claim 6, characterized in that: The method of using the multi-dimensional quantum state encoding parameters to verify the received key comprises the following specific steps: The receiver uses a quantum photon detector to receive the high-dimensional quantum state and measures the high-dimensional quantum state according to the multi-dimensional quantum state encoding parameters; Compare the measured high-dimensional quantum state with the decrypted key to check the consistency; If the measurement result is consistent with the decrypted key, the key can be used; If the measurement result is inconsistent with the decrypted key, a security alarm is triggered and the key is refused to be used; The key expires after use and is destroyed by physical destruction.

8. A quantum secure key management system based on homomorphic encryption, based on the quantum secure key management method based on homomorphic encryption according to any one of claims 1 to 7, characterized in that: Including, building module, encoding module, monitoring module and verification module; The construction module is used to initialize the quantum key pool, configure multi-dimensional quantum state encoding parameters, collect and pre-process the usage data of historical keys, build a key demand prediction model based on the pre-processed usage data, and output the predicted key demand; The encoding module is used to generate a multidimensional quantum state as an initial key distribution scheme based on the predicted key demand, encode the multidimensional quantum state using the multidimensional quantum state encoding parameter to generate a high-dimensional quantum state, convert the key format and store it in the quantum key pool, and distribute the key to each node of the quantum key pool according to the predicted key demand; The monitoring module is used to monitor the key usage of each node in the quantum key pool in real time, collect feedback information, generate a visual report, generate a new key distribution plan based on the key demand prediction model and store it in the quantum key pool; The verification module is used to extract the key of the new key distribution scheme from the quantum key pool, encrypt the key of the new key distribution scheme using homomorphic encryption, transmit the encrypted key through the quantum channel, and the receiver decrypts the encrypted key after receiving it to restore the original key, and verify the received key using multi-dimensional quantum state encoding parameters.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the quantum secure key management method based on homomorphic encryption are implemented in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the quantum secure key management method based on homomorphic encryption according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Quantum homomorphic encryption and decryption method based on multi-valued single quantum state

    CN113922944A

  • Quantum classical hybrid power load prediction method and related device

    CN118157094A

  • Verifiable quantum homomorphic encryption method based on quantum confusion

    CN118337379A

  • Digital key security management method and system based on quantum encryption technology

    CN118890153A

  • Security encryption communication method and system based on quantum key management

    CN119316138A

Cited By

  • Quantum key distribution secure communication system based on quantum mechanics principle

    CN120675711A

  • Key synchronization method and device, central management equipment and storage medium

    CN121664415A