A security assessment system and method for cryptographic algorithms

Through the multi-dimensional testing of the cryptographic algorithm security evaluation system, the problem of traditional evaluation methods ignoring the actual use environment factors is solved, and a comprehensive evaluation of the security of the cryptographic algorithm is achieved, which enhances the accuracy and practicality of the evaluation.

CN119484337BActive Publication Date: 2025-04-15XIAN SHANGYI ANHUA INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510061446.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-15
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

The security evaluation method of traditional cryptographic algorithms focuses on a single dimension and ignores the actual use environment factors, which makes the evaluation results unable to fully reflect the security of cryptographic algorithms in actual applications.

Method used

A security evaluation system for cryptographic algorithms is proposed, including cryptographic algorithm import module, basic testing module, theoretical testing module, practical testing module and security evaluation module. Through multi-dimensional testing, including the accuracy of encryption and decryption, resource occupation, mathematical foundation, encryption speed and side channel attack resistance, the security of the cryptographic algorithm is comprehensively evaluated.

Benefits of technology

A comprehensive and multi-dimensional evaluation of the security of the cryptographic algorithm is realized, which can more accurately reflect the security of the cryptographic algorithm in actual use, and avoid the limitations of single-dimensional evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484337B_ABST
    Figure CN119484337B_ABST
Patent Text Reader

Abstract

The present invention discloses a security assessment system and method for a cryptographic algorithm, which belongs to the field of information security technology, and includes a cryptographic algorithm import module, a basic test module, a theoretical test module, a practical test module, and a security assessment module. The cryptographic algorithm import module is used to receive the source code of the cryptographic algorithm to be evaluated imported by the user, and to establish an evaluation database to establish an archive for each imported cryptographic algorithm to be evaluated, and to record the basic information of each cryptographic algorithm in the archive, including the name of the cryptographic algorithm, the type of the cryptographic algorithm, and the key length. The security assessment system and method for a cryptographic algorithm of the present invention can evaluate the cryptographic algorithm in multiple dimensions, not only considering the theoretical aspects such as the correctness of encryption and decryption, resource occupation, and mathematical foundation, but also taking into account the actual use environment factors such as encryption speed and side channel attack resistance, comprehensively measuring the security of the algorithm, and avoiding the one-sidedness of single-dimensional evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology, and specifically relates to a security assessment system and method for a cryptographic algorithm. Background Art

[0002] In today's digital age, information security is of vital importance, and cryptographic algorithms, as the core technology to ensure information security, are particularly critical in terms of security assessment;

[0003] Traditional cryptographic algorithm security assessment methods often have limitations. Most cryptographic algorithm assessments only focus on a single dimension, considering theoretical aspects such as the correctness of encryption and decryption, resource usage, and mathematical foundations based on ideal conditions, while ignoring the impact of environmental factors under the actual use of cryptographic algorithms. As a result, the assessment results cannot fully reflect the security of cryptographic algorithms in actual applications, resulting in various potential risks faced by cryptographic algorithms in actual use scenarios, making it impossible to make a comprehensive and accurate judgment on the security of cryptographic algorithms.

[0004] In view of the above, this case proposes a cryptographic algorithm security assessment system and method to solve the above technical problems. Summary of the invention

[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a security assessment system and method for a cryptographic algorithm, which solves the above technical problem by improving the assessment method and processing method.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A cryptographic algorithm security assessment system, comprising a cryptographic algorithm import module, a basic test module, a theoretical test module, a practical test module, and a security assessment module;

[0008] The cryptographic algorithm import module is used to receive the source code of the cryptographic algorithm to be evaluated imported by the user, and to establish an evaluation database to create a file for each imported cryptographic algorithm to be evaluated, and to record the basic information of each cryptographic algorithm in the file, including the name of the cryptographic algorithm, the type of cryptographic algorithm, the key length, and the size of the key space;

[0009] The basic test module includes a standard test vector set and plaintext data of different sizes, which are used to determine the correctness of encryption and decryption of the current cryptographic algorithm and monitor the resource usage during the operation of the cryptographic algorithm;

[0010] The theoretical test module uses cryptographic theory to conduct a theoretical security assessment of the current cryptographic algorithm to verify whether the mathematical basis of the algorithm meets the security requirements. It also conducts tests against known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and generates a theoretical test score.

[0011] The practicality test module performs an actual usage environment evaluation test on the current cryptographic algorithm based on the actual usage environment of the current cryptographic algorithm, including encryption speed and side channel attack resistance, to obtain a practicality test score;

[0012] The security assessment module conducts a comprehensive assessment of the application security of the current cryptographic algorithm based on the theoretical test score and the practical test score of the current cryptographic algorithm.

[0013] Furthermore, the practicality test module performs an actual use environment evaluation test on the current cryptographic algorithm based on the actual use environment of the current cryptographic algorithm, including encryption speed and side channel attack resistance, to obtain a practicality test score, and the specific steps are as follows:

[0014] Based on plaintext data of different sizes, the encryption speed range of the current cryptographic algorithm is calculated. Combined with the actual usage environment data scale of the current cryptographic algorithm and the encryption speed of the same type of cryptographic algorithms in history, the encryption speed score of the current cryptographic algorithm is calculated.

[0015] Based on the actual usage environment of the current cryptographic algorithm, the physical protection for the operation of the cryptographic algorithm in the actual usage environment is obtained, the side channel attack resistance score of the current cryptographic algorithm is calculated, and the transmission side channel attack resistance score and encryption speed score are entered into the security assessment module.

[0016] Furthermore, the encryption speed range of the current cryptographic algorithm is calculated based on plaintext data of different sizes, and the encryption speed score of the current cryptographic algorithm is calculated based on the actual usage environment data scale of the current cryptographic algorithm and the encryption speed of the same type of cryptographic algorithms in history. The specific steps are as follows:

[0017] Based on the plaintext data volume intervals of different sizes, the plaintext data volume intervals are extracted geometrically from small to large data, extracted by the current cryptographic algorithm Encrypt each piece of data and record the encryption time ,based on The amount of data and the encryption time of the corresponding current cryptographic algorithm , analyze the encryption speed of the current cryptographic algorithm, the specific steps are:

[0018] Combined with the actual data volume application environment of the current cryptographic algorithm , to obtain the actual encryption speed of the current cryptographic algorithm, the steps are:

[0019] Will be consistent with the actual data volume application environment Extract all data points and calculate the encryption speed under each data point ,in For extraction The data volume application environment Data:

[0020] ;

[0021] in, Represents data points The amount of encrypted data and encryption time under the condition are calculated, and the average speed is used as the actual encryption speed of the current cryptographic algorithm. ;

[0022] Collect the encryption speeds of the same type of cryptographic algorithms and obtain the interval threshold, match the encryption speed of the current cryptographic algorithm, and obtain the encryption speed score. The specific steps and algorithm formula are as follows:

[0023] Collect the encryption speeds of the same type of cryptographic algorithms and build an interval threshold for the encryption speed , ,when ≥ When the encryption speed of the current cryptographic algorithm is excellent in actual use, the encryption speed score is recorded. ,when < < When the encryption speed of the current encryption algorithm is good in actual use, the encryption speed score is recorded. ,when ≤ When the encryption speed of the current encryption algorithm is average in actual use, the encryption speed score is recorded. .

[0024] Furthermore, based on the actual use environment of the current cryptographic algorithm, the physical protection of the cryptographic algorithm operation in the actual use environment is obtained, the side channel attack resistance score of the current cryptographic algorithm is calculated, and the side channel attack resistance score and the encryption speed score are transmitted into the security assessment module. The specific steps are:

[0025] Collect the physical protection measures in the actual application environment of the current cryptographic algorithm, including electromagnetic shielding measures, temperature control measures, and hardware isolation measures, and score the side channel attack resistance of the current cryptographic algorithm:

[0026] When the actual application environment of the cryptographic algorithm has electromagnetic shielding measures, temperature control measures, and hardware isolation measures, record the side channel attack resistance score ;

[0027] When any two of the following measures exist in the actual application environment of the cryptographic algorithm: electromagnetic shielding measures, temperature control measures, and hardware isolation measures, the side channel attack resistance score is recorded. ;

[0028] When the actual application environment of the cryptographic algorithm only has one of the following measures: electromagnetic shielding measures, temperature control measures, or hardware isolation measures, the side channel attack resistance score is recorded. .

[0029] Furthermore, the theoretical test module conducts a theoretical security assessment on the current cryptographic algorithm through cryptographic theory to verify whether the mathematical basis of the algorithm meets the security requirements. At the same time, it tests known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and generates a theoretical test score. The specific steps are as follows:

[0030] Based on the cryptographic algorithm archive in the cryptographic algorithm import module, extract the data of the current cryptographic algorithm and calculate the key space score of the current cryptographic algorithm. The specific steps are as follows:

[0031] Get the key length of the current cryptographic algorithm , calculate the key space ;

[0032] when > , represents the current cryptographic algorithm key space is excellent, records the key score ;

[0033] when ≤ ≤ , indicating that the current cryptographic algorithm key space is good, recording the key score ;

[0034] when < , represents the current cryptographic algorithm key space in general, records the key score ;

[0035] The current cryptographic algorithm is tested against known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and the differential analysis score, linear analysis score, and theoretical side channel attack score are obtained respectively, and the above scores are transmitted to the security assessment module.

[0036] Furthermore, the current cryptographic algorithm is tested against known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and differential analysis scores, linear analysis scores, and theoretical side channel attack scores are obtained respectively, and the above scores are transmitted to the security assessment module. The specific steps are as follows:

[0037] generate There are pairs of plaintext data, and there is a specific difference between the plaintext pairs. Use the current cryptographic algorithm to encrypt each pair of plaintext to obtain the corresponding ciphertext pair, and calculate the differential feature probability between the ciphertext pairs. , and its algorithm formula is:

[0038] ;

[0039] in, is a specific plaintext difference, is a specific ciphertext difference, Indicates that there is a plaintext difference The plaintext pair is encrypted to produce the ciphertext difference The number of times, traverse all Get the maximum value , calculate the differential analysis score :

[0040] ;

[0041] in, represents the adjustment factor;

[0042] For linear analysis, select a set of linear functions Act on the input plaintext and output ciphertext respectively, and calculate the deviation of linear approximation :

[0043] ;

[0044] in, represents the probability, Represents a linear function Acting on input plaintext As a result, Represents a linear function Acts on output ciphertext As a result, when ≤ When , it means high safety, linear analysis score ,when < < When , it means the safety is medium, and the linear analysis score ,when ≥ When , it means that the safety is general, and the linear analysis score ;

[0045] For side channel attacks, the theoretical side channel attack coefficient is calculated by the original entropy of the key and the entropy of the key after the side channel information is given. The algorithm formula is:

[0046] ;

[0047] in, represents the theoretical side channel attack coefficient, Represents the information in a given side channel In this case, the key The entropy of is the original entropy of the key, when ≤ When , it means high security, side channel attack score ,when < < When , it means the security is medium, and the side channel attack score is ,when ≥ When , it means the security is average, and the side channel attack score is .

[0048] Furthermore, the basic test module includes a standard test vector set and plaintext data of different sizes to determine the correctness of encryption and decryption of the current cryptographic algorithm and monitor the resource usage during the operation of the cryptographic algorithm. The specific steps are as follows:

[0049] Obtain the current cryptographic algorithm file in the evaluation database, select a standard test vector set based on the type of the current cryptographic algorithm, and perform encryption and decryption operations. The specific steps are as follows:

[0050] Encrypt the plaintext in the selected standard test vector using the cryptographic algorithm to be tested to obtain the ciphertext, and then decrypt the generated ciphertext using the current cryptographic algorithm to obtain the recovered plaintext;

[0051] Get the length of the restored plaintext and the original plaintext respectively, set the index variable, mark the comparison position of the current restored plaintext and the original plaintext, and select the loop. In each loop, get the corresponding position of the original plaintext and the restored plaintext according to the index, and compare the restored plaintext with the original plaintext:

[0052] When the bits at the corresponding positions are not equal during the loop process, it means that the encryption and decryption of the current cryptographic algorithm is abnormal. The loop is stopped immediately and the current index position is recorded. The current cryptographic algorithm is marked in dark red in the evaluation database.

[0053] When the loop is successfully executed, that is, no inequality occurs, it means that the current cryptographic algorithm is encrypting and decrypting normally, and the resource usage abnormality determination continues;

[0054] Repeat the encryption and decryption of the plaintext in the selected standard test vector by the current cryptographic algorithm five times, and record the resource usage during each encryption and decryption process. The resource usage values ​​include CPU usage and memory usage. The abnormal resource usage during the repeated encryption and decryption process is determined by T test. The specific steps are as follows:

[0055] Calculate the average resource usage during the five encryption and decryption processes of the cryptographic algorithm and standard deviation , the formula is:

[0056] ;

[0057] ;

[0058] in, It is The resource usage of each operation, based on the T statistic for each operation And the degrees of freedom , perform T test:

[0059] ;

[0060] Select the significance level , look up the T distribution table to find the critical value corresponding to the degrees of freedom and significance level ,when ≤ , indicating that the resource usage during the use of this cryptographic algorithm is normal. > , it means that the resource usage during the use of this cryptographic algorithm is abnormal, that is, the current cryptographic algorithm has stability abnormalities, and the current cryptographic algorithm is marked in light red in the evaluation database.

[0061] Furthermore, the security assessment module conducts a comprehensive assessment of the application security of the current cryptographic algorithm based on the theoretical test score and the practical test score of the current cryptographic algorithm, and the specific steps are as follows:

[0062] Based on the differential analysis score, key score, linear analysis score, side channel attack score, side channel attack resistance score and encryption speed score of the current cryptographic algorithm obtained by the theoretical test module and the practical test module, the security assessment score of the current cryptographic algorithm is calculated. :

[0063] ;

[0064] when When ≥85, it means that the current cryptographic algorithm security assessment has passed and is marked green in the evaluation database file;

[0065] when When it is less than 85, it means that the current cryptographic algorithm security assessment fails and is marked purple in the evaluation database file.

[0066] A method for evaluating the security of a cryptographic algorithm comprises the following steps:

[0067] S1. Receive the source code of the cryptographic algorithm to be evaluated imported by the user, establish an evaluation database, create a file for each imported cryptographic algorithm to be evaluated, and record the basic information of each cryptographic algorithm in the file;

[0068] S2. Use a standard test vector set to determine the correctness of encryption and decryption of the current cryptographic algorithm, monitor the resource usage during the operation of the cryptographic algorithm, conduct a security assessment of the algorithm through cryptographic theory, verify whether the mathematical basis of the algorithm meets the security requirements, and obtain a theoretical test score for the cryptographic algorithm;

[0069] S3. Based on the actual usage environment of the current cryptographic algorithm, conduct actual usage environment evaluation tests on the current cryptographic algorithm, including encryption speed and side-channel attack resistance, to obtain a practical test score, and combine the theoretical test scores to obtain a comprehensive security evaluation score for the current cryptographic algorithm.

[0070] Compared with the prior art, the present invention has the following beneficial effects:

[0071] 1. In the present invention, by performing basic tests, theoretical tests and practical tests on the cryptographic algorithm respectively, the security and applicability of the cryptographic algorithm can be comprehensively and multi-dimensionally evaluated. By analyzing the encryption speed in actual use, the security of the current cryptographic algorithm in actual use can be comprehensively considered, and the applicability of the cryptographic algorithm in different application scenarios can be evaluated, thereby enhancing the practicality of security evaluation;

[0072] 2. In the present invention, by combining the theoretical test scores and practical evaluation scores of the current cryptographic algorithm, the security of the current cryptographic algorithm can be comprehensively evaluated. The theoretical security and practical security of the cryptographic algorithm are combined to avoid the single limitation of the cryptographic security evaluation and enhance the functionality of the system;

[0073] 3. In the present invention, by marking abnormal colors for cryptographic algorithms under different security issues, cryptographic algorithms that fail security assessments can be quickly classified, which helps analysts quickly understand the distribution of various security issues in many cryptographic algorithms and provides direction for subsequent targeted research and improvement;

[0074] The security assessment system and method of the entire cryptographic algorithm can evaluate the cryptographic algorithm in multiple dimensions, taking into account theoretical aspects such as the correctness of encryption and decryption, resource usage, and mathematical foundations, as well as actual usage environment factors such as encryption speed and side-channel attack resistance, comprehensively measuring the security of the algorithm and avoiding the one-sidedness of a single-dimensional assessment. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 A block diagram of a security assessment system for a cryptographic algorithm of the present invention;

[0076] Figure 2 The present invention is a flowchart of a method for evaluating the security of a cryptographic algorithm. DETAILED DESCRIPTION

[0077] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0078] Example 1: Figure 1 As shown, a cryptographic algorithm security assessment system includes a cryptographic algorithm import module, a basic test module, a theoretical test module, a practical test module, and a security assessment module;

[0079] The cryptographic algorithm import module is used to receive the source code of the cryptographic algorithm to be evaluated and pass it through Establish an evaluation database, create a file for each imported cryptographic algorithm to be evaluated, and record the basic information of each cryptographic algorithm in the file, including the name of the cryptographic algorithm, the type of cryptographic algorithm, the key length, and the size of the key space;

[0080] The basic test module includes a standard test vector set and plaintext data of different sizes to determine the correctness of encryption and decryption of the current cryptographic algorithm, and monitor the resource usage during the operation of the cryptographic algorithm. The specific steps are as follows:

[0081] Obtain the current cryptographic algorithm file in the evaluation database, select a standard test vector set based on the type of the current cryptographic algorithm, and perform encryption and decryption operations. The specific steps are as follows:

[0082] Encrypt the plaintext in the selected standard test vector using the cryptographic algorithm to be tested to obtain the ciphertext, and then decrypt the generated ciphertext using the current cryptographic algorithm to obtain the recovered plaintext;

[0083] Get the length of the restored plaintext and the original plaintext respectively, set the index variable, mark the comparison position of the current restored plaintext and the original plaintext, and select the loop. In each loop, get the corresponding position of the original plaintext and the restored plaintext according to the index, and compare the restored plaintext with the original plaintext:

[0084] When the bits at the corresponding positions are not equal during the loop process, it means that the encryption and decryption of the current cryptographic algorithm is abnormal. The loop is stopped immediately and the current index position is recorded. The current cryptographic algorithm is marked in dark red in the evaluation database.

[0085] When the loop is successfully executed, that is, no inequality occurs, it means that the current cryptographic algorithm is encrypting and decrypting normally, and the resource usage abnormality determination continues;

[0086] It should be noted that the cryptographic algorithm types include AES, DES, etc. Based on the cryptographic algorithm type, a suitable set of public standard test vectors is selected to perform a benchmark test on the current cryptographic algorithm. The recovered plaintext is compared bit by bit with the original plaintext. If the two are exactly the same, it means that under the test vector, the encryption and decryption functions of the cryptographic algorithm are correct. If there is a difference, it indicates that there is a problem with the current cryptographic algorithm. During the cyclic comparison process, for binary data, it is necessary to compare whether the binary bit values ​​at the corresponding positions are equal. For text data, it is necessary to compare whether the encoding values ​​of the characters at the corresponding positions are equal.

[0087] Repeat the encryption and decryption of the plaintext in the selected standard test vector by the current cryptographic algorithm five times, and record the resource usage during each encryption and decryption process. The resource usage values ​​include CPU usage and memory usage. The abnormal resource usage during the repeated encryption and decryption process is determined by T test. The specific steps are as follows:

[0088] Calculate the average resource usage during the five encryption and decryption processes of the cryptographic algorithm and standard deviation , the formula is:

[0089] ;

[0090] ;

[0091] in, It is The resource usage of each operation, based on the T statistic for each operation And the degrees of freedom , perform T test:

[0092] ;

[0093] Select the significance level , look up the T distribution table to find the critical value corresponding to the degrees of freedom and significance level ,when ≤ , indicating that the resource usage during the use of this cryptographic algorithm is normal. > , it means that the resource usage during the use of this cryptographic algorithm is abnormal, that is, the current cryptographic algorithm has stability abnormalities, and the current cryptographic algorithm is marked in light red in the evaluation database.

[0094] It should be noted that for small samples, the T test is used to determine whether the resource usage of a certain operation deviates significantly from the average value, so as to determine the stability of the current cryptographic algorithm during operation. By marking different cryptographic algorithm anomalies with different colors, the management of abnormal cryptographic algorithm files in the evaluation database can be facilitated.

[0095] Embodiment 2: Theoretical test module, which conducts theoretical security assessment on the current cryptographic algorithm through cryptographic theory, verifies whether the mathematical basis of the algorithm meets the security requirements, and tests known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and generates theoretical test scores. The specific steps are as follows:

[0096] Based on the cryptographic algorithm archive in the cryptographic algorithm import module, extract the data of the current cryptographic algorithm and calculate the key space score of the current cryptographic algorithm. The specific steps are as follows:

[0097] Get the key length of the current cryptographic algorithm , calculate the key space ;

[0098] when > , represents the current cryptographic algorithm key space is excellent, records the key score ;

[0099] when ≤ ≤ , indicating that the current cryptographic algorithm key space is good, recording the key score ;

[0100] when < , represents the current cryptographic algorithm key space in general, records the key score ;

[0101] It should be noted that as well as It is obtained based on the consensus in the field of cryptography and the advice of experts in the field. The value can also be adjusted according to actual usage to relax or tighten the evaluation interval of the current cryptographic algorithm to meet the usage needs in different situations.

[0102] The current cryptographic algorithm is tested against known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and the differential analysis score, linear analysis score, and theoretical side channel attack score are obtained respectively. The above scores are transmitted to the security assessment module. The specific steps are as follows:

[0103] generate There are pairs of plaintext data, and there is a specific difference between the plaintext pairs. Use the current cryptographic algorithm to encrypt each pair of plaintext to obtain the corresponding ciphertext pair, and calculate the differential feature probability between the ciphertext pairs. , and its algorithm formula is:

[0104] ;

[0105] in, is a specific plaintext difference, is a specific ciphertext difference, Indicates that there is a plaintext difference The plaintext pair is encrypted to produce the ciphertext difference The number of times, traverse all Get the maximum value , calculate the differential analysis score :

[0106] ;

[0107] in, represents the adjustment factor;

[0108] It should be noted that if Very close to 1, it means that the current cryptographic algorithm has differential features that are easily exploited and the algorithm security is low. A probability close to random distribution indicates that the algorithm is highly secure. The value needs to be obtained through multi-algorithm comparison testing, that is, a group of cryptographic algorithms of different types and different security strengths are selected, and each algorithm is analyzed using a series of different adjustment coefficients. By comparing the scores of different algorithms under the same attack type, it is observed which adjustment coefficient value can make the scores show a reasonable degree of differentiation between different algorithms.

[0109] For linear analysis, select a set of linear functions Act on the input plaintext and output ciphertext respectively, and calculate the deviation of linear approximation :

[0110] ;

[0111] in, represents the probability, Represents a linear function Acting on input plaintext As a result, Represents a linear function Acts on output ciphertext As a result, when ≤ When , it means high safety, linear analysis score ,when < < When , it means the safety is medium, and the linear analysis score ,when ≥ When , it means that the safety is general, and the linear analysis score ;

[0112] It should be noted that the closer the deviation of the linear approximation is to 0, the stronger the cryptographic algorithm is against linear analysis. , The values ​​of and , the threshold value can also be adjusted according to actual conditions to meet the requirements of different cryptographic algorithms.

[0113] For side channel attacks, the theoretical side channel attack coefficient is calculated by the original entropy of the key and the entropy of the key after the side channel information is given. The algorithm formula is:

[0114] ;

[0115] in, represents the theoretical side channel attack coefficient, Represents the information in a given side channel In this case, the key The entropy of is the original entropy of the key, when ≤ When , it means high security, side channel attack score ,when < < When , it means the security is medium, and the side channel attack score is ,when ≥ When , it means the security is average, and the side channel attack score is .

[0116] It should be noted that the side channel attack score is usually related to the success rate of the attacker inferring the key through the side channel information. The lower the value, the more vulnerable the cryptographic algorithm is to side-channel attacks. , The value of needs to collect a lot of side channel data when the cryptographic algorithm is running normally, including power consumption, electromagnetic radiation, etc., and calculate the statistical parameters of these data, such as mean, variance, standard deviation, etc. to set it.

[0117] Embodiment 3: A practicality test module, based on the actual use environment of the current cryptographic algorithm, performs an actual use environment evaluation test on the current cryptographic algorithm, including encryption speed and side channel attack resistance, to obtain a practicality test score. The specific steps are as follows:

[0118] Based on plaintext data of different sizes, the encryption speed range of the current cryptographic algorithm is calculated. Combined with the actual usage environment data scale of the current cryptographic algorithm and the encryption speed of the same type of cryptographic algorithms in history, the encryption speed score of the current cryptographic algorithm is calculated. The specific steps are as follows:

[0119] Based on the plaintext data volume intervals of different sizes, the plaintext data volume intervals are extracted geometrically from small to large data, extracted by the current cryptographic algorithm Encrypt each piece of data and record the encryption time ,based on The amount of data and the encryption time of the corresponding current cryptographic algorithm , analyze the encryption speed of the current cryptographic algorithm, the specific steps are:

[0120] Combined with the actual data volume application environment of the current cryptographic algorithm , to obtain the actual encryption speed of the current cryptographic algorithm, the steps are:

[0121] Will be in line with the actual data volume application environment Extract all data points and calculate the encryption speed under each data point ,in For extraction The data volume application environment Data:

[0122] ;

[0123] in, Represents data points The amount of encrypted data and encryption time under the condition are calculated, and the average speed is used as the actual encryption speed of the current cryptographic algorithm. ;

[0124] It should be noted that the actual data volume application environment It needs to be determined based on the historical data of the current cryptographic algorithm's usage scenarios. The value of is usually set to 200, and proportional extraction is performed starting from 1KB. By setting different initial extraction data sizes and proportions, different practical test needs can be met. Geometric extraction can meet the characteristics of data scale growth in many actual scenarios. For example, in scenarios such as database storage and file transfer, the growth of data volume is usually exponential or multiple. Using the scale of geometrically extracted data to test the algorithm can more realistically reflect the changes in encryption time of the cryptographic algorithm when facing data of different magnitudes in actual application scenarios;

[0125] Collect the encryption speeds of the same type of cryptographic algorithms and obtain the interval threshold, match the encryption speed of the current cryptographic algorithm, and obtain the encryption speed score. The specific steps and algorithm formula are as follows:

[0126] Collect the encryption speeds of the same type of cryptographic algorithms and build an interval threshold for the encryption speed , ,when ≥ When the encryption speed of the current cryptographic algorithm is excellent in actual use, the encryption speed score is recorded. ,when < < When the encryption speed of the current encryption algorithm is good in actual use, the encryption speed score is recorded. ,when ≤ When the encryption speed of the current encryption algorithm is average in actual use, the encryption speed score is recorded. .

[0127] It should be noted that the encryption speed of the same type of cryptographic algorithm needs to be obtained through public literature, standard testing or actual application to collect encryption speed data of the same type of cryptographic algorithm, and the interval is divided by quantile to obtain the interval threshold , , to evaluate the actual security application performance of the current cryptographic algorithm. In mobile devices or embedded systems, due to limited computing resources, more efficient algorithms are needed to ensure performance. In this case, even if some algorithms are slightly less secure in theory, they can still provide sufficient security in the actual environment due to their efficient encryption speed. Calculating the encryption speed score of the current cryptographic algorithm can comprehensively evaluate the security of the current cryptographic algorithm;

[0128] Based on the actual use environment of the current cryptographic algorithm, obtain the physical protection of the cryptographic algorithm in the actual use environment, calculate the side channel attack resistance score of the current cryptographic algorithm, and transmit the side channel attack resistance score and encryption speed score into the security assessment module. The specific steps are as follows:

[0129] Collect the physical protection measures in the actual application environment of the current cryptographic algorithm, including electromagnetic shielding measures, temperature control measures, and hardware isolation measures, and score the side channel attack resistance of the current cryptographic algorithm:

[0130] When the actual application environment of the cryptographic algorithm has electromagnetic shielding measures, temperature control measures, and hardware isolation measures, record the side channel attack resistance score ;

[0131] When any two of the following measures exist in the actual application environment of the cryptographic algorithm: electromagnetic shielding measures, temperature control measures, and hardware isolation measures, the side channel attack resistance score is recorded. ;

[0132] When the actual application environment of the cryptographic algorithm only has one of the following measures: electromagnetic shielding measures, temperature control measures, or hardware isolation measures, the side channel attack resistance score is recorded. .

[0133] It should be noted that if the current cryptographic algorithm has electromagnetic shielding measures, temperature control measures, and hardware isolation measures in the actual use environment, it can effectively prevent side channel information leakage caused by electromagnetic leakage, temperature changes, and information leakage between hardware devices, so that the current cryptographic algorithm has strong resistance to side channel attacks during actual use. Collecting physical protection measures in the actual application environment of the current cryptographic algorithm requires analyzing the hardware environment, physical environment, and operating conditions of the cryptographic algorithm to obtain physical protection measures;

[0134] The security assessment module conducts a comprehensive assessment of the application security of the current cryptographic algorithm based on the theoretical test score and practical test score of the current cryptographic algorithm. The specific steps are as follows:

[0135] Based on the differential analysis score, key score, linear analysis score, side channel attack score, side channel attack resistance score and encryption speed score of the current cryptographic algorithm obtained by the theoretical test module and the practical test module, the security assessment score of the current cryptographic algorithm is calculated. :

[0136] ;

[0137] when When ≥85, it means that the current cryptographic algorithm security assessment has passed and is marked green in the evaluation database file;

[0138] when When it is less than 85, it means that the current cryptographic algorithm security assessment fails and is marked purple in the evaluation database file.

[0139] It should be noted that by combining the theoretical test scores and practical evaluation scores of the current cryptographic algorithms, a comprehensive evaluation of the security of the current cryptographic algorithms can be made. The theoretical security and actual security of the cryptographic algorithms are integrated to avoid the single limitation of cryptographic security evaluation.

[0140] Example 4: Figure 2 As shown, a method for evaluating the security of a cryptographic algorithm comprises the following steps:

[0141] S1. Receive the source code of the cryptographic algorithm to be evaluated imported by the user, establish an evaluation database, create a file for each imported cryptographic algorithm to be evaluated, and record the basic information of each cryptographic algorithm in the file;

[0142] S2. Use a standard test vector set to determine the correctness of encryption and decryption of the current cryptographic algorithm, monitor the resource usage during the operation of the cryptographic algorithm, conduct a security assessment of the algorithm through cryptographic theory, verify whether the mathematical basis of the algorithm meets the security requirements, and obtain a theoretical test score for the cryptographic algorithm;

[0143] S3. Based on the actual usage environment of the current cryptographic algorithm, conduct actual usage environment evaluation tests on the current cryptographic algorithm, including encryption speed and side-channel attack resistance, to obtain a practical test score, and combine the theoretical test scores to obtain a comprehensive security evaluation score for the current cryptographic algorithm.

[0144] In the embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation; the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the method of this embodiment.

[0145] The above embodiments are only used to illustrate the technical method 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 method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.

Claims

1. A security assessment system for a cryptographic algorithm, characterized in that: It includes cryptographic algorithm import module, basic test module, theoretical test module, practical test module and security assessment module; The cryptographic algorithm import module is used to receive the source code of the cryptographic algorithm to be evaluated imported by the user, and establish an evaluation database through MySQL, and create a file for each imported cryptographic algorithm to be evaluated, and record the basic information of each cryptographic algorithm in the file, including the name of the cryptographic algorithm, the type of cryptographic algorithm, the key length, and the size of the key space; The basic test module includes a standard test vector set and plaintext data of different sizes, which are used to determine the correctness of encryption and decryption of the current cryptographic algorithm and monitor the resource usage during the operation of the cryptographic algorithm; The theoretical test module uses cryptographic theory to conduct a theoretical security assessment of the current cryptographic algorithm to verify whether the mathematical basis of the algorithm meets the security requirements. It also conducts tests against known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and generates a theoretical test score. The practicality test module performs an actual usage environment evaluation test on the current cryptographic algorithm based on the actual usage environment of the current cryptographic algorithm, including encryption speed and side channel attack resistance, to obtain a practicality test score. The specific steps are as follows: Based on plaintext data of different sizes, the encryption speed range of the current cryptographic algorithm is calculated. Combined with the actual usage environment data scale of the current cryptographic algorithm and the encryption speed of the same type of cryptographic algorithms in history, the encryption speed score of the current cryptographic algorithm is calculated. The specific steps are as follows: Based on the plaintext data volume intervals of different sizes, n data are geometrically extracted from the plaintext data volume interval from small to large, and the n data extracted geometrically are encrypted respectively using the current cryptographic algorithm and the encryption time t is recorded. n , based on the data size of n data and the encryption time t of the corresponding current cryptographic algorithm n , analyze the encryption speed of the current cryptographic algorithm, the specific steps are: Combined with the actual data volume application environment (A, B) of the current cryptographic algorithm, the actual encryption speed of the current cryptographic algorithm is obtained. The steps are: Extract all data points in the application environment (A, B) that meet the actual data volume, and calculate the encryption speed V under each data point j , where j is the data that meets the data volume application environment (A, B) among the n extracted data: Among them, G j ,t j They represent the amount of encrypted data and encryption time at data point j respectively, and the average speed is used as the actual encryption speed of the current cryptographic algorithm. Collect the encryption speeds of the same type of cryptographic algorithms and obtain the interval threshold, match the encryption speed of the current cryptographic algorithm, and obtain the encryption speed score. The specific steps and algorithm formula are as follows: Collect the encryption speeds of the same type of cryptographic algorithms and construct the interval threshold V of the encryption speed low 、V high ,when When the encryption speed of the current cryptographic algorithm is excellent in actual use, the encryption speed score U is recorded. V =10, when When the encryption speed of the current cryptographic algorithm is good during actual use, the encryption speed score U is recorded. V =7, when When the encryption speed of the current cryptographic algorithm is average in actual use, the encryption speed score U is recorded. V =4; Based on the actual use environment of the current cryptographic algorithm, obtain the physical protection of the cryptographic algorithm in the actual use environment, including electromagnetic shielding measures, temperature control measures, and hardware isolation measures, calculate and obtain the side channel attack resistance score of the current cryptographic algorithm, and transmit the side channel attack resistance score and encryption speed score into the security assessment module; The security assessment module conducts a comprehensive assessment of the application security of the current cryptographic algorithm based on the theoretical test score and the practical test score of the current cryptographic algorithm.

2. A cryptographic algorithm security assessment system according to claim 1, characterized in that: The specific steps for scoring the side channel attack resistance of the current cryptographic algorithm are as follows: When the actual application environment of the cryptographic algorithm has electromagnetic shielding measures, temperature control measures, and hardware isolation measures, the side channel attack resistance score U is recorded. C =10; When any two of the electromagnetic shielding measures, temperature control measures, and hardware isolation measures exist in the actual application environment of the cryptographic algorithm, the side channel attack resistance score U is recorded. C =7; When the actual application environment of the cryptographic algorithm only has one of the following measures: electromagnetic shielding measures, temperature control measures, and hardware isolation measures, the side channel attack resistance score U is recorded. C =4.

3. The security assessment system for a cryptographic algorithm according to claim 1, characterized in that: The theoretical test module uses cryptographic theory to conduct a theoretical security assessment of the current cryptographic algorithm to verify whether the mathematical basis of the algorithm meets the security requirements. It also tests known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and generates a theoretical test score. The specific steps are as follows: Based on the cryptographic algorithm archive in the cryptographic algorithm import module, extract the data of the current cryptographic algorithm and calculate the key space score of the current cryptographic algorithm. The specific steps are as follows: Get the key length k of the current cryptographic algorithm and calculate the key space Ω=2 k ; When Ω>2 80 , represents the current cryptographic algorithm key space is excellent, record the key score U Ω =20; When 2 64 ≤Ω≤2 80 , indicating that the current cryptographic algorithm key space is good, and recording the key score U Ω =15; When Ω<2 64 , represents the current cryptographic algorithm key space in general, records the key score U Ω =10; The current cryptographic algorithm is tested against known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and the differential analysis score, linear analysis score, and theoretical side channel attack score are obtained respectively, and the above scores are transmitted to the security assessment module.

4. A cryptographic algorithm security assessment system according to claim 3, characterized in that: The current cryptographic algorithm is tested against known cryptographic attacks, including differential analysis, linear analysis, and side channel attacks, and differential analysis scores, linear analysis scores, and theoretical side channel attack scores are obtained respectively, and the above scores are transmitted to the security assessment module. The specific steps are as follows: Generate N pairs of plaintext data, and there is a specific difference between the plaintext pairs. Use the current cryptographic algorithm to encrypt each pair of plaintext to obtain the corresponding ciphertext pair, and calculate the differential feature probability P(C|D) between the ciphertext pairs. The algorithm formula is: Where D is a specific plaintext difference, C is a specific ciphertext difference, count(D,C) represents the number of times the plaintext pair with plaintext difference D is encrypted to generate the ciphertext difference C, and all P(C|D) are traversed to obtain the maximum value P max , calculate the differential analysis score U P : IN P =20-λ×log2(P max ); Among them, λ represents the adjustment coefficient; For linear analysis, a set of linear functions L and R are selected to act on the input plaintext and output ciphertext respectively, and the deviation γ of the linear approximation is calculated: Among them, Y represents probability, L(E) represents the result of linear function L acting on input plaintext E, and R(C) represents the result of linear function R acting on output ciphertext C. When γ≤γ min When , it means high safety, linear analysis score U γ =20, when γ min <γ<γ max When , it means the safety is moderate, and the linear analysis score is U γ =15, when γ≥γ max When , it means that the safety is general, and the linear analysis score is U γ =10; For side channel attacks, the theoretical side channel attack coefficient is calculated by the original entropy of the key and the entropy of the key after the side channel information is given. The algorithm formula is: Where ω represents the theoretical side channel attack coefficient, represents the key under the given side channel information μ The entropy of is the original entropy of the key, when ω≤ω min When , it means high security, and the side channel attack score is U ω =20, when ω min <ω<ω max When , it means the security is medium, and the side channel attack score is U ω =15, when ω≥ω max When , it means the security is average, and the side channel attack score is U ω =10.

5. The security assessment system for a cryptographic algorithm according to claim 1, characterized in that: The basic test module includes a standard test vector set and plaintext data of different sizes, which are used to determine the correctness of encryption and decryption of the current cryptographic algorithm and monitor the resource usage during the operation of the cryptographic algorithm. The specific steps are as follows: Obtain the current cryptographic algorithm file in the evaluation database, select a standard test vector set based on the type of the current cryptographic algorithm, and perform encryption and decryption operations. The specific steps are as follows: Encrypt the plaintext in the selected standard test vector using the cryptographic algorithm to be tested to obtain the ciphertext, and then decrypt the generated ciphertext using the current cryptographic algorithm to obtain the recovered plaintext; Get the length of the restored plaintext and the original plaintext respectively, set the index variable, mark the comparison position of the current restored plaintext and the original plaintext, and select the loop. In each loop, get the corresponding position of the original plaintext and the restored plaintext according to the index, and compare the restored plaintext with the original plaintext: When the bits at the corresponding positions are not equal during the loop process, it means that the encryption and decryption of the current cryptographic algorithm is abnormal. The loop is stopped immediately and the current index position is recorded. The current cryptographic algorithm is marked in dark red in the evaluation database. When the loop is successfully executed, that is, no inequality occurs, it means that the current cryptographic algorithm is encrypting and decrypting normally, and the resource usage abnormality determination continues; Repeat the encryption and decryption of the plaintext in the selected standard test vector by the current cryptographic algorithm five times, and record the resource usage during each encryption and decryption process. The resource usage values ​​include CPU usage and memory usage. The abnormal resource usage during the repeated encryption and decryption process is determined by T test. The specific steps are as follows: Calculate the average resource usage during the five encryption and decryption processes of the cryptographic algorithm And the standard deviation s, its formula is: Among them, x i is the resource usage value of the i-th operation, based on the T statistic T each time i And the degree of freedom df = 4, perform a T test: Select the significance level α = 0.05, and look up the T distribution table to find the critical value T corresponding to the degrees of freedom and significance level. 标准 , when |T i |≤T 标准 , indicating that the resource usage is normal during the use of the cryptographic algorithm. i |>T 标准 , it means that the resource usage during the use of this cryptographic algorithm is abnormal, that is, the current cryptographic algorithm has stability abnormalities, and the current cryptographic algorithm is marked in light red in the evaluation database.

6. A cryptographic algorithm security assessment system according to claim 1, characterized in that: The security assessment module conducts a comprehensive assessment of the application security of the current cryptographic algorithm based on the theoretical test score and the practical test score of the current cryptographic algorithm. The specific steps are as follows: Based on the differential analysis score, key score, linear analysis score, side channel attack score, side channel attack resistance score and encryption speed score of the current cryptographic algorithm obtained by the theoretical test module and the practical test module, the security assessment score φ of the current cryptographic algorithm is calculated: φ=U V +U C +U Ω +U P +U γ +U ω ; When φ≥85, it means that the current cryptographic algorithm security assessment is qualified and is marked green in the evaluation database file; When φ<85, it means that the current cryptographic algorithm security assessment fails and is marked purple in the evaluation database file.

7. A method for evaluating the security of a cryptographic algorithm, characterized in that: The method adopts the security assessment system of the cryptographic algorithm as described in any one of claims 1 to 6, and comprises the following steps: S1. Receive the source code of the cryptographic algorithm to be evaluated imported by the user, establish an evaluation database, create a file for each imported cryptographic algorithm to be evaluated, and record the basic information of each cryptographic algorithm in the file; S2. Use a standard test vector set to determine the correctness of encryption and decryption of the current cryptographic algorithm, monitor the resource usage during the operation of the cryptographic algorithm, conduct a security assessment of the algorithm through cryptographic theory, verify whether the mathematical basis of the algorithm meets the security requirements, and obtain a theoretical test score for the cryptographic algorithm; S3. Based on the actual usage environment of the current cryptographic algorithm, conduct actual usage environment evaluation tests on the current cryptographic algorithm, including encryption speed and side-channel attack resistance, to obtain a practical test score, and combine the theoretical test scores to obtain a comprehensive security evaluation score for the current cryptographic algorithm.

Citation Information

Patent Citations

  • Encryption algorithm evaluation method, medium, equipment and device

    CN110620671A

  • Symmetric cryptography suitability evaluation method suitable for embedded system

    CN116305075A