Communication data security transmission system based on blockchain

By randomly evaluating and cryptographic strength prediction of the generated keys, and enhancing their complexity using key derivative functions, the problem of insufficient key security in the prior art is solved, and higher data encryption security is achieved. Responsiveness to security threats.

CN119030774BActive Publication Date: 2025-02-25CHINA UTONE CONSTR CONSULTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411184426.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2025-02-25
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

When the prior art encrypts data through the method of a key, if the encryption of the key is low, it is easily obtained by attackers through brute force cracking or other password analysis methods, resulting in the exposure of sensitive information.

Method used

By evaluating the generated keys randomly, dividing them into high randomness and low randomness keys, using machine learning models to predict encryption strength, key-derived functions are used to process keys with insufficient encryption, enhancing their complexity and alert.

Benefits of technology

Effectively filter out highly secure keys, ensuring that data encryption is only used to encrypt data with rigorously evaluated keys, improving the security of data encryption, preventing potential password attacks, and issuing alerts when necessary to enhance system security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030774B_ABST
    Figure CN119030774B_ABST
Patent Text Reader

Abstract

The present invention discloses a communication data security transmission system based on blockchain, which relates to the technical field of communication data security transmission, including a key randomness evaluation module, an encryption strength prediction module, a key encryption level classification module and a key complexity enhancement module; the key randomness evaluation module obtains the key generated when data is encrypted, and performs randomness evaluation on the generated key. The present invention divides the generated keys into high randomness and low randomness keys by performing randomness evaluation on the generated keys, ensuring that only keys with high security are directly used for data encryption. For keys with low randomness, their hash characteristics are further obtained, and the encryption strength is predicted using a machine learning model. For keys with insufficient encryption, a key derivation function is used to enhance their complexity, and security is improved by iterative hashing algorithms and random salts, ensuring that the keys meet security standards, preventing potential cryptographic attacks, and sounding an alarm when necessary to enhance the security of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of secure transmission of communication data, and in particular to a secure transmission system for communication data based on blockchain. Background Art

[0002] The secure transmission of communication data based on blockchain is a method that uses blockchain technology to ensure the security and integrity of data during the communication process. It records the detailed information of data transmission on the blockchain to ensure that the data cannot be tampered with and is traceable, thereby preventing the data from being intercepted, tampered with, or forged during the transmission process. The distributed storage and consensus mechanism of the blockchain ensure that each piece of data transmitted is verified by multiple parties, enhancing the confidentiality and anti-attack capabilities of the data. In addition, combined with encryption technology, the communication data transmission based on blockchain can also protect the privacy of the data, ensuring that only authorized users can access or decrypt the data.

[0003] When communication data is securely transmitted based on blockchain, data encryption is usually carried out using a key method. In symmetric encryption, the sender and receiver use the same key to encrypt and decrypt data. The advantage of this method is that the encryption and decryption speed is fast, which is suitable for the rapid transmission of large amounts of data.

[0004] The prior art has the following deficiencies:

[0005] When the existing technology encrypts data by means of a key, if the encryption security level of the key is low and it is used for encryption, it will be easier for attackers to obtain the key through brute force cracking or other cryptanalysis methods. Once the key is leaked, the attacker can decrypt all data encrypted with the key, resulting in sensitive information such as personal identity information, financial data, and business secrets being exposed.

[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention

[0007] The purpose of the present invention is to provide a communication data security transmission system based on blockchain, which divides the generated keys into high randomness and low randomness keys by performing randomness evaluation, ensuring that only keys with high security are directly used for data encryption. For keys with low randomness, their hash characteristics are further obtained, and the encryption strength is predicted using a machine learning model. For keys with insufficient encryption, a key derivation function is used to enhance their complexity, and security is improved by iterative hashing algorithms and random salts to ensure that the keys meet security standards, prevent potential cryptographic attacks, and issue an alarm when necessary to strengthen the security of the system, so as to solve the problems in the above-mentioned background technology.

[0008] In order to achieve the above-mentioned object, the present invention provides the following technical solutions: a communication data secure transmission system based on blockchain, comprising a key randomness evaluation module, an encryption strength prediction module, a key encryption level classification module and a key complexity enhancement module;

[0009] The key randomness evaluation module obtains the key generated during data encryption, performs randomness evaluation on the generated key, and divides the key into high-randomness key and low-randomness key according to the result of randomness evaluation. The high-randomness key is directly used for data encryption.

[0010] The encryption strength prediction module obtains the hash characteristics of the key classified as low randomness, inputs the obtained hash characteristics into a pre-trained machine learning model, and predicts the encryption degree of the key;

[0011] The key encryption level classification module further divides the keys into high encryption keys and low encryption keys based on the prediction results of the machine learning model. The high encryption keys are directly used for data encryption.

[0012] The key complexity enhancement module uses a key derivation function to increase the complexity of low encryption keys by iterating the hash algorithm multiple times and adding salt. After the key is processed by the key derivation function, it re-evaluates whether the key meets the security standards. After the key passes all security standards, the key is used for data encryption.

[0013] Preferably, a key generated during data encryption is obtained, randomness analysis is performed on the generated key to generate a randomness index, and randomness evaluation is performed on the generated key using the randomness index;

[0014] The steps for generating randomness index are as follows:

[0015] Assume the key length is L and the number of bits 0 is , the number of bits 1 is ,in , by the key length L, the number of bits 0 , the number of bits 1 is The distribution unevenness of 0 and 1 in the key is calculated to evaluate the randomness of the bit. The calculation formula for the bit distribution unevenness is: , where Indicates the unevenness of bit distribution;

[0016] Define bit transfer count is the number of transitions from bit 0 to bit 1, is the number of transitions from bit 1 to bit 0, is the transition probability from bit 0 to bit 1, is the transition probability from bit 1 to bit 0, and the total number of transitions is , then the transition probability and The calculation expression is: , ; Through the transition probability and Calculate the bit transfer entropy to measure the complexity of the transfer between bits. The calculation expression is: , where represents the bit transfer entropy;

[0017] Get four existing bit pairs 00, 01, 10, 11, and record the number of bit pairs 00, 01, 10, 11 as , , , , then the total number of bit pairs for: , then the bit pair probability for: ; By bit pair probability Calculate the binary subsequence complexity to analyze the complexity of each bit subsequence of length 2 in the key. The calculation expression of the binary subsequence complexity is: , where represents the binary subsequence complexity;

[0018] Comprehensive bit distribution unevenness , bit transfer entropy And the binary subsequence complexity Calculate the randomness index. The expression is: , where Represents the randomness index.

[0019] Preferably, the randomness index generated by performing randomness evaluation on the generated key is compared and analyzed with a preset randomness index reference threshold, and the key is divided. The specific division steps are as follows:

[0020] If the randomness index is greater than or equal to the randomness index reference threshold, the key is classified as a high-randomness key, and the high-randomness key is directly used for data encryption;

[0021] If the randomness index is less than the randomness index reference threshold, the key is classified as a low-randomness key and further analysis is performed later.

[0022] Preferably, for keys classified as low randomness, the degree of change in the hash value caused by a small change in the key and the degree of uniform distribution of the hash value in the output space are obtained. After obtaining, the degree of change in the hash value caused by a small change in the key and the degree of uniform distribution of the hash value in the output space are analyzed, and a diffusion index and a uniform distribution index are generated respectively. The diffusion index and the uniform distribution index are input into a pre-trained machine learning model to generate an encryption degree coefficient, and the encryption degree of the key is predicted by the encryption degree coefficient.

[0023] Preferably, the encryption degree coefficient generated after analyzing the hash property of the key is compared with a preset encryption degree coefficient reference threshold, and the key is further divided. The specific division steps are as follows:

[0024] If the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold, the key is further divided into a high encryption key, and the high encryption key is directly used for data encryption;

[0025] If the encryption degree coefficient is less than the encryption degree coefficient reference threshold, the key is further classified as a low encryption key.

[0026] Preferably, the steps of obtaining the degree of change in the hash value caused by a small change in the key and, after obtaining, analyzing the degree of change in the hash value caused by the small change in the key to generate a diffusion index are as follows:

[0027] Calculate the hash value for the original key K , then generate a key that is only one bit different from the original key K , and calculate its hash value , , , hash value and hash value It will be used for subsequent calculation of diffusion effect;

[0028] Calculating the hash value and The bit difference number D is defined as the total number of different bits between two hash values. The calculation expression is: , where n is the length in bits of the hash value, and Respectively represent the i-th bit of the hash value, Represents a bitwise exclusive OR operation;

[0029] Based on the bit difference number D, the bit difference rate is calculated, which represents the ratio of bits in the hash value that change due to a small input change. The bit difference rate is calculated as follows: , where Indicates the bit difference rate;

[0030] The diffusion index is calculated based on the bit difference rate. The diffusion index is used to quantify the intensity of changes in the hash output caused by small input changes. The calculation expression is: , where Represents the diffusion index.

[0031] Preferably, the uniform distribution degree of the hash value in the key in the output space is obtained, and after the uniform distribution degree of the hash value in the key in the output space is analyzed, the specific steps of generating the uniform distribution index are as follows:

[0032] Divide the output space of hash values ​​into multiple buckets of equal size, and then calculate the number of hash values ​​in each bucket. Suppose the output space is divided into m buckets, Indicates the number of hash values ​​contained in the kth bucket, and calculates the difference in the distribution of hash value buckets. The calculation expression is: , where N represents the total number of hash values, Indicates the difference in the distribution of hash value buckets;

[0033] The sequence continuity index of the hash value is calculated to evaluate the continuity of the hash value distribution in the output space. Assuming that the hash values ​​are arranged in the natural order of the output space, the sequence continuity is defined as the difference between the hash values. The calculation expression of the sequence continuity index is: , where represents the sequence continuity index, where Represents the difference between adjacent hash values, , represents the kth hash value in the hash value sequence, Represents the k+1th hash value in the hash value sequence;

[0034] Calculate the hash value distribution entropy to evaluate the distribution complexity of the hash value in the output space. Suppose the proportion of each bucket is , , then the calculation expression of hash value distribution entropy is: , where Represents the hash value distribution entropy;

[0035] Comprehensive hash value bucket distribution difference , sequence continuity index And the hash value distribution entropy Calculate the uniform distribution index. The expression is: , where Represents the uniform distribution index.

[0036] Preferably, for low encryption keys, a key derivation function is used to increase the complexity of the key by iterating the hash algorithm multiple times and adding salt. The specific steps are as follows:

[0037] Select the key derivation function;

[0038] Before applying the key derivation function, a random salt is generated for the original key. The salt is a piece of random data that is combined with the key during the hashing process to ensure that the same key generates a different result each time it is hashed.

[0039] Taking the original key and the generated salt as input, apply the selected key derivation function to perform multiple iterative hash calculations;

[0040] After completing multiple iterative hashing, the key derivation function outputs a new derived key with higher complexity and security.

[0041] Preferably, after being processed by the key derivation function, the randomness index is compared and analyzed with the randomness index reference threshold, and the encryption degree coefficient is compared and analyzed with the encryption degree coefficient reference threshold. If the randomness index is greater than or equal to the randomness index reference threshold or the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold, the encryption key processed by the key derivation function is used to re-encrypt the data. If the low encryption key processed by the key derivation function does not have a randomness index greater than or equal to the randomness index reference threshold or the encryption degree coefficient greater than or equal to the encryption degree coefficient reference threshold within a specified time, an alarm is issued.

[0042] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0043] The present invention performs randomness evaluation on the generated keys and divides the keys into high-randomness keys and low-randomness keys according to the evaluation results. It can effectively screen out keys with higher security in the initial stage, ensure that only keys that have been strictly evaluated and whose randomness index reaches or exceeds a reference threshold can be directly used for data encryption, further analyze and process the keys with lower randomness, ensure that these potentially weak keys are strengthened as necessary before use, and effectively avoid keys with lower encryption levels due to lower randomness from being used for data encryption.

[0044] The present invention targets keys with low randomness, obtains the hash characteristics of the keys and uses a pre-trained machine learning model to predict their encryption levels. For keys with insufficient encryption levels, a key derivation function is used to enhance the complexity. By iterating the hash algorithm multiple times and adding random salts, the security of these low-encryption keys is effectively improved, their entropy and unpredictability are increased, potential cryptographic attacks are prevented, and it is ensured that the keys after enhanced processing meet security standards and meet the needs of data encryption. The security of the keys is re-evaluated after processing, and an alarm is issued when necessary, further improving the ability to respond to security threats and ensuring that all keys used for data encryption are fully security verified. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0046] Figure 1 This is a module schematic diagram of the blockchain-based communication data secure transmission system of the present invention. DETAILED DESCRIPTION

[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art.

[0048] The present invention provides Figure 1 The blockchain-based communication data security transmission system shown includes a key randomness evaluation module, an encryption strength prediction module, a key encryption level classification module, and a key complexity enhancement module;

[0049] The key randomness evaluation module obtains the key generated during data encryption, performs randomness evaluation on the generated key, and divides the key into high-randomness key and low-randomness key according to the result of randomness evaluation. The high-randomness key is directly used for data encryption.

[0050] There are many ways to obtain the keys generated when encrypting data, depending on the design of the system and application. In a secure system, keys are usually generated and stored by a dedicated key management system (KMS) or hardware security module (HSM). To obtain the key, it is usually necessary to go through an authentication and authorization process and access the KMS or HSM through a secure interface or API. For example, in cloud services, developers can use the APIs provided by the cloud to generate and manage encryption keys, ensuring that the keys are subject to strict security controls throughout the entire life cycle of generation, use, and storage.

[0051] Obtain the key generated during data encryption, perform randomness analysis on the generated key to generate a randomness index, and use the randomness index to evaluate the randomness of the generated key;

[0052] The steps for generating randomness index are as follows:

[0053] Assume the key length is L and the number of bits 0 is , the number of bits 1 is ,in , by the key length L, the number of bits 0 , the number of bits 1 is The distribution unevenness of 0 and 1 in the key is calculated to evaluate the randomness of the bit. The calculation formula for the bit distribution unevenness is: , where Indicates the unevenness of bit distribution;

[0054] Bit distribution unevenness Measures the difference between the number of times bit 0 and bit 1 occur in the key. By combining the cube and logarithm of the difference, this formula can emphasize larger non-uniformities while also providing a more detailed measure of the uniformity of the distribution.

[0055] Bit 0 and bit 1 are the basic units in the binary number system and represent the smallest component of computer data. In the binary system, bit 0 usually represents the "off" or "no voltage" state, while bit 1 represents the "on" or "voltage" state. These two bits are the basis of digital information and can be combined into more complex data such as numbers, characters, and instructions. Computers perform all calculations and data storage operations through the combination of these bits. Therefore, bit 0 and bit 1 are the core foundation of computer processing information.

[0056] Define bit transfer count is the number of transitions from bit 0 to bit 1, is the number of transitions from bit 1 to bit 0, is the transition probability from bit 0 to bit 1, is the transition probability from bit 1 to bit 0, and the total number of transitions is , then the transition probability and The calculation expression is: , ; Through the transition probability and Calculate the bit transfer entropy to measure the complexity of the transfer between bits. The calculation expression is: , where represents the bit transfer entropy;

[0057] Bit transfer entropy The transfer entropy is calculated using the logarithm with base 3 to avoid the traditional binary entropy measurement method, and special emphasis is placed on the complexity of the transfer pattern. If the transfer probability is uniform, the entropy value is high, indicating strong randomness.

[0058] Get four existing bit pairs 00, 01, 10, 11, and record the number of bit pairs 00, 01, 10, 11 as , , , , then the total number of bit pairs for: , then the bit pair probability (xy represents bit pairs, such as 00, 01, 10, 11) is: ; By bit pair probability Calculate the binary subsequence complexity to analyze the complexity of each bit subsequence of length 2 in the key. The calculation expression of the binary subsequence complexity is: , where represents the binary subsequence complexity;

[0059] Binary Subsequence Complexity The randomness of the occurrence of bit pairs is captured by using a nonlinear transformation of the sine function. This nonlinear processing can amplify the slight differences in the probability of bit pairs, thus more sensitively detecting non-random patterns.

[0060] Comprehensive bit distribution unevenness , bit transfer entropy And the binary subsequence complexity Calculate the randomness index. The expression is: , where represents the randomness index;

[0061] The randomness index combines the bit distribution unevenness, bit transfer entropy and binary subsequence complexity in the form of cube root, balancing the influence of each indicator, avoiding a single indicator dominating the randomness evaluation, and highlighting the overall randomness of the key.

[0062] As can be seen from the randomness index, the larger the performance value of the randomness index generated by the randomness evaluation of the generated key, the higher the randomness and unpredictability of the generated key. A high randomness index means that the bit distribution and bit transition pattern in the key are closer to the ideal random state, reducing predictable patterns and repetitiveness, thereby improving the ability to resist brute force cracking and other cryptographic attacks. On the contrary, a low randomness index indicates that the randomness of the key is poor, there is regularity or predictability, which can be easily exploited by attackers, and is therefore not suitable for secure data encryption.

[0063] The randomness index generated by the randomness evaluation of the generated key is compared and analyzed with the preset randomness index reference threshold, and the key is divided. The specific division steps are as follows:

[0064] If the randomness index is greater than or equal to the randomness index reference threshold, the key is classified as a high-randomness key, and the high-randomness key is directly used for data encryption;

[0065] If the randomness index is less than the randomness index reference threshold, the key is classified as a low-randomness key and further analysis is performed later.

[0066] The encryption strength prediction module obtains the hash characteristics of the key classified as low randomness, inputs the obtained hash characteristics into a pre-trained machine learning model, and predicts the encryption degree of the key;

[0067] For the keys that are classified as low randomness, the degree of change in the hash value caused by a small change in the key and the degree of uniform distribution of the hash value in the output space are obtained. After obtaining, the degree of change in the hash value caused by a small change in the key and the degree of uniform distribution of the hash value in the output space are analyzed, and a diffusion index and a uniform distribution index are generated respectively. The diffusion index and the uniform distribution index are input into a pre-trained machine learning model to generate an encryption degree coefficient, and the encryption degree of the key is predicted by the encryption degree coefficient.

[0068] A pre-trained machine learning model is one that has been trained with a large amount of historical data and has learned the patterns and features in that data, so that it can accurately predict new input data. The model uses a large amount of data on low-randomness and high-randomness keys, combined with their diffusion index and uniform distribution index, to learn how to evaluate the impact of these features on the encryption strength of the key. In this way, when the diffusion index and uniform distribution index of a new key are input into the model, the model can generate an encryption degree coefficient based on previously learned experience and rules, thereby predicting the overall encryption strength of the key. This type of model is usually trained using a supervised learning algorithm, using labeled training data sets to optimize its prediction accuracy.

[0069] Small changes in the key cause larger changes in the hash value, usually indicating a higher degree of encryption of the key. This property reflects the diffusion of the hash function, that is, a small change in the input (such as a change of one bit) will cause a significant change in the output hash value, known as the "avalanche effect". A strong hash function should have this property to ensure that any small change in the input can produce a completely different hash value, thereby increasing unpredictability and security. On the contrary, if a small change in the key only causes a small change in the hash value, it indicates that the hash function is not diffuse enough and can be easily predicted or speculated by attackers, resulting in a low degree of encryption.

[0070] The steps of obtaining the degree of change in the hash value caused by a small change in the key and analyzing the degree of change in the hash value caused by a small change in the key to generate a diffusion index are as follows:

[0071] Calculate the hash value for the original key K , then generate a key that is only one bit different from the original key K , and calculate its hash value , , , hash value and hash value It will be used for subsequent calculation of diffusion effect;

[0072] Here and The original key K and the modified key are hashed by the hash function By comparing these two hash values, we can analyze the changes caused by small changes in the hash value.

[0073] "Hash" is an algorithm or function that converts input data of arbitrary length (such as text, files, or keys) into an output value of fixed length (called a hash value or hash value). This process is one-way, meaning that the original input cannot be reversed from the hash value. The main characteristics of a hash function are that the output value is of fixed length, different inputs usually produce unique hash values, and even if the input has a slight change, the output hash value will be significantly different (avalanche effect). Hash functions are widely used in data integrity verification, cryptography, fast data lookup, and applications to ensure information security because they can effectively check whether data has been tampered with.

[0074] Calculating the hash value and The bit difference number D is defined as the total number of different bits between two hash values. The calculation expression is: , where n is the length in bits of the hash value, and Respectively represent the i-th bit of the hash value, Represents a bitwise exclusive OR operation;

[0075] The bit difference number DDD calculates whether the two hash values ​​are different in each bit, XOR operation When two bits are the same, they are 0, and when they are different, they are 1. The result of accumulating all the bits is the number of bit differences.

[0076] Based on the bit difference number D, the bit difference rate is calculated, which represents the ratio of bits in the hash value that change due to a small input change. The bit difference rate is calculated as follows: , where Indicates the bit difference rate;

[0077] Bit Difference Rate It consists of two parts: Used to measure the basic degree of hash value change; Part II Additional minor adjustments are provided to refine the results, increasing sensitivity to bit changes via absolute value operations.

[0078] The diffusion index is calculated based on the bit difference rate. The diffusion index is used to quantify the intensity of changes in the hash output caused by small input changes. The calculation expression is: , where represents the diffusion index;

[0079] The diffusion index combines the bit difference rate and the hash value bit length, Adjustments are made to ensure that the index is not overly biased by extreme values. The cubic operation in the formula further amplifies the diffusion index at high variability rates to emphasize the strength of the diffusion effect.

[0080] From the diffusion index, we can see that the larger the value of the diffusion index generated after analyzing the degree of change in the hash value caused by a small change in the key, the greater the output change caused by a small change in the key, which generally means that the hash function has a stronger avalanche effect. Therefore, a higher diffusion index indicates a higher degree of encryption of the key, because a small change in the input will result in a significantly different output hash value, enhancing the unpredictability and security of the data. Conversely, a lower diffusion index means that a small change in the input causes a smaller change in the hash value, indicating that the diffusion of the hash function is insufficient, which may reduce the encryption strength of the key and make it more vulnerable to attack.

[0081] The higher the uniform distribution of hash values ​​in the key in the output space, the higher the encryption degree of the key is usually. This is because uniformly distributed hash values ​​mean that the hash function can produce unpredictable and widely dispersed outputs in response to changes in the input data, thereby ensuring that the probability of each output value is the same, enhancing security and anti-collision capabilities. On the contrary, if the hash value has a low uniform distribution in the output space, this may indicate that the hash function is insensitive to changes in the input, and the generated hash values ​​are concentrated in certain areas, increasing the risk of collisions and reducing the strength of encryption. Therefore, the uniform distribution of hash values ​​is an important indicator for evaluating the security of keys.

[0082] The uniform distribution degree of the hash value in the key in the output space is obtained. After obtaining, the uniform distribution degree of the hash value in the key in the output space is analyzed. The specific steps of generating the uniform distribution index are as follows:

[0083] Divide the output space of hash values ​​into multiple buckets of equal size, and then calculate the number of hash values ​​in each bucket. Suppose the output space is divided into m buckets. Indicates the number of hash values ​​contained in the kth bucket, and calculates the difference in the distribution of hash value buckets. The calculation expression is: , where N represents the total number of hash values, Indicates the difference in the distribution of hash value buckets;

[0084] This formula calculates the actual proportion of each bucket. The ideal uniform ratio The difference is taken to the fourth power to amplify the effect of uneven distribution. A high hash value bucket distribution difference value indicates that the hash value distribution deviates from uniformity, indicating an uneven distribution.

[0085] The sequence continuity index of the hash value is calculated to evaluate the continuity of the hash value distribution in the output space. Assuming that the hash values ​​are arranged in the natural order of the output space, the sequence continuity is defined as the difference between the hash values. The calculation expression of the sequence continuity index is: , where represents the sequence continuity index, where Represents the difference between adjacent hash values, , represents the kth hash value in the hash value sequence, Represents the k+1th hash value in the hash value sequence;

[0086] It is the difference between adjacent hash values, using the square of the sine function to measure the change in the difference. A higher sequence continuity index indicates that the differences between hash values ​​are uneven, and there may be a tendency to cluster or disperse.

[0087] Calculate the hash value distribution entropy to evaluate the distribution complexity of the hash value in the output space. Suppose the proportion of each bucket is , , then the calculation expression of hash value distribution entropy is: , where Represents the hash value distribution entropy;

[0088] In this formula, a lower hash value distribution entropy means that the hash values ​​are more concentrated in certain buckets, indicating an uneven distribution.

[0089] Comprehensive hash value bucket distribution difference , sequence continuity index And the hash value distribution entropy Calculate the uniform distribution index. The expression is: , where represents the uniform distribution index;

[0090] The uniform distribution index uses a combination of hash bucket distribution variance, sequence continuity index, and hash distribution entropy to measure the uniformity of the distribution. By combining the fourth root of each metric with the entropy and taking the inverse, it amplifies the extreme unevenness of any one metric while ensuring that all factors are considered comprehensively. A high uniform distribution index value indicates a more uniform hash distribution.

[0091] It can be seen from the uniform distribution index that the larger the uniform distribution index value generated after analyzing the uniform distribution of the hash value in the key in the output space, the higher the encryption degree of the key. This is because a larger uniform distribution index means that the hash value is more evenly distributed in the output space, which means that the output of the hash function for different keys has better randomness and unpredictability, thereby enhancing the strength and security of encryption. On the contrary, if the uniform distribution index is small, it means that the hash value distribution is uneven, there is a concentration or pattern, which reduces the strength of encryption and is easy to be exploited by attackers.

[0092] The machine learning model is not specifically limited here, and can achieve the diffusion index and uniform distribution index Perform comprehensive analysis to generate encryption degree coefficient In order to realize the technical solution of the present invention, the present invention provides a specific implementation method;

[0093] Encryption Degree Coefficient The resulting calculation formula is: , where , Diffusion Index and uniform distribution index The preset scaling factor of , Both are greater than 0.

[0094] It can be seen from the encryption degree coefficient that the larger the expression value of the diffusion index generated after analyzing the degree of change in the hash value caused by a small change in the key, the larger the expression value of the uniform distribution index generated after analyzing the uniform distribution of the hash value in the key in the output space. That is, the larger the expression value of the encryption degree coefficient generated after analyzing the hash hashing characteristics of the key, the higher the encryption degree of the key, and vice versa.

[0095] The key encryption level classification module further divides the keys into high encryption keys and low encryption keys based on the prediction results of the machine learning model. The high encryption keys are directly used for data encryption.

[0096] The encryption degree coefficient generated after analyzing the hash characteristics of the key is compared with the preset encryption degree coefficient reference threshold, and the key is further divided. The specific division steps are as follows:

[0097] If the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold, the key is further divided into a high encryption key, and the high encryption key is directly used for data encryption;

[0098] If the encryption degree coefficient is less than the encryption degree coefficient reference threshold, the key is further classified as a low encryption key.

[0099] The key complexity enhancement module uses a key derivation function to iterate the hash algorithm multiple times and add salt to increase the complexity of the key for low encryption keys. After the key derivation function is processed, it is re-evaluated whether the key meets the security standards. After the key passes all security standards, the key is used for data encryption;

[0100] For low encryption keys, a key derivation function is used to increase the complexity of the key by iterating the hash algorithm multiple times and adding salt. The specific steps are as follows:

[0101] Select a key derivation function (KDF);

[0102] The choice of key derivation function is very important because it determines how to convert the original key into a more complex key. Commonly used KDFs include PBKDF2, bcrypt, scrypt, etc. These functions are designed to improve security and increase the difficulty of cracking. PBKDF2 increases complexity through multiple iterations of HMAC (hash-based message authentication code); bcrypt combines adjustable cost parameters and internal states to resist brute force cracking; scrypt is optimized for defense against hardware attacks and consumes a lot of memory and computing resources. Which KDF to choose depends on the security and performance requirements of the application scenario.

[0103] Before applying the key derivation function, a random salt is generated for the original key. The salt is a piece of random data that is combined with the key during the hashing process to ensure that the same key generates a different result each time it is hashed.

[0104] This step prevents attackers from using pre-computed rainbow tables for quick cracking. When generating salt, a high-quality random number generator (e.g., a cryptographically secure pseudo-random number generator, CSPRNG) should be used to ensure the randomness and unpredictability of the salt. The length of the salt is usually 16 bytes or longer to provide sufficient randomness.

[0105] Taking the original key and the generated salt as input, apply the selected key derivation function to perform multiple iterative hash calculations;

[0106] This process involves repeated hashing operations many times, so that even if the attacker knows the original key and salt, it will take a lot of time and computing resources to generate the same hash value. The number of iterations is an important parameter of KDF, which determines the complexity and time cost of the calculation. Usually, the number of iterations is set high enough to prevent brute force cracking, but at the same time, it is necessary to balance performance and usage scenarios. By iterating the hash multiple times, KDF effectively increases the complexity and security of the generated key.

[0107] After completing multiple iterative hashing, the key derivation function outputs a new derived key with higher complexity and security;

[0108] This derived key is obtained by enhancing the original key, including random salt and the results of multiple hash operations, which is difficult to reverse engineer. This derived key can be used for encryption, decryption operations or other scenarios that require high security. The advantage of using a derived key is that even if the original key is weak, the key enhanced by KDF still has high security in practical applications and effectively resists various forms of cryptographic attacks.

[0109] After being processed by the key derivation function, the randomness index is compared and analyzed with the randomness index reference threshold, and the encryption degree coefficient is compared and analyzed with the encryption degree coefficient reference threshold. If the randomness index is greater than or equal to the randomness index reference threshold or the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold, the encryption key processed by the key derivation function is used to re-encrypt the data. If the randomness index of the low encryption key processed by the key derivation function does not exceed or equal to the randomness index reference threshold or the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold within the specified time, an alarm is issued.

[0110] The specified time refers to a pre-set time period during which the system monitors and evaluates the randomness index and encryption degree coefficient of the low encryption key after being processed by the key derivation function. If the randomness index of the processed key does not reach or exceed the randomness index reference threshold, or the encryption degree coefficient does not reach or exceed the encryption degree coefficient reference threshold within this time period, it is considered that the processed key is still not secure enough, or the system itself has some abnormal conditions. At this time, the system will issue an alarm to inform the relevant personnel. The purpose of this practice is to ensure that the key security assessment and necessary encryption operations are completed within a certain time frame, thereby ensuring data security. The specified time can be a few seconds, minutes, hours, or even days, depending on the security level and operating environment required by the system.

[0111] The present invention performs randomness evaluation on the generated keys and divides the keys into high-randomness keys and low-randomness keys according to the evaluation results. It can effectively screen out keys with higher security in the initial stage, ensure that only keys that have been strictly evaluated and whose randomness index reaches or exceeds a reference threshold can be directly used for data encryption, further analyze and process the keys with lower randomness, ensure that these potentially weak keys are strengthened as necessary before use, and effectively avoid keys with lower encryption levels due to lower randomness from being used for data encryption.

[0112] The present invention targets keys with low randomness, obtains the hash characteristics of the keys and uses a pre-trained machine learning model to predict their encryption levels. For keys with insufficient encryption levels, a key derivation function is used to enhance the complexity. By iterating the hash algorithm multiple times and adding random salts, the security of these low-encryption keys is effectively improved, their entropy and unpredictability are increased, potential cryptographic attacks are prevented, and it is ensured that the keys after enhanced processing meet security standards and meet the needs of data encryption. The security of the keys is re-evaluated after processing, and an alarm is issued when necessary, further improving the ability to respond to security threats and ensuring that all keys used for data encryption are fully security verified.

[0113] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0115] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A communication data security transmission system based on blockchain, characterized in that: It includes a key randomness evaluation module, an encryption strength prediction module, a key encryption level classification module, and a key complexity enhancement module; The key randomness evaluation module obtains the key generated during data encryption, performs randomness evaluation on the generated key, and divides the key into high-randomness key and low-randomness key according to the result of randomness evaluation. The high-randomness key is directly used for data encryption. The encryption strength prediction module obtains the hash characteristics of the key classified as low randomness, inputs the obtained hash characteristics into a pre-trained machine learning model, and predicts the encryption degree of the key; The key encryption level classification module further divides the keys into high encryption keys and low encryption keys based on the prediction results of the machine learning model. The high encryption keys are directly used for data encryption. The key complexity enhancement module uses a key derivation function to increase the complexity of low-encryption keys by iterating the hash algorithm multiple times and adding salt. After the key is processed by the key derivation function, it re-evaluates whether the key meets the security standards. After the key passes all security standards, the key is used for data encryption.

2. The communication data security transmission system based on blockchain according to claim 1 is characterized in that: Obtain the key generated during data encryption, perform randomness analysis on the generated key to generate a randomness index, and use the randomness index to evaluate the randomness of the generated key; The steps for generating randomness index are as follows: Assume the key length is L and the number of bits 0 is , the number of bits 1 is ,in , by the key length L, the number of bits 0 , the number of bits 1 is The distribution unevenness of 0 and 1 in the key is calculated to evaluate the randomness of the bit. The calculation formula for the bit distribution unevenness is: , where Indicates the unevenness of bit distribution; Define bit transfer count is the number of transitions from bit 0 to bit 1, is the number of transitions from bit 1 to bit 0, is the transition probability from bit 0 to bit 1, is the transition probability from bit 1 to bit 0, and the total number of transitions is , then the transition probability and The calculation expression is: , ; Through the transition probability and Calculate the bit transfer entropy to measure the complexity of the transfer between bits. The calculation expression is: , where represents the bit transfer entropy; Get four existing bit pairs 00, 01, 10, 11, and record the number of bit pairs 00, 01, 10, 11 as , , , , then the total number of bit pairs for: , then the bit pair probability for: ; By bit pair probability Calculate the binary subsequence complexity to analyze the complexity of each bit subsequence of length 2 in the key. The calculation expression of the binary subsequence complexity is: , where represents the binary subsequence complexity; Comprehensive bit distribution unevenness , bit transfer entropy And the binary subsequence complexity Calculate the randomness index. The expression is: , where Represents the randomness index.

3. The communication data security transmission system based on blockchain according to claim 2 is characterized in that: The randomness index generated by the randomness evaluation of the generated key is compared and analyzed with the preset randomness index reference threshold, and the key is divided. The specific division steps are as follows: If the randomness index is greater than or equal to the randomness index reference threshold, the key is classified as a high-randomness key, and the high-randomness key is directly used for data encryption; If the randomness index is less than the randomness index reference threshold, the key is classified as a low-randomness key and further analysis is performed later.

4. The communication data secure transmission system based on blockchain according to claim 3 is characterized in that: For keys that are classified as low randomness, the degree of change in the hash value caused by a small change in the key and the degree of uniform distribution of the hash value in the output space are obtained. After obtaining, the degree of change in the hash value caused by a small change in the key and the degree of uniform distribution of the hash value in the output space are analyzed, and a diffusion index and a uniform distribution index are generated respectively. A small change in the key is a change of one bit. The diffusion index and the uniform distribution index are input into a pre-trained machine learning model to generate an encryption degree coefficient, and the encryption degree of the key is predicted by the encryption degree coefficient.

5. The communication data secure transmission system based on blockchain according to claim 4 is characterized in that: The encryption degree coefficient generated after analyzing the hash characteristics of the key is compared with the preset encryption degree coefficient reference threshold, and the key is further divided. The specific division steps are as follows: If the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold, the key is further divided into a high encryption key, and the high encryption key is directly used for data encryption; If the encryption degree coefficient is less than the encryption degree coefficient reference threshold, the key is further classified as a low encryption key.

6. The communication data secure transmission system based on blockchain according to claim 4 is characterized in that: The steps of obtaining the degree of change in the hash value caused by a small change in the key and analyzing the degree of change in the hash value caused by a small change in the key to generate a diffusion index are as follows: Calculate the hash value for the original key K , then generate a key that is only one bit different from the original key K , and calculate its hash value , , , hash value and hash value It will be used for subsequent calculation of diffusion effect; Calculating the hash value and The bit difference number D is defined as the total number of different bits between two hash values. The calculation expression is: , where n is the length in bits of the hash value, and Respectively represent the i-th bit of the hash value, Represents a bitwise exclusive OR operation; Based on the bit difference number D, the bit difference rate is calculated, which represents the ratio of bits in the hash value that change due to a small input change. The bit difference rate is calculated as follows: , where Indicates the bit difference rate; The diffusion index is calculated based on the bit difference rate. The diffusion index is used to quantify the intensity of changes in the hash output caused by small input changes. The calculation expression is: , where Represents the diffusion index.

7. The communication data secure transmission system based on blockchain according to claim 4 is characterized in that: The uniform distribution degree of the hash value in the key in the output space is obtained. After obtaining, the uniform distribution degree of the hash value in the key in the output space is analyzed. The specific steps for generating the uniform distribution index are as follows: Divide the output space of hash values ​​into multiple buckets of equal size, and then calculate the number of hash values ​​in each bucket. Suppose the output space is divided into m buckets, Indicates the number of hash values ​​contained in the kth bucket, and calculates the difference in the distribution of hash value buckets. The calculation expression is: , where N represents the total number of hash values, Indicates the difference in the distribution of hash value buckets; The sequence continuity index of the hash value is calculated to evaluate the continuity of the hash value distribution in the output space. Assuming that the hash values ​​are arranged in the natural order of the output space, the sequence continuity is defined as the difference between the hash values. The calculation expression of the sequence continuity index is: , where represents the sequence continuity index, where Represents the difference between adjacent hash values, , represents the kth hash value in the hash value sequence, Represents the k+1th hash value in the hash value sequence; Calculate the hash value distribution entropy to evaluate the distribution complexity of the hash value in the output space. Suppose the proportion of each bucket is , , then the calculation expression of hash value distribution entropy is: , where Represents the hash value distribution entropy; Comprehensive hash value bucket distribution difference , sequence continuity index And the hash value distribution entropy Calculate the uniform distribution index. The expression is: , where Represents the uniform distribution index.

8. The communication data secure transmission system based on blockchain according to claim 1 is characterized in that: For low encryption keys, a key derivation function is used to increase the complexity of the key by iterating the hash algorithm multiple times and adding salt. The specific steps are as follows: Select the key derivation function; Before applying the key derivation function, a random salt is generated for the original key. The salt is a piece of random data that is combined with the key during the hashing process to ensure that the same key generates a different result each time it is hashed. Taking the original key and the generated salt as input, apply the selected key derivation function to perform multiple iterative hash calculations; After completing multiple iterative hashing, the key derivation function outputs a new derived key with higher complexity and security.

9. The communication data secure transmission system based on blockchain according to claim 8 is characterized in that: After being processed by the key derivation function, the randomness index is compared and analyzed with the randomness index reference threshold, and the encryption degree coefficient is compared and analyzed with the encryption degree coefficient reference threshold. If the randomness index is greater than or equal to the randomness index reference threshold or the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold, the encryption key processed by the key derivation function is used to re-encrypt the data. If the randomness index of the low encryption key processed by the key derivation function is not greater than or equal to the randomness index reference threshold or the encryption degree coefficient is greater than or equal to the encryption degree coefficient reference threshold within the specified time, an alarm is issued.

Citation Information

Patent Citations

  • Method and device for improving security of encryption chip and computer equipment

    CN118094606A

  • Novel encryption method based on SM4 symmetry

    CN118473646A