A secure encryption method for software development data
Patent Information
- Application Number
- CN202611135879.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-13
AI Technical Summary
[0005]有鉴于此,本发明实施例提供了一种软件开发数据的安全加密方法,以解决提高密钥破解的复杂度,以提高对软件开发数据的安全性保护的问题
[0034]本发明获取目标软件的任一开发数据文档,将所述任一开发数据文档划分为至少一个分组,利用AES加密算法,得到所述任一开发数据文档的每个分组的初始密钥,所述任一开发数据文档中包含至少一个功能函数;根据所述任一开发数据文档中的每个分组的自身数据特征以及初始密钥,获取对每个分组的初始密钥进行加密传输时的公钥和私钥;根据初始密钥,以及初始密钥的公钥和私钥,对所述任一开发数据文档进行加密传输,获取监测周期内对所述任一开发数据文档进行加密传输的传输次数,根据所述任一开发数据文档中每个功能函数被调用的次数,以及所述监测周期内所述任一开发数据文档的传输次数,获取对所述任一开发数据文档中的每个分组的初始密钥进行轮换的轮换时间;根据所述轮换时间,利用AES加密算法,对所述任一开发数据文档中的每个分组的初始密钥进行更新,得到新初始密钥,用于在未来对目标软件的所述任一开发数据文档进行加密传输。其中,根据待加密数据(任一开发数据文档中的每个分组)的自身特性,对AES加密算法得到的初始密钥进行加密,得到待加密数据(任一开发数据文档中的每个分组)的初始密钥的公钥和私钥,增加了初始密钥传输时的安全性和破解的复杂性;同时根据待加密数据(任一开发数据文档中的每个分组)的使用频率(也即是传输次数),以及待加密数据自身的重要性,自适应设置初始密钥的轮换时间,增加了密钥破解的复杂度,进一步提高数据加密的安全性。
Smart Images

Figure CN122908976A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a secure encryption method for software development data. Background Technology
[0002] Software development involves a large amount of data, including source code, design documents, user information, and business data. This data is not only a core asset of software developers but also relates to users' privacy and rights. However, with the continuous upgrading and diversification of cyberattack methods, software development data faces increasingly severe security threats. Data leaks and tampering incidents occur frequently, causing huge losses to software developers and users. Therefore, it is necessary to encrypt software development data to ensure its security.
[0003] Traditionally, the AES encryption algorithm is used to encrypt software development data. The AES encryption algorithm is fast and efficient, and is suitable for processing large amounts of data. However, since the AES encryption algorithm is a symmetric encryption algorithm, encryption and decryption use the same key. Therefore, the distribution and rotation of the key must be very strict. Once the key is leaked, all encrypted data may be cracked, and data security is easily seriously threatened.
[0004] Therefore, how to increase the complexity of key cracking to improve the security protection of software development data has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a secure encryption method for software development data to address the problem of increasing the complexity of key cracking and thus improving the security protection of software development data.
[0006] This invention provides a secure encryption method for software development data, which includes the following steps:
[0007] Obtain any development data document of the target software, divide the any development data document into at least one group, use the AES encryption algorithm to obtain the initial key of each group of the any development data document, and the any development data document contains at least one function.
[0008] Based on the data characteristics of each group in any of the development data documents and the initial key, obtain the public and private keys for encrypting the transmission of the initial key of each group;
[0009] Based on the initial key, and the public and private keys of the initial key, the encrypted transmission of any development data document is performed. The number of times the encrypted transmission of any development data document is performed within the monitoring period is obtained. Based on the number of times each function in any development data document is called and the number of times the development data document is transmitted within the monitoring period, the rotation time for rotating the initial key of each group in any development data document is obtained.
[0010] Based on the rotation time, the initial key of each group in any development data document is updated using the AES encryption algorithm to obtain a new initial key, which is used for encrypted transmission of any development data document of the target software in the future.
[0011] Preferably, the step of obtaining the public and private keys for encrypting the transmission of the initial key for each group based on the data characteristics of each group in any development data document and the initial key includes:
[0012] For any group, the frequency of occurrence of each character in the group is counted, and the character with the highest frequency and closest to the first character in the group is recorded as the target character;
[0013] Based on the target character, perform a bitwise XOR operation on each character in any group to obtain an operational binary sequence. Convert the initial key of any group into binary to obtain an initial key binary sequence. Perform an XOR operation on the operational binary sequence and the initial key binary sequence to obtain the target binary sequence.
[0014] Based on the distribution of 0 and 1 in the target binary sequence, two target prime numbers are obtained. Based on the two target prime numbers, the public key and private key for encrypting and transmitting the initial key of any group are obtained using the RSA algorithm.
[0015] Preferably, obtaining two target prime numbers based on the distribution of 0s and 1s in the target binary sequence includes:
[0016] The number of 0s and 1s in the target binary sequence are counted respectively. If the number of 0s and 1s in the target binary sequence is greater than or equal to 2, the largest prime number within the range of the number of 0s is obtained and recorded as the first prime number. The largest prime number within the range of the number of 1s is obtained and recorded as the second prime number. If the first prime number and the second prime number are different, the first prime number and the second prime number are recorded as the target prime number.
[0017] If the first prime number is the same as the second prime number, then the maximum number of 0s and 1s is selected, and two maximum prime numbers are obtained within the range of less than or equal to the maximum number, thus obtaining two target prime numbers;
[0018] If the number of 0s or 1s in the target binary sequence is less than 2, then the maximum number of 0s and 1s is selected as the target number, and two maximum prime numbers are obtained within the range of less than or equal to the target number, thus obtaining two target prime numbers.
[0019] Preferably, the step of obtaining the rotation time for rotating the initial key of each group in any development data document based on the number of times each function is called in any development data document and the number of times the development data document is transmitted within the monitoring period includes:
[0020] The number of times each function in any development data document is called is recorded as the call count. Based on the call count of each function in any development data document, the function concentration index of any development data document is obtained.
[0021] Based on the number of transmissions of any development data document within the monitoring period and the function concentration index of any development data document, the key rotation necessity index of the initial key for each group in any development data document is obtained.
[0022] Based on the key rotation necessity index and the duration of the monitoring period, the rotation time for rotating the initial key of each group in any development data document is obtained.
[0023] Preferably, obtaining the function concentration index of any development data document based on the number of calls to each functional function in any development data document includes:
[0024] Calculate the average number of calls to all functional functions in any of the development data documents, and subtract the reciprocal of the average number of calls from the constant 1 to obtain the first central tendency index;
[0025] Calculate the reciprocal of the number of all functional functions in any of the development data documents to obtain the second centrality index;
[0026] Calculate the average value between the first concentration index and the second concentration index to obtain the function concentration index of any development data document.
[0027] Preferably, the step of obtaining the key rotation necessity index for the initial key of each group in any development data document based on the number of transmissions of any development data document within the monitoring period and the function concentration index of any development data document includes:
[0028] Subtracting the reciprocal of the number of transmissions of any development data document within the monitoring period from the constant 1 yields the utilization rate of any development data document within the monitoring period.
[0029] The usage rate and function concentration index in any of the development data documents are weighted and summed to obtain the key rotation necessity index of the initial key for each group in any of the development data documents.
[0030] Preferably, the step of obtaining the rotation time for rotating the initial key of each group in any development data document based on the key rotation necessity index and the duration of the monitoring period includes:
[0031] Subtract the key rotation necessity index from the constant 1 to obtain the rotation time coefficient. Calculate the product between the rotation time coefficient and the duration of the monitoring period to obtain the rotation period duration for rotating the initial key of each group in any development data document.
[0032] The sum of the last moment of the monitoring period and the duration of the rotation period is calculated to obtain the rotation time for rotating the initial key of each group in any development data document.
[0033] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0034] This invention acquires any development data document of the target software, divides the development data document into at least one group, and uses the AES encryption algorithm to obtain an initial key for each group of the development data document. Each development data document contains at least one function. Based on the data characteristics of each group in the development data document and the initial key, a public key and a private key are obtained for encrypting and transmitting the initial key of each group. The development data document is then encrypted and transmitted using the initial key, its public key, and its private key. The number of times the development data document is encrypted and transmitted within a monitoring period is obtained. Based on the number of times each function in the development data document is called and the number of times the development data document is transmitted within the monitoring period, a rotation time for rotating the initial key of each group in the development data document is obtained. Based on the rotation time, the initial key of each group in the development data document is updated using the AES encryption algorithm to obtain a new initial key, which is used for encrypting and transmitting the development data document of the target software in the future. Specifically, based on the characteristics of the data to be encrypted (each group in any development data document), the initial key obtained by the AES encryption algorithm is encrypted to obtain the public and private keys of the initial key of the data to be encrypted (each group in any development data document), which increases the security of the initial key transmission and the complexity of cracking. At the same time, based on the usage frequency (i.e., the number of transmissions) of the data to be encrypted (each group in any development data document) and the importance of the data to be encrypted itself, the rotation time of the initial key is adaptively set, which increases the complexity of key cracking and further improves the security of data encryption. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a flowchart of a secure encryption method for software development data provided in Embodiment 1 of the present invention. Detailed Implementation
[0037] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.
[0038] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0039] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0040] See Figure 1 This is a flowchart of a secure encryption method for software development data provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include:
[0041] Step S101: Obtain any development data document of the target software, divide the any development data document into at least one group, and use the AES encryption algorithm to obtain the initial key of each group of the any development data document. The any development data document contains at least one function.
[0042] The software corresponding to the software development data to be encrypted is denoted as the target software. Each development data document (containing at least one function) of the target software is encrypted using the AES encryption algorithm. Since AES is a block cipher, it is designed to encrypt or decrypt only fixed-size single blocks of data (128 bits, or 16 bytes). Therefore, taking the i-th development data document of the target software as an example, according to the AES standard, the i-th development data document is first divided into at least one block, each block being a fixed length of 128 bits. Then, the AES encryption algorithm is used to encrypt each block in the i-th development data document, obtaining the initial key and ciphertext for each block. The initial key for each block in the i-th development data document is the same; that is, the round keys used for subsequent rounds of encryption for each block in the i-th development data document are derived from the same initial key. The initial key for each block in the i-th development data document is the initial key for the i-th development data document, and the encryption and decryption of the i-th development data document also rely on the same initial key. The AES encryption algorithm is existing technology and will not be discussed further here.
[0043] Step S102: Based on the data characteristics of each group in any development data document and the initial key, obtain the public key and private key for encrypting and transmitting the initial key of each group.
[0044] In AES encryption, the transmission of the initial key must be protected by encryption or other secure methods; it must never be transmitted in plaintext, otherwise it will directly lead to key leakage and compromise the security of the entire encryption system. Traditionally, the RSA encryption algorithm is typically used to encrypt the initial key. The traditional RSA encryption algorithm generates two large prime numbers randomly, ultimately yielding the public and private keys used to encrypt the initial key. While larger prime numbers generally offer higher security, generating the public and private keys requires more computational resources and time, resulting in slower encryption and decryption speeds. Furthermore, the generated public and private keys are longer, placing a greater burden on the system for storing them.
[0045] Therefore, in this embodiment of the invention, firstly, two target prime numbers are obtained based on the data characteristics of each group in the i-th development data document to reduce the number of bits in the randomly generated prime numbers and reduce the computational burden on the system. Then, using the RSA encryption algorithm, the initial key of each group is encrypted based on the two target prime numbers corresponding to each group, resulting in the public and private keys used for encrypted transmission of the initial key of each group. Although reducing the number of bits in the prime numbers inherently reduces security, since the public and private keys of the initial key of each group are obtained separately based on the data characteristics of each group, the public and private keys of the initial keys of all groups in the i-th development data document are not identical. Furthermore, there is a subsequent initial key rotation mechanism, which improves the overall security performance of the i-th development data document. The RSA encryption algorithm is existing technology and will not be described in detail here.
[0046] Taking the j-th group in the i-th development data document as an example, the specific process of obtaining the two target prime numbers in the j-th group is as follows:
[0047] Count the frequency of each character in the j-th group, and denote the character with the highest frequency and closest to the first character in the j-th group as the target character;
[0048] Based on the target character, perform a bitwise XOR operation on each character in the j-th group to obtain the operational binary sequence. Convert the initial key of the j-th group into binary to obtain the initial key binary sequence. Perform an XOR operation between the operational binary sequence and the initial key binary sequence to obtain the target binary sequence. For example, suppose the j-th group is (abcdafgabcbcee), where the frequency of character 'a' is 3, the frequency of character 'b' is 3, the frequency of character 'c' is 3, the frequency of character 'd' is 1, the frequency of character 'f' is 1, the frequency of character 'g' is 1, and the frequency of character 'e' is 2. The characters with the highest frequency are characters 'a', 'b', and 'c'. Among them, the character closest to the first character in the j-th group is character 'a'. Therefore, character 'a' is recorded as the target character. Based on character 'a', a bitwise XOR operation is performed on each character in the j-th group to obtain the operation binary sequence. That is, in the j-th group, the position of character 'a' is recorded as 0, and the remaining positions are recorded as 1, so the operation binary sequence is (01110110111111). Assuming the initial key binary sequence (the length of the initial key binary sequence is the same as that of the operation binary sequence) is (01011011100101), after performing an XOR operation on the operation binary sequence and the initial key binary sequence, the target binary sequence is (00101101011010).
[0049] The number of 0s and 1s in the target binary sequence are counted separately. If the number of 0s and 1s in the target binary sequence is both greater than or equal to 2, then the largest prime number within the range of the number of 0s is obtained and denoted as the first prime number. The largest prime number within the range of the number of 1s is obtained and denoted as the second prime number. If the first prime number and the second prime number are different, then the first prime number and the second prime number are denoted as the target prime numbers of the j-th group. For example, if the number of 0s in the target binary sequence is 58 and the number of 1s is 70, then the first prime number is 53 and the second prime number is 67. In this case, the first prime number and the second prime number are not equal, so the two target prime numbers of the j-th group are 53 and 67 respectively.
[0050] If the first prime number is the same as the second prime number, then the maximum number of 0s and 1s is selected, and two maximum prime numbers are obtained within the range of less than or equal to the maximum number, thus obtaining the two target prime numbers of the j-th group. For example, in the target binary sequence, if the number of 0s is 64 and the number of 1s is 64, then the first prime number is 61 and the second prime number is also 61. At this time, two maximum prime numbers less than or equal to 64 are obtained, namely 61 and 59. Therefore, the two target prime numbers of the j-th group are 61 and 59.
[0051] If the number of 0s or 1s in the target binary sequence is less than 2, then the maximum number of 0s and 1s is selected and recorded as the target number. Two maximum prime numbers are obtained within the range of less than or equal to the target number, resulting in the two target prime numbers for the j-th group. For example, if the number of 0s in the target binary sequence is 1 and the number of 1s is 127, then the maximum number of 0s and 1s is 127, which is the target number. In this case, two maximum prime numbers less than or equal to 127 are obtained, namely 127 and 113. Therefore, the two target prime numbers for the j-th group are 127 and 113.
[0052] Thus, we have obtained two target prime numbers for the j-th group in the i-th development data document. These prime numbers are used to obtain the public and private keys for encrypting the initial key of the j-th group in the i-th development data document using the RSA encryption algorithm.
[0053] Similarly, obtain the public and private keys for encrypting the transmission of the initial key for each group in the i-th development data document.
[0054] Step S103: Based on the initial key, and the public and private keys of the initial key, encrypt and transmit any of the development data documents; obtain the number of times the encrypted transmission of any of the development data documents is performed within the monitoring period; and obtain the rotation time for rotating the initial key of each group in any of the development data documents based on the number of times each function in any of the development data documents is called and the number of times the development data documents are transmitted within the monitoring period.
[0055] To reduce the risk of key leakage or cracking and increase the complexity of key cracking, keys need to be rotated periodically. If the key has been used for a long time, i.e., the interval between key rotations is long, the possibility of key cracking is higher. If the key has been used for a short time, i.e., the interval between key rotations is short, frequent key rotations will increase the system's computational load and increase system burden. Therefore, in this embodiment of the invention, the monitoring period is set to 30 days. This is not a limitation; implementers can set it according to specific scenarios. Based on the usage of the i-th development document data document of the target software within the monitoring period, the rotation period for rotating the initial key of each group in the i-th development document data document is adaptively obtained. That is, the usage time of the initial key of each group in the i-th development document data document is adaptively obtained, thereby obtaining the rotation time for rotating the initial key of each group in the i-th development document data document, to increase the complexity of key cracking and further improve the security of data encryption. Since the initial key of each group in the i-th development document data document is the same, the initial key of each group in the i-th development document data document is the initial key of the i-th development document data document.
[0056] The step of adaptively obtaining the rotation period for the initial key of the i-th development document data document is as follows:
[0057] (1) Based on the number of times each function is called in the i-th development data document, the function concentration index of the i-th development data document is obtained.
[0058] First, we analyze the distribution of functional functions (independent code units that complete specific tasks) in the i-th development data document to obtain a function concentration index for the i-th development data document. This index is used to determine the importance of the i-th development data document, and the rotation cycle length for rotating the initial key of the i-th development data document is adaptively determined based on its importance. If the number of functional functions in the i-th development data document is small, and the functional functions are frequently called, it indicates that the i-th development data document is very likely to be a core operating module of the target software. The more important the i-th development data document is to the operation of the target software, the more frequently it should be replaced. The initial key of the i-th development data document, i.e., the rotation period for rotating the initial key of the i-th development data document, is relatively short to ensure the security of the development data of the target software. If the i-th development data document contains a large number of function files, and the function files are called infrequently, it indicates that the i-th development data document is very likely to contain functional data of some functions of the target software. Generally, it mainly affects some functions of the software rather than making the software difficult to run, and its importance is relatively low. In this case, the rotation period for rotating the initial key of the i-th development data document is longer to reduce the system's computational load and reduce the system's workload.
[0059] Based on the distribution of functional functions in the i-th development data document, the specific method for obtaining the function concentration index of the i-th development data document is as follows:
[0060] Based on the programming language and scenario of the i-th development data document, the number of times each functional function in the i-th development data document is called is counted using methods such as Python decorators, closures (functional programming), and class method statistics (object-oriented programming). This number is denoted as the call count. The average call count of all functional functions in the i-th development data document is calculated. The first central index is obtained by subtracting the reciprocal of the average call count from the constant 1. The method of counting the number of functional functions called using methods such as Python decorators, closures, and class method statistics based on the programming language and scenario of the i-th development data document is existing technology and will not be elaborated here.
[0061] Calculate the reciprocal of the number of all functionalities in the i-th development data document to obtain the second centrality index;
[0062] Calculate the average value between the first concentration index and the second concentration index to obtain the function concentration index of the i-th development data document.
[0063] In one implementation, the formula for calculating the function concentration index of the i-th development data document is:
[0064]
[0065] in, Let represent the function concentration index of the i-th development data document, and s represent the total number of functions in the i-th development data document. This indicates the number of times the h-th function in the i-th development data document is called.
[0066] It should be noted that the smaller s is, and The larger the value, the fewer the number of functional functions in the i-th development data document, and the more frequently these functions are called. The larger the value, the more concentrated the functionalities in the i-th development data document. The i-th development data document is very likely to be the core operating module of the target software. The more important the i-th development data document is to the operation of the target software, the more frequently the initial key of the i-th development data document should be changed.
[0067] (2) Based on the number of transmissions of the i-th development data document within the monitoring period and the function concentration index of the i-th development data document, the key rotation necessity index of the initial key in the i-th development data document is obtained.
[0068] Within the monitoring period, specifically the 30 days during which the initial key of the i-th development data document is used to encrypt and transmit the i-th development data document, the number of times the i-th development data document is encrypted and transmitted is obtained. If the i-th development data document is transmitted more times within the monitoring period, it indicates that the initial key of the i-th development data document is used more often, the importance of the i-th development data document is greater, and the necessity of rotating the initial key of the i-th development data document is greater; conversely, the less important the i-th development data document is, the less necessity of rotating the initial key of the i-th development data document is.
[0069] Therefore, in this embodiment of the invention, based on the number of transmissions of the i-th development data document within the monitoring period and the function concentration index of the i-th development data document, the key rotation necessity index of the initial key of the i-th development data document is obtained, specifically:
[0070] Subtracting the reciprocal of the number of transmissions of the i-th development data document within the monitoring period from the constant 1 yields the utilization rate of the i-th development data document within the monitoring period.
[0071] The usage rate and function concentration index in the i-th development data document are weighted and summed to obtain the key rotation necessity index of the initial key of the i-th development data document.
[0072] In one implementation, the formula for calculating the key rotation necessity index of the initial key of the i-th development data document is:
[0073]
[0074] in, The key rotation necessity index represents the initial key of the i-th development data document. Indicates the first weight. The function concentration index represents the i-th development data document. Indicates the second weight. This indicates the number of times the i-th development data document was transmitted within the monitoring period.
[0075] It should be noted that the number of times the i-th development data document is transmitted within the monitoring period... The actual value, therefore The corresponding weight is relatively large, that is, set , There are no restrictions here; implementers can set them according to the specific scenario. The larger the value, the greater the concentration of functionalities in the i-th development data document, and the greater the importance of the i-th development data document. The larger the value, the greater the necessity to rotate the initial key for the i-th development data document; The larger the value, the more times the i-th development data document is transmitted within the monitoring period, and the higher the utilization rate of the initial key of the i-th development data document. The larger the value, the greater the necessity to rotate the initial key for the i-th development data document.
[0076] (3) Based on the key rotation necessity index and the duration of the monitoring period, the rotation period duration for rotating the initial key of the i-th development data document is obtained.
[0077] Specifically, the key rotation necessity index is subtracted from the constant 1 to obtain the rotation time coefficient. The product of the rotation time coefficient and the duration of the monitoring period is calculated to obtain the rotation period duration for rotating the initial key of the i-th development data document.
[0078] In one implementation, the formula for calculating the rotation period for rotating the initial key of the i-th development data document is as follows:
[0079]
[0080] in, This represents the rotation period for rotating the initial key of the i-th development data document. The key rotation necessity index represents the initial key of the i-th development data document, and T represents the duration of the monitoring period. In this embodiment of the invention, the duration of the monitoring period is 30 days.
[0081] It should be noted that, The larger the value, the greater the necessity for rotating the initial key of the i-th development data document; that is, the shorter the rotation period for rotating the initial key of the i-th development data document. The smaller the value, the shorter the rotation period for the initial key of the i-th development data document.
[0082] Thus, we have obtained the rotation period for rotating the initial key of the i-th development data document, which is also the rotation period for rotating the initial key of each group in the i-th development data document.
[0083] Furthermore, the sum of the last moment of the monitoring period and the duration of the rotation period is calculated to obtain the rotation time for rotating the initial key of each group in the i-th development data document. For example, assuming the initial key of the i-th development data document was obtained at 00:00:00 on January 1st, and the monitoring period is 30 days, then the last moment of the monitoring period is 00:00:00 on January 31st. The rotation time for rotating the initial key of each group in the i-th development data document is February 15th, 00:00:00:00.
[0084] Step S104: According to the rotation time, the initial key of each group in any development data document is updated using the AES encryption algorithm to obtain a new initial key, which is used for encrypted transmission of any development data document of the target software in the future.
[0085] Based on the rotation time for rotating the initial key of each group in the i-th development data document, the initial key of each group in the i-th development data document is updated using the AES encryption algorithm to obtain a new initial key. Then, steps S102 and S103 are repeated to obtain the public and private keys for encrypted transmission of the new initial key of each group in the i-th development data document, as well as the rotation time for rotating the new initial key of each group in the i-th development data document. Based on the new initial key of each group in the i-th development data document, the i-th development data document is encrypted and transmitted in the future.
[0086] Similarly, obtain the initial key for each development data document of the target software, and encrypt and transmit each development data document of the target software.
[0087] In summary, this invention obtains any development data document of the target software, divides the any development data document into at least one group, and uses the AES encryption algorithm to obtain an initial key for each group of the any development data document. The any development data document contains at least one function. Based on the data characteristics of each group in the any development data document and the initial key, a public key and a private key are obtained for encrypting and transmitting the initial key of each group. Based on the initial key, and the public and private keys of the initial key, the any development data document is encrypted and transmitted. The number of times the any development data document is encrypted and transmitted within a monitoring period is obtained. Based on the number of times each function in the any development data document is called and the number of times the any development data document is transmitted within the monitoring period, a rotation time for rotating the initial key of each group in the any development data document is obtained. Based on the rotation time, the initial key of each group in the any development data document is updated using the AES encryption algorithm to obtain a new initial key, which is used for encrypting and transmitting the any development data document of the target software in the future. Specifically, based on the characteristics of the data to be encrypted (each group in any development data document), the initial key obtained by the AES encryption algorithm is encrypted to obtain the public and private keys of the initial key of the data to be encrypted (each group in any development data document), which increases the security of the initial key transmission and the complexity of cracking. At the same time, based on the usage frequency (i.e., the number of transmissions) of the data to be encrypted (each group in any development data document) and the importance of the data to be encrypted itself, the rotation time of the initial key is adaptively set, which increases the complexity of key cracking and further improves the security of data encryption.
[0088] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A secure encryption method for software development data, characterized in that, The secure encryption methods for the software development data include: Obtain any development data document of the target software, divide the any development data document into at least one group, use the AES encryption algorithm to obtain the initial key of each group of the any development data document, and the any development data document contains at least one function. Based on the data characteristics of each group in any of the development data documents and the initial key, obtain the public and private keys for encrypting the transmission of the initial key of each group; Based on the initial key, and the public and private keys of the initial key, the encrypted transmission of any development data document is performed. The number of times the encrypted transmission of any development data document is performed within the monitoring period is obtained. Based on the number of times each function in any development data document is called and the number of times the development data document is transmitted within the monitoring period, the rotation time for rotating the initial key of each group in any development data document is obtained. Based on the rotation time, the initial key of each group in any development data document is updated using the AES encryption algorithm to obtain a new initial key, which is used for encrypted transmission of any development data document of the target software in the future.
2. The secure encryption method for software development data according to claim 1, characterized in that, The step of obtaining the public and private keys for encrypting the transmission of the initial key for each group based on its own data characteristics and the initial key in any development data document includes: For any group, the frequency of occurrence of each character in the group is counted, and the character with the highest frequency and closest to the first character in the group is recorded as the target character; Based on the target character, perform a bitwise XOR operation on each character in any group to obtain an operational binary sequence. Convert the initial key of any group into binary to obtain an initial key binary sequence. Perform an XOR operation on the operational binary sequence and the initial key binary sequence to obtain the target binary sequence. Based on the distribution of 0 and 1 in the target binary sequence, two target prime numbers are obtained. Based on the two target prime numbers, the public key and private key for encrypting and transmitting the initial key of any group are obtained using the RSA algorithm.
3. The secure encryption method for software development data according to claim 2, characterized in that, The step of obtaining two target prime numbers based on the distribution of 0s and 1s in the target binary sequence includes: The number of 0s and 1s in the target binary sequence are counted respectively. If the number of 0s and 1s in the target binary sequence is greater than or equal to 2, the largest prime number within the range of the number of 0s is obtained and recorded as the first prime number. The largest prime number within the range of the number of 1s is obtained and recorded as the second prime number. If the first prime number and the second prime number are different, the first prime number and the second prime number are recorded as the target prime number. If the first prime number is the same as the second prime number, then the maximum number of 0s and 1s is selected, and two maximum prime numbers are obtained within the range of less than or equal to the maximum number, thus obtaining two target prime numbers; If the number of 0s or 1s in the target binary sequence is less than 2, then the maximum number of 0s and 1s is selected as the target number, and two maximum prime numbers are obtained within the range of less than or equal to the target number, thus obtaining two target prime numbers.
4. The secure encryption method for software development data according to claim 1, characterized in that, The step of obtaining the rotation time for rotating the initial key of each group in any development data document based on the number of times each function is called in any development data document and the number of times the development data document is transmitted within the monitoring period includes: The number of times each function in any development data document is called is recorded as the call count. Based on the call count of each function in any development data document, the function concentration index of any development data document is obtained. Based on the number of transmissions of any development data document within the monitoring period and the function concentration index of any development data document, the key rotation necessity index of the initial key for each group in any development data document is obtained. Based on the key rotation necessity index and the duration of the monitoring period, the rotation time for rotating the initial key of each group in any development data document is obtained.
5. A secure encryption method for software development data according to claim 4, characterized in that, The step of obtaining the function concentration index of any development data document based on the number of calls to each functional function in any development data document includes: Calculate the average number of calls to all functional functions in any of the development data documents, and subtract the reciprocal of the average number of calls from the constant 1 to obtain the first central tendency index; Calculate the reciprocal of the number of all functional functions in any of the development data documents to obtain the second centrality index; Calculate the average value between the first concentration index and the second concentration index to obtain the function concentration index of any development data document.
6. A secure encryption method for software development data according to claim 4, characterized in that, The step of obtaining the key rotation necessity index for the initial key of each group in any development data document based on the number of transmissions of any development data document within the monitoring period and the function concentration index of any development data document includes: Subtracting the reciprocal of the number of transmissions of any development data document within the monitoring period from the constant 1 yields the utilization rate of any development data document within the monitoring period. The usage rate and function concentration index in any of the development data documents are weighted and summed to obtain the key rotation necessity index of the initial key for each group in any of the development data documents.
7. A secure encryption method for software development data according to claim 4, characterized in that, The step of determining the rotation time for rotating the initial key of each group in any development data document based on the key rotation necessity index and the duration of the monitoring period includes: Subtract the key rotation necessity index from the constant 1 to obtain the rotation time coefficient. Calculate the product between the rotation time coefficient and the duration of the monitoring period to obtain the rotation period duration for rotating the initial key of each group in any development data document. The sum of the last moment of the monitoring period and the duration of the rotation period is calculated to obtain the rotation time for rotating the initial key of each group in any development data document.