A cryptographic chip random number generator entropy source quality detection method and system

By using phase-locked loop technology to achieve multi-channel synchronous acquisition and wavelet threshold denoising, combined with a multi-dimensional evaluation system and fuzzy comprehensive evaluation method, the problem of insufficient synchronization accuracy and unscientific evaluation in existing entropy source quality detection is solved, realizing comprehensive and accurate detection and optimization guidance of entropy source quality.

CN122137553APending Publication Date: 2026-06-02SHANGHAI UNI SENTRY INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI UNI SENTRY INTELLIGENT TECH CO LTD
Filing Date
2026-02-26
Publication Date
2026-06-02

Smart Images

  • Figure CN122137553A_ABST
    Figure CN122137553A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for detecting the entropy source quality of a random number generator in a cryptographic chip, relating to the field of cryptographic chip security technology. It achieves high-precision synchronization between the acquisition channel and the entropy source clock through phase-locked loop (PLL) technology, ensuring the accuracy of multi-dimensional data acquisition. A combined preprocessing scheme using wavelet threshold denoising, the 3σ criterion, and the Grubbs test improves data reliability. A multi-dimensional evaluation system covering basic statistics, entropy value, stability, and anti-interference capability is constructed, combining the analytic hierarchy process (AHP) and fuzzy comprehensive evaluation method to achieve scientific weight allocation and quality scoring. An interference simulation module is added to adapt to practical application scenarios. Ultimately, this not only overcomes the shortcomings of existing technologies such as insufficient synchronization accuracy, single detection dimensions, and unscientific evaluation, achieving comprehensive and accurate detection of entropy source quality, but also generates a detection report containing non-compliant indicators and improvement suggestions, providing precise guidance for entropy source optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cryptographic chip technology, and in particular to a method and system for detecting the entropy source quality of a cryptographic chip random number generator. Background Technology

[0002] Random number generators are the core components of cryptographic chips, and the randomness of their output random numbers directly determines the security of cryptographic algorithms. Entropy sources, as the fundamental source of the randomness generated by random number generators, are crucial to ensuring the security of random numbers. In critical areas such as financial payments, e-government, and IoT security, cryptographic chips have extremely high requirements for the quality of the entropy source in random number generators. Substandard entropy source quality can lead to predictable random numbers, resulting in serious security risks such as the collapse of encryption systems and the leakage of sensitive information. Currently, entropy source quality testing has become an essential step in the research, development, production, and acceptance processes of cryptographic chips. Existing entropy source quality testing technologies primarily assess the randomness of entropy source output signals by collecting them and combining statistical analysis methods, focusing on the detection of signal characteristics in a single dimension, either in the time or frequency domain. However, with the increasing integration of cryptographic chips and the growing complexity of application scenarios, entropy source output signals are susceptible to interference from internal chip circuitry, external electromagnetic environments, power supply fluctuations, and other factors. This places higher demands on the synchronization, multi-dimensionality, and anti-interference assessment capabilities of testing technologies.

[0003] Although existing entropy source quality detection technology has been applied to some extent, it still has many shortcomings in actual detection processes, as follows: 1. Insufficient synchronous acquisition accuracy: Existing detection equipment mostly uses independent clocks for data acquisition, which cannot achieve synchronous acquisition with the entropy source output clock. This results in time deviations in the acquired data, which in turn affects the accuracy of time-domain signal feature extraction. Especially in high-frequency entropy source detection scenarios, the deviation will significantly amplify the detection error.

[0004] 2. Single detection dimension: Most detection methods only detect a single dimension of the time-domain voltage signal or frequency-domain feature signal, ignoring the impact of factors such as noise interference and environmental fluctuations on the quality of the entropy source, and cannot fully reflect the true performance of the entropy source in complex real-world scenarios. 3. Poor reliability of data preprocessing: Existing technologies mostly use a single noise reduction or outlier removal algorithm. For example, if only the 3σ criterion is used to remove outliers, it is difficult to cope with the various noises mixed in the entropy source output signal and occasional extreme abnormal data. This can easily lead to the loss of effective signals or the retention of abnormal data, affecting the accuracy of subsequent evaluation results.

[0005] 4. The evaluation system is incomplete and the weight allocation is unreasonable: the existing evaluation indicators are mostly concentrated on basic statistical characteristics or single entropy values, and lack evaluation of key performance such as the stability and anti-interference ability of entropy sources; at the same time, the weights of the indicators are mostly assigned by experience, which is highly subjective and cannot scientifically reflect the degree of influence of each indicator on the quality of the entropy source, resulting in low credibility of the comprehensive evaluation results. 5. Lack of anti-interference capability assessment: Existing tests are mostly conducted in ideal environments, without simulating complex interference scenarios such as electromagnetic interference, power supply interference, and temperature fluctuations in actual applications. This makes it impossible to accurately assess the quality stability of the entropy source under actual working conditions, resulting in a disconnect between test results and actual application effects. Summary of the Invention

[0006] The purpose of this invention is to provide a method and system for detecting the entropy source quality of a cryptographic chip random number generator. It achieves high-precision synchronization between the acquisition channel and the entropy source clock through phase-locked loop technology, ensuring the accuracy of multi-dimensional data acquisition. A combined preprocessing scheme of wavelet threshold denoising and the "3σ criterion + Grubbs test" is employed to improve data reliability. A multi-dimensional evaluation system covering basic statistics, entropy value, stability, and anti-interference capability is constructed, combining the analytic hierarchy process (AHP) and fuzzy comprehensive evaluation method to achieve scientific weight allocation and quality scoring. An interference simulation module is added to adapt to practical application scenarios. Ultimately, this invention not only overcomes the shortcomings of existing technologies such as insufficient synchronization accuracy, single detection dimensions, and unscientific evaluation, achieving comprehensive and accurate detection of entropy source quality, but also generates a detection report containing unqualified indicators and improvement suggestions, providing precise guidance for entropy source optimization and effectively ensuring the secure application of cryptographic chips in key areas such as financial payment and e-government.

[0007] To achieve the above objectives, the present invention provides a method for detecting the entropy source quality of a cryptographic chip random number generator, comprising the following steps: S1: Build a multi-channel synchronous acquisition platform and control the multi-channel synchronous acquisition platform to perform multi-dimensional data acquisition on the entropy source output signal of the random number generator of the cryptographic chip to obtain the raw acquisition data; S2: Preprocess the raw data obtained in S1. Preprocessing includes data noise reduction, outlier removal, and data standardization. S3: After preprocessing the collected data, construct a multi-dimensional evaluation index system for entropy source quality. The evaluation index system includes basic statistical indicators, entropy value evaluation indicators, stability indicators, and anti-interference ability indicators. S4: The weights of the multi-dimensional evaluation indicators in S4 are determined by the analytic hierarchy process, and the entropy source quality is comprehensively scored by the fuzzy comprehensive evaluation method to obtain the entropy source quality level. S5: Generate an entropy source quality test report based on the entropy source quality level and the specific scores of each evaluation indicator.

[0008] Preferably, the multi-dimensional data in S1 includes time-domain voltage signals, frequency-domain characteristic signals, and noise interference signals. The sampling rate of the time-domain voltage signals is not less than 5 times the highest frequency of the entropy source output signal, and the acquisition duration is not less than 10 entropy source output cycles.

[0009] Preferably, in S2, the data denoising uses a wavelet threshold denoising algorithm to calculate the wavelet coefficients of the original collected data, set an adaptive threshold to correct the wavelet coefficients, and then reconstruct the data. The adaptive threshold calculation formula is as follows: ; In the formula, λ is the wavelet threshold, σ is the noise standard deviation in the original acquired data, and N is the length of the original acquired data; Outlier removal employs the 3σ criterion combined with the Grubbs test. First, outlier data is preliminarily screened using the 3σ criterion, and then the Grubbs test is used to verify the preliminarily screened outlier data. Once confirmed, the outlier data is removed. The 3σ criterion is based on the normal distribution and defines the outlier threshold using the following formula: X < μ - 3σ or X > μ + 3σ; mean μ Standard deviation σ In the formula, μ is the mean of the original collected data. N This represents the total amount of original collected data. For the first i One original data point, X Let σ be the data point to be determined, and σ be the standard deviation of the original collected data. Grubbs' test verifies the validity of suspected outliers through statistical calculation and critical value determination: The following formula is used during the calculation of the statistic: G=| X 可疑 -μ| / σ; In the formula, G is the Grubbs statistic, and X... 可疑 These are suspected outlier data points identified using the 3σ criterion. critical value Determine the value by querying the Grubbs critical value table: ; Where α is the significance level; The number of samples; For degrees of freedom of Distributed in The critical value of the quantile; if the calculated G> The data point was determined to be a valid outlier and was removed. In data standardization, the Z-score standardization method is used to transform the data to the [0,1] interval.

[0010] Preferably, in S3, the basic statistical indicators include mean, variance, kurtosis, skewness, and uniformity of signal amplitude distribution; the entropy evaluation indicators include minimum entropy, Shannon entropy, and conditional entropy. Minimum Entropy ; In the formula, m The number of types of data symbols. For the first m The probability of the occurrence of a certain data symbol max(P 1 ,P 2 ,..., P m ) It is the maximum value among all the probabilities of the occurrence of data symbols; Shannon entropy ; In the formula, For the first i The probability of a given data symbol appearing; Conditional entropy H(X|Y) ; In the formula, X` This is the current output data sequence. Y` Output the data sequence for the previous time step. for The first in i Data symbols, for The first in j Data symbols, for and The joint probability of simultaneous occurrence for under conditions The conditional probability; Stability metrics include long-term stability and short-term stability. Long-term stability is assessed by the statistical characteristic deviation of the entropy source output signal over different time periods. = ×100%; In the formula, The statistical characteristic deviation value, For the first k Statistical characteristic values ​​for a time period, These are the statistical characteristic values ​​for the initial time period; Short-term stability is assessed by evaluating the signal fluctuation amplitude over 100 consecutive output cycles: ; In the formula, For signal fluctuation amplitude, For the first i The signal amplitude of each output cycle; The anti-interference capability index is evaluated by the rate of change of the entropy value of the entropy source output signal under a preset interference intensity: ; In the formula, H_inter is the entropy rate of change, H_inter is the entropy value of the output signal of the entropy source after applying interference, and H_normal is the entropy value of the output signal of the entropy source without interference.

[0011] Preferably, the specific process of determining the weights of each evaluation index using the analytic hierarchy process in S4 includes: S41: Establish a hierarchical structure model, which includes a target layer, a criterion layer, and an indicator layer. The target layer is a comprehensive evaluation of the entropy source quality. The criterion layer includes basic statistical dimensions, entropy value dimensions, stability dimensions, and anti-interference ability dimensions. The indicator layer consists of specific evaluation indicators corresponding to each dimension. S42: Construct a judgment matrix, invite multiple domain experts to compare the importance of elements at the same level relative to their corresponding elements at the next higher level, quantify the comparison results using the 1-9 scale method, and obtain the judgment matrix; S43: Perform a consistency check on the judgment matrix: Consistency Indicators: ; In the formula, CI is the consistency index. To determine the largest eigenvalue of a matrix, To determine the order of a matrix; Consistency ratio ; In the formula, CR is the consistency ratio, and RI is the average random consistency index, the value of which is determined by the order of the judgment matrix. Sure, =1 when RI=0, =2 when RI=0, RI=0.58 when =3, RI=0.90 when =4, When RI = 5, RI = 1.12; if the consistency ratio CR < 0.1, the judgment matrix passes the consistency test; otherwise, the judgment matrix is ​​reconstructed. S43: Calculate the weight values ​​of each evaluation index based on the judgment matrix that has passed the consistency test.

[0012] A system for detecting the entropy source quality of a random number generator for cryptographic chips includes a multi-channel synchronous acquisition module, a data preprocessing module, an evaluation index construction module, a comprehensive evaluation module, and a report generation module. The multi-channel synchronous acquisition module performs multi-dimensional data acquisition on the entropy source output signal of the random number generator of the cryptographic chip. The data preprocessing module is connected to the multi-channel synchronous acquisition module to perform noise reduction, outlier removal, and data standardization on the raw acquired data. The evaluation index construction module is used to construct a multi-dimensional evaluation index system for entropy source quality. The evaluation index system includes basic statistical indicators, entropy value evaluation indicators, stability indicators, and anti-interference ability indicators. The comprehensive evaluation module is connected to the data preprocessing module and the evaluation index construction module. The weight of the evaluation index system is determined by the analytic hierarchy process, and the fuzzy comprehensive evaluation method is used to comprehensively score the entropy source quality to obtain the entropy source quality level. The report generation module is connected to the comprehensive evaluation module. It generates a test report based on the entropy source quality level and the scores of each evaluation indicator, and provides improvement suggestions when the test fails.

[0013] Preferably, the multi-channel synchronous acquisition module includes a signal conditioning unit, a high-speed data acquisition unit, a clock synchronization unit, and an acquisition control unit. The clock synchronization unit is used to achieve synchronization between each acquisition channel and the entropy source output clock. The signal conditioning unit is used to amplify, filter, and perform level conversion processing on the entropy source output signal. The high-speed data acquisition unit uses an analog-to-digital converter with a resolution of 16 bits or higher, supports multi-channel parallel acquisition, and has a single-channel acquisition rate of no less than 100MSps; the clock synchronization unit includes a phase-locked loop chip, a crystal oscillator and a clock distribution circuit, with a synchronization accuracy error of no more than 1ns.

[0014] Preferably, it also includes an interference simulation module and a display and storage module. The interference simulation module is connected to the multi-channel synchronous acquisition module to apply electromagnetic interference, power interference and temperature interference of preset intensity to the entropy source of the random number generator of the cryptographic chip to test the anti-interference capability of the entropy source. The display and storage module is connected to the report generation module and the multi-channel synchronous acquisition module to display the acquired data, evaluation process data and test reports in real time, and to persistently store the relevant data.

[0015] Therefore, the present invention employs the above-described method and system for detecting the entropy source quality of a cryptographic chip random number generator, and the technical effects are as follows: (1) This invention builds a multi-channel synchronous acquisition platform with a clock synchronization module and uses phase-locked loop technology to achieve synchronous acquisition of each acquisition channel with the entropy source output clock. The synchronization accuracy error does not exceed 1ns, effectively eliminating the time deviation caused by the asynchronous acquisition clock and entropy source clock, ensuring the accuracy of multi-dimensional acquisition data in time domain, frequency domain and other dimensions, and laying the foundation for subsequent accurate evaluation.

[0016] (2) This invention acquires time-domain voltage signals, frequency-domain characteristic signals and noise interference signals through multiple channels simultaneously. Combined with a multi-dimensional evaluation system that covers basic statistical indicators, entropy evaluation indicators, stability indicators and anti-interference ability indicators, it comprehensively covers the core performance characteristics of entropy sources, breaks the limitation of single-dimensional detection in existing technologies, and more realistically reflects the quality of entropy sources.

[0017] (3) The present invention adopts a combined preprocessing scheme of wavelet threshold denoising algorithm and “3σ criterion + Grubbs test”. Wavelet threshold denoising can adaptively correct the wavelet coefficients of the signal and accurately filter out mixed noise. The combined outlier removal method first screens and then verifies accurately, effectively avoiding the limitations of a single algorithm and ensuring the integrity and accuracy of the preprocessed data.

[0018] (4) This invention uses the analytic hierarchy process (AHP) combined with the fuzzy comprehensive evaluation method to achieve the weight allocation and quality scoring of evaluation indicators. The AHP can scientifically determine the weight of each indicator based on expert experience and objective characteristics, avoiding subjective assignment bias. The fuzzy comprehensive evaluation method can effectively deal with the fuzzy problem in the evaluation process, improve the credibility and objectivity of the comprehensive evaluation results, and accurately classify the quality level of entropy sources.

[0019] (5) By adding an interference simulation module, the present invention can simulate electromagnetic interference, power supply interference and temperature interference in actual applications. Combined with the anti-interference capability index, the performance change of the entropy source under the preset interference intensity is evaluated, making the detection results closer to the actual application scenario and providing a guarantee for the secure application of cryptographic chips in complex environments. At the same time, the detection report can clearly mark the unqualified indicators and improvement suggestions, providing accurate guidance for the optimization of the entropy source. Attached Figure Description

[0020] Figure 1 This is a flowchart of the method for detecting the entropy source quality of the random number generator in the cryptographic chip according to the present invention. Detailed Implementation

[0021] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0022] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0023] Example like Figure 1 As shown, this invention provides a method for detecting the entropy source quality of a cryptographic chip random number generator, comprising the following steps: S1: Build a multi-channel synchronous acquisition platform and control the multi-channel synchronous acquisition platform to perform multi-dimensional data acquisition on the entropy source output signal of the random number generator of the cryptographic chip to obtain the raw acquisition data; the multi-channel synchronous acquisition platform is equipped with a multi-channel synchronous acquisition module, which includes a signal conditioning unit, a high-speed data acquisition unit, a clock synchronization unit, and an acquisition control unit. The clock synchronization unit is used to realize the same source synchronization between each acquisition channel and the entropy source output clock, and the signal conditioning unit is used to amplify, filter, and perform level conversion processing on the entropy source output signal; The multi-dimensional data in S1 includes time-domain voltage signals, frequency-domain characteristic signals, and noise interference signals. The sampling rate of the time-domain voltage signals is no less than 5 times the highest frequency of the entropy source output signal, and the acquisition time is no less than 10 entropy source output cycles.

[0024] S2: Preprocess the raw data obtained in S1. The preprocessing includes data denoising, outlier removal and data standardization. In S2, the data denoising adopts the wavelet threshold denoising algorithm. The wavelet coefficients of the raw data are calculated, and the data is reconstructed after the wavelet coefficients are corrected by setting an adaptive threshold. The adaptive threshold calculation formula is as follows: ; In the formula, λ is the wavelet threshold, σ is the noise standard deviation in the original acquired data, and N is the length of the original acquired data; Outlier removal employs the 3σ criterion combined with the Grubbs test. First, outlier data is preliminarily screened using the 3σ criterion, and then the Grubbs test is used to verify the preliminarily screened outlier data. Once confirmed, the outlier data is removed. The 3σ criterion is based on the normal distribution and defines the outlier threshold using the following formula: X < μ - 3σ or X > μ + 3σ; mean μ Standard deviation σ In the formula, μ is the mean of the original collected data. N This represents the total amount of original collected data. For the first i One original data point, X Let σ be the data point to be determined, and σ be the standard deviation of the original collected data. Grubbs' test verifies the validity of suspected outliers through statistical calculation and critical value determination: The following formula is used during the calculation of the statistic: G=| X 可疑 -μ| / σ; In the formula, G is the Grubbs statistic, and X... 可疑 These are suspected outlier data points identified using the 3σ criterion. critical value Determine the value by querying the Grubbs critical value table: ; Where α is the significance level; The number of samples; For degrees of freedom of Distributed in The critical value of the quantile; if the calculated G> The data point was determined to be a valid outlier and was removed. In data standardization, the Z-score standardization method is used to transform the data to the [0,1] interval.

[0025] S3: After preprocessing the collected data, construct a multi-dimensional evaluation index system for entropy source quality. The evaluation index system includes basic statistical indicators, entropy value evaluation indicators, stability indicators, and anti-interference ability indicators. In S3, basic statistical indicators include mean, variance, kurtosis, skewness, and uniformity of signal amplitude distribution; entropy evaluation indicators include minimum entropy, Shannon entropy, and conditional entropy. Minimum Entropy ; In the formula, m The number of types of data symbols. For the first m The probability of the occurrence of a certain data symbol max(P 1 ,P 2 ,..., P m ) It is the maximum value among all the probabilities of the occurrence of data symbols; Shannon entropy ; In the formula, For the first i The probability of a given data symbol appearing; Conditional entropy H(X|Y) ; In the formula, X` This is the current output data sequence. Y` Output the data sequence for the previous time step. for The first in i Data symbols, for The first in j Data symbols, for and The joint probability of simultaneous occurrence for under conditions The conditional probability; Stability metrics include long-term stability and short-term stability. Long-term stability is assessed by the statistical characteristic deviation of the entropy source output signal over different time periods. = ×100%; In the formula, The statistical characteristic deviation value, For the first k Statistical characteristic values ​​for a time period, These are the statistical characteristic values ​​for the initial time period; Short-term stability is assessed by evaluating the signal fluctuation amplitude over 100 consecutive output cycles: ; In the formula, For signal fluctuation amplitude, For the first i The signal amplitude of each output cycle; The anti-interference capability index is evaluated by the rate of change of the entropy value of the entropy source output signal under a preset interference intensity: ; In the formula, H_inter is the entropy rate of change, H_inter is the entropy value of the output signal of the entropy source after applying interference, and H_normal is the entropy value of the output signal of the entropy source without interference.

[0026] S4: The weights of the multi-dimensional evaluation indicators in S4 are determined by the analytic hierarchy process, and the entropy source quality is comprehensively scored by the fuzzy comprehensive evaluation method to obtain the entropy source quality level. The specific process of determining the weights of each evaluation indicator using the analytic hierarchy process in S4 includes: S41: Establish a hierarchical structure model, which includes a target layer, a criterion layer, and an indicator layer. The target layer is a comprehensive evaluation of the entropy source quality. The criterion layer includes basic statistical dimensions, entropy value dimensions, stability dimensions, and anti-interference ability dimensions. The indicator layer consists of specific evaluation indicators corresponding to each dimension. S42: Construct a judgment matrix, invite multiple domain experts to compare the importance of elements at the same level relative to their corresponding elements at the next higher level, quantify the comparison results using the 1-9 scale method, and obtain the judgment matrix; S43: Perform a consistency check on the judgment matrix: Consistency Indicators: ; In the formula, CI is the consistency index. To determine the largest eigenvalue of a matrix, To determine the order of a matrix; Consistency ratio ; In the formula, CR is the consistency ratio, and RI is the average random consistency index, the value of which is determined by the order of the judgment matrix. Sure, =1 when RI=0, =2 when RI=0, RI=0.58 when =3, RI=0.90 when =4, When RI = 5, RI = 1.12; if the consistency ratio CR < 0.1, the judgment matrix passes the consistency test; otherwise, the judgment matrix is ​​reconstructed. S43: Calculate the weight values ​​of each evaluation index based on the judgment matrix that has passed the consistency test.

[0027] S5: Generate an entropy source quality inspection report based on the entropy source quality level and the specific scores of each evaluation indicator. If the inspection result is unqualified, clearly indicate the unqualified indicators and corresponding improvement suggestions in the inspection report.

[0028] A system for detecting the entropy source quality of a random number generator for cryptographic chips includes a multi-channel synchronous acquisition module, a data preprocessing module, an evaluation index construction module, a comprehensive evaluation module, and a report generation module. The multi-channel synchronous acquisition module performs multi-dimensional data acquisition on the entropy source output signal of the random number generator of the cryptographic chip. The data preprocessing module is connected to the multi-channel synchronous acquisition module to perform noise reduction, outlier removal, and data standardization on the raw acquired data. The evaluation index construction module is used to construct a multi-dimensional evaluation index system for entropy source quality. The evaluation index system includes basic statistical indicators, entropy value evaluation indicators, stability indicators, and anti-interference ability indicators. The comprehensive evaluation module is connected to the data preprocessing module and the evaluation index construction module. The weight of the evaluation index system is determined by the analytic hierarchy process, and the fuzzy comprehensive evaluation method is used to comprehensively score the entropy source quality to obtain the entropy source quality level. The report generation module is connected to the comprehensive evaluation module. It generates a test report based on the entropy source quality level and the scores of each evaluation indicator, and provides improvement suggestions when the test fails.

[0029] The multi-channel synchronous acquisition module includes a signal conditioning unit, a high-speed data acquisition unit, a clock synchronization unit, and an acquisition control unit. The clock synchronization unit is used to achieve synchronization between each acquisition channel and the entropy source output clock. The signal conditioning unit is used to amplify, filter, and perform level conversion on the entropy source output signal. The high-speed data acquisition unit uses an analog-to-digital converter with a resolution of 16 bits or higher, supports multi-channel parallel acquisition, and has a single-channel acquisition rate of no less than 100MSps; the clock synchronization unit includes a phase-locked loop chip, a crystal oscillator and a clock distribution circuit, with a synchronization accuracy error of no more than 1ns.

[0030] It also includes an interference simulation module and a display and storage module. The interference simulation module is connected to the multi-channel synchronous acquisition module to apply electromagnetic interference, power interference and temperature interference of preset intensity to the entropy source of the random number generator of the cryptographic chip to test the anti-interference capability of the entropy source. The display and storage module is connected to the report generation module and the multi-channel synchronous acquisition module to display the acquired data, evaluation process data and test reports in real time, and to persistently store the relevant data.

[0031] A computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of a method for detecting the entropy source quality of a cryptographic chip random number generator.

[0032] Example 1 Taking the entropy source of the ring oscillator of a certain type of financial cryptographic chip as the detection object, the highest frequency of the output signal of the entropy source is 20MHz, and the output random number is used for financial payment encryption scenarios.

[0033] Establish a multi-channel synchronous data acquisition platform: A phase-locked loop (PLL) chip, CD4046, is used to construct a clock synchronization unit. Combined with a 100MHz high-precision crystal oscillator and clock distribution circuit, the clock of the acquisition channel and the entropy source output clock are synchronized. The synchronization accuracy error is tested to be 0.8ns, which meets the design requirement of no more than 1ns. The signal conditioning module uses a differential amplifier circuit, INA128, to amplify the weak signal (amplitude 0.2-0.5V) output by the entropy source to 1-5V. An RC low-pass filter circuit filters out 50Hz power frequency interference and high-frequency noise above 200MHz. The signal is then adapted to the high-speed data acquisition unit by a level conversion circuit. The high-speed data acquisition unit uses a 16-bit resolution analog-to-digital converter, ADS8688, which supports 4-channel parallel acquisition. The single-channel acquisition rate is set to 100MSps (5 times the highest output frequency of the entropy source, 20MHz). The acquisition control unit uses an FPGA chip, XC7K325T, to implement the acquisition timing control.

[0034] Multi-dimensional data collection: The entropy source output signal was acquired in multiple dimensions through the acquisition platform. The acquisition time was set to 20 entropy source output cycles (1μs). A total of three types of raw data were acquired: time-domain voltage signal, frequency-domain feature signal, and noise interference signal. The number of acquisition points for the time-domain voltage signal was 1000. The frequency-domain feature signal was obtained by converting the time-domain signal through Fast Fourier Transform (FFT). The noise interference signal was acquired synchronously from the interference signal of the circuit surrounding the entropy source through a dedicated noise acquisition channel.

[0035] Data preprocessing: (1) Data denoising: The original time-domain data was decomposed into three levels using the db4 wavelet basis, and the wavelet coefficients of each level were calculated. An adaptive threshold formula was then used. After determining the threshold and performing soft threshold correction on the wavelet coefficients, the data is reconstructed. After noise reduction, the signal-to-noise ratio of the signal is increased from 25dB to 42dB, effectively filtering out circuit thermal noise and external electromagnetic interference noise.

[0036] (2) Outlier removal: Initial screening is performed using the 3σ criterion, followed by calculation using the mean, standard deviation, and outlier threshold formulas: X < μ - 3σ or X > μ + 3σ; mean μ Standard deviation σ ; The mean μ = 3.2V and the standard deviation σ = 0.3V of the time-domain data were calculated. Data with amplitudes less than μ - 3σ = 2.3V or greater than μ + 3σ = 4.1V were marked as preliminary outliers, resulting in 12 outliers. The Grubbs test was then used for verification, and the significance level α was used to determine the critical value. (In this embodiment, α=0.05, the total data N=1000, and the query yielded a critical value G=2.57). The G value was calculated for each of the 12 preliminary outliers. If the calculated G>2.57, it was determined to be a valid outlier. Finally, 8 valid outliers were confirmed and removed, avoiding the problem of false deletion of valid signals caused by a single 3σ criterion.

[0037] (3) Data standardization: The Z-score standardization method is used to transform the preprocessed time domain and frequency domain data to the [0,1] interval to ensure the comparability of data in different dimensions.

[0038] Construction and comprehensive evaluation of a multi-dimensional evaluation indicator system: The constructed evaluation index system includes 4 criterion layers and 12 index layers. The basic statistical indicators include mean, variance, kurtosis, skewness, and uniformity of signal amplitude distribution (5 indicators). The entropy evaluation indicators include minimum entropy, Shannon entropy, and conditional entropy (3 indicators). The stability indicators include long-term stability (the deviation values ​​of statistical characteristics in 10 different time periods) and short-term stability (the amplitude of signal fluctuation in 100 consecutive output cycles) (2 indicators). The anti-interference capability indicator is the rate of change of entropy under the preset interference intensity (1 indicator).

[0039] Five experts in the field of cryptographic chip testing were invited to conduct pairwise comparisons of the importance of each indicator using the 1-9 scale method. A judgment matrix was constructed and a consistency test was performed. The consistency index CI = 0.042, which is less than the preset threshold of 0.1. The consistency test was passed, and the weights of each indicator were calculated as follows: basic statistical indicator weight 0.25, entropy evaluation indicator weight 0.35, stability indicator weight 0.25, and anti-interference ability indicator weight 0.15.

[0040] The fuzzy comprehensive evaluation method was used to classify the test results of each indicator into four fuzzy levels: "excellent," "good," "qualified," and "unqualified." A fuzzy evaluation matrix was established, and a comprehensive evaluation vector was calculated by combining the indicator weights. The final comprehensive quality score of the entropy source was 89 points, and the quality level was "good." Among them, the anti-interference ability indicator scored relatively low (72 points), while the scores of the other indicators were all above 85 points.

[0041] Interference simulation testing and improvement suggestions: By applying electromagnetic interference (10V / m, frequency 2.4GHz), power supply interference (±5% voltage fluctuation), and temperature interference (-40℃~85℃) of preset intensity to the entropy source using an interference simulation module, the entropy change rate of the output signal of the entropy source was found to be 8%, exceeding the excellent level threshold (≤5%). Based on this, the test report clearly indicates that the anti-interference capability indicator is unqualified, and improvement suggestions are proposed: add an electromagnetic shielding layer around the entropy source, optimize the power supply filtering circuit, and select oscillation circuit components with better temperature stability.

[0042] The improved entropy source was re-tested, and its anti-interference capability score increased to 88 points, with a comprehensive score of 92 points, raising its quality level to "Excellent," thus meeting the high security requirements of financial payment encryption scenarios. Compared with existing single-dimensional detection methods, this solution provides more comprehensive and accurate detection results, and its improvement suggestions precisely address the core defects of the entropy source, verifying the effectiveness and practicality of the solution.

[0043] Therefore, this invention employs the aforementioned method and system for detecting the entropy source quality of a cryptographic chip random number generator. It utilizes phase-locked loop (PLL) technology to achieve high-precision synchronization between the acquisition channel and the entropy source clock, ensuring the accuracy of multi-dimensional data acquisition. A combined preprocessing scheme of wavelet threshold denoising and the "3σ criterion + Grubbs test" is used to improve data reliability. A multi-dimensional evaluation system covering basic statistics, entropy value, stability, and anti-interference capability is constructed. This system combines analytic hierarchy process (AHP) and fuzzy comprehensive evaluation to achieve scientific weight allocation and quality scoring. Furthermore, an interference simulation module is added to adapt to practical application scenarios. Ultimately, this invention not only overcomes the shortcomings of existing technologies, such as insufficient synchronization accuracy, single detection dimensions, and unscientific evaluation, achieving comprehensive and accurate detection of entropy source quality, but also generates a detection report containing non-compliant indicators and improvement suggestions, providing precise guidance for entropy source optimization.

[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for detecting the entropy source quality of a random number generator in a cryptographic chip, characterized in that, Includes the following steps: S1: Build a multi-channel synchronous acquisition platform and control the multi-channel synchronous acquisition platform to perform multi-dimensional data acquisition on the entropy source output signal of the random number generator of the cryptographic chip to obtain the raw acquisition data; S2: Preprocess the raw data obtained in S1. Preprocessing includes data noise reduction, outlier removal, and data standardization. S3: After preprocessing the collected data, construct a multi-dimensional evaluation index system for entropy source quality. The evaluation index system includes basic statistical indicators, entropy value evaluation indicators, stability indicators, and anti-interference ability indicators. S4: The weights of the multi-dimensional evaluation indicators in S4 are determined by the analytic hierarchy process, and the entropy source quality is comprehensively scored by the fuzzy comprehensive evaluation method to obtain the entropy source quality level. S5: Generate an entropy source quality test report based on the entropy source quality level and the specific scores of each evaluation indicator.

2. The method for detecting the entropy source quality of a cryptographic chip random number generator according to claim 1, characterized in that, The multi-dimensional data in S1 includes time-domain voltage signals, frequency-domain characteristic signals, and noise interference signals. The sampling rate of the time-domain voltage signals is no less than 5 times the highest frequency of the entropy source output signal, and the acquisition time is no less than 10 entropy source output cycles.

3. The method for detecting the entropy source quality of a cryptographic chip random number generator according to claim 1, characterized in that, In S2, the data denoising uses a wavelet threshold denoising algorithm to calculate the wavelet coefficients of the original collected data, set an adaptive threshold to correct the wavelet coefficients, and then reconstruct the data. The adaptive threshold calculation formula is as follows: ; In the formula, λ is the wavelet threshold, σ is the noise standard deviation in the original acquired data, and N is the length of the original acquired data; Outlier removal employs the 3σ criterion combined with the Grubbs test. First, outlier data is preliminarily screened using the 3σ criterion, and then the Grubbs test is used to verify the preliminarily screened outlier data. Once confirmed, the outlier data is removed. The 3σ criterion is based on the normal distribution and defines the outlier threshold using the following formula: X < μ - 3σ or X > μ + 3σ; mean μ Standard deviation σ In the formula, μ is the mean of the original collected data. N This represents the total amount of original collected data. For the first i One original data point, X Let σ be the data point to be determined, and σ be the standard deviation of the original collected data. Grubbs' test verifies the validity of suspected outliers through statistical calculation and critical value determination: The following formula is used during the calculation of the statistic: G=| X 可疑 -μ| / σ; In the formula, G is the Grubbs statistic, and X... 可疑 These are suspected outlier data points identified using the 3σ criterion. critical value Determine the value by querying the Grubbs critical value table: ; Where α is the significance level; The number of samples; For degrees of freedom of Distributed in The critical value of the quantile; if the calculated G> The data point was determined to be a valid outlier and was removed. In data standardization, the Z-score standardization method is used to transform the data to the [0,1] interval.

4. The method for detecting the entropy source quality of a cryptographic chip random number generator according to claim 1, characterized in that, In S3, basic statistical indicators include mean, variance, kurtosis, skewness, and uniformity of signal amplitude distribution; entropy evaluation indicators include minimum entropy, Shannon entropy, and conditional entropy. Minimum Entropy ; In the formula, m The number of types of data symbols. For the first m The probability of the occurrence of a certain data symbol max(P 1 ,P 2 ,...,P m ) It is the maximum value among all the probabilities of the occurrence of data symbols; Shannon entropy ; In the formula, For the first i The probability of a given data symbol appearing; Conditional entropy H(X|Y) ; In the formula, X` This is the current output data sequence. Y` Output the data sequence for the previous time step. for The first in i Data symbols, for The first in j Data symbols, for and The joint probability of simultaneous occurrence for under conditions The conditional probability; Stability metrics include long-term stability and short-term stability. Long-term stability is assessed by the statistical characteristic deviation of the entropy source output signal over different time periods. = ×100%; In the formula, The statistical characteristic deviation value, For the first k Statistical characteristic values ​​for a time period, These are the statistical characteristic values ​​for the initial time period; Short-term stability is assessed by evaluating the signal fluctuation amplitude over 100 consecutive output cycles: ; In the formula, For signal fluctuation amplitude, For the first i The signal amplitude of each output cycle; The anti-interference capability index is evaluated by the rate of change of the entropy value of the entropy source output signal under a preset interference intensity: ; In the formula, H_inter is the entropy rate of change, H_inter is the entropy value of the output signal of the entropy source after applying interference, and H_normal is the entropy value of the output signal of the entropy source without interference.

5. The method for detecting the entropy source quality of a cryptographic chip random number generator according to claim 1, characterized in that, The specific process of determining the weights of each evaluation indicator using the analytic hierarchy process in S4 includes: S41: Establish a hierarchical structure model, which includes a target layer, a criterion layer, and an indicator layer. The target layer is a comprehensive evaluation of the entropy source quality. The criterion layer includes basic statistical dimensions, entropy value dimensions, stability dimensions, and anti-interference ability dimensions. The indicator layer consists of specific evaluation indicators corresponding to each dimension. S42: Construct a judgment matrix, invite multiple domain experts to compare the importance of elements at the same level relative to their corresponding elements at the next higher level, quantify the comparison results using the 1-9 scale method, and obtain the judgment matrix; S43: Perform a consistency check on the judgment matrix: Consistency Indicators: ; In the formula, CI is the consistency index. To determine the largest eigenvalue of a matrix, To determine the order of a matrix; Consistency ratio ; In the formula, CR is the consistency ratio, and RI is the average random consistency index, the value of which is determined by the order of the judgment matrix. Sure, =1 when RI=0, =2 when RI=0, RI=0.58 when =3, RI=0.90 when =4, When RI = 5, RI = 1.12; if the consistency ratio CR < 0.1, the judgment matrix passes the consistency test; otherwise, the judgment matrix is ​​reconstructed. S43: Calculate the weight values ​​of each evaluation index based on the judgment matrix that has passed the consistency test.

6. A system for detecting the entropy source quality of a cryptographic chip random number generator according to any one of claims 1-5, characterized in that, It includes a multi-channel synchronous acquisition module, a data preprocessing module, an evaluation index construction module, a comprehensive evaluation module, and a report generation module; The multi-channel synchronous acquisition module performs multi-dimensional data acquisition on the entropy source output signal of the random number generator of the cryptographic chip. The data preprocessing module is connected to the multi-channel synchronous acquisition module to perform noise reduction, outlier removal, and data standardization on the raw acquired data. The evaluation index construction module is used to construct a multi-dimensional evaluation index system for entropy source quality. The evaluation index system includes basic statistical indicators, entropy value evaluation indicators, stability indicators, and anti-interference ability indicators. The comprehensive evaluation module is connected to the data preprocessing module and the evaluation index construction module. The weight of the evaluation index system is determined by the analytic hierarchy process, and the fuzzy comprehensive evaluation method is used to comprehensively score the entropy source quality to obtain the entropy source quality level. The report generation module is connected to the comprehensive evaluation module. It generates a test report based on the entropy source quality level and the scores of each evaluation indicator, and provides improvement suggestions when the test fails.

7. The entropy source quality detection system for a cryptographic chip random number generator according to claim 6, characterized in that, The multi-channel synchronous acquisition module includes a signal conditioning unit, a high-speed data acquisition unit, a clock synchronization unit, and an acquisition control unit. The clock synchronization unit is used to achieve synchronization between each acquisition channel and the entropy source output clock. The signal conditioning unit is used to amplify, filter, and perform level conversion on the entropy source output signal. The high-speed data acquisition unit uses an analog-to-digital converter with a resolution of 16 bits or higher, supports multi-channel parallel acquisition, and has a single-channel acquisition rate of no less than 100MSps; the clock synchronization unit includes a phase-locked loop chip, a crystal oscillator and a clock distribution circuit, with a synchronization accuracy error of no more than 1ns.

8. The entropy source quality detection system for a cryptographic chip random number generator according to claim 6, characterized in that, It also includes an interference simulation module and a display and storage module. The interference simulation module is connected to the multi-channel synchronous acquisition module to apply electromagnetic interference, power interference and temperature interference of preset intensity to the entropy source of the random number generator of the cryptographic chip to test the anti-interference capability of the entropy source. The display and storage module is connected to the report generation module and the multi-channel synchronous acquisition module to display the acquired data, evaluation process data and test reports in real time, and to persistently store the relevant data.