Data encryption method and device, processor and electronic device

By improving the BlowFish algorithm and elliptic curve cryptography to encrypt cloud data, and combining it with the MD5 function to generate digital signatures, the problem of poor data encryption in cloud computing is solved, achieving efficient and secure data protection.

CN116170185BActive Publication Date: 2026-05-19CHINA TELECOM CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD
Filing Date
2022-12-29
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing cloud-based data encryption technologies are ineffective, making it difficult to guarantee data security and integrity. In particular, encryption efficiency is low in cloud computing environments, failing to effectively protect data from unauthorized access.

Method used

The improved BlowFish algorithm is used to encrypt the data, and the key is encrypted using elliptic curve cryptography. The MD5 function is used to generate a digital signature, and access permissions are determined by verifying user identity and permissions, thus ensuring data security and integrity.

Benefits of technology

It improves the efficiency and security of cloud data encryption, ensures the integrity and privacy of data in the cloud computing environment, reduces encryption time and memory consumption, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170185B_ABST
    Figure CN116170185B_ABST
Patent Text Reader

Abstract

The application discloses a data encryption method and device, a processor and an electronic device. The method comprises the following steps: obtaining original data to be encrypted in the cloud; encrypting the original data by a target BlowFish algorithm and an original key to obtain encrypted original data, wherein the target BlowFish algorithm is an improved algorithm of an original BlowFish algorithm; encrypting the original key to obtain an encrypted original key; and saving the encrypted original data and the encrypted original key to the cloud. Through the application, the problem that the effect of encrypting data in the cloud is poor in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and more specifically, to a data encryption method and apparatus, processor, and electronic device. Background Technology

[0002] Currently, ensuring cloud security is one of the most critical challenges facing the cloud services industry. Processing data and providing reliable and secure cloud services in a cloud environment using shared resources requires a robust encryption method that does not consume excessive performance. Therefore, in a cloud environment, the speed of encryption algorithms is crucial to user experience.

[0003] Furthermore, cloud computing is a location-independent environment that shares computing power and resources to provide high-performance services. While cloud computing makes life easier, it also introduces new security challenges and cyberattack threats, such as those exploiting authentication vulnerabilities. As resources and services are shared in open environments between and within networks, security becomes even more critical in cloud computing. Moreover, the privacy and security of user data stored remotely on cloud storage services are paramount. Encryption algorithms are needed to encrypt user data to protect it from unauthorized access and maintain its security and integrity. Several encryption technologies are used to protect data in different cloud deployment models: public cloud, private cloud, and hybrid cloud. Security becomes even more critical when cloud service providers offer multiple concurrent services for large amounts of data. Therefore, providing assurance services for transmitted data, especially protecting its integrity, becomes a challenging task. However, the efficiency of encrypting data in related technologies is relatively low, and simply encrypting data is insufficient to guarantee its security, resulting in poor encryption effectiveness.

[0004] There is currently no effective solution to the problem of poor encryption of data in the cloud in related technologies. Summary of the Invention

[0005] The main objective of this application is to provide a data encryption method, apparatus, processor, and electronic device to solve the problem of poor encryption effect for data in the cloud in related technologies.

[0006] To achieve the above objectives, according to one aspect of this application, a data encryption method is provided. The method includes: acquiring raw data to be encrypted from a cloud; encrypting the raw data using a target BlowFish algorithm and a raw key to obtain encrypted raw data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm; encrypting the raw key to obtain an encrypted raw key; and storing the encrypted raw data and the encrypted raw key in the cloud.

[0007] Furthermore, before encrypting the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data, the method further includes: determining the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm; changing the calculation method of the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm to obtain the target BlowFish algorithm.

[0008] Furthermore, changing the calculation methods of the first, second, third, and fourth calculation modules in the original BlowFish algorithm to obtain the target BlowFish algorithm includes: performing an accumulation operation on the first and second calculation modules in the original BlowFish algorithm to obtain a first calculation result; performing an accumulation operation on the third and fourth calculation modules in the original BlowFish algorithm to obtain a second calculation result; and performing an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

[0009] Furthermore, after saving the encrypted original data and the encrypted original key to the cloud, the method further includes: receiving a target request sent by a target object, wherein the target request is used to request access to the encrypted original data in the cloud; obtaining a digital signature corresponding to the original data based on the target request; and determining the access result of the target object accessing the encrypted original data in the cloud based on the digital signature corresponding to the original data.

[0010] Furthermore, before obtaining the encrypted original key and the digital signature corresponding to the original data according to the target request, the method further includes: obtaining the original data; processing the original data using a hash function to obtain processed original data; and using the processed original data as the digital signature.

[0011] Further, based on the digital signature corresponding to the original data, determining the access result of the target object to the encrypted original data in the cloud includes: determining the identity information of the target object based on the digital signature corresponding to the original data; determining whether the target object has permission to access the encrypted original data in the cloud based on the identity information of the target object; if the target object has permission to access the encrypted original data in the cloud, then it is determined that the target object successfully accessed the encrypted original data in the cloud; if the target object does not have permission to access the encrypted original data in the cloud, then it is determined that the target object failed to access the encrypted original data in the cloud.

[0012] Furthermore, after determining whether the target object has permission to access the encrypted original data in the cloud, the method further includes: if the target object has permission to access the encrypted original data in the cloud, then obtaining the encrypted original key, decrypting the encrypted original key to obtain the original key; using the original key to decrypt the encrypted original data in the cloud to obtain the original data, and returning the original data to the target object.

[0013] To achieve the above objectives, according to another aspect of this application, a data encryption device is provided. The device includes: a first acquisition unit for acquiring raw data to be encrypted from a cloud; a first encryption unit for encrypting the raw data using a target BlowFish algorithm and a raw key to obtain encrypted raw data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm; a second encryption unit for encrypting the raw key to obtain an encrypted raw key; and a first storage unit for storing the encrypted raw data and the encrypted raw key in the cloud.

[0014] Furthermore, the apparatus further includes: a first determining unit, configured to determine the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm before encrypting the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data; and a first changing unit, configured to change the calculation method of the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm to obtain the target BlowFish algorithm.

[0015] Further, the first modification unit includes: a first accumulation module, used to accumulate the first calculation module and the second calculation module in the original BlowFish algorithm to obtain a first calculation result; a second accumulation module, used to accumulate the third calculation module and the fourth calculation module in the original BlowFish algorithm to obtain a second calculation result; and a first XOR module, used to perform an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

[0016] Furthermore, the device further includes: a first receiving unit, configured to receive a target request sent by a target object after saving the encrypted original data and the encrypted original key to the cloud, wherein the target request is used to request access to the encrypted original data in the cloud; a second obtaining unit, configured to obtain a digital signature corresponding to the original data based on the target request; and a second determining unit, configured to determine the access result of the target object accessing the encrypted original data in the cloud based on the digital signature corresponding to the original data.

[0017] Furthermore, the apparatus further includes: a third acquisition unit, configured to acquire the original data before acquiring the encrypted original key and the digital signature corresponding to the original data according to the target request; a first processing unit, configured to process the original data using a hash function to obtain processed original data; and a third determination unit, configured to use the processed original data as the digital signature.

[0018] Further, the second determining unit includes: a second determining module, used to determine the identity information of the target object based on the digital signature corresponding to the original data; a first determining module, used to determine whether the target object has permission to access the encrypted original data in the cloud based on the identity information of the target object; a third determining module, used to determine that the target object successfully accessed the encrypted original data in the cloud if the target object has permission to access the encrypted original data in the cloud; and a fourth determining module, used to determine that the target object failed to access the encrypted original data in the cloud if the target object does not have permission to access the encrypted original data in the cloud.

[0019] Furthermore, the device further includes: a fourth acquisition unit, configured to, after determining whether the target object has permission to access the encrypted original data in the cloud, if the target object has permission to access the encrypted original data in the cloud, acquire the encrypted original key and decrypt the encrypted original key to obtain the original key; and a second processing unit, configured to use the original key to decrypt the encrypted original data in the cloud to obtain the original data and return the original data to the target object.

[0020] To achieve the above objectives, according to another aspect of this application, a processor is provided for running a program, wherein the program executes the data encryption method described in any of the above-described embodiments.

[0021] To achieve the above objectives, according to another aspect of this application, an electronic device is provided, the electronic device including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the data encryption method described in any of the above.

[0022] This application employs the following steps: obtaining the original data to be encrypted from the cloud; encrypting the original data using a target BlowFish algorithm and an original key to obtain encrypted original data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm; encrypting the original key to obtain an encrypted original key; and saving the encrypted original data and the encrypted original key to the cloud. This solves the problem of poor encryption effectiveness for data in the cloud in related technologies. By using the improved BlowFish algorithm and original key to encrypt the original data, the efficiency of data encryption can be improved. Furthermore, encrypting the original key simultaneously and saving both the encrypted original data and the encrypted original key to the cloud ensures the security of cloud computing, thereby improving the encryption effectiveness of data in the cloud. Attached Figure Description

[0023] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0024] Figure 1 This is a flowchart of a data encryption method provided according to an embodiment of this application;

[0025] Figure 2This is a flowchart illustrating the use of the MD5 function to generate a hash code as a digital signature in an embodiment of this application.

[0026] Figure 3 This is a flowchart of the calculation process of the F-Function module in a standard BlowFish algorithm provided by existing technology;

[0027] Figure 4 This is a flowchart of the calculation process of the F-Function module in the improved BlowFish algorithm in this application embodiment;

[0028] Figure 5 This is a flowchart of an optional data encryption method provided according to an embodiment of this application;

[0029] Figure 6 This is a schematic diagram illustrating the algorithm execution time for 50KB of data in an embodiment of this application;

[0030] Figure 7 This is a schematic diagram of the algorithm throughput when dealing with 50KB of data in an embodiment of this application;

[0031] Figure 8 This is a schematic diagram illustrating the algorithm execution time for 1024KB of data in an embodiment of this application;

[0032] Figure 9 This is a schematic diagram of the algorithm throughput when dealing with 1024KB of data in an embodiment of this application;

[0033] Figure 10 This is a schematic diagram illustrating the algorithm's memory consumption when dealing with 50KB of data in an embodiment of this application;

[0034] Figure 11 This is a schematic diagram of a data encryption device provided according to an embodiment of this application;

[0035] Figure 12 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0036] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0037] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0039] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.

[0040] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0041] BlowFish Algorithm: The BlowFish algorithm is a 64-bit block cipher with variable key length and symmetric key, which can be used to encrypt strings of 64 bits in length.

[0042] Cloud computing: Cloud computing is a type of distributed computing that refers to breaking down massive data processing programs into countless smaller programs through a network "cloud." These smaller programs are then processed and analyzed by a system composed of multiple servers to obtain results and return them to the user.

[0043] Elliptic Curve Cryptography (ECC): Elliptic Curve Cryptography is a public-key encryption technique based on elliptic curve theory. It allows for faster, smaller, and more efficient key creation. ECC utilizes the properties of elliptic curve equations to generate keys, rather than relying on the product of large prime numbers as in traditional methods.

[0044] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a data encryption method provided according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0045] Step S101: Obtain the original data to be encrypted from the cloud.

[0046] For example, obtaining raw data, where the raw data is data to be encrypted in the cloud.

[0047] Step S102: Encrypt the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data. The target BlowFish algorithm is an improved version of the original BlowFish algorithm.

[0048] For example, the original BlowFish algorithm can be improved, and the original data can be encrypted using the improved BlowFish algorithm and the user key.

[0049] Step S103: Encrypt the original key to obtain the encrypted original key.

[0050] For example, the user key can be encrypted using Elliptic Curve Cryptography (ECC). Furthermore, the step of encrypting the user key using Elliptic Curve Cryptography (ECC) is performed asynchronously.

[0051] Step S104: Save the encrypted original data and the encrypted original key to the cloud.

[0052] For example, after obtaining the encrypted key and encrypted data, the encrypted key and encrypted data are stored in the cloud.

[0053] Through the steps S101 to S104 described above, by using the improved BlowFish algorithm and the original key to encrypt the original data, the efficiency of data encryption can be improved. At the same time, the original key is encrypted, and the encrypted original data and the encrypted original key are saved in the cloud, which can ensure the security of cloud computing and thus improve the effect of encrypting data in the cloud.

[0054] To obtain a digital signature quickly and accurately, the data encryption method provided in this application embodiment can also obtain a digital signature through the following steps: obtaining the original data; processing the original data using a hash function to obtain the processed original data; and using the processed original data as the digital signature.

[0055] For example, Figure 2 This is a flowchart illustrating the use of the MD5 function to generate a hash code as a digital signature in an embodiment of this application, as shown below. Figure 2 As shown, the MD5 function is used to generate a hash code for the original data, which serves as a digital signature for user data transmission, used to verify the integrity of the data, and the digital signature is used in all subsequent information exchange processes.

[0056] Furthermore, because the initial digital signature model is vulnerable to cyberattacks (i.e., attackers can access data by forging digital signatures), the original data is first subjected to an MD5 operation to obtain a hash code, and then the encoded data is used as the digital signature. If the attacker's fake signature does not match the hash result, the data will be inaccessible.

[0057] The above scheme effectively protects the security of data transmission and access using digital signatures.

[0058] To quickly and accurately obtain the target BlowFish algorithm, the data encryption method provided in this application embodiment can also obtain the target BlowFish algorithm through the following steps: determining the first calculation module, second calculation module, third calculation module, and fourth calculation module in the original BlowFish algorithm; changing the calculation method of the first calculation module, second calculation module, third calculation module, and fourth calculation module in the original BlowFish algorithm to obtain the target BlowFish algorithm.

[0059] For example, the calculation methods of the four calculation modules in the original BlowFish algorithm can be changed to obtain the improved BlowFish algorithm.

[0060] In conclusion, the improved BlowFish algorithm can be obtained quickly and accurately by modifying the computation module in the original BlowFish algorithm.

[0061] To quickly and accurately obtain the target BlowFish algorithm, the data encryption method provided in this application embodiment can also obtain the target BlowFish algorithm through the following steps: performing an accumulation operation on the first calculation module and the second calculation module in the original BlowFish algorithm to obtain a first calculation result; performing an accumulation operation on the third calculation module and the fourth calculation module in the original BlowFish algorithm to obtain a second calculation result; and performing an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

[0062] For example, the method provided in this application aims to propose a secure encryption algorithm with low execution time and high throughput, and employs an improved BlowFish algorithm in the core part of data encryption. This algorithm uses a variable key length ranging from 32 to 448 bits and uses multiple subkeys. Subkeys can be pre-computed before encrypting and decrypting data, making the algorithm much faster than other algorithms and requiring less memory. The BlowFish algorithm uses four 256-bit S-BOXs (computation modules), containing a total of 1024 32-bit entities. The first byte of the first 32-bit module is used to look up an entity in the first S-BOX, the second byte in the second S-BOX, and so on for all other entities. The decryption process is a reverse encryption operation, taking the ciphertext as input, except that the subkeys are used in the reverse manner.

[0063] The F function (a function within the BlowFish algorithm) is the most time-consuming and crucial part of the encryption process because it performs the main calculations in a modular format throughout all operations of the BlowFish algorithm, including adders and inversions. In the method provided in this application, the execution time of BlowFish can be reduced by improving the modularity of the F function. Furthermore, Figure 3 This is a flowchart of the calculation process of the F-Function module in a standard BlowFish algorithm provided by existing technology. Figure 3 This demonstrates the overall process of the F-Function module (F function, a type of function in the BlowFish algorithm) in the standard BlowFish algorithm.

[0064] The S-box is a substitution box that receives n bits of input and then converts them into m bits of output. n and m can be unequal. The input to the F function is 32 bits, which is first divided into four parts, or four 8-bit units. The S-box's function is to convert these 8 bits into 32 bits. For the XOR operation, Mod 2 after accumulation 32operate.

[0065] The algorithm is improved to reduce the complexity of execution time. Equation (1) calculates the F-function value of the standard BlowFish algorithm.

[0066] F(X L )=(((S 1,a +S 2,b )mod 2 32 XOR S 3,c )+S 4,d )mod 2 32 (1)

[0067] Without compromising the security of the BlowFish algorithm, the F function module is modified to Equation (2).

[0068] F′(X L )=((S 1,a +S 2,b )mod 2 32 XOR((S) 3,c +S 4,d )mod 2 32 (2)

[0069] After the improvement, ((S) can be executed in parallel. 1,a +S 2,b )mod 2 32 ) and ((S) 3,c +S 4,d )mod 2 32 The improved module reduces the time required for two operations to a single operation. This parallel operation, utilizing multithreading, reduces the overall execution time of the algorithm. Since BlowFish's F-Function requires 16 rounds of looping, the improvement increases the execution time of each encryption and decryption operation by 16 times. Furthermore, because BlowFish's security is dependent on its key, the improved module will not negatively impact the algorithm's security. Figure 4 This is a flowchart of the calculation process of the F-Function module in the improved BlowFish algorithm in this application embodiment. Figure 4 The improved F-Function is shown.

[0070] The BlowFish algorithm based on the improved F function consists of a 16-round Feistel network (the network in the BlowFish algorithm), with a 64-bit data element X as input.

[0071] First, the 64 bits are divided into two 32-bit blocks, left (L) and right (R). The next step is to perform an XOR operation on the first 32-bit block (L). In the third step, the calculated 32-bit data is transferred to the F function and XORed with the other 32-bit block (R). Then L and R are swapped for use in the next BlowFish round.

[0072] Decryption and encryption are the opposite operations. Encryption starts from 1 and iterates through 16 rounds, then sequentially checks X. L X R The operation is performed. During decryption, the loop starts from round 16 and iterates for 16 rounds, performing operations on both the left and right sides. After the last 16 rounds of looping, the original data is obtained.

[0073] The above method can quickly and accurately obtain the improved BlowFish algorithm, and use the improved BlowFish algorithm to encrypt data, thereby improving the data encryption efficiency.

[0074] To quickly and accurately determine the access result of a target object accessing encrypted original data in the cloud, the data encryption method provided in this application embodiment can also determine the access result of a target object accessing encrypted original data in the cloud through the following steps: receiving a target request sent by the target object, wherein the target request is used to request access to encrypted original data in the cloud; obtaining the digital signature corresponding to the original data based on the target request; and determining the access result of the target object accessing encrypted original data in the cloud based on the digital signature corresponding to the original data.

[0075] For example, the system first receives a user's request to access encrypted data in the cloud. Then, based on this request, it obtains the digital signature corresponding to the data. Finally, it uses the obtained digital signature to determine the user's access to the encrypted data. In other words, by verifying the digital signature, it can be determined whether the user can access encrypted data in the cloud.

[0076] In conclusion, verifying digital signatures can ensure the security of encrypted data in the cloud.

[0077] To quickly and accurately determine the access result of a target object accessing the encrypted original data in the cloud, the data encryption method provided in this application embodiment can also determine the access result of a target object accessing the encrypted original data in the cloud through the following steps: determining the identity information of the target object based on the digital signature corresponding to the original data; determining whether the target object has permission to access the encrypted original data in the cloud based on the identity information of the target object; if the target object has permission to access the encrypted original data in the cloud, then it is determined that the target object successfully accessed the encrypted original data in the cloud; if the target object does not have permission to access the encrypted original data in the cloud, then it is determined that the target object failed to access the encrypted original data in the cloud.

[0078] For example, by using the obtained digital signature, the user's identity can be determined, and based on the user's identity, it can be determined whether the user has permission to access encrypted data in the cloud. If the user has permission to access encrypted data in the cloud, the user can successfully access the encrypted data in the cloud; if the user does not have permission to access encrypted data in the cloud, the access will fail and an error message will be displayed.

[0079] Using the above method, digital signatures can be used to quickly and accurately determine whether a user has permission to access encrypted data in the cloud.

[0080] In order to quickly and accurately decrypt the encrypted original data in the cloud, the data encryption method provided in this application embodiment can also decrypt the encrypted original data in the cloud through the following steps: if the target object has the permission to access the encrypted original data in the cloud, the encrypted original key is obtained and decrypted to obtain the original key; the original key is used to decrypt the encrypted original data in the cloud to obtain the original data, and the original data is returned to the target object.

[0081] For example, the original key can be encrypted using an elliptic curve cryptography (ECC) algorithm, which is an asymmetric encryption algorithm based on elliptic curve mathematics. Compared to RSA (an encryption algorithm), ECC has the advantage of using shorter keys to achieve security comparable to or higher than RSA. RSA is also an asymmetric encryption algorithm, widely used in public-key cryptography and e-commerce. Furthermore, 160-bit ECC encryption is equivalent to 1024-bit RSA encryption, and 210-bit ECC encryption is equivalent to 2048-bit RSA encryption.

[0082] Symmetric-key algorithms, such as BlowFish, require the transmission of the user's key, which poses a certain risk. Therefore, the method provided in this application uses an elliptic curve-based asymmetric encryption algorithm to protect necessary security. In this method, a 164-bit key is used to provide higher performance than other methods. Elliptic curve-based cryptographic algorithms have high security, low memory and bandwidth requirements, and are suitable for encrypting keys in cloud platform environments. The basic formula for elliptic curve cryptography is Equation (3):

[0083] y 2 =x 3 +ax+b (3)

[0084] Where 'a' is the angle between the tangent to the elliptic curve and the x-axis, and 'b' represents a constant, and in order for the elliptic curve to have no singularities (i.e., to be smooth and differentiable everywhere), its discriminant must be non-zero, i.e., Δ = 4a. 3 +27b 2 ≠0. Randomly select two points P and Q on the elliptic curve. The straight line passing through these two points intersects the elliptic curve at a third point R, satisfying: P + Q + R = 0.

[0085] In elliptic curve cryptography, adding two distinct points on an elliptic curve requires 6 additions, 1 squaring, 2 multiplications, and 1 inverse operation. Furthermore, doubling the number of points on an elliptic curve requires 8 additions, 2 squaring, 2 multiplications, and 1 inverse operation.

[0086] Elliptic curve cryptography first selects a random number k within the domain as the private key. P is a point on the elliptic curve, and the public key Q = k·P is calculated. Therefore, calculating the private key k from points P and Q has high computational complexity, making it difficult to crack; this is one of the main advantages of elliptic curve cryptography.

[0087] For example, after encrypting the original key using an elliptic curve cryptography algorithm, the encrypted original key is then decrypted. The decrypted original key is then used to decrypt the encrypted original data in the cloud, and finally the decrypted original data can be sent to the user.

[0088] The above method can quickly and accurately send the decrypted original data to the user.

[0089] For example, Figure 5 This is a flowchart of an optional data encryption method provided according to an embodiment of this application, such as... Figure 5 As shown, the optional data encryption methods include the following steps:

[0090] Step 1: Before encryption, the original data is processed using the MD5 function to generate a hash code, which improves the efficiency of digital signature and data integrity verification.

[0091] Step 2: Use the generated hash code as a digital signature for user data transmission to verify the integrity of the data, and this digital signature will be used in subsequent information exchange processes.

[0092] Step 3: Encrypt the original data using the symmetric cryptographic algorithm (BlowFish) of the improved F function module.

[0093] Step 4: Improve the key of the BlowFish encryption algorithm and encrypt it using elliptic curve cryptography.

[0094] Step 5: Obtain the encrypted data and the encrypted key.

[0095] Step 6: The recipient can decrypt the received data using the reverse process and their private key. The data is decrypted using BlowFish's key, and the verification process uses a digital signature.

[0096] For example, the method provided in this application employs both symmetric and asymmetric encryption algorithms, combined with the MD5 hash function to improve digital signatures, ensuring data integrity. Furthermore, the encryption speed of the algorithm and the balance between it and encryption time are considered. Typically, asymmetric encryption algorithms require more time to generate keys than symmetric encryption algorithms, resulting in a slower generation speed. Literature review indicates that the BlowFish algorithm is well-suited for cloud computing data security. Therefore, the proposed method uses the improved symmetric key generation algorithm BlowFish to encrypt data.

[0097] First, the MD5 function is used to generate a hash code of the original data, which serves as a digital signature for user data transmission. This digital signature is used to verify the integrity of the data and is required in subsequent information exchange processes.

[0098] The second step involves encrypting the original data using the improved BlowFish algorithm provided in the embodiments of this application, combined with the user key and digital signature. In a cloud platform environment, the BlowFish algorithm is a symmetric algorithm with relatively short encryption and decryption times.

[0099] The third step involves using Elliptic Curve Cryptography (ECC) to encrypt the user key, ensuring its security. This step is performed asynchronously. In cloud environments, data transmission requires keys with high security and short lengths to guarantee efficient data transfer. Therefore, ECC, using shorter key lengths, has a shorter execution time.

[0100] Finally, we obtain the encrypted key and the encrypted data.

[0101] In addition, to verify the effectiveness of the method provided in this application embodiment, it is compared with the currently mainstream encryption algorithms AES, 3DES, DES, and RSA, and different parameters of the algorithm execution, such as memory usage, throughput, and execution time, are compared. First, a small amount of data (50KB) is used to evaluate the encryption algorithm and analyze its performance when the data is small. Then, a large amount of data (1024KB) is used to evaluate the encryption algorithm.

[0102] (1) Throughput and Execution Time

[0103] First, the evaluation is based on 50KB of data. And... Figure 6 This is a schematic diagram illustrating the algorithm execution time for 50KB of data in an embodiment of this application. Figure 6 The algorithm execution time is compared with that of RSA, AES, DES and 3DES algorithms on a 50KB dataset.

[0104] The execution time results show that the proposed hybrid encryption algorithm reduces execution time by 800, 550, 300, and 400 milliseconds, respectively. Therefore, the method provided in this application uses the BlowFish algorithm with an improved F function module, resulting in a shorter encryption process. Furthermore, the method provided in this application uses ECC only for key encryption and has no impact on the overall algorithm execution time.

[0105] and, Figure 7 This is a schematic diagram illustrating the algorithm throughput when dealing with 50KB of data in an embodiment of this application. Figure 7 The throughput of different algorithms is shown at 50KB of data.

[0106] Experimental results show that, due to the high efficiency of the BlowFish algorithm in the cloud environment, the proposed method has a much higher throughput in the cloud environment than other algorithms.

[0107] Because the size of the data affects the execution time of the algorithm, it is also necessary to compare the running efficiency of the algorithm when the data volume is large. Figure 8 This is a schematic diagram illustrating the algorithm execution time for 1024KB of data in an embodiment of this application. Figure 8 The efficiency of the proposed method and its comparison with other algorithms is shown on a 1024KB dataset.

[0108] like Figure 8 As shown, with a data size of 1024KB, the proposed method executes in less time than other algorithms. Compared to other symmetric encryption algorithms (DES, 3DES, and AES), this algorithm reduces execution time by 230, 230, and 130 milliseconds, respectively, and compared to the asymmetric encryption algorithm (RSA), it reduces execution time by 731 milliseconds. This demonstrates that the proposed method is more efficient.

[0109] in addition, Figure 9 This is a schematic diagram illustrating the algorithm throughput with 1024KB of data in an embodiment of this application. Figure 9 The throughput comparison between the proposed algorithm and other algorithms is shown for 1024KB of data.

[0110] And such as Figure 9 As shown, the proposed method achieves higher throughput per second for 1024KB of data compared to other algorithms. The proposed method's throughput is on average 16% higher than other symmetric encryption algorithms (AES, 3DES, and DES) and 50% higher than the asymmetric encryption algorithm (RSA).

[0111] Furthermore, in the proposed method, data encryption and key encryption are separated. Therefore, using the BlowFish algorithm and elliptic curve cryptography (ECC) keys in parallel does not affect the overall execution time and throughput of the algorithm. This demonstrates that when the original data size is larger, encryption using the improved BlowFish algorithm is faster and performs better. Because ECC is used to encrypt the key simultaneously, the proposed method offers higher security.

[0112] (2) Memory consumption

[0113] Memory consumption is one of the important indicators for evaluating encryption algorithms. Figure 10 This is a schematic diagram illustrating the algorithm's memory consumption when dealing with 50KB of data in an embodiment of this application. Figure 10 The comparison of memory consumption between the proposed method and other algorithms is shown.

[0114] Experimental results show that the proposed method uses less memory compared to other algorithms. The main factors affecting memory consumption are the number of algorithm operations and the key size; therefore, a 50KB dataset is sufficient to test the algorithm's memory consumption. The use of an improved BlowFish algorithm as the core encryption algorithm results in lower memory usage.

[0115] Therefore, the method provided in this application proposes an improved encryption algorithm that offers high efficiency, high performance, and security, applicable to cloud environments. Since the core of the proposed algorithm is based on an improved BlowFish encryption algorithm, it reduces the encryption time, improves encryption efficiency and throughput. Furthermore, the use of ECC to encrypt the key used for data encryption reduces security issues inherent in symmetric key exchange algorithms.

[0116] In addition to the above, the proposed algorithm also uses MD5-based digital signatures to provide data integrity and verify information communication between users and the cloud platform.

[0117] Experimental evaluation results show that, compared with AES, DES, 3DES and RSA algorithms, the proposed algorithm outperforms other encryption algorithms in terms of throughput, memory usage and execution time.

[0118] In summary, the data encryption method provided in this application obtains the original data to be encrypted from the cloud; encrypts the original data using a target BlowFish algorithm and an original key to obtain encrypted original data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm; encrypts the original key to obtain an encrypted original key; and saves the encrypted original data and the encrypted original key to the cloud, thus solving the problem of poor encryption effect for data in the cloud in related technologies. By using the improved BlowFish algorithm and the original key to encrypt the original data, the efficiency of data encryption can be improved. Furthermore, encrypting the original key simultaneously and saving the encrypted original data and the encrypted original key to the cloud ensures the security of cloud computing, thereby improving the encryption effect for data in the cloud.

[0119] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0120] This application also provides a data encryption device. It should be noted that the data encryption device of this application can be used to execute the data encryption method provided in this application. The data encryption device provided in this application is described below.

[0121] Figure 11 This is a schematic diagram of a data encryption device according to an embodiment of this application. Figure 11As shown, the device includes: a first acquisition unit 1101, a first encryption unit 1102, a second encryption unit 1103, and a first storage unit 1104.

[0122] Specifically, the first acquisition unit 1101 is used to acquire the original data to be encrypted in the cloud;

[0123] The first encryption unit 1102 is used to encrypt the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data. The target BlowFish algorithm is an improved version of the original BlowFish algorithm.

[0124] The second encryption unit 1103 is used to encrypt the original key to obtain the encrypted original key;

[0125] The first storage unit 1104 is used to save the encrypted original data and the encrypted original key to the cloud.

[0126] In summary, the data encryption device provided in this application embodiment acquires the original data to be encrypted from the cloud through a first acquisition unit 1101; a first encryption unit 1102 encrypts the original data using a target BlowFish algorithm and an original key to obtain encrypted original data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm; a second encryption unit 1103 encrypts the original key to obtain an encrypted original key; and a first storage unit 1104 saves the encrypted original data and the encrypted original key to the cloud, thus solving the problem of poor encryption effect for data in the cloud in related technologies. By using the improved BlowFish algorithm and the original key to encrypt the original data, the efficiency of data encryption can be improved. Furthermore, encrypting the original key simultaneously and saving the encrypted original data and the encrypted original key to the cloud ensures the security of cloud computing, thereby improving the encryption effect for data in the cloud.

[0127] Optionally, in the data encryption device provided in the embodiments of this application, the device further includes: a first determining unit, used to determine the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm before encrypting the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data; and a first changing unit, used to change the calculation method of the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm to obtain the target BlowFish algorithm.

[0128] Optionally, in the data encryption device provided in the embodiments of this application, the first modification unit includes: a first accumulation module, used to accumulate the first calculation module and the second calculation module in the original BlowFish algorithm to obtain a first calculation result; a second accumulation module, used to accumulate the third calculation module and the fourth calculation module in the original BlowFish algorithm to obtain a second calculation result; and a first XOR module, used to perform an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

[0129] Optionally, in the data encryption device provided in the embodiments of this application, the device further includes: a first receiving unit, configured to receive a target request sent by a target object after the encrypted original data and the encrypted original key are saved to the cloud, wherein the target request is used to request access to the encrypted original data in the cloud; a second obtaining unit, configured to obtain the digital signature corresponding to the original data according to the target request; and a second determining unit, configured to determine the access result of the target object accessing the encrypted original data in the cloud based on the digital signature corresponding to the original data.

[0130] Optionally, in the data encryption device provided in the embodiments of this application, the device further includes: a third acquisition unit, used to acquire the original data before acquiring the encrypted original key and the digital signature corresponding to the original data according to the target request; a first processing unit, used to process the original data using a hash function to obtain the processed original data; and a third determination unit, used to use the processed original data as the digital signature.

[0131] Optionally, in the data encryption device provided in this application embodiment, the second determining unit includes: a second determining module, used to determine the identity information of the target object based on the digital signature corresponding to the original data; a first determining module, used to determine whether the target object has permission to access the encrypted original data in the cloud based on the identity information of the target object; a third determining module, used to determine that the target object has successfully accessed the encrypted original data in the cloud if the target object has permission to access the encrypted original data in the cloud; and a fourth determining module, used to determine that the target object has failed to access the encrypted original data in the cloud if the target object does not have permission to access the encrypted original data in the cloud.

[0132] Optionally, in the data encryption device provided in the embodiments of this application, the device further includes: a fourth acquisition unit, used to, after determining whether the target object has permission to access the encrypted original data in the cloud, if the target object has permission to access the encrypted original data in the cloud, acquire the encrypted original key and decrypt the encrypted original key to obtain the original key; and a second processing unit, used to decrypt the encrypted original data in the cloud using the original key to obtain the original data and return the original data to the target object.

[0133] The data encryption device includes a processor and a memory. The first acquisition unit 1101, the first encryption unit 1102, the second encryption unit 1103, and the first storage unit 1104 are all stored in the memory as program units. The processor executes the program units stored in the memory to achieve the corresponding functions.

[0134] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured; adjusting kernel parameters can improve the encryption effectiveness of data in the cloud.

[0135] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0136] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a method for encrypting the data.

[0137] This invention provides a processor for running a program, wherein the program executes a data encryption method during runtime.

[0138] like Figure 12 As shown, this embodiment of the invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: acquiring raw data to be encrypted in the cloud; encrypting the raw data using a target BlowFish algorithm and a raw key to obtain encrypted raw data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm; encrypting the raw key to obtain an encrypted raw key; and saving the encrypted raw data and the encrypted raw key to the cloud.

[0139] When the processor executes the program, it also performs the following steps: before encrypting the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data, the method further includes: determining the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm; changing the calculation method of the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm to obtain the target BlowFish algorithm.

[0140] When the processor executes the program, it also performs the following steps: changing the calculation methods of the first, second, third, and fourth calculation modules in the original BlowFish algorithm to obtain the target BlowFish algorithm includes: performing an accumulation operation on the first and second calculation modules in the original BlowFish algorithm to obtain a first calculation result; performing an accumulation operation on the third and fourth calculation modules in the original BlowFish algorithm to obtain a second calculation result; and performing an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

[0141] When the processor executes the program, it also performs the following steps: after saving the encrypted original data and the encrypted original key to the cloud, the method further includes: receiving a target request sent by a target object, wherein the target request is used to request access to the encrypted original data in the cloud; obtaining a digital signature corresponding to the original data based on the target request; and determining the access result of the target object accessing the encrypted original data in the cloud based on the digital signature corresponding to the original data.

[0142] When the processor executes the program, it also performs the following steps: before obtaining the encrypted original key and the digital signature corresponding to the original data according to the target request, the method further includes: obtaining the original data; processing the original data using a hash function to obtain processed original data; and using the processed original data as the digital signature.

[0143] When the processor executes the program, it also performs the following steps: determining the access result of the target object to the encrypted original data in the cloud based on the digital signature corresponding to the original data includes: determining the identity information of the target object based on the digital signature corresponding to the original data; determining whether the target object has permission to access the encrypted original data in the cloud based on the identity information of the target object; if the target object has permission to access the encrypted original data in the cloud, then it is determined that the target object has successfully accessed the encrypted original data in the cloud; if the target object does not have permission to access the encrypted original data in the cloud, then it is determined that the target object has failed to access the encrypted original data in the cloud.

[0144] When the processor executes the program, it also performs the following steps: after determining whether the target object has permission to access the encrypted original data in the cloud, the method further includes: if the target object has permission to access the encrypted original data in the cloud, then obtaining the encrypted original key, decrypting the encrypted original key to obtain the original key; using the original key to decrypt the encrypted original data in the cloud to obtain the original data, and returning the original data to the target object.

[0145] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0146] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: obtaining raw data to be encrypted in the cloud; encrypting the raw data using a target BlowFish algorithm and a raw key to obtain encrypted raw data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm; encrypting the raw key to obtain an encrypted raw key; and saving the encrypted raw data and the encrypted raw key to the cloud.

[0147] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: before encrypting the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data, the method further includes: determining the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm; changing the calculation method of the first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm to obtain the target BlowFish algorithm.

[0148] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: changing the calculation methods of the first, second, third, and fourth calculation modules in the original BlowFish algorithm to obtain the target BlowFish algorithm includes: performing an accumulation operation on the first and second calculation modules in the original BlowFish algorithm to obtain a first calculation result; performing an accumulation operation on the third and fourth calculation modules in the original BlowFish algorithm to obtain a second calculation result; and performing an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

[0149] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: after saving the encrypted original data and the encrypted original key to the cloud, the method further includes: receiving a target request sent by a target object, wherein the target request is used to request access to the encrypted original data in the cloud; obtaining a digital signature corresponding to the original data based on the target request; and determining the access result of the target object accessing the encrypted original data in the cloud based on the digital signature corresponding to the original data.

[0150] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: before obtaining the encrypted original key and the digital signature corresponding to the original data according to the target request, the method further includes: obtaining the original data; processing the original data using a hash function to obtain processed original data; and using the processed original data as the digital signature.

[0151] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: determining the access result of the target object to the encrypted original data in the cloud based on the digital signature corresponding to the original data, including: determining the identity information of the target object based on the digital signature corresponding to the original data; determining whether the target object has permission to access the encrypted original data in the cloud based on the identity information of the target object; if the target object has permission to access the encrypted original data in the cloud, then determining that the target object has successfully accessed the encrypted original data in the cloud; if the target object does not have permission to access the encrypted original data in the cloud, then determining that the target object has failed to access the encrypted original data in the cloud.

[0152] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: after determining whether the target object has permission to access the encrypted original data in the cloud, the method further includes: if the target object has permission to access the encrypted original data in the cloud, then obtaining the encrypted original key, decrypting the encrypted original key to obtain the original key; using the original key to decrypt the encrypted original data in the cloud to obtain the original data, and returning the original data to the target object.

[0153] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0154] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0155] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0156] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.

[0157] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0158] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0159] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0160] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0161] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0162] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for encrypting data, characterized in that, include: Retrieve the raw data to be encrypted from the cloud; The original data is encrypted using the target BlowFish algorithm and the original key to obtain the encrypted original data. The target BlowFish algorithm is an improved version of the original BlowFish algorithm. The original key is encrypted using an elliptic curve cryptography algorithm to obtain the encrypted original key; The encrypted original data and the encrypted original key are saved to the cloud. The improvement of the original BlowFish algorithm to obtain the target BlowFish algorithm includes: performing an accumulation operation on the first and second calculation modules in the original BlowFish algorithm to obtain a first calculation result; performing an accumulation operation on the third and fourth calculation modules in the original BlowFish algorithm to obtain a second calculation result; and performing an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

2. The method according to claim 1, characterized in that, Before encrypting the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data, the method further includes: The first calculation module, the second calculation module, the third calculation module, and the fourth calculation module in the original BlowFish algorithm are determined; The target BlowFish algorithm is obtained by changing the calculation methods of the first, second, third, and fourth calculation modules in the original BlowFish algorithm.

3. The method according to claim 1, characterized in that, After saving the encrypted original data and the encrypted original key to the cloud, the method further includes: Receive a target request sent by a target object, wherein the target request is used to request access to the encrypted original data in the cloud; Based on the target request, obtain the digital signature corresponding to the original data; Based on the digital signature corresponding to the original data, the access result of the target object to the encrypted original data in the cloud is determined.

4. The method according to claim 3, characterized in that, Before obtaining the encrypted original key and the digital signature corresponding to the original data according to the target request, the method further includes: Obtain the original data; The original data is processed using a hash function to obtain the processed original data; The processed original data is used as the digital signature.

5. The method according to claim 3, characterized in that, Based on the digital signature corresponding to the original data, the access result of the target object to the encrypted original data in the cloud is determined as follows: Based on the digital signature corresponding to the original data, the identity information of the target object is determined; Based on the identity information of the target object, determine whether the target object has permission to access the encrypted original data in the cloud; If the target object has permission to access the encrypted original data in the cloud, then it is determined that the target object has successfully accessed the encrypted original data in the cloud. If the target object does not have permission to access the encrypted original data in the cloud, then it is determined that the target object's access to the encrypted original data in the cloud has failed.

6. The method according to claim 5, characterized in that, After determining whether the target object has permission to access the encrypted original data in the cloud, the method further includes: If the target object has permission to access the encrypted original data in the cloud, then the encrypted original key is obtained, and the encrypted original key is decrypted to obtain the original key; The original key is used to decrypt the encrypted original data in the cloud to obtain the original data, and the original data is returned to the target object.

7. A data encryption device, characterized in that, include: The first acquisition unit is used to acquire the original data to be encrypted in the cloud; The first encryption unit is used to encrypt the original data using the target BlowFish algorithm and the original key to obtain the encrypted original data, wherein the target BlowFish algorithm is an improved version of the original BlowFish algorithm. The second encryption unit is used to encrypt the original key using an elliptic curve cryptography algorithm to obtain the encrypted original key; The first storage unit is used to save the encrypted original data and the encrypted original key to the cloud. The encryption device further includes: a first accumulation module, used to accumulate the first calculation module and the second calculation module in the original BlowFish algorithm to obtain a first calculation result; a second accumulation module, used to accumulate the third calculation module and the fourth calculation module in the original BlowFish algorithm to obtain a second calculation result; and a first XOR module, used to perform an XOR operation on the first calculation result and the second calculation result to obtain the target BlowFish algorithm.

8. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the data encryption method according to any one of claims 1 to 6.