White box symmetric encryption and decryption method, device, equipment, system and medium
The input encoding of the white box password algorithm is protected through composite affine transformation technology. The composite input encoding and output encoding of the decrypted background system are used to decrypt the plaintext data, which solves the problem that the white box password algorithm is easily cracked by multiple rounds of encryption, and improves data protection security and reduce hardware requirements.
Patent Information
- Application Number
- CN202411305023.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-18
AI Technical Summary
The white box password algorithm relies on external encoding during multiple rounds of encryption and is easily cracked, resulting in reduced data protection security. Existing protection methods such as security chips and security isolation areas are difficult to promote under the limitations of hardware and operating systems.
The composite affine transformation technology is used to protect the input encoding. Multiple iterative encryption is carried out by decrypting the composite input encoding and preset input encoding generated by the background system. It is difficult for an attacker to split and obtain the input encoding. The decryption background system uses output encoding and input inverse. Encoding and decrypting plaintext data to improve the security of data protection.
It effectively improves the data protection security of the white box password algorithm, avoids the risk of external encoding being intercepted and cracked, and does not require hardware security chips or security isolation areas, and has high operability and promotion.
Smart Images

Figure CN119109568A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing, and in particular, relates to a method, device, equipment, system and medium for white-box symmetric encryption and decryption. Background Art
[0002] In the process of electronic realization of various businesses, a large amount of data needs to be transmitted. The transmitted data contains sensitive information of users. In order to ensure the security of sensitive information, the data will be encrypted before transmission. White box cryptography is a technology that uses affine transformation and lookup table technology to encode and protect the key, hide the key in the lookup table, and thus encrypt the data. During the encryption and decryption process of the white box cryptography algorithm, the key will not appear in the memory in plain text.
[0003] However, multiple rounds of encryption are performed in the white-box cryptographic algorithm. Multiple rounds of encryption use scrambling codes to protect intermediate data. Correspondingly, before the first round of encryption, it is necessary to introduce external coding, namely input coding, to obtain the scrambled information of the first round of encryption. After the last round of encryption, it is necessary to introduce external coding, namely output coding, to offset the scrambled information of the last round of encryption. If the external coding is intercepted, it is possible to use the external coding to perform calculations to derive the keys for multiple rounds of encryption, thereby cracking the white-box cryptographic algorithm. If the white-box cryptographic algorithm is cracked, the data encrypted by the white-box cryptographic algorithm will also be cracked, thereby reducing the security of data protection. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device, system and medium for white-box symmetric encryption and decryption, which can improve the security of data protection.
[0005] In a first aspect, an embodiment of the present application provides a white-box symmetric encryption method, which is applied to an encryption terminal, and the method includes: obtaining plaintext data; performing multiple rounds of iterative encryption based on the plaintext data, and the composite input code, lookup table and composite affine transformation data issued by the decryption background system to obtain obfuscated ciphertext data, wherein the composite input code is obtained by performing a composite affine transformation on an input obfuscation code randomly generated by the decryption background system and a preset input code; sending the obfuscated ciphertext data to the decryption background system, wherein the obfuscated ciphertext data is decrypted by the decryption background system according to a preset output code, a pre-stored target key and an input obfuscation inverse code to obtain plaintext data, and the input obfuscation inverse code includes an inverse code of the input obfuscation code.
[0006] In the second aspect, an embodiment of the present application provides a white-box symmetric decryption method, which is applied to a decryption background system, the method comprising: receiving obfuscated ciphertext data sent by an encryption terminal, the obfuscated ciphertext data being obtained by performing multiple rounds of iterative encryption based on plaintext data, and a composite input code, a lookup table, and a composite affine transformation data issued by the decryption background system, the composite input code being obtained by performing a composite affine transformation on an input obfuscation code randomly generated by the decryption background system and a preset input code; decrypting the obfuscated ciphertext data according to a preset output code, a pre-stored target key, and an input obfuscation inverse code to obtain plaintext data, the input obfuscation inverse code comprising an inverse code of the input obfuscation code.
[0007] In a third aspect, an embodiment of the present application provides a white-box symmetric encryption device, comprising: a data acquisition module for acquiring plaintext data; a white-box encryption module for performing multiple rounds of iterative encryption based on the plaintext data, and the composite input code, lookup table and composite affine transformation data issued by the decryption background system to obtain obfuscated ciphertext data, wherein the composite input code is obtained by performing a composite affine transformation on an input obfuscation code randomly generated by the decryption background system and a preset input code; a sending module for sending obfuscated ciphertext data to the decryption background system, wherein the obfuscated ciphertext data is decrypted by the decryption background system according to a preset output code, a pre-stored target key and an input obfuscation inverse code to obtain plaintext data, and the input obfuscation inverse code includes the inverse code of the input obfuscation code.
[0008] In a fourth aspect, an embodiment of the present application provides a white-box symmetric decryption device, comprising: a receiving module, used to receive obfuscated ciphertext data sent by an encryption terminal, the obfuscated ciphertext data is obtained by performing multiple rounds of iterative encryption based on plaintext data, and a composite input code, a lookup table, and a composite affine transformation data issued by the white-box symmetric decryption device, the composite input code is obtained by performing a composite affine transformation on an input obfuscation code randomly generated by the white-box symmetric decryption device and a preset input code; a white-box decryption module, used to decrypt the obfuscated ciphertext data according to a preset output code, a pre-stored target key, and an input obfuscation inverse code to obtain plaintext data, the input obfuscation inverse code comprising an inverse code of the input obfuscation code.
[0009] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the white-box symmetric encryption method of the first aspect or the white-box symmetric decryption method of the second aspect is implemented.
[0010] In the sixth aspect, an embodiment of the present application provides a system for white-box symmetric encryption and decryption, including: an encryption terminal, used to execute the white-box symmetric encryption method of the first aspect; a decryption background system, communicated with the encryption terminal, and used to execute the white-box symmetric decryption method of the second aspect.
[0011] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the white-box symmetric encryption method of the first aspect or the white-box symmetric decryption method of the second aspect is implemented.
[0012] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the white-box symmetric encryption method of the first aspect or the white-box symmetric decryption method of the second aspect.
[0013] The embodiment of the present application provides a method, device, equipment, system and medium for white-box symmetric encryption and decryption. The encryption terminal performs multiple rounds of iterative encryption according to plaintext data, composite input code, lookup table and composite affine transformation data to obtain obfuscated ciphertext data. The composite input code is obtained by performing composite affine transformation on the input obfuscated code randomly generated by the decryption background system and the input code. The attacker cannot split the input code according to the composite input code. After the decryption background system receives the obfuscated ciphertext data, it can decrypt the obfuscated ciphertext data according to the output code, the target key and the input obfuscated inverse code. The input obfuscated inverse code can offset the obfuscated information introduced by the input obfuscated code, thereby restoring the plaintext data. The output code and the input obfuscated inverse code are both in the decryption background system with higher security, and it is difficult for the attacker to obtain them. In the case where at least one of the input code, the output code and the input obfuscated inverse code cannot be obtained, even if the attacker obtains the basic key and / or round key of the white-box cryptographic algorithm, the obfuscated ciphertext data cannot be cracked, thereby improving the security of data protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0015] Figure 1 A flowchart of a white-box symmetric encryption method provided by an embodiment of the present application;
[0016] Figure 2 A schematic diagram of an example of obtaining obfuscated ciphertext data provided in an embodiment of the present application;
[0017] Figure 3 A schematic diagram of an example of decrypting obfuscated ciphertext data to obtain plaintext data provided in an embodiment of the present application;
[0018] Figure 4 A flowchart of a white-box symmetric decryption method provided by an embodiment of the present application;
[0019] Figure 5 A schematic diagram of the structure of a white-box symmetric encryption device provided in one embodiment of the present application;
[0020] Figure 6 A schematic diagram of the structure of a white box symmetric decryption device provided in one embodiment of the present application;
[0021] Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;
[0022] Figure 8 A schematic diagram of the architecture of a white-box symmetric encryption and decryption system provided in one embodiment of the present application. DETAILED DESCRIPTION
[0023] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended only to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application. It should be noted that the acquisition, storage, use, and processing of information and data in the embodiments of the present application are authorized by users or relevant agencies, in compliance with the relevant provisions of national laws and regulations.
[0024] In the electronic implementation process of various businesses, a large amount of data needs to be transmitted. The transmitted data contains sensitive information of users. In order to ensure the security of sensitive information, the data will be encrypted before transmission. For example, in the payment scenario, there is a large amount of sensitive information in the payment data, which needs to be encrypted before transmission. The white-box cryptographic algorithm is a technology that uses affine transformation and lookup table technology to encode and protect the key, hide the key in the lookup table, and thus encrypt the data. During the encryption and decryption process of the white-box cryptographic algorithm, the key will not appear in the memory in plain text. However, multiple rounds of encryption will be performed in the white-box cryptographic algorithm, and multiple rounds of encryption must use scrambling coding to protect the intermediate data. Correspondingly, before the first round of encryption, it is necessary to introduce external coding, that is, input coding, to obtain the scrambled information of the first round of encryption. After the last round of encryption, it is necessary to introduce external coding, that is, output coding, to offset the scrambled information of the last round of encryption. In the case where the external code is intercepted, the inverse transformation of the external code, namely the external code inverse code, can be obtained according to the external code. Through the external code inverse code, the code used to process the lookup table can be decomposed from the composite affine transformation data in the white-box cryptographic algorithm, and then the round key of the multi-round encryption in the white-box cryptographic algorithm can be derived, so that the encrypted data can be directly cracked using the round key. The complexity of cracking the white-box cryptographic algorithm using the external code such as the input code as a breakthrough point is less than O(2 20.4 ), which is much lower than the current complexity of Lin-Lai attack to crack the white-box cryptographic algorithm O(2 47 ), which poses a greater threat to data security and reduces the security of data protection.
[0025] In some related technologies, a security chip can be added to the encryption terminal side, and the external code can be placed in the security chip for protection. Alternatively, a virtual machine technology can be used in the encryption terminal to establish a secure isolation zone, and both the external code and the white box cryptographic algorithm can be placed in the secure isolation zone for protection. However, the security chip has relatively high hardware requirements, and common mobile phones and other terminals do not have such hardware conditions, making it difficult to promote. Although the establishment of a secure isolation zone is not invasive to the hardware, the applicable operating system, that is, the platform, is limited, and the versatility is poor, and it is also difficult to promote. The operability of the above two protection methods in actual applications is relatively poor.
[0026] The present application provides a method, device, equipment, system, medium and program product for white-box symmetric encryption and decryption, which can pre-process the input code by compound affine transformation to obtain compound input code, and use the compound input code in the encryption process, so that it is difficult for attackers to obtain the input code from the compound input code, and it is also impossible to use the input code to crack the white-box cryptographic algorithm, thereby improving the security of data protection. Moreover, the input code is hidden in the compound input code obtained by compound affine transformation, and there is no need to add a security chip to the encryption terminal, nor is there a need to set up a security isolation zone in the encryption terminal, which has great operability in practical applications.
[0027] The following describes the white-box symmetric encryption and decryption methods, devices, equipment, systems, media and program products provided by the present application.
[0028] The first aspect of the present application provides a white-box symmetric encryption method, which can be applied to an encryption terminal, that is, the white-box symmetric encryption method can be executed by the encryption terminal. The white-box symmetric encryption algorithm in the embodiment of the present application can be implemented as a white-box SM4 cryptographic algorithm. Figure 1 A flowchart of a white-box symmetric encryption method provided by an embodiment of the present application is shown in FIG. Figure 1 As shown, the white-box symmetric encryption method may include steps S101 to S103.
[0029] In step S101, plaintext data is obtained.
[0030] The content of the plaintext data can be determined according to the application scenario. For example, in the payment scenario, the plaintext data may include but is not limited to payment information; in the user login scenario, the plaintext data may include but is not limited to user identity information, which will not be illustrated one by one here. The plaintext data that needs to be encrypted and protected is within the protection scope of the embodiments of this application.
[0031] In step S102, multiple rounds of iterative encryption are performed based on the plaintext data, and the composite input code, lookup table and composite affine transformation data issued by the decryption background system to obtain obfuscated ciphertext data.
[0032] The decryption background system will send the composite input code, lookup table and composite affine transformation data to the encryption terminal in advance, that is, the encryption terminal will receive the composite input code, lookup table and composite affine transformation data sent by the decryption background system in advance. In the subsequent encryption process, the encryption terminal can directly use the composite input code, lookup table and composite affine transformation data for encryption.
[0033] The composite input code is obtained by composite affine transformation of the input obfuscation code randomly generated by the decryption background system and the preset input code. The generation of the composite input code is completed in the decryption background system, and the encryption terminal does not receive the input obfuscation code, that is, the input obfuscation code is unknown to the encryption terminal. The random generation of the input obfuscation code improves the randomness of the composite input code, and further increases the difficulty of splitting the input code from the composite input code. The input code can be regarded as an affine transformation, and the input obfuscation code can also be regarded as an affine transformation. The decryption background system uses the randomly generated input obfuscation code to perform an affine transformation on the input code as a composite affine transformation. For example, the input code includes, the input obfuscation code includes, then the process of obtaining the composite input code by the input code, the input obfuscation code and the composite affine transformation can be seen in the following formulas (1) to (3):
[0034]
[0035] Among them, P i (x) is the input code; l[P i ] is the linear part of the input code, which is a matrix. In some examples, it can be a 32×32 reversible matrix over a finite field containing two elements, namely GF(2); x is the object to be affine transformed, namely the original data; c[P i ] is the constant part of the input code, which is a vector. In some examples, it can be a 32×1 column vector on GF(2); N i (x) is the input obfuscation code; l[N i ] is the linear part of the input obfuscation code, which is a matrix. In some examples, it can be a 32×32 reversible matrix on GF(2); c[N i ] is the constant part of the input obfuscation code, which is a vector. In some examples, it can be a 32×1 column vector on GF(2); M i (x) is the composite input code; It is an XOR operation.
[0036] Even if the attacker intercepts the composite input code, if he wants to get the input code from the composite input code, he needs to split the linear part of the composite input code, i.e., the invertible matrix, into the product of two invertible matrices, and split an i-order invertible matrix into two i-order invertible matrices. The number of i-order invertible matrices that can be obtained can be obtained according to the following formula (4):
[0037]
[0038] Where h(i) is the number of i-order reversible matrices that can be obtained by splitting an i-order reversible matrix into two i-order reversible matrices; when i=32, the number of 32-order reversible matrices that can be obtained by splitting a 32-order reversible matrix is 2 1023 , the attacker wants to 1023 It is unrealistic to find the combination of the linear part of the actual input code and the linear part of the input obfuscation code in a 32-order reversible matrix. Even if the combination of the linear part is obtained, the constant part of the composite input code needs to be split to obtain the combination of the constant part. Similarly, from 2 1023 It is unrealistic to find the combination of the constant part of the actual input code and the constant part of the input obfuscation code using a 32-order reversible matrix. Therefore, the composite input code can safely protect the input code from being extracted by an attacker.
[0039] The lookup table is a lookup table in a white-box cryptographic algorithm, which can be used to look up the round key for each round of encryption, and will not be described in detail here. The composite affine transformation data is composite affine transformation data in a white-box cryptographic algorithm. In some examples, the composite affine transformation data may include a composite affine transformation code obtained by affine transformation of an inverse code of an input code and another input code, and a composite affine transformation code obtained by affine transformation of an input code and an operation code.
[0040] Composite input coding can be used to introduce scrambling information into plaintext data, and the data obtained after the introduction of scrambling information can participate in subsequent multiple rounds of iterative encryption. In some examples, the composite input coding and the plaintext data can be affine transformed to obtain first input data; the first input data, the lookup table and the composite affine transformation data are used to perform multiple rounds of iterative encryption to obtain obfuscated ciphertext data. The first input data includes data obtained after affine transformation of the plaintext data and the composite input coding. The first input data and the composite affine transformation data are used as inputs for multiple rounds of iterative encryption, and the lookup table is used as a parameter for multiple rounds of iterative encryption to obtain obfuscated ciphertext data. Multiple rounds of iterative encryption can be implemented as white box SM4 iterative encryption. Obfuscated ciphertext data is obfuscated and encrypted data.
[0041] In step S103, the obfuscated ciphertext data is sent to the decryption background system.
[0042] The obfuscated ciphertext data is decrypted by the decryption background system according to the preset output code, the pre-stored target key and the input obfuscated inverse code to obtain the plaintext data. The input obfuscated inverse code includes the inverse code of the input obfuscated code. That is to say, after the decryption background system receives the obfuscated ciphertext data, it can first use the preset output code to perform an affine transformation with the obfuscated ciphertext data to offset the scrambling information introduced by the last round of encryption in multiple rounds of iterative encryption, and then decrypt the obfuscated ciphertext data processed by the output code according to the target key. In some examples, the obfuscated ciphertext data is used to perform an affine transformation with the output code in the decryption background system to obtain the first output data. The first output data is used to decrypt based on the target key to obtain the obfuscated plaintext data. The obfuscated plaintext data is used to perform an affine transformation with the input obfuscated inverse code to obtain the plaintext data. The first output data obtained by the decryption background system using the output code to perform an affine transformation on the obfuscated ciphertext data is the data after the scrambling information introduced by the last round of encryption in multiple rounds of iterative encryption is offset. The target key may include the basic key of the white box encryption algorithm or the round key of the white box encryption algorithm. If the target key includes a basic key, the round key of multiple rounds of iterative encryption can be obtained by expanding the basic key, and the round key can be used to decrypt the obfuscated ciphertext data after the output coding process. If the target key includes a round key, the round key can be directly used to decrypt the obfuscated ciphertext data after the output coding process. After decryption, the data with the obfuscated information of the input obfuscated code is obtained. The decrypted data can be processed using the input obfuscated inverse code to restore the data with the obfuscated information of the input obfuscated code to plaintext data.
[0043] The attacker cannot obtain the input code from the composite input code, and the output code and the input obfuscated inverse code are both in the decryption background system. The security level of the decryption background system is much higher than that of the encryption terminal. It is difficult for the attacker to obtain the output code and the input obfuscated inverse code from the decryption background system. The attacker cannot use the external code as a breakthrough point to crack the obfuscated ciphertext data generated in the embodiment of the present application. Even if the attacker extracts the basic key and round key required for encryption from the lookup table, in the absence of the input code and the output code, the attacker still cannot crack the obfuscated ciphertext data generated in the embodiment of the present application.
[0044] In an embodiment of the present application, the encryption terminal performs multiple rounds of iterative encryption according to the plaintext data, the composite input code, the lookup table and the composite affine transformation data to obtain obfuscated ciphertext data. The composite input code is obtained by performing a composite affine transformation on the input obfuscated code randomly generated by the decryption background system and the input code. The attacker cannot split the input code based on the composite input code. After the decryption background system receives the obfuscated ciphertext data, it can decrypt the obfuscated ciphertext data according to the output code, the target key and the input obfuscated inverse code. The input obfuscated inverse code can offset the obfuscated information introduced by the input obfuscated code, thereby restoring the plaintext data. The output code and the input obfuscated inverse code are both in the decryption background system with higher security, and it is difficult for the attacker to obtain them. In the case where at least one of the input code, the output code and the input obfuscated inverse code cannot be obtained, even if the attacker obtains the basic key and / or round key of the white box cryptographic algorithm, the obfuscated ciphertext data cannot be cracked, thereby improving the security of data protection. Moreover, hiding the input code in the composite input code obtained by the composite affine transformation does not require adding a security chip to the encryption terminal, nor does it require setting up a security isolation zone in the encryption terminal. It has great operability in practical applications and is easier to promote and use.
[0045] In some embodiments, plaintext data may be obtained according to data groups, one data group is one plaintext data, the plaintext data may include multiple plaintext data blocks, and each plaintext data block in one plaintext data corresponds to a composite input code. In some examples, the plaintext data may be 128-bit plaintext data, and each 128-bit plaintext data may include four 32-bit data blocks. The encryption terminal may perform an affine transformation on each composite input code and the corresponding plaintext data block to obtain multiple input data blocks; and combine the multiple input data blocks to obtain the first input data.
[0046] For example, Figure 2 A schematic diagram of an example of obtaining obfuscated ciphertext data provided in an embodiment of the present application, such as Figure 2As shown, the 128-bit plaintext data is X0X1X2X3, including four plaintext data blocks, each of which has 32 bits, and the four plaintext data blocks are plaintext data block X0, plaintext data block X1, plaintext data block X2 and plaintext data block X3, respectively, and the composite input code includes M0, M1, M2 and M3. The composite input code M0 can be calculated based on the input code P0 and the input obfuscation code N0, the composite input code M1 can be calculated based on the input code P1 and the input obfuscation code N1, the composite input code M2 can be calculated based on the input code P2 and the input obfuscation code N2, and the composite input code M3 can be calculated based on the input code P3 and the input obfuscation code N3. The calculation of the composite input code including M0, M1, M2 and M3 can be obtained according to the above formulas (1) to (3). The plaintext data block X0 is affine transformed with the composite input code M0 to obtain the input data block X0", the plaintext data block X1 is affine transformed with the composite input code M1 to obtain the input data block X1", the plaintext data block X2 is affine transformed with the composite input code M2 to obtain the input data block X2", the plaintext data block X3 is affine transformed with the composite input code M3 to obtain the input data block X3", and the four input data blocks are combined to obtain the first input data X0",X1",X2",X3". Input the iterative encryption algorithm module, perform 32 rounds of white box SM4 iterative encryption, and obtain the 128-bit obfuscated ciphertext data X 32 "X 33 "X 34 "X 35 ". Figure 2 The process of obtaining obfuscated ciphertext data is executed in the encryption terminal.
[0047] In some embodiments, the obfuscated ciphertext data may include multiple obfuscated ciphertext data blocks, and each obfuscated ciphertext data block of the obfuscated ciphertext data corresponds to an output code. Each obfuscated ciphertext data block is used to perform an affine transformation with the corresponding output code to obtain multiple output data blocks. The first output data includes multiple output data blocks. The steps of performing an affine transformation on each obfuscated ciphertext data block and the corresponding output code to obtain an output data block, and combining multiple output data blocks to obtain a first output data block can be performed by the decryption background system. An obfuscated ciphertext data and the corresponding output code can obtain an output data block by performing an affine transformation.
[0048] The obfuscated plaintext data may include multiple obfuscated plaintext data blocks, and each obfuscated plaintext data block in an obfuscated plaintext data corresponds to an input obfuscated inverse code. Each obfuscated plaintext data block is used to perform an affine transformation with the corresponding input obfuscated inverse code to obtain a plaintext data block. The plaintext data includes multiple plaintext data blocks. The steps of performing an affine transformation on each obfuscated plaintext data block and the corresponding input obfuscated inverse code to obtain a plaintext data block, and combining the plaintext data blocks to obtain the plaintext data may be performed by the decryption background system. A plaintext data block may be obtained by performing an affine transformation on an obfuscated plaintext data block and the corresponding input obfuscated inverse code.
[0049] For example, Figure 3 A schematic diagram of an example of decrypting obfuscated ciphertext data to obtain plaintext data provided by an embodiment of the present application, such as Figure 3 As shown, the 128-bit obfuscated ciphertext data is X 32 "X 33 "X 34 "X 35 ", may include four obfuscated ciphertext data blocks, each obfuscated ciphertext data block is 32 bits, and the four obfuscated ciphertext data blocks are obfuscated ciphertext data blocks X 32 ", obfuscated ciphertext data block X 33 ", obfuscated ciphertext data block X 34 " and obfuscated ciphertext data block X 35 ". Confused ciphertext data block X 32 " and the corresponding output code P -1 32 Affine transformation to get the output data block X 32 "', obfuscated ciphertext data block X 33 " and the corresponding output code P -1 33 Affine transformation to get the output data block X 33 "', obfuscated ciphertext data block X 34 " and the corresponding output code P -1 34 Affine transformation to get the output data block X 34 "', obfuscated ciphertext data block X 35 " and the corresponding output code P -1 35 Affine transformation to get the output data block X 35 "'. Combine the four output data blocks to obtain the first output data X 32 "'X 33 "'X 34 "'X 35 "'. According to the basic key encrypted by the white box SM4, the first output data X 32 "'X 33 "'X 34 "'X35 "'Decryption, get 128 bits of obfuscated plaintext data X0'X1'X2'X3' with obfuscated information. The obfuscated plaintext data X0'X1'X2'X3' includes four obfuscated plaintext data blocks, namely obfuscated plaintext data block X0', obfuscated plaintext data block X1', obfuscated plaintext data block X2' and obfuscated plaintext data block X3'. The obfuscated plaintext data block X0' is inversely encoded with the input obfuscated inverse code N -1 0 affine transformation to obtain the plaintext data block X0, the obfuscated plaintext data block X1' and the input obfuscated inverse code N -1 1 Affine transformation to obtain plaintext data block X1, obfuscated plaintext data block X2' and input obfuscated inverse code N -1 2 Affine transformation to obtain plaintext data block X2, obfuscated plaintext data block X3' and input obfuscated inverse code N -1 3 Affine transformation is performed to obtain the plaintext data block X3. The four plaintext data blocks are combined and restored to obtain the 128-bit plaintext data X0X1X2X3. Figure 3 The process of decrypting obfuscated ciphertext data to obtain plaintext data is executed in a decryption background system.
[0050] The second aspect of the present application provides a white box symmetric decryption method, which can be applied to a decryption background system, that is, the white box symmetric decryption method can be executed by the decryption background system. The white box symmetric decryption algorithm in the embodiment of the present application can be implemented as a white box SM4 cryptographic algorithm. Figure 4 A flowchart of a white box symmetric decryption method provided by an embodiment of the present application is shown in FIG. Figure 4 As shown, the white-box symmetric decryption method may include step S201 and step S202.
[0051] In step S201, obfuscated ciphertext data sent by an encryption terminal is received.
[0052] The obfuscated ciphertext data is obtained by multiple rounds of iterative encryption based on the plaintext data, the composite input code, the lookup table, and the composite affine transformation data issued by the decryption background system. The composite input code is obtained by composite affine transformation of the input obfuscated code randomly generated by the decryption background system and the preset input code.
[0053] In step S202, the obfuscated ciphertext data is decrypted according to the preset output code, the pre-stored target key and the input obfuscation inverse code to obtain the plaintext data.
[0054] The input obfuscated inverse code includes an inverse code of the input obfuscated code.
[0055] In some embodiments, the above step S202 can be specifically refined as follows: performing an affine transformation on the obfuscated ciphertext data and the output code to obtain first output data; decrypting the first output data based on the target key to obtain obfuscated plaintext data; performing an affine transformation on the obfuscated plaintext data and the input obfuscated inverse code to obtain plaintext data.
[0056] In some examples, the obfuscated ciphertext data includes multiple obfuscated ciphertext data blocks, and each obfuscated ciphertext data block of the obfuscated ciphertext data corresponds to an output code. The step of performing an affine transformation on the obfuscated ciphertext data and the output code to obtain the first output data can be specifically refined as follows: performing an affine transformation on each obfuscated ciphertext data block and the corresponding output code to obtain multiple output data blocks; and combining the multiple output data blocks to obtain the first output data.
[0057] In some examples, the obfuscated plaintext data includes multiple obfuscated plaintext data blocks, and each obfuscated plaintext data block in an obfuscated plaintext data corresponds to an input obfuscated inverse code. The above step of performing an affine transformation on the obfuscated plaintext data and the input obfuscated inverse code to obtain the plaintext data can be specifically refined as follows: performing an affine transformation on each obfuscated plaintext data block and the corresponding input obfuscated inverse code to obtain multiple plaintext data blocks; and combining multiple plaintext data blocks to obtain the plaintext data.
[0058] In some embodiments, before receiving the obfuscated ciphertext data sent by the encryption terminal, the decryption background system may also send the composite input code, the lookup table and the composite affine transformation data to the encryption terminal.
[0059] In some embodiments, the obfuscated ciphertext data is obtained by performing multiple rounds of iterative encryption based on the first input data, the lookup table and the composite affine transformation data. The first input data is obtained by performing affine transformation on the composite input code and the plaintext data.
[0060] The plaintext data includes a plurality of plaintext data blocks, and each plaintext data block of a plaintext data corresponds to a composite input code. Each plaintext data block is used to perform an affine transformation with the corresponding composite input code to obtain a plurality of input data blocks. The first input data includes a plurality of input data blocks.
[0061] It should be noted that the white-box symmetric decryption method is a decryption method corresponding to the above-mentioned white-box symmetric encryption method. All implementation methods in the above-mentioned white-box symmetric encryption method embodiment are applicable to the white-box symmetric decryption method embodiment, and can achieve the same technical effect, which will not be repeated here.
[0062] Through the white-box symmetric encryption method and the white-box symmetric decryption method, the composite affine transformation is used to protect the input code, and the decryption background system is used to protect the output code to improve the security of the external code, thereby improving the overall security of white-box cryptographic algorithms such as the white-box SM4 algorithm. In the white-box symmetric decryption process, the decryption background system eliminates the scrambling information introduced into the obfuscated ciphertext data through the output code and the input obfuscated inverse code, realizing a complete white-box symmetric encryption and decryption process.
[0063] A third aspect of the present application provides a white-box symmetric encryption device. Figure 5 A schematic diagram of the structure of a white box symmetric encryption device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the white-box symmetric encryption device 300 may include a data acquisition module 301 , a white-box encryption module 302 and a sending module 303 .
[0064] The data acquisition module 301 can be used to acquire plaintext data.
[0065] The white box encryption module 302 can be used to perform multiple rounds of iterative encryption based on the plaintext data, the composite input code, the lookup table and the composite affine transformation data issued by the decryption background system to obtain obfuscated ciphertext data. The composite input code is obtained by performing a composite affine transformation on the input obfuscated code randomly generated by the decryption background system and the preset input code.
[0066] The sending module 303 can be used to send obfuscated ciphertext data to the decryption background system. The obfuscated ciphertext data is decrypted by the decryption background system according to the preset output code, the pre-stored target key and the input obfuscated inverse code to obtain the plaintext data. The input obfuscated inverse code includes the inverse code of the input obfuscated code.
[0067] In some embodiments, the white box encryption module 302 can be specifically used to: perform affine transformation on the composite input code and plain text data to obtain first input data; perform multiple rounds of iterative encryption using the first input data, the lookup table and the composite affine transformation data to obtain obfuscated ciphertext data.
[0068] In some examples, the plaintext data includes multiple plaintext data blocks, and each plaintext data block of the plaintext data corresponds to a composite input code. The white box encryption module 302 can be specifically used to: perform affine transformation on each composite input code and the corresponding plaintext data block to obtain multiple input data blocks; and combine the multiple input data blocks to obtain the first input data.
[0069] In some embodiments, the white-box symmetric encryption device 300 may further include a receiving module. The receiving module may be used to receive the composite input code, the lookup table and the composite affine transformation data sent by the decryption background system before obtaining the plaintext data.
[0070] In some embodiments, the obfuscated ciphertext data is used to perform an affine transformation with the output code in the decryption background system to obtain the first output data. The first output data is used to decrypt based on the target key to obtain the obfuscated plaintext data. The obfuscated plaintext data is used to perform an affine transformation with the input obfuscated inverse code to obtain the plaintext data.
[0071] In some examples, the obfuscated ciphertext data includes a plurality of obfuscated ciphertext data blocks, and each obfuscated ciphertext data block of the obfuscated ciphertext data corresponds to an output code. Each obfuscated ciphertext data block is used to perform an affine transformation with the corresponding output code to obtain a plurality of output data blocks. The first output data includes a plurality of output data blocks.
[0072] The obfuscated plaintext data includes a plurality of obfuscated plaintext data blocks, and each obfuscated plaintext data block in the obfuscated plaintext data corresponds to an input obfuscated inverse code. Each obfuscated plaintext data block is used to perform an affine transformation with the corresponding input obfuscated inverse code to obtain a plaintext data block. The plaintext data includes a plurality of plaintext data blocks.
[0073] It should be noted that the white-box symmetric encryption device 300 is a device corresponding to the above-mentioned white-box symmetric encryption method. All implementation methods in the above-mentioned method embodiments are applicable to the embodiments of the device and can achieve the same technical effects, which will not be repeated here.
[0074] A fourth aspect of the present application provides a white-box symmetric decryption device. Figure 6 A schematic diagram of the structure of a white box symmetric decryption device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the white-box symmetric decryption device 400 may include a receiving module 401 and a white-box decryption module 402 .
[0075] The receiving module 401 can be used to receive obfuscated ciphertext data sent by the encryption terminal. The obfuscated ciphertext data is obtained by performing multiple rounds of iterative encryption based on the plaintext data, the composite input code, the lookup table and the composite affine transformation data issued by the white-box symmetric decryption device. The composite input code is obtained by performing a composite affine transformation on the input obfuscated code randomly generated by the white-box symmetric decryption device and the preset input code.
[0076] The white box decryption module 402 can be used to decrypt the obfuscated ciphertext data according to the preset output code, the pre-stored target key and the input obfuscated inverse code to obtain the plaintext data. The input obfuscated inverse code includes the inverse code of the input obfuscated code.
[0077] In some embodiments, the white box decryption module 402 can be specifically used to: perform an affine transformation based on the obfuscated ciphertext data and the output code to obtain first output data; decrypt the first output data based on the target key to obtain obfuscated plaintext data; perform an affine transformation based on the obfuscated plaintext data and the input obfuscated inverse code to obtain plaintext data.
[0078] In some examples, the obfuscated ciphertext data includes multiple obfuscated ciphertext data blocks, and each obfuscated ciphertext data block of the obfuscated ciphertext data corresponds to an output code. The white box decryption module 402 can be specifically used to: perform affine transformation on each obfuscated ciphertext data block and the corresponding output code to obtain multiple output data blocks; and combine the multiple output data blocks to obtain the first output data.
[0079] In some examples, the obfuscated plaintext data includes multiple obfuscated plaintext data blocks, and each obfuscated plaintext data block in an obfuscated plaintext data corresponds to an input obfuscated inverse code. The white box decryption module 402 can be specifically used to: perform an affine transformation on each obfuscated plaintext data block and the corresponding input obfuscated inverse code to obtain multiple plaintext data blocks; and combine multiple plaintext data blocks to obtain plaintext data.
[0080] In some embodiments, the white-box symmetric decryption apparatus 400 may further include a sending module. The sending module may be used to send the composite input code, the lookup table and the composite affine transformation data to the encryption terminal before receiving the obfuscated ciphertext data sent by the encryption terminal.
[0081] In some embodiments, the obfuscated ciphertext data is obtained by performing multiple rounds of iterative encryption based on the first input data, the lookup table and the composite affine transformation data. The first input data is obtained by performing affine transformation on the composite input code and the plaintext data.
[0082] The plaintext data includes a plurality of plaintext data blocks, and each plaintext data block of a plaintext data corresponds to a composite input code. Each plaintext data block is used to perform an affine transformation with the corresponding composite input code to obtain a plurality of input data blocks. The first input data includes a plurality of input data blocks.
[0083] It should be noted that the white-box symmetric decryption device 400 is a device corresponding to the above-mentioned white-box symmetric decryption method. All implementation methods in the above-mentioned method embodiments are applicable to the embodiments of the device and can achieve the same technical effects, which will not be repeated here.
[0084] A fifth aspect of the present application provides an electronic device. Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the electronic device 500 includes a memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .
[0085] In some examples, the processor 502 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0086] The memory 501 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it can be operated to perform the operations described with reference to the method for white-box symmetric encryption in the first embodiment of the present application or the operations described with reference to the method for white-box symmetric decryption in the second embodiment.
[0087] The processor 502 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 501, so as to implement the white-box symmetric encryption method in the first aspect embodiment or the white-box symmetric decryption method in the second aspect embodiment.
[0088] In some examples, the electronic device 500 may further include a communication interface 503 and a bus 504. Figure 7 As shown, the memory 501, the processor 502, and the communication interface 503 are connected via a bus 504 and communicate with each other.
[0089] The communication interface 503 is mainly used to realize the communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication interface 503 can also be used to access input devices and / or output devices.
[0090] The bus 504 includes hardware, software, or both, coupling the components of the electronic device 500 to each other. By way of example and not limitation, the bus 504 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 504 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0091] A sixth aspect of the present application provides a white-box symmetric encryption and decryption system. Figure 8 A schematic diagram of the architecture of a white-box symmetric encryption and decryption system provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the white-box symmetric encryption and decryption system may include an encryption terminal 61 and a decryption background system 62 , and the encryption terminal 61 is communicatively connected with the decryption background system 62 .
[0092] The encryption terminal 61 is used to execute the white box symmetric encryption method in the above-mentioned first aspect embodiment. For details, please refer to the relevant descriptions in the above-mentioned embodiments, and the same technical effects can be achieved. To avoid repetition, it is not repeated here. The encryption terminal 61 may include but is not limited to mobile phones, desktop computers, laptops, smart watches, smart bracelets, electronic paper and other devices.
[0093] The decryption background system 62 is used to execute the method of white-box symmetric decryption in the above-mentioned second aspect embodiment. For details, please refer to the relevant descriptions in the above-mentioned embodiments, and the same technical effects can be achieved. To avoid repetition, it is not repeated here. The decryption background system 62 may include one or more than two devices. The devices in the decryption background system 62 may be implemented as servers or other devices. The type and number of devices in the decryption background system 62 are not limited here.
[0094] The seventh aspect of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by the processor, the white-box symmetric encryption method in the first aspect embodiment or the white-box symmetric decryption method in the second aspect embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. Among them, the above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a disk or an optical disk, etc., which is not limited here.
[0095] In an eighth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the white-box symmetric encryption method in the first aspect embodiment or the white-box symmetric decryption method in the second aspect embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0096] It should be clear that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For device embodiments, equipment embodiments, system embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can refer to the description part of the method embodiment. The present application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application. In addition, for the sake of brevity, a detailed description of known method technologies is omitted here.
[0097] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0098] Those skilled in the art should understand that the above embodiments are exemplary rather than restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on the study of the drawings, the specification and the claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other devices or steps; the quantifier "one" does not exclude multiple; the terms "first" and "second" are used to indicate names rather than to indicate any specific order. Any figure marks in the claims should not be understood as limiting the scope of protection. The functions of multiple parts appearing in the claims can be implemented by a single hardware or software module. The appearance of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A white-box symmetric encryption method, It is characterized in that Applied to an encryption terminal, the method comprises: Get plaintext data; According to the plaintext data, and the composite input code, lookup table and composite affine transformation data issued by the decryption background system, multiple rounds of iterative encryption are performed to obtain obfuscated ciphertext data, wherein the composite input code is obtained by composite affine transformation of the input obfuscated code randomly generated by the decryption background system and the preset input code; The obfuscated ciphertext data is sent to the decryption background system, wherein the obfuscated ciphertext data is decrypted by the decryption background system according to a preset output code, a pre-stored target key and an input obfuscated inverse code to obtain the plaintext data, and the input obfuscated inverse code includes an inverse code of the input obfuscated code.
2. The method according to claim 1, It is characterized in that The method of performing multiple rounds of iterative encryption based on the plaintext data, the composite input code, the lookup table and the composite affine transformation data issued by the decryption background system to obtain obfuscated ciphertext data includes: Performing an affine transformation on the composite input code and the plaintext data to obtain first input data; Using the first input data, the lookup table and the composite affine transformation data, multiple rounds of iterative encryption are performed to obtain obfuscated ciphertext data.
3. The method according to claim 2, It is characterized in that The plaintext data includes a plurality of plaintext data blocks, and each plaintext data block of the plaintext data corresponds to one of the composite input codes; The step of performing an affine transformation on the composite input code and the plaintext data to obtain first input data includes: Performing affine transformation on each of the composite input codes and the corresponding plaintext data block to obtain multiple input data blocks; A plurality of the input data blocks are combined to obtain the first input data.
4. The method according to claim 1, It is characterized in that Before obtaining the plaintext data, the method further includes: Receive the composite input code, the lookup table and the composite affine transformation data sent by the decryption background system.
5. The method according to claim 1, It is characterized in that The obfuscated ciphertext data is used to perform an affine transformation with the output code in the decryption background system to obtain first output data; the first output data is used to perform decryption based on the target key to obtain obfuscated plaintext data; the obfuscated plaintext data is used to perform an affine transformation with the input obfuscated inverse code to obtain the plaintext data.
6. The method according to claim 5, It is characterized in that The obfuscated ciphertext data includes a plurality of obfuscated ciphertext data blocks, each obfuscated ciphertext data block of the obfuscated ciphertext data corresponds to an output code, and each obfuscated ciphertext data block is used to perform an affine transformation with the corresponding output code to obtain a plurality of output data blocks; The first output data includes a plurality of output data blocks; The obfuscated plaintext data includes multiple obfuscated plaintext data blocks, each obfuscated plaintext data block in the obfuscated plaintext data corresponds to an input obfuscated inverse code, and each obfuscated plaintext data block is used to perform affine transformation with the corresponding input obfuscated inverse code to obtain a plaintext data block; the plaintext data includes multiple plaintext data blocks.
7. A method for white-box symmetric decryption, It is characterized in that Applied to the decryption background system, the method includes: Receiving obfuscated ciphertext data sent by the encryption terminal, the obfuscated ciphertext data is obtained by performing multiple rounds of iterative encryption according to the plaintext data, and the composite input code, the lookup table and the composite affine transformation data issued by the decryption background system, the composite input code is obtained by performing a composite affine transformation on the input obfuscated code randomly generated by the decryption background system and the preset input code; The obfuscated ciphertext data is decrypted according to a preset output code, a pre-stored target key and an input obfuscated inverse code to obtain the plaintext data, wherein the input obfuscated inverse code includes an inverse code of the input obfuscated code.
8. The method according to claim 7, It is characterized in that The decrypting the obfuscated ciphertext data according to the preset output code, the pre-stored target key and the input obfuscated inverse code to obtain the plaintext data includes: Performing an affine transformation on the obfuscated ciphertext data and the output code to obtain first output data; Decrypting the first output data based on the target key to obtain obfuscated plaintext data; The plaintext data is obtained by performing an affine transformation on the obfuscated plaintext data and the input obfuscated inverse code.
9. The method according to claim 8, It is characterized in that The obfuscated ciphertext data includes a plurality of obfuscated ciphertext data blocks, and each obfuscated ciphertext data block of the obfuscated ciphertext data corresponds to one output code; The step of performing an affine transformation on the obfuscated ciphertext data and the output code to obtain first output data includes: Performing affine transformation on each obfuscated ciphertext data block and the corresponding output code to obtain multiple output data blocks; A plurality of the output data blocks are combined to obtain the first output data.
10. The method according to claim 8, It is characterized in that The obfuscated plaintext data includes a plurality of obfuscated plaintext data blocks, and each obfuscated plaintext data block in the obfuscated plaintext data corresponds to one input obfuscated inverse code; The step of performing an affine transformation on the obfuscated plaintext data and the input obfuscated inverse code to obtain the plaintext data includes: Performing an affine transformation on each obfuscated plaintext data block and the corresponding input obfuscated inverse code to obtain a plurality of plaintext data blocks; Combine multiple plaintext data blocks to obtain the plaintext data.
11. The method according to claim 7, It is characterized in that Before receiving the obfuscated ciphertext data sent by the encryption terminal, the method further includes: The composite input code, the lookup table and the composite affine transformation data are sent to the encryption terminal.
12. The method according to claim 7, It is characterized in that The obfuscated ciphertext data is obtained by performing multiple rounds of iterative encryption according to the first input data, the lookup table and the composite affine transformation data, and the first input data is obtained by performing affine transformation on the plaintext data according to the composite input code; The plaintext data includes a plurality of plaintext data blocks, and each plaintext data block of the plaintext data corresponds to one of the composite input codes; Each of the plaintext data blocks is used to perform an affine transformation with the corresponding composite input code to obtain a plurality of input data blocks; The first input data includes a plurality of input data blocks.
13. A white box symmetric encryption device, It is characterized in that include: A data acquisition module, used to acquire plaintext data; A white box encryption module is used to perform multiple rounds of iterative encryption according to the plaintext data, and the composite input code, lookup table and composite affine transformation data issued by the decryption background system to obtain obfuscated ciphertext data, wherein the composite input code is obtained by performing a composite affine transformation on the input obfuscated code randomly generated by the decryption background system and the preset input code; A sending module is used to send the obfuscated ciphertext data to the decryption background system, wherein the obfuscated ciphertext data is decrypted by the decryption background system according to a preset output code, a pre-stored target key and an input obfuscated inverse code to obtain the plaintext data, and the input obfuscated inverse code includes an inverse code of the input obfuscated code.
14. A white box symmetric decryption device, It is characterized in that include: A receiving module, used for receiving obfuscated ciphertext data sent by an encryption terminal, wherein the obfuscated ciphertext data is obtained by performing multiple rounds of iterative encryption according to plaintext data, and a composite input code, a lookup table, and a composite affine transformation data issued by the white-box symmetric decryption device, wherein the composite input code is obtained by performing a composite affine transformation on an input obfuscated code randomly generated by the white-box symmetric decryption device and a preset input code; The white box decryption module is used to decrypt the obfuscated ciphertext data according to a preset output code, a pre-stored target key and an input obfuscated inverse code to obtain the plaintext data, wherein the input obfuscated inverse code includes an inverse code of the input obfuscated code.
15. An electronic device, It is characterized in that include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the white-box symmetric encryption method according to any one of claims 1 to 6 or the white-box symmetric decryption method according to any one of claims 7 to 12 is implemented.
16. A white-box symmetric encryption and decryption system. It is characterized in that include: An encryption terminal, used to execute the white box symmetric encryption method as claimed in any one of claims 1 to 6; A decryption background system is communicatively connected to the encryption terminal and is used to execute the white box symmetric decryption method as described in any one of claims 7 to 12.
17. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the white-box symmetric encryption method as described in any one of claims 1 to 6 or the white-box symmetric decryption method as described in any one of claims 7 to 12.
18. A computer program product, It is characterized in that The invention comprises a computer program, which, when executed by a processor, implements the white-box symmetric encryption method according to any one of claims 1 to 6 or the white-box symmetric decryption method according to any one of claims 7 to 12.
Citation Information
Patent Citations
White-box password nonlinear coding protection method based on combination of table look-up and disturbance scrambling
CN105656622A
Symmetric white box encryption method with unfixed key and apparatus
CN106411518A
Password authentication using white-box
EP3627763A1
Device and method for encrypting or decrypting data
KR1020160026313A
White-box encryption method for prevention of fault injection attack and apparatus therefor
US20210152326A1
