Safe and efficient encryption method and system for multi-mode mass data
By binding KDF blocks and HASH blocks into atomic execution units for parallel computation, the technical problem of improving the efficiency of SM2 in multimodal massive data processing is solved, and the encryption efficiency is improved without changing the security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-10
AI Technical Summary
When dealing with massive multimodal data, existing technologies have limited room for improvement in the efficiency of SM2 encryption. In particular, due to the limitations of the underlying computational characteristics of elliptic curve cryptography, it is difficult to improve performance while maintaining the correctness and security of the execution results.
By binding KDF block computation and HASH block processing into atomic execution units, parallel computation is achieved using SIMD instructions. A dynamic task binding scheduler is designed to schedule execution across components in parallel, thereby improving encryption efficiency.
Without altering the security and functional execution results of SM2, it significantly improves the encryption efficiency of multimodal massive data, especially when processing large amounts of data.
Smart Images

Figure CN121644074A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a secure and efficient encryption method and system for multimodal massive data. Background Technology
[0002] Elliptic Curve Cryptography (ECC), as a core pillar of modern public-key cryptography, occupies an irreplaceable strategic position in the global information security field. Its security stems from the computational complexity of the Elliptic Curve Discrete Logarithm Problem (ECDLP), which, under classical computational models, has been proven to have sub-exponential solution difficulty, providing a solid foundation for cryptographic security.
[0003] SM2, a national cryptographic elliptic curve public-key algorithm independently designed in my country, references the ECC architecture and strictly adheres to the GB / T 32918-2016 standard in its encryption process. It achieves end-to-end security through the collaborative use of elliptic curve point operations, symmetric encryption, and hash verification. Currently, national cryptographic algorithms have been widely adopted in various scenarios, particularly suited to the autonomous production needs of the industrial manufacturing sector. However, due to limitations in the underlying computational characteristics of ECC, there is still room for improvement in the encryption efficiency of SM2 when processing massive amounts of multimodal data.
[0004] Current industry optimization techniques for SM2 efficiency primarily focus on five areas: hardware instruction optimization, cryptographic library improvements, data structure innovation, distributed protocol design, and functional integration design. For example, invention patent CN202210846869.2 uses SIMD instructions to achieve message expansion and data rearrangement, improving overall algorithm efficiency through instruction-level parallelism and process simplification; invention patent CN117908835B optimizes large integer splitting using floating-point calculations, reducing the number of representation words and multiplication / addition operations to lower underlying computational complexity; related academic research accelerates core operations at the cryptographic library layer through curve specialization and parallel computing, and adapts to scenario requirements at the protocol functional layer through distributed design and functional integration. However, these technologies offer limited improvement for encrypting multimodal massive data using SM2. Therefore, a method to improve encryption performance while maintaining the correctness and security of execution results is needed. Summary of the Invention
[0005] This invention overcomes the shortcomings of existing technologies in encrypting multimodal massive data, and provides a secure and efficient encryption method and device for multimodal massive data, in order to solve the problems existing in the prior art.
[0006] To address the aforementioned technical problems, this invention provides a secure and efficient encryption method for multimodal massive data:
[0007] A secure and efficient encryption method for multimodal massive data includes the following steps:
[0008] Random number generation, selecting a cryptographically secure random number k;
[0009] Calculate the elliptic curve point C1=[k]G, where C1 is a temporary public key, which needs to be converted into a bit string and verified that it is not an infinite point;
[0010] Derive the key points, calculate the key point (x2, y2) = [k] PB, and convert the coordinates of this point into a bit string;
[0011] The execution unit is bound together with the KDF block computation and the HASH block processing to form the atomic execution unit TASK of the task;
[0012] The dynamic task binding scheduler calls the SIMD instruction set to perform parallel computation on the bound atomic execution unit TASK.
[0013] Plaintext obfuscation involves performing a bitwise XOR operation C2 = M ⊕ t on the input plaintext M to encrypt the stream.
[0014] Ciphertext synthesis, output ciphertext.
[0015] The technical principle of this invention is to improve encryption efficiency without changing the execution result of multimodal massive data by binding KDF block calculation and HASH block processing into atomic execution units and using SIMD instructions to achieve parallel execution of the HASH block processing function (HASH-CF).
[0016] A further technical solution is to calculate the elliptic curve point C1=[k]G, and then perform the following steps:
[0017] Verify the validity of the public key of the receiving user B, and calculate S = [h]PB;
[0018] If S is a point at infinity, it indicates that the public key is invalid, and the process terminates.
[0019] In the parameters recommended by the standard, the cofactor h = 1;
[0020] If S is not at infinity, proceed with the next steps.
[0021] A further technical solution is that the binding execution unit specifically includes the following steps:
[0022] The dynamic task binding scheduler binds two KDF block computations with one HASH block processing to form the atomic execution unit TASK of a task.
[0023] A further technical solution is that the parallel computation of the TASK specifically includes the following steps: KDF block computation computes the shared key, and generates a key stream t = KDF(x2 || y2, klen) of the same length as the plaintext through KDF;
[0024] KDF constructs an iterative counter mode based on the SM3 algorithm. If the output t is all zero, the random number k in step A1 needs to be reselected to avoid weak keys.
[0025] HASH block processing performs integrity authentication, calculating the integrity label C3 = SM3(x2 || M || y2). SM3, a hash that binds messages and coordinates, provides tamper resistance to the ciphertext.
[0026] A further technical solution is that the SIMD instruction set includes SSE, AVX2, and AVX512.
[0027] A further technical solution involves performing parallel computation on the bound atomic execution unit TASK and then executing the following steps:
[0028] Continue executing the CF function to process the remaining message blocks in the integrity label C3;
[0029] Another aspect of the present invention provides a secure and efficient encryption system for multimodal massive data.
[0030] A secure and efficient encryption system for multimodal massive data includes a plaintext input module, an efficient encryption module, and a ciphertext output module.
[0031] The plaintext input module is used to input massive amounts of multimodal data that need to be encrypted;
[0032] The high-efficiency encryption module is used to perform the secure and efficient encryption method described above on the input multimodal massive data;
[0033] The ciphertext output module refers to the module used to output the encrypted content. Compared with the prior art, the present invention has at least the following beneficial effects: This application deconstructs the inherent relationship between KDF and HASH, and by proposing a computational flow fusion technology, it overcomes the computational isomorphism between the counter block processing of KDF and the message block partitioning of HASH. The core lies in designing a dynamic task binding scheduler, which can dynamically bind KDF and HASH tasks in A5 and A7 in a 2:1 ratio, and schedule them for parallel execution across components. Without changing the original security and functional execution results of SM2, it can effectively improve encryption efficiency. The larger the amount of data to be encrypted, the more obvious the effect. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the standard encryption process for SM2;
[0035] Figure 2 This is a schematic diagram of the information processing and module architecture of Example 1. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0037] Before explaining the embodiments, the full names and Chinese translations of the abbreviations used in the embodiments will be explained.
[0038] Explanation of abbreviations:
[0039] SIMD (Single Instruction, Multiple Data): Single Instruction Multiple Data Stream;
[0040] SSE (Streaming SIMD Extensions): Streaming SIMD extensions;
[0041] KDF (Key Derivation Function): Key derivation function;
[0042] HASHSecure Hash Algorithm 3): Secure hash algorithm 3 (the hash function in SM2 is specified as SM3);
[0043] CF (Component Function): Block processing function in the HASH algorithm (including EXT and COMP);
[0044] EXT (Message Extension function): Message extension function (one of the computational units that make up CF);
[0045] COMP (Compression function): Compression function (one of the computational units that make up CF);
[0046] Block processing (the basic unit in the computation process);
[0047] Example 1
[0048] A secure and efficient encryption method for multimodal massive data, see [link to relevant documentation]. Figure 1 , Figure 2 This includes the following steps:
[0049] Step 1 (i.e., standard encryption procedure A1): Random number generation, selecting a cryptographically secure random number k;
[0050] Step 2 (i.e., standard encryption procedure A2): Calculate the elliptic curve point C1 = [k]G. Here, C1 serves as a temporary public key, which needs to be converted into a bit string and verified to be not at infinity.
[0051] Step 3 (i.e., standard encryption procedure A3): Verify the validity of the public key of the receiving user B, and calculate S = [h]PB. If S is at infinity, it indicates that the public key is invalid, and the procedure terminates.
[0052] In the parameters recommended by the standard, the cofactor h = 1;
[0053] If S is not at infinity, proceed with the next steps.
[0054] Step 4 (i.e., standard encryption process A4): Derive the key point, calculate the key point (x2, y2) = [k] PB, and convert the coordinates of this point into a bit string;
[0055] Step 5 (refer to the standard encryption process A5+A7): Use the dynamic task binding scheduler to bind the calculation of the two KDF blocks in A5 with the processing of the one HASH block in A7 to form the atomic execution unit TASK of the task.
[0056] It is understandable that the ratio of KDF block calculation to HASH block processing can be selected according to the actual situation. In this embodiment, the KDF block calculation in A5 and the HASH block processing in A7 are bound together in a 2:1 ratio.
[0057] The parallel computation of the TASK specifically includes the following steps:
[0058] KDF block computation computes the shared key, generating a key stream t = KDF(x2 || y2,klen) of the same length as the plaintext;
[0059] KDF constructs an iterative counter mode based on the SM3 algorithm. If the output t is all zero, the random number k in step A1 needs to be reselected to avoid weak keys.
[0060] HASH block processing performs integrity authentication, calculating the integrity label C3 = SM3(x2 || M || y2). SM3, a hash that binds messages and coordinates, provides tamper resistance to the ciphertext.
[0061] Step 6 (SIMD): The dynamic task binding scheduler calls the SIMD instruction set to perform parallel computation on the bound atomic execution unit TASK;
[0062] It should be noted that the SIMD instruction set includes, but is not limited to, SSE, AVX2, and AVX512;
[0063] By designing a dynamic task binding scheduler, the KDF block computation in A5 and the HASH block processing in A7 are bound together in a 2:1 ratio. This task is then scheduled for parallel computation across components (at the A5 and A7 component levels). Without altering the original security and functional execution results of SM2, this effectively improves encryption efficiency; the larger the amount of data to be encrypted, the more significant the effect.
[0064] Step 7: After step 6 is completed, continue executing the CF function to process the remaining message blocks in C3;
[0065] Step 8 (i.e., standard encryption procedure A6): Plaintext obfuscation, perform bitwise XOR C2 = M ⊕t on the input plaintext M to perform stream encryption;
[0066] Step 9 (i.e., standard encryption process A8): Ciphertext synthesis, output ciphertext;
[0067] For example, the ciphertext C = C1 || C3 || C2.
[0068] Example 2
[0069] A secure and efficient encryption system for multimodal massive data includes a plaintext input module, an efficient encryption module, and a ciphertext output module.
[0070] The plaintext input module is used to input massive amounts of multimodal data that need to be encrypted;
[0071] The high-efficiency encryption module is used to perform the secure and efficient encryption method described above on the input multimodal massive data;
[0072] The ciphertext output module is used to output the encrypted content.
[0073] Although the invention has been described herein with reference to illustrative embodiments, it should be understood that many other modifications and implementations can be devised by those skilled in the art, which will fall within the scope and spirit of the principles disclosed herein. More specifically, various variations and modifications can be made to the components and / or layout of the subject matter combination within the scope of this disclosure. Besides variations and modifications to the components and / or layout, other uses will be apparent to those skilled in the art.
Claims
1. A secure and efficient encryption method for multi-modal mass data, characterized in that, The method comprises the following steps: Random number generation, selecting a cryptographically secure random number k; Calculate the elliptic curve point C1=[k]G, where C1 is used as a temporary public key, which needs to be converted into a bit string and verified as a non-infinite point; Derive the key point, calculate the key point (x2, y2) = [k] PB, and convert the point coordinates into a bit string; Binding execution unit, binding KDF block calculation and HASH block processing to form an atomic execution unit TASK of the task; Dynamic task binding scheduler calls the SIMD instruction set to perform parallel calculation on the bound atomic execution unit TASK; Plaintext confusion, perform bitwise XOR C2 = M ⊕ t on the input plaintext M for stream encryption; Cipher synthesis, output the ciphertext.
2. The method as claimed in claim 1, wherein, The calculation of the elliptic curve point C1=[k]G is followed by the following steps: Verify the validity of the public key of the accepting user B, calculate S=[h]PB; If S is an infinite point, it indicates that the public key is illegal, and the process terminates; In the standard recommended parameters, the cofactor h = 1; If S is not an infinite point, then perform the subsequent steps.
3. The method as claimed in claim 1, wherein, The binding execution unit specifically comprises the following steps: The dynamic task binding scheduler binds 2 KDF block calculations and 1 HASH block processing to form an atomic execution unit TASK of the task.
4. The method as claimed in claim 3, wherein, The TASK performs parallel calculation, which specifically comprises the following steps: KDF block calculation calculates the shared key, and generates a keystream t = KDF(x2 || y2,klen) equal in length to the plaintext through KDF; KDF constructs an iterative counter mode based on the SM3 algorithm, and if the output t is all zeros, the random number k in step A1 needs to be reselected to avoid weak keys; HASH block processing performs integrity authentication, and calculates an integrity label C3= SM3(x2 || M || y2), which binds the message and coordinates through SM3 and provides tamper resistance for the ciphertext.
5. The method as claimed in claim 1, wherein, The SIMD instruction set includes SSE, AVX2, and AVX512.
6. The method as claimed in claim 1, wherein, After the parallel calculation of the bound atomic execution unit TASK, the following steps are performed: Continue to execute the CF function to process the remaining message blocks in C3.
7. A secure and efficient encryption system for multi-modal mass data characterized in that, It comprises a plaintext input module, an efficient encryption module, and a ciphertext output module; The plaintext input module is used to input the multi-modal massive data that needs to be encrypted; The efficient encryption module is used to execute the secure and efficient encryption method as claimed in claims 1-6 on the input multi-modal massive data; The ciphertext output module is used to output the encrypted content.
Citation Information
Patent Citations
SM2 encryption and decryption rapid implementation method based on SIMD
CN115174038A
A method to accelerate the SM2 national encryption algorithm based on floating point computing capability
CN117908835B