Data encryption method and device, equipment, storage medium and product

By dividing the data into sub -blocks and encryption, combined with the decomposition and expansion of ciphertext, the problem of quantum computers cracking traditional encryption methods was solved, and efficient data encryption and computing efficiency were achieved.

CN119383001APending Publication Date: 2025-01-28CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411633976.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The development of quantum computers has led to the cracking of traditional encryption methods in a very short time, resulting in technical problems in the leakage of users' personal data.

Method used

By dividing the data into multiple sub -blocks, encrypting each sub -block, the initial ciphertext is obtained, and the ciphertext is directly decomposed into two parts to expand the operation alone to generate a ciphertext that meets the conditions of the same state.

Benefits of technology

Reduce the mathematical operations during the encryption process, reduce the random interference of traditional encryption methods, improve the computing efficiency of cloud computing, and effectively block quantum computing attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383001A_ABST
    Figure CN119383001A_ABST
Patent Text Reader

Abstract

The invention discloses a data encryption method and device, equipment, a storage medium and a product, and relates to the technical field of data security, and the method comprises the steps: obtaining a private key and a data plaintext; the data plaintext is divided into a plurality of sub-blocks, each sub-block is encrypted according to the private key to obtain an initial ciphertext, and the initial ciphertext comprises a first ciphertext part and a second ciphertext part; respectively expanding the first part of the ciphertext and the second part of the ciphertext to obtain an expanded ciphertext; according to the method, the plaintext is divided into the plurality of sub-blocks, each sub-block is encrypted to obtain the ciphertext, and the ciphertext is directly decomposed into two parts for independent expansion operation, so that a result which is the same as that of overall expansion can be obtained, the ciphertext meeting homomorphic operation conditions can be directly generated, mathematical operation in the encryption process is reduced, and the encryption efficiency is improved. The random interference of a traditional encryption method is reduced, the computing efficiency of cloud computing is improved, and quantum computing attacks can be effectively blocked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to data encryption methods, devices, equipment, storage media and products. Background Art

[0002] Cloud computing can connect a large number of computing, storage and software resources to form a large-scale shared virtual IT pool, providing efficient, fast and diversified information services to remote computer users. However, cloud computing also faces security issues, which has become an important reason restricting its development. In order to protect the security of data, many types of encryption algorithms are applied in the cloud to store data in encrypted form. The development of privacy computing technology is regarded as an important technical tool to solve problems such as data privacy protection, data security distribution and intelligent use of data. Privacy computing is a technology that performs efficient computing processing while protecting data privacy. Its purpose is to ensure the privacy and security of data while maintaining efficient data processing. It enhances trust in the cloud computing environment and promotes the development of various new applications and services.

[0003] In recent years, the rapid development of quantum computers and quantum algorithms has greatly improved the efficiency of cracking some asymmetric encryption methods. Post-quantum cryptography is an emerging research direction in the field of cryptography. Its main goal is to design and implement encryption algorithms that can resist attacks from quantum computers. With the rapid development of quantum computing technology, traditional cryptographic methods, such as symmetric encryption and public key encryption, may be cracked by quantum computers in a very short time, which poses a serious threat to global information security. Summary of the invention

[0004] The main purpose of this application is to provide a data encryption method, device, equipment, storage medium and product, aiming to solve the technical problem that the current development of quantum technology, quantum computers can crack most encryption methods, leading to the leakage of user personal data.

[0005] To achieve the above purpose, the present application proposes a data encryption method, which includes the following steps: Get the private key and data plaintext; Divide the data plaintext into multiple sub-blocks, and encrypt each sub-block according to the private key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part; The first ciphertext part and the second ciphertext part are respectively expanded to obtain an extended ciphertext.

[0006] In one embodiment, dividing the data plaintext into a plurality of sub-blocks, and encrypting each sub-block according to the public key to obtain an initial ciphertext includes: Splitting the data plaintext into a plurality of sub-blocks; Encrypt each word block according to a preset encryption function and the private key to obtain an encrypted sub-block; An initial ciphertext is obtained according to the encrypted sub-block.

[0007] In one embodiment, obtaining the initial ciphertext according to the encrypted sub-block includes: Performing additive calculation on the encrypted sub-blocks to obtain original ciphertext; Obtain a preset matrix, and obtain a first part of the ciphertext according to the private key, the preset matrix and the original ciphertext; Obtain a reference matrix, and obtain a second part of the ciphertext according to the data plaintext, the reference matrix and the original ciphertext; The first ciphertext part and the second ciphertext part are used as initial ciphertext.

[0008] In one embodiment, the step of respectively expanding the first ciphertext part and the second ciphertext part to obtain an extended ciphertext includes: Get the key collection; Determining whether the first ciphertext part and the second ciphertext part meet a preset partial ciphertext homomorphic extension requirement according to the key set; When the preset partial ciphertext homomorphic extension requirement is met, the first ciphertext part is added to the second ciphertext part to obtain the extended ciphertext.

[0009] In one embodiment, when the preset homomorphic extension requirement is met, adding the first ciphertext part to the second ciphertext part to obtain the extended ciphertext includes: When the preset homomorphic expansion requirements are met, the preset expansion requirements are obtained; When the first ciphertext part and the second ciphertext part meet the preset extension requirement, an extended ciphertext is obtained according to the first ciphertext part and the second ciphertext part.

[0010] In one embodiment, after respectively expanding the first ciphertext part and the second ciphertext part to obtain the extended ciphertext, the method further includes: Processing the data plaintext according to a hash function to obtain an initial hash value; Encrypting the initial hash value according to a preset curve function to obtain a digital signature; Data transmission is performed according to the digital signature and the extended ciphertext.

[0011] In addition, to achieve the above purpose, the present application also proposes a data encryption device, the data encryption device comprising: Acquisition module, used to obtain private keys and data plaintext; A decomposition module, used for dividing the data plaintext into multiple sub-blocks, and encrypting each sub-block according to the private key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part; The homomorphic expansion module is used to expand the first part of the ciphertext and the second part of the ciphertext respectively to obtain an extended ciphertext.

[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes a data encryption device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data encryption method described above.

[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data encryption method described above are implemented.

[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the data encryption method described above are implemented.

[0015] One or more technical solutions proposed in this application have at least the following technical effects: By dividing the plaintext into multiple sub-blocks, encrypting each sub-block to obtain ciphertext, and directly decomposing the ciphertext into two parts for separate expansion operations, the same result as the overall expansion can be obtained. The ciphertext that meets the homomorphic operation conditions can be directly generated, which reduces the mathematical operations in the encryption process, reduces the random interference of traditional encryption methods, improves the computing efficiency of cloud computing, and can effectively block quantum computing attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] Figure 1 A flowchart of the first embodiment of the data encryption method of the present application is provided; Figure 2 A flowchart of the second embodiment of the data encryption method of the present application is provided; Figure 3 A system structure diagram provided for the second embodiment of the data encryption method of this application; Figure 4 This is a schematic diagram of the module structure of the data encryption device according to an embodiment of the present application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the data encryption method in the embodiment of the present application.

[0019] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0021] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0022] The main solution of the embodiment of the present application is: obtain a private key, a public key and data plaintext; divide the data plaintext into multiple sub-blocks, encrypt each sub-block according to the public key to obtain an initial ciphertext, the initial ciphertext includes a first ciphertext part and a second ciphertext part; expand the first ciphertext part and the second ciphertext part respectively to obtain an extended ciphertext.

[0023] Due to the existing technology, cloud computing can connect a large number of computing, storage and software resources together to form a large-scale shared virtual IT pool, providing efficient, fast and diversified information services for remote computer users. However, cloud computing also faces security issues, which has become an important reason restricting its development. In order to protect the security of data, many types of encryption algorithms are applied in the cloud to store data in encrypted form in the cloud. The development of privacy computing technology is regarded as an important technical tool to solve problems such as data privacy protection, data security distribution and data intelligent use. Privacy computing is a technology that performs efficient computing processing while protecting data privacy. Its purpose is to ensure the privacy and security of data while maintaining efficient data processing. It enhances trust in the cloud computing environment and promotes the development of various new applications and services. In recent years, the rapid development of quantum computers and quantum algorithms has greatly improved the efficiency of cracking some asymmetric encryption methods. Post-quantum cryptography is an emerging research direction in the field of cryptography. Its main goal is to design and implement encryption algorithms that can resist quantum computer attacks. With the rapid development of quantum computing technology, traditional cryptographic methods, such as symmetric encryption and public key encryption, may be cracked by quantum computers in a very short time, which poses a serious threat to global information security.

[0024] The present application provides a solution, which includes obtaining a private key, a public key and a data plaintext; dividing the data plaintext into multiple sub-blocks, encrypting each sub-block according to the public key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part; respectively expanding the first ciphertext part and the second ciphertext part to obtain an extended ciphertext; dividing the plaintext into multiple sub-blocks, encrypting each sub-block to obtain a ciphertext, and directly decomposing the ciphertext into two parts for separate expansion operations, which can obtain the same result as the overall expansion, and can directly generate a ciphertext that meets the homomorphic operation conditions, thereby reducing the mathematical operations in the encryption process, reducing the random interference of traditional encryption methods, improving the computing efficiency of cloud computing, and utilizing the characteristics of post-quantum cryptography to effectively block quantum computing attacks.

[0025] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a data encryption method, etc. The following takes the data encryption method as an example to illustrate this embodiment and the following embodiments.

[0026] Based on this, the present application embodiment provides a data encryption method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the data encryption method of the present application.

[0027] In this embodiment, the data encryption method includes steps S10 to S40: Step S10: Obtain the private key and data plaintext.

[0028] It should be noted that the private key and public key of the present invention are based on McEliece cryptography. McEliece cryptography is a public key cryptosystem and a secure encryption method in post-quantum cryptography that can resist quantum computing attacks. It is also called code-based cryptography.

[0029] It should be noted that in step 1, three matrices are randomly generated as the private key, including the reversible matrix S (i.e., the scrambler), the coding matrix G (i.e., the encoder), and the permutation matrix P, and the parity check matrix H and the decoding matrix R (i.e., the decoder) are generated according to the matrix G for error correction. The three matrices in the private key (i.e., S, G, P, as shown in formula (1)) are multiplied to generate the public key A. Matrix A is a non-negative matrix, A=SGP.

[0030] Step S20: Divide the data plaintext into multiple sub-blocks, and encrypt each sub-block according to the private key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part.

[0031] It should be noted that in response to the security issues of privacy-preserving cloud computing, the existing privacy-preserving cloud computing methods based on homomorphic encryption mainly include traditional asymmetric encryption methods and fully homomorphic encryption algorithms. Asymmetric encryption algorithms refer to the use of different keys for encryption and decryption, one is a public key and the other is a private key. Content encrypted by the public key can only be decrypted by the private key, and vice versa, content encrypted by the private key can only be decrypted by the public key.

[0032] It is understandable that the data plaintext may be data that the user needs to transmit or encrypt, and the sub-block may be a portion of the plaintext obtained after the plaintext is segmented. The complete plaintext may be obtained by splicing the various plaintexts.

[0033] It should be noted that after encrypting each sub-block, it is regarded as a complete ciphertext. According to the requirement of homomorphic operation, the ciphertext matrix satisfies the prerequisite of the Hermitian matrix, and the initial ciphertext is divided into two parts, namely, the first ciphertext part and the second ciphertext part.

[0034] In a feasible implementation, step S20 may include steps A21 to A24: Step A21: Divide the data plaintext into multiple sub-blocks.

[0035] It is understandable that the data plaintext may be divided into a plurality of sub-blocks by equally dividing the data plaintext into a plurality of sub-blocks according to the size of the data plaintext, or may be divided in other ways.

[0036] It should be noted that, in general, the encryption process of traditional McEliece cryptography first defines the plaintext as x and generates a random matrix e; then the plaintext x is encrypted according to the public key A, and the random matrix e is added to generate an interfered ciphertext, and the encrypted ciphertext y=xA+e.

[0037] It should be emphasized that in the encryption process, adding the random matrix e can effectively deal with quantum computing attacks, improve the security of cloud computing, increase the complexity of quantum computing attacks, and prevent linear attacks and key equivalence attacks, but at the same time it will increase the interference of the algorithm and affect the accuracy of the ciphertext.

[0038] It should be further emphasized that in order to avoid the interference of the random matrix e, the plaintext is divided into multiple sub-blocks, namely .

[0039] Step A22: encrypt each word block according to a preset encryption function and the private key to obtain an encrypted sub-block.

[0040] It should be noted that the preset encryption function may be a predetermined function that directly encrypts each sub-block after the plaintext is segmented, such as the encryption function , according to the encryption function The following formula can be used to encrypt each sub-block:

[0041] Step A23: Obtaining an initial ciphertext according to the encrypted sub-block.

[0042] It is understandable that a plurality of encrypted sub-blocks are taken as a complete initial ciphertext.

[0043] It should be noted that the initial ciphertext obtained according to the encrypted sub-blocks may be obtained by performing additive calculations on each encrypted sub-block respectively, and the following formula may be referred to:

[0044] The XOR calculation is recorded as ⊕ as an additive calculation. The ciphertext encrypted by the encryption function is , the result of the homomorphic encryption function is a non-negative matrix, so the security of the proposed method is based on the NP-hard problem It should be emphasized that an additive calculation is performed on the encrypted sub-block to obtain the original ciphertext; a preset matrix is ​​obtained, and the first part of the ciphertext is obtained according to the private key, the preset matrix and the original ciphertext; a reference matrix is ​​obtained, and the second part of the ciphertext is obtained according to the data plaintext, the reference matrix and the original ciphertext; the first part of the ciphertext and the second part of the ciphertext are used as the initial ciphertext.

[0045] It should be noted that, according to the preset matrix, the reference matrix, the public key and the data plaintext, the initial ciphertext is divided into the first ciphertext part and the second ciphertext part, which can be defined as: , decompose the new ciphertext into two parts, the first part is the public key and a random matrix The second part is the plain text and combination.

[0046] In this implementation, the encryption function of McEliece cryptography is modified to divide the plaintext into multiple sub-blocks, and each sub-block is encrypted, thereby reducing the random matrix of the traditional encryption method. Interference improves the computing efficiency of cloud computing and utilizes the characteristics of post-quantum cryptography to effectively block quantum computing attacks. Compared with traditional asymmetric encryption methods, it reduces the possibility of being cracked by quantum computers.

[0047] The above are only feasible implementations of step S20 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S20.

[0048] Step S30: Expand the first ciphertext part and the second ciphertext part respectively to obtain an extended ciphertext.

[0049] It should be understood that in the homomorphic encryption algorithm based on McEliece cryptography, it is necessary to perform homomorphic operations on the encrypted and decrypted ciphertexts. The prerequisite for homomorphic operations is that the ciphertext matrix satisfies the Hermitian matrix, that is, In the traditional algorithm, a new ciphertext matrix needs to be generated To construct an extended ciphertext that can be operated homomorphically, the new ciphertext is converted into Transform to extended ciphertext ,This method will lead to a more complex algorithm structure and higher computational complexity.

[0050] It should be noted that expanding the first part of the ciphertext and the second part of the ciphertext to obtain the extended ciphertext can be a homomorphic encryption method, based on which the ciphertext is expanded separately so that the expanded ciphertext can also be decrypted normally. Therefore, the ciphertext expansion no longer needs to be expanded as a whole, but is decomposed into two parts for separate expansion operations, and the same result as the overall expansion can be obtained.

[0051] In the specific implementation, the new ciphertext It can be defined as , decompose the new ciphertext into two parts, the first part is the public key and a random matrix The second part is the plain text and At this time, the decryption of the new ciphertext can be expressed as , where the first part can be directly extended, namely , accordingly, the decryption process also changes from become , assuming that the second part of the ciphertext also has this property, that is , the expanded ciphertext can also be decrypted normally. Therefore, the ciphertext expansion no longer needs to be expanded as a whole.

[0052] This embodiment provides a data encryption method, which divides the plaintext into multiple sub-blocks, encrypts each sub-block to obtain a ciphertext, and directly decomposes the ciphertext into two parts for separate expansion operations, thereby obtaining the same result as the overall expansion, and can directly generate ciphertext that meets the homomorphic operation conditions, reducing mathematical operations in the encryption process, reducing random interference of traditional encryption methods, improving the computing efficiency of cloud computing, and being able to effectively block quantum computing attacks.

[0053] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2Step S30 in the data encryption method further includes steps S31 to S33: Step S31: Obtain a key set.

[0054] It is understandable that the key set may be a set of multiple user keys.

[0055] In the specific implementation, it is assumed that the user The ciphertext , assuming is a set of two keys.

[0056] Step S32: judging whether the first ciphertext part and the second ciphertext part meet the preset partial ciphertext homomorphic extension requirement according to the key set.

[0057] It should be noted that the privacy-preserving cloud computing solution based on fully homomorphic encryption is a cryptographic system that allows arbitrarily complex operations to be performed on encrypted data. A notable feature of fully homomorphic encryption is that "data is available but invisible", that is, any operation can be performed on encrypted data without decryption, and the output result is the same as the result of the same operation on unencrypted data. This feature makes fully homomorphic encryption very suitable for data privacy protection in cloud computing.

[0058] Step S33: When the preset partial ciphertext homomorphic extension requirement is met, the first ciphertext part is added to the second ciphertext part to obtain the extended ciphertext.

[0059] It should be understood that, because the first ciphertext part and the second ciphertext part are ciphertexts that satisfy homomorphic operations, the first ciphertext part and the second ciphertext part can be directly encrypted respectively, and then the two parts of the ciphertext can be added together to obtain the extended ciphertext.

[0060] It is worth mentioning that it is easier to construct extended ciphertext. We can directly generate ciphertext that meets the homomorphic operation conditions and improve the efficiency of the homomorphic encryption algorithm by performing fewer operations.

[0061] In a feasible implementation, step S33 may include steps A331-A332: Step A331: When the preset homomorphic expansion requirement is met, obtain the preset expansion requirement.

[0062] It should be noted that the first part of the ciphertext and the second part of the ciphertext can be expressed as and ,in To meet the preset partial ciphertext homomorphic expansion requirements, it can be .

[0063] Furthermore, It can be expressed as ,in To meet the preset partial ciphertext homomorphic expansion requirements, it can be .

[0064] It should be emphasized that in and When the requirements are met, it is determined whether the first ciphertext part and the second ciphertext part meet the preset partial ciphertext homomorphic extension requirements.

[0065] It should be emphasized that the preset expansion requirements can be and The requirement for the sum of can be expressed as .

[0066] Step A332: when the first part of the ciphertext and the second part of the ciphertext meet the preset extension requirement, obtain an extended ciphertext according to the first part of the ciphertext and the second part of the ciphertext.

[0067] It should be noted that according to and Add together to get ,exist To satisfy , it is considered that the first ciphertext part and the second ciphertext part meet the preset extension requirement, which can also be expressed as ,like If this requirement is met, it is also considered that the first ciphertext part and the second ciphertext part meet the preset extension requirement.

[0068] It should be noted that, when the first ciphertext part and the second ciphertext part meet the preset extension requirement, the extended ciphertext is obtained by adding the first ciphertext part to the second ciphertext part.

[0069] In this embodiment, during the ciphertext generation process, the user can use the encryption algorithm to generate an extended ciphertext that can perform homomorphic operations without performing traditional extension operations, thereby improving the efficiency of the homomorphic encryption algorithm by performing fewer operations.

[0070] The above are only feasible implementations of step S33 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S33.

[0071] It should be noted that, after respectively expanding the first part of the ciphertext and the second part of the ciphertext to obtain the extended ciphertext, the method further includes: processing the data plaintext according to a hash function to obtain an initial hash value; encrypting the initial hash value according to a preset curve function to obtain a digital signature; and transmitting data according to the digital signature and the extended ciphertext.

[0072] It should be noted that the privacy-preserving cloud computing system based on post-quantum cryptographic homomorphic encryption is divided into two schemes: homomorphic encryption and digital signature described in this proposal, which are deployed on the local and cloud computing platforms respectively. The combination of the two schemes ensures the security of private data and the non-repudiation of computing data. The system model is as follows: Figure 3 As shown, Figure 3 The system model includes local and cloud computing platforms; the user inputs plaintext data and obtains the user key, the cloud computing server based on the cloud computing platform performs homomorphic encryption, transmits the encrypted data to the encrypted database, and uploads it to the cloud computing server of the cloud computing platform based on the encrypted database. The cloud computing server executes the SM3 algorithm and SM2 digital signature to obtain the signature value, and feeds back the signature value to the digital signature server, so that the server can feedback the response to the cloud computing server when the digital signature is successful.

[0073] It should be emphasized that this embodiment supports polynomial operations to achieve more complex encryption and computing operations, avoids interference from random matrices, and further improves the security of the algorithm, effectively resists quantum computing attacks, and has a shorter encryption and decryption time compared to other mainstream homomorphic encryption algorithms.

[0074] Among them, it should be noted that the data plaintext is processed according to the hash function to obtain the initial hash value, which can be obtained by using the SM3 hash function and the SM2 digital signature technology. First, the original data is processed by the SM3 hash function to generate a corresponding digital signature, which improves security while hiding the original data and improves the efficiency of the SM2 digital signature. Then, the SM2 digital signature is used to ensure the integrity and non-repudiation of the original data.

[0075] Among them, it needs to be further explained that "encrypting the initial hash value according to a preset curve function to obtain a digital signature, and transmitting data according to the digital signature and the extended ciphertext" can be real-time data encryption obtained using the homomorphic encryption method designed in this proposal; performing homomorphic computing operations on the ciphertext to obtain a result calculation; using a private key to decrypt the ciphertext to obtain plaintext; using the SM3 hash function to obtain a hash value for the plaintext result, using the SM2 private key to digitally sign the hash to generate a digital signature.

[0076] This embodiment provides a data encryption method, which generates ciphertext that can perform homomorphic operations by utilizing an encryption algorithm without performing ciphertext expansion operations. By reducing mathematical operations in the encryption process, the execution efficiency of the homomorphic encryption algorithm can be significantly improved during large-scale operations.

[0077] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data encryption method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0078] This application also provides a data encryption device, please refer to Figure 4 , the data encryption device comprises: An acquisition module 10 is used to acquire a private key and plain text data; A decomposition module 20, configured to divide the data plaintext into a plurality of sub-blocks, and encrypt each sub-block according to the private key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part; The homomorphic expansion module 30 is used to expand the first ciphertext part and the second ciphertext part respectively to obtain an extended ciphertext.

[0079] The data encryption device provided by the present application adopts the data encryption method in the above embodiment, which can solve the technical problem that the current quantum technology development and quantum computers can crack most encryption methods, leading to the leakage of user personal data. Compared with the prior art, the beneficial effects of the data encryption device provided by the present application are the same as the beneficial effects of the data encryption method provided by the above embodiment, and the other technical features in the data encryption device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0080] The present application provides a data encryption device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data encryption method in the above-mentioned embodiment one.

[0081] Reference below Figure 5 , which shows a schematic diagram of the structure of a data encryption device suitable for implementing an embodiment of the present application. The data encryption device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The data encryption device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0082] like Figure 5As shown, the data encryption device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data encryption device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data encryption device to communicate with other devices wirelessly or by wire to exchange data. Although the data encryption device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0083] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0084] The data encryption device provided by the present application adopts the data encryption method in the above embodiment, which can solve the technical problem that the current quantum technology development and quantum computers can crack most encryption methods, leading to the leakage of user personal data. Compared with the prior art, the beneficial effects of the data encryption device provided by the present application are the same as the beneficial effects of the data encryption method provided by the above embodiment, and the other technical features in the data encryption device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0085] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

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

[0087] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data encryption method in the above-mentioned embodiment.

[0088] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0089] The computer-readable storage medium may be included in the data encryption device; or may exist independently without being assembled into the data encryption device.

[0090] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a data encryption device, the data encryption device: obtains a private key, a public key and data plaintext; divides the data plaintext into multiple sub-blocks, encrypts each sub-block according to the public key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part; and expands the first ciphertext part and the second ciphertext part respectively to obtain an extended ciphertext.

[0091] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0092] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0093] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0094] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data encryption method, and can solve the technical problem that quantum computers can crack most encryption methods due to the current development of quantum technology, leading to the leakage of user personal data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the data encryption method provided in the above-mentioned embodiment, and will not be elaborated here.

[0095] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data encryption method when executed by a processor.

[0096] The computer program product provided by this application can solve the technical problem that the current development of quantum technology can crack most encryption methods, resulting in the leakage of user personal data. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the data encryption method provided by the above embodiment, which will not be repeated here.

[0097] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A data encryption method, characterized in that: The data encryption method comprises: Get the private key and data plaintext; Divide the data plaintext into multiple sub-blocks, and encrypt each sub-block according to the private key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part; The first ciphertext part and the second ciphertext part are respectively expanded to obtain an extended ciphertext.

2. The method according to claim 1, characterized in that The step of dividing the data plaintext into a plurality of sub-blocks and encrypting each sub-block according to the public key to obtain an initial ciphertext includes: Splitting the data plaintext into a plurality of sub-blocks; Encrypt each word block according to a preset encryption function and the private key to obtain an encrypted sub-block; An initial ciphertext is obtained according to the encrypted sub-block.

3. The method according to claim 2, characterized in that The obtaining of the initial ciphertext according to the encrypted sub-blocks comprises: Performing additive calculation on the encrypted sub-blocks to obtain original ciphertext; Obtain a preset matrix, and obtain a first part of the ciphertext according to the private key, the preset matrix and the original ciphertext; Obtain a reference matrix, and obtain a second part of the ciphertext according to the data plaintext, the reference matrix and the original ciphertext; The first ciphertext part and the second ciphertext part are used as initial ciphertext.

4. The method according to claim 1, characterized in that The step of respectively expanding the first ciphertext part and the second ciphertext part to obtain an extended ciphertext comprises: Get the key collection; Determining whether the first ciphertext part and the second ciphertext part meet a preset partial ciphertext homomorphic extension requirement according to the key set; When the preset partial ciphertext homomorphic extension requirement is met, the first ciphertext part is added to the second ciphertext part to obtain the extended ciphertext.

5. The method according to claim 4, characterized in that When the preset homomorphic extension requirement is met, adding the first ciphertext part to the second ciphertext part to obtain an extended ciphertext includes: When the preset homomorphic expansion requirements are met, the preset expansion requirements are obtained; When the first ciphertext part and the second ciphertext part meet the preset extension requirement, an extended ciphertext is obtained according to the first ciphertext part and the second ciphertext part.

6. The method according to claim 1, characterized in that After the first ciphertext part and the second ciphertext part are expanded respectively to obtain the expanded ciphertext, the method further includes: Processing the data plaintext according to a hash function to obtain an initial hash value; Encrypting the initial hash value according to a preset curve function to obtain a digital signature; Data transmission is performed according to the digital signature and the extended ciphertext.

7. A data encryption device, characterized in that: The data encryption device comprises: Acquisition module, used to obtain private keys and data plaintext; A decomposition module, used for dividing the data plaintext into multiple sub-blocks, and encrypting each sub-block according to the private key to obtain an initial ciphertext, wherein the initial ciphertext includes a first ciphertext part and a second ciphertext part; The homomorphic expansion module is used to expand the first part of the ciphertext and the second part of the ciphertext respectively to obtain an extended ciphertext.

8. A data encryption device, characterized in that: The data encryption device comprises: a memory, a processor, and a data encryption program stored in the memory and executable on the processor, wherein the data encryption program is configured to implement the data encryption method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a data encryption program, and when the data encryption program is executed by the processor, the data encryption method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a data encryption program, and when the data encryption program is executed by a processor, the steps of the data encryption method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • GSW type multi-key fully homomorphic encryption method with efficient ciphertext expansion process

    CN115378571A

  • Encryption method and device, terminal equipment and computer readable storage medium

    CN115622745A

  • Data privacy protection method based on dynamic multi-key fully homomorphic encryption

    CN118264461A