Blockchain-based encryption and decryption methods and devices
By using blockchain-based encryption and decryption methods, and leveraging the transformation and computation of public and private keys, the problem of insufficient data storage security is solved, achieving secure, transparent, and reliable data protection.
Patent Information
- Application Number
- CN202411447322.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-10-16
AI Technical Summary
Existing data storage methods are lacking in terms of security and privacy, making it crucial to improve data storage security.
By using a blockchain-based encryption method, the data to be encrypted is sampled, transformed and encrypted using a public key, and then encrypted data is generated and stored on the blockchain. At the same time, the private key is used for decryption, thereby improving the security and transparency of the data.
It achieves more secure, transparent and reliable data protection, enhances resistance to data attacks, and improves data security by leveraging the immutability and decentralization of blockchain.
Smart Images

Figure CN119357998B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of data processing, and in particular to a blockchain-based encryption and decryption method and apparatus. Background Technology
[0002] With the continuous development of Internet technology and the increasing amount of data resources, more and more users are beginning to transmit data through the Internet. Users can download the data they need from the Internet for use, which greatly improves convenience. However, as the amount of data on the Internet continues to increase, in order to ensure the timeliness and transmission efficiency of data, cloud storage services have begun to be established for data storage. However, the current storage methods still have problems such as security and privacy.
[0003] Currently, algorithms such as AES and RSA can be used to encrypt data and ensure its confidentiality during transmission and storage. Hash values can be generated based on hash functions to ensure data integrity. Centralized entities can be relied upon to verify the integrity and authenticity of data. Data traceability can also be ensured by regularly recording data change history, audit logs, and backup data. However, the above methods still have shortcomings in terms of data security. How to improve the security of data storage has become a key focus of attention for all parties. Summary of the Invention
[0004] The purpose of one embodiment of this specification is to provide a blockchain-based encryption processing method and apparatus to improve the effectiveness and security of data storage.
[0005] To solve the above-mentioned technical problems, one embodiment of this specification is implemented as follows:
[0006] Firstly, one embodiment of this specification provides a blockchain-based encryption processing method, comprising:
[0007] Acquire the data to be encrypted and perform data sampling to obtain the first sampled data and the second sampled data;
[0008] The first sampled data is transformed using the public key to obtain the transformation parameters;
[0009] Encryption calculations are performed based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data.
[0010] The user identifier and the encrypted data are sent to the blockchain node for on-chain storage.
[0011] The blockchain-based encryption method provided in this embodiment first samples the data to be encrypted to obtain first sampled data and second sampled data during the data encryption process. Then, the first sampled data is transformed according to the public key to obtain transformation parameters. Finally, encryption calculations are performed based on preset parameters, transformation parameters, and second sampled data to obtain encrypted data. In this way, data encryption is performed to improve the resistance to data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage. Thus, by storing encrypted data on the blockchain, more secure, transparent, and reliable data protection is achieved.
[0012] Secondly, another embodiment of this specification provides a blockchain-based decryption processing method, including:
[0013] Based on the user identifier in the data access request, data is read from the blockchain to obtain encrypted data;
[0014] Based on preset parameters and the encrypted data, perform inverse encryption calculation to obtain transformation parameters;
[0015] The transformation parameters are decrypted and calculated using the private key to obtain the first sampled data;
[0016] The data to be encrypted is obtained by transforming the first sampled data and the encrypted data.
[0017] The blockchain-based decryption method provided in this embodiment first reads data from the blockchain based on the user identifier to obtain encrypted data. Then, during the decryption process, it first performs inverse encryption calculations based on preset parameters and the encrypted data to obtain transformation parameters. Next, it performs decryption calculations on the transformation parameters using the private key to obtain first sample data. Finally, it performs transformation processing based on the first sample data and the encrypted data to obtain the data to be encrypted. Thus, by combining the private key and the decryption algorithm, it decrypts the encrypted data stored on the blockchain, improving data security.
[0018] Thirdly, another embodiment of this specification provides a blockchain-based encryption processing apparatus, comprising:
[0019] The data sampling module is used to acquire the data to be encrypted and perform data sampling to obtain the first sampled data and the second sampled data.
[0020] The transformation processing module is used to transform the first sampled data according to the public key to obtain transformation parameters;
[0021] An encryption calculation module is used to perform encryption calculations based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data;
[0022] The data sending module is used to send the user identifier and the encrypted data to the blockchain node for on-chain storage.
[0023] Fourthly, another embodiment of this specification provides a blockchain-based decryption processing apparatus, comprising:
[0024] The data reading module is used to read data from the blockchain based on the user identifier in the data access request and obtain encrypted data;
[0025] The encryption inverse calculation module is used to perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters;
[0026] The decryption calculation module is used to decrypt and calculate the transformation parameters based on the private key to obtain the first sampled data;
[0027] The transformation processing module is used to perform transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted.
[0028] Fifthly, another embodiment of this specification provides a blockchain-based encryption processing device, comprising: a memory, a processor, and computer-executable instructions stored in the memory and executable on the processor, wherein the computer-executable instructions, when executed by the processor, implement the steps of the blockchain-based encryption processing method as described in the first aspect above.
[0029] In a sixth aspect, another embodiment of this specification provides a blockchain-based decryption processing device, comprising: a memory, a processor, and computer-executable instructions stored in the memory and executable on the processor, wherein the computer-executable instructions, when executed by the processor, implement the steps of the blockchain-based decryption processing method as described in the second aspect above.
[0030] In a seventh aspect, this specification provides a computer-readable storage medium in another embodiment for storing computer-executable instructions that, when executed by a processor, implement the steps of the blockchain-based cryptographic processing method described in the first aspect above.
[0031] Eighthly, in another embodiment of this specification, a different computer-readable storage medium is provided for storing computer-executable instructions that, when executed by a processor, implement the steps of the blockchain-based decryption processing method described in the second aspect above.
[0032] In a ninth aspect, this specification provides a computer program product in another embodiment, the computer program product including a blockchain-based encryption processing program, the blockchain-based encryption processing program being executed by a processor to implement the steps of the blockchain-based encryption processing method as described in the first aspect above.
[0033] In a tenth aspect, this specification provides another computer program product in a further embodiment, the computer program product including a blockchain-based encryption processing program, the blockchain-based encryption processing program being executed by a processor to implement the steps of the blockchain-based decryption processing method as described in the second aspect above. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in one or more embodiments of this specification, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 A flowchart illustrating a blockchain-based encryption process is provided as one embodiment of this specification.
[0036] Figure 2 A timing diagram of a key pair generation process provided in one embodiment of this specification;
[0037] Figure 3 A data encryption timing diagram provided as an embodiment of this specification;
[0038] Figure 4 This specification provides a flowchart of a blockchain-based encryption method for data encryption scenarios, as an embodiment of the present specification.
[0039] Figure 5 A flowchart illustrating a blockchain-based decryption process is provided as one embodiment of this specification.
[0040] Figure 6 A data decryption timing diagram provided as an embodiment of this specification;
[0041] Figure 7 This specification provides a flowchart of a blockchain-based decryption method for data decryption scenarios, as an embodiment of the present specification.
[0042] Figure 8 A schematic diagram of a blockchain-based encryption processing device provided for one embodiment of this specification;
[0043] Figure 9A schematic diagram of a blockchain-based decryption processing device provided for one embodiment of this specification;
[0044] Figure 10 This is a schematic diagram of the structure of a blockchain-based encryption processing device provided in one embodiment of this specification;
[0045] Figure 11 This is a schematic diagram of a blockchain-based decryption processing device provided as an embodiment of this specification. Detailed Implementation
[0046] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0047] This specification provides an embodiment of a blockchain-based encryption processing method:
[0048] Reference Figure 1 The diagram illustrates a blockchain-based encryption processing method provided in this embodiment. The blockchain-based encryption processing method provided in this embodiment specifically includes the following steps S102 to S108.
[0049] Step S102: Obtain the data to be encrypted and perform data sampling to obtain the first sampled data and the second sampled data.
[0050] The data to be encrypted in this embodiment can be sensitive data that needs to be encrypted, such as user privacy data; or important data that users or organizations need to store in encryption. This embodiment does not limit the scope of the data.
[0051] In practice, during the data encryption process, data encryption is performed based on both the encryption algorithm (lattice encryption algorithm) and the public key. Since data encryption is based on the public key, after obtaining the data to be encrypted, the public key is first read based on the user identifier.
[0052] In the specific implementation process, when a user registers, transacts, or updates their key pair, the trusted blockchain application generates a key pair for the user. In one optional implementation provided in this embodiment, the key pair is generated in the following manner:
[0053] Send a key pair generation request containing user information to the blockchain trusted application; the blockchain trusted application generates a user identifier and a key pair based on the key pair generation request, and stores the user identifier, key pair and user information together;
[0054] Receive public keys sent by trusted blockchain applications.
[0055] Specifically, to ensure data security and prevent the leakage of public or private keys due to the use of the same user identifier to obtain them, trusted blockchain applications can regenerate the user identifier and user information associated with each key pair, thereby ensuring the security of the key pair. Furthermore, after generating the key pair, in addition to sending the public key to the user, trusted blockchain applications also upload the public key to blockchain storage to ensure its immutability.
[0056] It should be noted that the blockchain-based encryption method provided in this embodiment can be applied to service providers. These service providers can be those that provide data encryption to users or those that provide data transactions to users. This embodiment does not impose any limitations on these service providers.
[0057] For example, such as Figure 2 The sequence diagram shown illustrates the key pair generation process. After receiving the user's key pair generation request, the service provider sends the request to the trusted blockchain application. Upon receiving the request, the trusted blockchain application generates a key pair, stores the private key, returns the public key to the service provider, and stores the public key in the blockchain storage system in the cloud environment.
[0058] In specific implementation, after obtaining the data to be encrypted, the data is encrypted based on the public key and the lattice encryption algorithm. In the specific process of encrypting the data based on both the lattice encryption algorithm and the public key, the obtained data to be encrypted is first sampled to obtain first sampled data and second sampled data. In an optional implementation provided in this embodiment, during the data sampling process, the data to be encrypted is sampled according to the first sampling strategy to obtain first sampled data, and the data to be encrypted is sampled according to the second sampling strategy to obtain second sampled data.
[0059] Specifically, to ensure effective data encryption, data initialization and random matrix generation are required before sampling the data to be encrypted. During data initialization, the public key, the data to be encrypted, the random bit string, and the structure field parameters are obtained. For example, the public key pk, the data to be encrypted m, the random bit string r, and the NT2 (Number Theoretic Transform over a Field of Characteristic 2) structure field parameter (k, 1) are obtained. During random matrix generation, a random matrix is generated in the NTT (Number Theoretic Transform) field. For example, a matrix of size k is created in the NT2 field. A random matrix A is given by k. Each element at position (i, j) in random matrix A can be generated by the XOF (Extendable Output Function) function based on the input (σ, i, j). The domain parameters can be lattice parameters, such as the parameters p and q specified for the NT2 domain.
[0060] In other words, during the data encryption process based on the lattice encryption algorithm and the public key, data initialization is first performed to obtain the public key, the data to be encrypted, the random bit string, and the structural domain parameters. Then, a random matrix is generated to obtain a random matrix of a preset size. Next, the data to be encrypted is sampled according to a first sampling strategy to obtain first sampled data, and then the data to be encrypted is sampled according to a second sampling strategy to obtain second sampled data. Specifically, during the data sampling process according to the first sampling strategy, a preset number of data samples can be taken from a random modulus of the data to be encrypted using an incremental pseudo-random function to obtain the first sampled data. Since there are two dimensions in the structural domain during the data encryption calculation process... Therefore, in one optional implementation of this embodiment, during the process of sampling the data to be encrypted according to the second sampling strategy to obtain the second sampled data, the data is sampled a preset number of times in the first modulus of the data to be encrypted according to the pseudo-random function to obtain the first sub-sampled data, and the data is sampled a starting number of times in the second modulus of the data to be encrypted according to the pseudo-random function to obtain the second sub-sampled data; that is, the second sampled data is obtained by sampling the data in at least one modulus of the data to be encrypted according to the pseudo-random function; optionally, the sampling number of the first sub-sampled data in the second sampled data is a preset number; the sampling number of the second sub-sampled data is 1 time; thereby, randomness is increased in the encryption process by using random values to improve the security of data encryption.
[0061] For example, a pseudo-random function with an increment of N is used to sample k times from a random modulus of the data to be encrypted to obtain the first sampled data r. A pseudo-random function is used to sample k times from a random modulus of the data to be encrypted to obtain the first sub-sampled data e1. A pseudo-random function is used to sample once from another random modulus of the data to be encrypted to obtain the second sub-sampled data e2.
[0062] Step S104: Transform the first sampled data according to the public key to obtain transformation parameters.
[0063] After obtaining the data to be encrypted and performing data sampling to obtain the first sampled data and the second sampled data, in this step, the first sampled data is transformed according to the public key to obtain the transformation parameters.
[0064] In practice, after obtaining the first sampled data, the first sampled data is transformed according to the public key. In the process of transformation, the first sampled data r is converted into the NT2 field, and the NT2 number theory transformation is performed on r according to the public key to obtain the transformation parameter sr.
[0065] Step S106: Perform encryption calculations based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data.
[0066] Based on the transformation parameters obtained above, this step involves performing encryption calculations based on preset parameters, transformation parameters, and second sampled data to obtain encrypted data.
[0067] Optionally, the preset parameters include the aforementioned structural domain parameters, random matrix, and / or preset number of iterations.
[0068] In the specific execution process, in order to obtain the specified parameters corresponding to the transformation parameters in the structural domain, in an optional implementation method provided in this embodiment, the process of obtaining encrypted data by performing encryption calculation based on preset parameters, transformation parameters, and second sampled data can be achieved in the following way:
[0069] The first encryption parameter is calculated based on the structural domain parameter, the random matrix, the preset number of times, the transformation parameter, and the first sub-sampled data;
[0070] The second encryption parameter is calculated based on the structural domain parameter, the random matrix, the transformation parameter, and the second subsampled data;
[0071] The first encryption parameter and the second encryption parameter are determined as the encrypted data.
[0072] For example, if the first encryption parameter is p and the second encryption parameter is q, p can be calculated using the following formula:
[0073]
[0074] in, The number is random; calculate q using the following formula:
[0075]
[0076] The first encryption parameter and the second encryption parameter are calculated using the above method, and then used as encrypted data.
[0077] It should also be noted that, to improve the convenience of storage and transmission, after calculating and obtaining the first and second encryption parameters, the first and second encryption parameters can be encoded and compressed, and the encoded and compressed first and second encryption parameters can be used as encrypted data. In an optional implementation provided in this embodiment, in the process of obtaining encrypted data through encryption calculation based on preset parameters, transformation parameters, and second sampled data, encryption calculation can first be performed according to the preset parameters, the transformation parameters, and the second sampled data to obtain encryption parameters, and then the encryption parameters can be compressed to obtain encrypted data. For example, after calculating and obtaining the above p and q, p and q can be compressed and encoded to obtain encrypted data f1 and f2.
[0078] Step S108: Send the user identifier and the encrypted data to the blockchain node for on-chain storage.
[0079] After encrypting the data to be encrypted using a public-key cryptography algorithm, the user identifier and the encrypted data are sent to a blockchain node for on-chain storage to ensure the transparency and security of the encrypted data. Figure 3 The data encryption sequence diagram shown illustrates how the service provider obtains the user's data to be encrypted, encrypts the data using a public key and a lattice encryption algorithm, obtains encrypted data, and stores the encrypted data on a blockchain node in a cloud-based blockchain storage system.
[0080] Based on this, users can also access encrypted data. During the process of accessing the data to be encrypted, the encrypted data needs to be decrypted to obtain the data to be encrypted. Corresponding to the above-mentioned data encryption based on public key and lattice encryption algorithm, during the data decryption process, data decryption can be performed based on private key and lattice decryption algorithm. In one optional implementation provided in this embodiment, data decryption is performed in the following manner:
[0081] Based on the user identifier in the data access request, data is read from the blockchain to obtain encrypted data;
[0082] Based on preset parameters and the encrypted data, perform inverse encryption calculation to obtain transformation parameters;
[0083] The transformation parameters are decrypted and calculated using the private key to obtain the first sampled data;
[0084] The data to be encrypted is obtained by transforming the first sampled data and the encrypted data.
[0085] In the specific execution process, since the transformation parameters need to be decrypted and calculated based on the private key, and the private key is the key to the decryption process, its security and privacy are crucial. Exposing the private key to the outside world would lead to the leakage of encrypted data. Therefore, the private key is stored in a trusted blockchain application, and after the user's identity verification is successful, the private key is issued to the service provider so that the service provider can decrypt the data based on the private key. During the identity verification process, to protect the user's sensitive personal information and prevent the leakage of user information, zero-knowledge proof technology can be used for identity verification. Specifically, in the technical solution of this application, after reading the data from the blockchain based on the user identifier in the data access request and obtaining the encrypted data, the following operations are also performed:
[0086] A zero-knowledge proof is generated based on the user identifier, and the user identifier and the zero-knowledge proof are sent to a trusted blockchain application.
[0087] Receive the private key returned by the trusted blockchain application after the user identifier and the zero-knowledge proof have been verified.
[0088] Specifically, the service provider applies to a zero-knowledge certification authority to generate a zero-knowledge proof. The zero-knowledge certification authority generates the zero-knowledge proof based on the user's password information and randomly generated challenge information and returns it to the service provider. After receiving the zero-knowledge proof, the service provider sends a private key application, including the user identifier and the zero-knowledge proof, to the trusted blockchain application. If the trusted blockchain application verifies that the user identifier and the zero-knowledge proof are valid, it returns the private key to the service provider. In this way, zero-knowledge certification technology is introduced into the private key generation process, which not only securely verifies the user's identity but also avoids the leakage of authentication information, improves the security and privacy of the private key application process, and provides users with a more secure and reliable encryption service.
[0089] In practice, the service provider reads data from the blockchain based on the user identifier in the data access request. After obtaining the encrypted data, it requests a private key from the trusted blockchain application and receives the private key returned by the application. Then, it decrypts the data using the private key and a lattice decryption algorithm. During the decryption process, a reverse encryption calculation is first performed based on preset parameters and the encrypted data to obtain transformation parameters. Corresponding to the above process, after calculating and obtaining the encrypted parameters, the encrypted parameters are compressed. In an optional implementation provided in this embodiment, during the reverse encryption calculation based on the preset parameters and the encrypted data to obtain the transformation parameters, the encrypted data is first decompressed to obtain the encrypted parameters. Then, a reverse encryption calculation is performed based on the encrypted parameters and the preset parameters to obtain the transformation parameters. Thus, the encrypted parameters are recovered for decryption using the private key.
[0090] For example, decompress f1 and f2 in the encrypted data to obtain p and q; calculate the transformation parameter sr by following the inverse calculation process of p1 and p2.
[0091] After calculating the transformation parameters, the transformation parameters are decrypted using the private key to obtain the first sampled data; for example, the transformation parameter sr is decrypted using the private key to obtain r. Further, transformation processing is performed based on the first sampled data and the encrypted data to obtain the data to be encrypted. Optionally, since the encrypted data contains a first encryption parameter and a second encryption parameter, in one optional implementation of this embodiment, the following operations are performed during the transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted:
[0092] Calculate the first region based on the first sampled data and the first encryption parameter, and calculate the second region based on the first sampled data and the second encryption parameter;
[0093] Calculate the shared area between the first region and the second region;
[0094] The shared region in the structural domain is deleted to obtain the remaining region, and the data to be encrypted is determined based on the remaining region.
[0095] For example, calculate the dot product of r with p and q in the NT2 domain to obtain the common part of the regions corresponding to the two dot products, and remove the common part from the NT2 domain to obtain the data to be encrypted.
[0096] In summary, the blockchain-based encryption method provided in this embodiment, after obtaining the data to be encrypted, encrypts the data according to the public key and lattice encryption algorithm, obtains the encrypted data, and sends the user identifier and encrypted data to the blockchain node for on-chain storage. During the data encryption process, the data to be encrypted is first sampled to obtain first sampled data and second sampled data. Then, the first sampled data undergoes a number theory transformation of its structural domain according to the public key to obtain transformation parameters. Encryption calculations are then performed based on preset parameters, transformation parameters, and second sampled data to obtain encryption parameters, which are then encoded and compressed to obtain encrypted data. This approach introduces the lattice encryption algorithm for data encryption, leveraging its high security characteristics to better adapt to the needs of large-scale data encryption and enhance resistance to evolving quantum attacks. Furthermore, by introducing blockchain into the cloud environment, the immutability and decentralization of blockchain enhance the security and trustworthiness of encrypted data. Combining blockchain and lattice encryption algorithms provides a novel data protection mechanism, offering a more secure, transparent, and reliable cloud data protection solution.
[0097] The following combination Figure 4 Taking the application of the blockchain-based encryption method provided in this embodiment in a data encryption scenario as an example, the blockchain-based encryption method provided in this embodiment will be further explained. (Refer to...) Figure 4 The blockchain-based encryption processing method applied to data encryption scenarios specifically includes steps S402 to S418.
[0098] Step S402: Obtain the data to be encrypted.
[0099] Step S404: Sample data a preset number of times from the random modulus of the data to be encrypted using an incremental pseudo-random function to obtain the first sampled data.
[0100] Step S406: Sample data a preset number of times from the first random modulus of the data to be encrypted using a pseudo-random function to obtain the second sampled data.
[0101] Optionally, the first random modulus and the random modulus in step S404 can be the same random modulus or different random moduli.
[0102] Step S408: Sample the data once from the second random modulus of the data to be encrypted using a pseudo-random function to obtain the third sampled data.
[0103] Optionally, the second random modulus and the random modulus in step S404 can be the same random modulus or different random modulus, but the second random modulus and the first random modulus are different random modulus of the data to be encrypted.
[0104] It should be noted that the execution order of steps S404, S406 and S408 is not limited here.
[0105] Step S410: Read the public key according to the user identifier, and perform a number theory transformation of the structural domain on the first sampled data according to the public key to obtain the transformation parameters.
[0106] Step S412: Calculate the first encryption parameter based on the structural domain parameter, random matrix, preset number of iterations, transformation parameter, and second sampled data.
[0107] Step S414: Calculate the second encryption parameter based on the structural domain parameter, the random matrix, the transformation parameter, and the third sampled data.
[0108] It should be noted that the execution order of steps S412 and S414 is not limited here.
[0109] Step S416: Encode and compress the first encryption parameter and the second encryption parameter to obtain encrypted data.
[0110] Step S418: Send the user identifier and encrypted data to the blockchain node for on-chain storage.
[0111] It should be noted that any one or more steps from S402 to S418 can be combined to form a new implementation method according to the needs of implementation and deployment. Furthermore, any one or more technical features in the technical solution composed of steps S402 to S418 can also be combined to form a new implementation method according to the actual deployment needs, or the technical features in one or more optional implementations provided by steps S102 to S108 can be combined to form a new implementation method. These will not be elaborated on here.
[0112] This specification provides an example of a blockchain-based decryption processing method:
[0113] The blockchain-based decryption method provided in this embodiment corresponds to the relevant content of the blockchain-based encryption method described above. Therefore, when reading this embodiment, you can refer to the relevant content of the above embodiments, and vice versa.
[0114] Reference Figure 5 The diagram illustrates a blockchain-based decryption processing method provided in this embodiment. The blockchain-based decryption processing method provided in this embodiment specifically includes the following steps S502 to S508.
[0115] Step S502: Read data from the blockchain based on the user identifier in the data access request to obtain encrypted data.
[0116] In the specific execution process, since the transformation parameters need to be decrypted and calculated based on the private key, and the private key is the key to the decryption process, its security and privacy are crucial. Exposing the private key to the outside world would lead to the leakage of encrypted data. Therefore, the private key is stored in a trusted blockchain application, and after the user's identity verification is successful, the private key is issued to the service provider so that the service provider can decrypt the data based on the private key. During the identity verification process, to protect the user's sensitive personal information and prevent the leakage of user information, zero-knowledge proof technology can be used for identity verification. Specifically, in the technical solution of this application, after reading the data from the blockchain based on the user identifier in the data access request and obtaining the encrypted data, the following operations are also performed:
[0117] A zero-knowledge proof is generated based on the user identifier, and the user identifier and the zero-knowledge proof are sent to a trusted blockchain application.
[0118] Receive the private key returned by the trusted blockchain application after the user identifier and the zero-knowledge proof have been verified.
[0119] Specifically, the service provider applies to a zero-knowledge certification authority to generate a zero-knowledge proof. The zero-knowledge certification authority generates the zero-knowledge proof based on the user's password information and randomly generated challenge information and returns it to the service provider. After receiving the zero-knowledge proof, the service provider sends a private key application, including the user identifier and the zero-knowledge proof, to the trusted blockchain application. If the trusted blockchain application verifies that the user identifier and the zero-knowledge proof are valid, it returns the private key to the service provider. In this way, zero-knowledge certification technology is introduced into the private key generation process, which not only securely verifies the user's identity but also avoids the leakage of authentication information, improves the security and privacy of the private key application process, and provides users with a more secure and reliable encryption service.
[0120] Step S504: Perform inverse encryption calculation based on preset parameters and the encrypted data to obtain transformation parameters.
[0121] In practice, the service provider reads data from the blockchain based on the user identifier in the data access request. After obtaining the encrypted data, it requests a private key from the trusted blockchain application and receives the private key returned by the application. Then, it decrypts the data using the private key and a lattice decryption algorithm. During the decryption process, a reverse encryption calculation is first performed based on preset parameters and the encrypted data to obtain transformation parameters. Corresponding to the above process, after calculating and obtaining the encrypted parameters, the encrypted parameters are compressed. In an optional implementation provided in this embodiment, during the reverse encryption calculation based on the preset parameters and the encrypted data to obtain the transformation parameters, the encrypted data is first decompressed to obtain the encrypted parameters. Then, a reverse encryption calculation is performed based on the encrypted parameters and the preset parameters to obtain the transformation parameters. Thus, the encrypted parameters are recovered for decryption using the private key.
[0122] For example, decompress f1 and f2 in the encrypted data to obtain p and q; calculate the transformation parameter sr by following the inverse calculation process of p1 and p2.
[0123] Step S506: Decrypt and calculate the transformation parameters according to the private key to obtain the first sampled data.
[0124] After calculating the transformation parameters, the transformation parameters are decrypted using the private key to obtain the first sampled data; for example, the transformation parameter sr is decrypted using the private key to obtain r.
[0125] Step S508: Based on the first sampled data and the encrypted data, perform transformation processing to obtain the data to be encrypted.
[0126] In specific implementation, transformation processing is performed based on the first sampled data and encrypted data to obtain the data to be encrypted. Optionally, since the encrypted data contains a first encryption parameter and a second encryption parameter, in one optional implementation provided in this embodiment, the following operations are performed during the transformation processing based on the first sampled data and encrypted data to obtain the data to be encrypted:
[0127] Calculate the first region based on the first sampled data and the first encryption parameter, and calculate the second region based on the first sampled data and the second encryption parameter;
[0128] Calculate the shared area between the first region and the second region;
[0129] The shared region in the structural domain is deleted to obtain the remaining region, and the data to be encrypted is determined based on the remaining region.
[0130] For example, calculate the dot product of r with p and q in the NT2 domain to obtain the common part of the regions corresponding to the two dot products, and remove the common part from the NT2 domain to obtain the data to be encrypted.
[0131] In summary, the blockchain-based decryption method provided in this embodiment first reads data from the blockchain based on the user identifier in the data access request after receiving the data access request, obtaining encrypted data. Then, it generates a zero-knowledge proof based on the user identifier and sends the user identifier and zero-knowledge proof to the trusted blockchain application. After the trusted blockchain application verifies the user identifier and zero-knowledge proof, it returns the private key. Decryption is then performed using the private key and the lattice decryption algorithm. Thus, during the private key application process, zero-knowledge proofs are used to achieve identity verification, avoiding the leakage of user information. Furthermore, by decrypting the data according to the private key and the decryption algorithm corresponding to the lattice encryption algorithm, the high security of the lattice encryption algorithm is utilized, enhancing the resistance to the ever-evolving quantum attacks.
[0132] The following combination Figure 6 and Figure 7 Taking the application of the blockchain-based decryption method provided in this embodiment in a data decryption scenario as an example, the blockchain-based decryption method provided in this embodiment will be further explained. (Refer to...) Figure 7 The blockchain-based decryption processing method applied to data decryption scenarios specifically includes steps S702 to S710.
[0133] like Figure 6 As shown, after receiving a user's data access request, the service provider reads the encrypted data from the blockchain storage system in the cloud environment based on the user identifier in the data access request. The provider then sends a zero-knowledge certification application to a zero-knowledge certification authority and obtains a zero-knowledge proof generated and returned by the authority. Upon receiving the zero-knowledge proof, the service provider sends a private key application containing the user identifier and the zero-knowledge proof to the trusted blockchain application. The trusted blockchain application verifies the user identifier and the zero-knowledge proof based on the private key application and returns the private key to the service provider if the verification is successful. The service provider then decrypts the encrypted data using the private key and the decryption algorithm corresponding to the lattice encryption algorithm to obtain the data to be encrypted.
[0134] Step S702: Obtain a data access request and read data from the blockchain based on the user identifier in the data access request to obtain encrypted data.
[0135] Step S704: Generate a zero-knowledge proof based on the user identifier, and send the user identifier and the zero-knowledge proof to the trusted blockchain application.
[0136] Step S706: Receive the private key returned by the trusted blockchain application after the user identifier and zero-knowledge proof have been successfully verified.
[0137] Step S708: Perform inverse encryption calculation based on preset parameters and encrypted data to obtain transformation parameters, and perform decryption calculation on the transformation parameters according to the private key to obtain the first sampled data.
[0138] Step S710: Transform the first sampled data and the encrypted data to obtain the data to be encrypted.
[0139] It should be noted that any one or more steps from S702 to S710 can be combined to form a new implementation method according to the needs of implementation and deployment. Furthermore, any one or more technical features in the technical solution composed of steps S702 to S710 can also be combined to form a new implementation method according to the actual deployment needs, or the technical features in one or more optional implementations provided by steps S502 to S508 can be combined to form a new implementation method. These will not be elaborated on here.
[0140] Figure 8 The diagram below illustrates a blockchain-based encryption processing device according to one embodiment of the present invention. Figure 8 As shown, the device includes:
[0141] The data sampling module 802 is used to acquire the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data;
[0142] The transformation processing module 804 is used to transform the first sampled data according to the public key to obtain transformation parameters;
[0143] The encryption calculation module 806 is used to perform encryption calculations based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data.
[0144] The data sending module 808 is used to send the user identifier and the encrypted data to the blockchain node for on-chain storage.
[0145] The blockchain-based encryption processing device provided in this embodiment first samples the data to be encrypted by running the data sampling module 802 to obtain first sample data and second sample data. Then, it transforms the first sample data according to the public key by running the transformation processing module 804 to obtain transformation parameters. Then, it performs encryption calculation based on the preset parameters, transformation parameters and second sample data by running the encryption calculation module 806 to obtain encrypted data. In this way, data encryption is performed to improve the resistance to data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage by running the data sending module 808. In this way, by storing encrypted data on the blockchain, more secure, more transparent and more reliable data protection is achieved.
[0146] The blockchain-based encryption processing device provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0147] Figure 9 The diagram illustrates a blockchain-based decryption processing device according to one embodiment of the present invention. Figure 9 As shown, the device includes:
[0148] The data reading module 902 is used to read data from the blockchain based on the user identifier in the data access request and obtain encrypted data.
[0149] The encryption inverse calculation module 904 is used to perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters;
[0150] The decryption calculation module 906 is used to decrypt and calculate the transformation parameters according to the private key to obtain the first sampled data;
[0151] The transformation processing module 908 is used to perform transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted.
[0152] The blockchain-based decryption processing device provided in this embodiment first reads data from the blockchain using the data reading module 902 based on the user identifier to obtain encrypted data. Then, during the decryption process, the encryption inverse calculation module 904 performs encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters. Next, the decryption calculation module 906 performs decryption calculation on the transformation parameters using the private key to obtain first sampled data. Finally, the transformation processing module 908 performs transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted. Thus, by combining the private key and the decryption algorithm, the encrypted data stored on the blockchain is decrypted, improving data security.
[0153] The blockchain-based decryption processing device provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0154] Furthermore, one embodiment of this specification also provides a blockchain-based encryption processing device. Figure 10 The following is a schematic diagram of the structure of a blockchain-based encryption processing device provided as an embodiment of this specification, as shown below. Figure 10 As shown, the device includes: a memory 1001, a processor 1002, a bus 1003, and a communication interface 1004. The memory 1001, the processor 1002, and the communication interface 1004 communicate via the bus 1003. The communication interface 1004 may include input / output interfaces, including but not limited to a keyboard, mouse, monitor, microphone, and loudspeaker.
[0155] Figure 10 In the memory 1001, computer-executable instructions that can run on the processor 1002 are stored. When the processor 1002 executes the computer-executable instructions, the following process is implemented:
[0156] Acquire the data to be encrypted and perform data sampling to obtain the first sampled data and the second sampled data;
[0157] The first sampled data is transformed using the public key to obtain the transformation parameters;
[0158] Encryption calculations are performed based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data.
[0159] The user identifier and the encrypted data are sent to the blockchain node for on-chain storage.
[0160] The blockchain-based encryption processing device provided in this embodiment, through the cooperation of a memory 1001, a processor 1002, a bus 1003, and a communication interface 1004, first samples the data to be encrypted during the data encryption process to obtain first sampled data and second sampled data. Then, it transforms the first sampled data according to the public key to obtain transformation parameters. Finally, it performs encryption calculations based on preset parameters, transformation parameters, and second sampled data to obtain encrypted data. In this way, data encryption is performed to improve the resistance to data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage. Thus, by storing encrypted data on the blockchain, more secure, transparent, and reliable data protection is achieved.
[0161] The blockchain-based encryption processing device provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0162] Furthermore, one embodiment of this specification also provides a blockchain-based decryption processing device. Figure 11 The following is a schematic diagram of the structure of a blockchain-based encryption processing device provided as an embodiment of this specification, as shown below. Figure 11 As shown, the device includes: a memory 1101, a processor 1102, a bus 1103, and a communication interface 1104. The memory 1101, the processor 1102, and the communication interface 1104 communicate via the bus 1103. The communication interface 1104 may include input / output interfaces, including but not limited to a keyboard, mouse, monitor, microphone, and loudspeaker.
[0163] Figure 11 In the processor 1102, the memory 1101 stores computer-executable instructions that can run on the processor 1102. When the processor 1102 executes the computer-executable instructions, the following process is implemented:
[0164] Based on the user identifier in the data access request, data is read from the blockchain to obtain encrypted data;
[0165] Based on preset parameters and the encrypted data, perform inverse encryption calculation to obtain transformation parameters;
[0166] The transformation parameters are decrypted and calculated using the private key to obtain the first sampled data;
[0167] The data to be encrypted is obtained by transforming the first sampled data and the encrypted data.
[0168] The blockchain-based decryption processing device provided in this embodiment, through the cooperation of memory 1101, processor 1102, bus 1103 and communication interface 1104, first reads data from the blockchain according to the user identifier to obtain encrypted data during the data decryption process. In the process of decrypting the encrypted data, it first performs inverse encryption calculation based on preset parameters and encrypted data to obtain transformation parameters. Then, it performs decryption calculation on the transformation parameters according to the private key to obtain first sample data. Finally, it performs transformation processing based on the first sample data and encrypted data to obtain the data to be encrypted. In this way, the encrypted data stored on the blockchain is decrypted by combining the private key and decryption algorithm, thereby improving data security.
[0169] The blockchain-based decryption processing device provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0170] Furthermore, another embodiment of this specification provides a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the following process:
[0171] Acquire the data to be encrypted and perform data sampling to obtain the first sampled data and the second sampled data;
[0172] The first sampled data is transformed using the public key to obtain the transformation parameters;
[0173] Encryption calculations are performed based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data.
[0174] The user identifier and the encrypted data are sent to the blockchain node for on-chain storage.
[0175] The computer-readable storage medium provided in this embodiment first samples the data to be encrypted during the data encryption process to obtain first sampled data and second sampled data. Then, it transforms the first sampled data according to the public key to obtain transformation parameters. Finally, it performs encryption calculations based on preset parameters, transformation parameters, and second sampled data to obtain encrypted data. In this way, data encryption is performed to improve the resistance to data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage. Thus, by storing encrypted data on the blockchain, more secure, transparent, and reliable data protection is achieved.
[0176] The computer-readable storage medium includes read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0177] The computer-readable storage medium provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0178] Furthermore, another embodiment of this specification provides another computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the following process:
[0179] Based on the user identifier in the data access request, data is read from the blockchain to obtain encrypted data;
[0180] Based on preset parameters and the encrypted data, perform inverse encryption calculation to obtain transformation parameters;
[0181] The transformation parameters are decrypted and calculated using the private key to obtain the first sampled data;
[0182] The data to be encrypted is obtained by transforming the first sampled data and the encrypted data.
[0183] The computer-readable storage medium provided in this embodiment first reads data from the blockchain based on the user identifier to obtain encrypted data during the data decryption process. During the data decryption process, it first performs inverse encryption calculation based on preset parameters and encrypted data to obtain transformation parameters. Then, it performs decryption calculation on the transformation parameters based on the private key to obtain first sampled data. Finally, it performs transformation processing based on the first sampled data and encrypted data to obtain the data to be encrypted. In this way, the encrypted data stored on the blockchain is decrypted by combining the private key and decryption algorithm, thereby improving data security.
[0184] The computer-readable storage medium includes read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0185] The computer-readable storage medium provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0186] Furthermore, another embodiment of this specification provides a computer program product that, when executed by a processor, implements the following process:
[0187] Acquire the data to be encrypted and perform data sampling to obtain the first sampled data and the second sampled data;
[0188] The first sampled data is transformed using the public key to obtain the transformation parameters;
[0189] Encryption calculations are performed based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data.
[0190] The user identifier and the encrypted data are sent to the blockchain node for on-chain storage.
[0191] The computer program product provided in this embodiment first samples the data to be encrypted during the data encryption process to obtain first sampled data and second sampled data. Then, it transforms the first sampled data according to the public key to obtain transformation parameters. Then, it performs encryption calculations based on preset parameters, transformation parameters, and second sampled data to obtain encrypted data. In this way, data encryption is performed to improve the resistance to data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage. In this way, by storing encrypted data on the blockchain, more secure, transparent, and reliable data protection is achieved.
[0192] The computer program product provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0193] Furthermore, another embodiment of this specification provides another computer program product that, when executed by a processor, implements the following process:
[0194] Based on the user identifier in the data access request, data is read from the blockchain to obtain encrypted data;
[0195] Based on preset parameters and the encrypted data, perform inverse encryption calculation to obtain transformation parameters;
[0196] The transformation parameters are decrypted and calculated using the private key to obtain the first sampled data;
[0197] The data to be encrypted is obtained by transforming the first sampled data and the encrypted data.
[0198] The computer program product provided in this embodiment first reads data from the blockchain based on the user identifier to obtain encrypted data during the data decryption process. During the data decryption process, it first performs inverse encryption calculation based on preset parameters and encrypted data to obtain transformation parameters. Then, it performs decryption calculation on the transformation parameters based on the private key to obtain first sampled data. Finally, it performs transformation processing based on the first sampled data and encrypted data to obtain the data to be encrypted. In this way, the encrypted data stored on the blockchain is decrypted by combining the private key and decryption algorithm, thereby improving data security.
[0199] The computer program product provided in one embodiment of this specification can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
[0200] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0201] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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 illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0202] 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.
[0203] 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 1 The steps of the function specified in one or more boxes.
[0204] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0205] Memory may include non-persistent storage in computer-readable storage 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 storage media.
[0206] Computer-readable storage media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer-readable 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 storage media does not include transient media, such as modulated data signals and carrier waves.
[0207] 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 a process, method, article, or apparatus. Without further limitation, 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 said element.
[0208] 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.
[0209] The above description is merely an embodiment of this application and is 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 blockchain-based encryption processing method, characterized in that, The method includes: The process involves acquiring data to be encrypted, sampling the data to be encrypted according to a first sampling strategy to obtain first sampled data, and sampling the data to be encrypted according to a second sampling strategy to obtain second sampled data. The first sampled data is transformed using the public key to obtain the transformation parameters; Encryption calculations are performed based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data. The user identifier and the encrypted data are sent to the blockchain node for on-chain storage. The step of sampling the data to be encrypted according to the second sampling strategy to obtain the second sampled data includes: The first sub-sampled data is obtained by sampling the data a predetermined number of times according to the first modulus of the data to be encrypted using a pseudo-random function; and, The second sub-sampled data is obtained by sampling the data a starting number of times according to the second modulus of the data to be encrypted using a pseudo-random function; The encryption calculation based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data includes: The first encryption parameter is calculated based on the structural domain parameter, the random matrix, the preset number of times, the transformation parameter, and the first sub-sampled data; The second encryption parameter is calculated based on the structural domain parameter, the random matrix, the transformation parameter, and the second subsampled data; The first encryption parameter and the second encryption parameter are determined as the encrypted data.
2. The blockchain-based encryption processing method according to claim 1, characterized in that, The encryption calculation based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data includes: Encryption parameters are obtained by performing encryption calculations based on the preset parameters, the transformation parameters, and the second sampled data. The encryption parameters are compressed to obtain the encrypted data.
3. A blockchain-based decryption method for the blockchain-based encryption method according to claim 1, characterized in that, The method includes: Based on the user identifier in the data access request, data is read from the blockchain to obtain encrypted data; Based on preset parameters and the encrypted data, perform inverse encryption calculation to obtain transformation parameters; The transformation parameters are decrypted and calculated using the private key to obtain the first sampled data; The data to be encrypted is obtained by transforming the first sampled data and the encrypted data.
4. The blockchain-based decryption processing method according to claim 3, characterized in that, After the step of reading data from the blockchain based on the user identifier in the data access request to obtain encrypted data is executed, and before the step of performing inverse encryption calculation based on preset parameters and the encrypted data to obtain transformation parameters is executed, the method further includes: A zero-knowledge proof is generated based on the user identifier, and the user identifier and the zero-knowledge proof are sent to the trusted blockchain application. Receive the private key returned by the trusted blockchain application after the user identifier and the zero-knowledge proof have been verified.
5. The blockchain-based decryption processing method according to claim 3, characterized in that, The step of performing inverse encryption calculation based on preset parameters and the encrypted data to obtain transformation parameters includes: The encrypted data is decompressed to obtain the encryption parameters; The transformation parameters are obtained by performing inverse encryption calculation based on the encryption parameters and the preset parameters.
6. The blockchain-based decryption processing method according to claim 3, characterized in that, The encrypted data includes a first encryption parameter and a second encryption parameter.
7. The blockchain-based decryption processing method according to claim 6, characterized in that, The step of transforming the first sampled data and the encrypted data to obtain the data to be encrypted includes: Calculate the first region based on the first sampled data and the first encryption parameter, and calculate the second region based on the first sampled data and the second encryption parameter; Calculate the shared area between the first region and the second region; The shared region in the structural domain is deleted to obtain the remaining region, and the data to be encrypted is determined based on the remaining region.
8. A blockchain-based encryption processing device, characterized in that, The device includes: The data sampling module is used to acquire data to be encrypted, perform data sampling on the data to be encrypted according to a first sampling strategy to obtain first sampled data, and perform data sampling on the data to be encrypted according to a second sampling strategy to obtain second sampled data; The transformation processing module is used to transform the first sampled data according to the public key to obtain transformation parameters; An encryption calculation module is used to perform encryption calculations based on preset parameters, the transformation parameters, and the second sampled data to obtain encrypted data; The data sending module is used to send the user identifier and the encrypted data to the blockchain node for on-chain storage; The data sampling module is used to perform data sampling a preset number of times on the first modulus of the data to be encrypted according to a pseudo-random function, to obtain first sub-sampled data; and The second sub-sampled data is obtained by sampling the data a starting number of times according to the second modulus of the data to be encrypted using a pseudo-random function; The encryption calculation module is used to calculate the first encryption parameter based on the structural domain parameter, the random matrix, the preset number of times, the transformation parameter, and the first sub-sampled data. The second encryption parameter is calculated based on the structural domain parameter, the random matrix, the transformation parameter, and the second subsampled data; The first encryption parameter and the second encryption parameter are determined as the encrypted data.
9. A blockchain-based decryption processing device for a blockchain-based encryption processing device according to claim 8, characterized in that, The device includes: The data reading module is used to read data from the blockchain based on the user identifier in the data access request and obtain encrypted data; The encryption inverse calculation module is used to perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; The decryption calculation module is used to decrypt and calculate the transformation parameters based on the private key to obtain the first sampled data; The transformation processing module is used to perform transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted.
10. A blockchain-based encryption processing device, characterized in that, The device includes a memory and a processor. The memory stores computer-executable instructions, which, when executed on the processor, are capable of implementing the steps of the blockchain-based encryption processing method as described in claim 1 or 2.
11. A blockchain-based decryption processing device, characterized in that, The device includes a memory and a processor. The memory stores computer-executable instructions, which, when executed on the processor, are capable of implementing the steps of the blockchain-based decryption processing method according to any one of claims 3-7.
12. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they can implement the blockchain-based encryption processing method described in claim 1 or 2.
13. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they are able to implement the steps of the blockchain-based decryption processing method as described in any one of claims 3-7.
Citation Information
Patent Citations
Block chain oracle machine updatable encryption method and system based on post quantum cryptography
CN118677687A
Executing a cryptographic operation
US20200313886A1