Encryption and decryption processing method and device based on block chain

By blockchain -based encryption processing methods, the data is sampled, transformed, and encrypted, and the encrypted data is stored on the chain, which solves the problem of insufficient data storage security in the existing technology. And transparency.

CN119357998AActive Publication Date: 2025-01-24CHINA MOBILE INTERNET CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411447322.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-24
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The prior art has security and privacy issues in the data storage process, making it difficult to effectively protect the confidentiality and integrity of data.

Method used

Using blockchain-based encryption processing methods, encrypted data is generated through data sampling, transformation processing and encryption calculations, and is stored on the chain to achieve higher data security and transparency.

Benefits of technology

It improves the security and transparency of data storage, enhances resistance to data attacks, and ensures data confidentiality and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357998A_ABST
    Figure CN119357998A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an encryption and decryption processing method and device based on a block chain, and the encryption processing method based on the block chain comprises the steps: firstly obtaining to-be-encrypted data, carrying out the data sampling, obtaining first sampling data and second sampling data, carrying out the transformation processing of the first sampling data according to a public key, and obtaining a second sampling data; the method comprises the following steps: acquiring a transformation parameter, performing encryption calculation based on a preset parameter, the transformation parameter and second sampling data to obtain encrypted data, and finally sending a user identifier and the encrypted data to a block chain node for uplink storage, thereby improving the validity of data encryption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of data processing, and in particular to a blockchain-based encryption and decryption processing method and device. Background Art

[0002] With the continuous development of Internet technology and the continuous increase of data resources, more and more users begin to transmit data through the Internet. Users can download the required data on the Internet for use, which greatly improves the convenience. However, with the continuous increase of data on the Internet, in order to ensure the immediacy and transmission efficiency of data, cloud storage services are established to store data. However, the current storage methods still have problems such as security and privacy. Currently, data can be encrypted using algorithms such as AES and RSA to ensure the confidentiality of data during transmission and storage. Hash values ​​of data can be generated based on hash functions to ensure data integrity. Centralized entities can be relied upon to verify data integrity and authenticity. Data traceability can also be ensured by regularly recording data change history, audit logs, and backup data. However, the above methods are still lacking in data security. How to improve the security of data storage has become a focus of attention for all parties. Summary of the invention

[0003] The purpose of one embodiment of this specification is to provide a blockchain-based encryption processing method and device to improve the effectiveness and security of data storage.

[0004] To solve the above technical problems, an embodiment of this specification is implemented as follows: In a first aspect, an embodiment of this specification provides an encryption processing method based on blockchain, including: Acquire the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data; Performing transformation processing on the first sampled data according to the public key to obtain transformation parameters; Perform encryption calculation based on preset parameters, the transformation parameters and the second sampled data to obtain encrypted data; The user identification and the encrypted data are sent to the blockchain node for on-chain storage.

[0005] The blockchain-based encryption processing 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 transforms the first sampled data according to the public key to obtain transformation parameters, and then performs encryption calculation based on preset parameters, transformation parameters and second sampled data to obtain encrypted data. In this way, data encryption is performed in this manner to enhance the ability to resist data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage. In this way, by storing the encrypted data on-chain, more secure, more transparent and more reliable data protection is achieved.

[0006] In a second aspect, another embodiment of this specification provides a blockchain-based decryption processing method, including: Read data from the blockchain according to the user ID in the data access request to obtain encrypted data; Perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; Decrypting and calculating the transformation parameter according to the private key to obtain first sampling data; Transformation processing is performed based on the first sampled data and the encrypted data to obtain data to be encrypted.

[0007] The blockchain-based decryption processing method provided in this embodiment, during the data decryption process, first reads data on the blockchain according to the user identification to obtain encrypted data. During the data decryption process of the encrypted data, first perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters. Then perform decryption calculation on the transformation parameters according to the private key to obtain first sampled data. Finally, perform transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted. In this way, the encrypted data stored on the blockchain is decrypted in combination with the private key and the decryption algorithm to improve the security of the data.

[0008] In a third aspect, another embodiment of the present specification provides an encryption processing device based on blockchain, including: A data sampling module, used to obtain the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data; A transformation processing module, used for performing transformation processing on the first sampled data according to a public key to obtain transformation parameters; An encryption calculation module, used to perform encryption calculation 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 identification and the encrypted data to the blockchain node for on-chain storage.

[0009] In a fourth aspect, another embodiment of the present specification provides a blockchain-based decryption processing device, comprising: A data reading module, used to read data from the blockchain according to the user identifier in the data access request to obtain encrypted data; An encryption inverse calculation module, used to perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; A decryption calculation module, used to perform decryption calculation on the transformation parameter according to a private key to obtain 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 data to be encrypted.

[0010] In the fifth aspect, another embodiment of the present specification provides a blockchain-based encryption processing device, comprising: a memory, a processor, and computer-executable instructions stored on 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.

[0011] In the sixth aspect, another embodiment of the present specification provides a blockchain-based decryption processing device, comprising: a memory, a processor, and computer-executable instructions stored on 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.

[0012] In the seventh aspect, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the blockchain-based encryption processing method as described in the first aspect above are implemented.

[0013] In the eighth aspect, another embodiment of the present specification provides another computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the blockchain-based decryption processing method as described in the second aspect above are implemented.

[0014] In the ninth aspect, another embodiment of the present specification provides a computer program product, wherein the computer program product includes a blockchain-based encryption processing program, and the blockchain-based encryption processing program is executed by a processor to implement the steps of the blockchain-based encryption processing method as described in the first aspect above.

[0015] In the tenth aspect, another embodiment of the present specification provides another computer program product, wherein the computer program product includes a blockchain-based encryption processing program, and the blockchain-based encryption processing program is executed by a processor to implement the steps of the blockchain-based decryption processing method as described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in one or more embodiments of the present specification, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0017] Figure 1 A flowchart of an encryption process based on blockchain provided for one embodiment of this specification; Figure 2 A timing diagram of a key pair generation process provided by one embodiment of this specification; Figure 3 A data encryption timing diagram provided for one embodiment of this specification; Figure 4 A flowchart of a blockchain-based encryption processing method applied to a data encryption scenario provided in one embodiment of this specification; Figure 5 A flowchart of a decryption process based on blockchain provided for one embodiment of this specification; Figure 6 A data decryption timing diagram provided for one embodiment of this specification; Figure 7 A flowchart of a decryption processing method based on blockchain applied to a data decryption scenario provided in one embodiment of this specification; Figure 8 A schematic diagram of a blockchain-based encryption processing device provided in one embodiment of this specification; Fig. 9 A schematic diagram of a blockchain-based decryption processing device provided in one embodiment of this specification; Fig.10 A schematic diagram of the structure of a blockchain-based encryption processing device provided in one embodiment of this specification; Fig.11 A schematic diagram of the structure of a blockchain-based decryption processing device provided for one embodiment of this specification. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0019] This specification provides an encryption processing method embodiment based on blockchain: Reference Figure 1 , which shows a processing flow chart of 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.

[0020] Step S102, obtaining data to be encrypted and performing data sampling to obtain first sampled data and second sampled data.

[0021] The data to be encrypted in this embodiment may be sensitive data that needs to be encrypted, such as user privacy data, or important data of a user or an organization that needs to be encrypted and stored, which is not limited in this embodiment.

[0022] In specific implementation, in the process of encrypting the data to be encrypted, data encryption is performed based on both the encryption algorithm (lattice encryption algorithm) and the public key; since data encryption is performed based on the public key, after the data to be encrypted is obtained, the public key is first read based on the user identification.

[0023] In the specific implementation process, when the user performs user registration, user transaction, or updates the key pair, the blockchain trusted application generates a key pair for the user. In an optional implementation provided in this embodiment, the key pair is generated in the following manner: Sending 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 associates and stores the user identifier, the key pair, and the user information; Receive the public key sent by the blockchain trusted application.

[0024] Specifically, in order to ensure data security and avoid the leakage of public keys or private keys caused by the use of the same user ID to obtain public keys or private keys, blockchain trusted applications can regenerate the user ID associated with the key pair and associate it with user information every time a key pair is generated, thereby ensuring the security of the key pair. After generating the key pair, the blockchain trusted application will not only send the public key to the user, but also upload the public key to the blockchain storage to ensure that the public key cannot be tampered with.

[0025] It should be noted that the blockchain-based encryption processing method provided in this embodiment can be applied to service agencies. The service agency can be a service agency that provides data encryption to users, or a service agency that provides data transactions to users. This embodiment does not limit this.

[0026] For example, Figure 2 As shown in the key pair generation process timing diagram, after the service agency obtains the user's key pair generation request, it sends the key pair generation request to the blockchain trusted application. After receiving the key pair generation request, the blockchain trusted application generates a key pair according to the key pair generation request, stores the private key, returns the public key to the service agency, and stores the public key in the blockchain storage system in the cloud environment.

[0027] In specific implementation, after the data to be encrypted is obtained, data encryption is performed based on the public key and the lattice encryption algorithm. In the process of encrypting the data based on 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 by this embodiment, in the process of data sampling, the data to be encrypted is sampled according to a first sampling strategy to obtain first sampled data, and the data to be encrypted is sampled according to a second sampling strategy to obtain second sampled data.

[0028] Specifically, in order to ensure the effective implementation of data encryption, data initialization and random matrix generation are required before sampling the encrypted data; specifically, in the process of data initialization, the public key, the data to be encrypted, the random bit string and the structural domain 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) structural domain parameters (k, 1) are obtained; in the process of generating the random matrix, a random matrix is ​​generated in the NTT (Number Theoretic Transform) domain; for example, a k-sized matrix is ​​created in the NT2 domain. k; each element at position (i, j) in the random matrix A can be generated by the XOF (Extendable Output Function) function according to the input (σ, i, j). The domain parameters can be lattice parameters, such as the NT2 domain specified parameters p and q.

[0029] That is, in the process of encrypting the data to be encrypted according to the lattice encryption algorithm and the public key, firstly, data initialization is performed to obtain the public key, the data to be encrypted, the random bit string and the structural domain parameters, and then a random matrix is ​​generated to obtain a random matrix of a preset size; then, data sampling is performed on the data to be encrypted according to the first sampling strategy to obtain first sampling data, and data sampling is performed on the data to be encrypted according to the second sampling strategy to obtain second sampling data; specifically, in the process of sampling the data to be encrypted according to the first sampling strategy, a preset number of data samplings can be performed from a random modulus of the data to be encrypted according to the incremental pseudo-random function to obtain the first sampling data; since in the process of calculating the encrypted data, there are two dimensions in the structural domain Parameters, therefore, in an optional implementation manner provided by this embodiment, in the process of sampling the data to be encrypted according to the second sampling strategy to obtain the second sampled data, data sampling is performed a preset number of times in the first modulus of the data to be encrypted according to a pseudo-random function to obtain the first sub-sampled data, and data sampling is performed 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 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; in this way, randomness is increased in the encryption process by random values ​​to improve the security of data encryption.

[0030] 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, and a pseudo-random function is used to sample 1 time from another random modulus of the data to be encrypted to obtain the second sub-sampled data e2.

[0031] Step S104: transform the first sampled data according to the public key to obtain transformation parameters.

[0032] After the data to be encrypted is acquired and data sampling is performed 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 transformation parameters.

[0033] In specific implementation, after obtaining the first sampled data, the first sampled data is transformed according to the public key. In the specific transformation process, the first sampled data r is converted into the NT2 domain, and NT2 number theory transformation is performed on r according to the public key to obtain the transformation parameter sr.

[0034] Step S106, performing encryption calculation based on preset parameters, the transformation parameters and the second sampled data to obtain encrypted data.

[0035] On the basis of the transformation parameters obtained above, in this step, encryption calculation is performed based on the preset parameters, the transformation parameters and the second sampled data to obtain encrypted data.

[0036] Optionally, the preset parameters include the above-mentioned structural domain parameters, a random matrix and / or a preset number of times.

[0037] In the specific execution process, in order to obtain the specified parameters corresponding to the transformation parameters in the structure domain, in an optional implementation manner provided by this embodiment, the process of performing encryption calculation based on the preset parameters, the transformation parameters and the second sampled data to obtain the encrypted data can be implemented in the following manner: Calculate a first encryption parameter according to the structural domain parameter, the random matrix, the preset number of times, the transformation parameter and the first sub-sampling data; Calculate a second encryption parameter according to the structural domain parameter, the random matrix, the transformation parameter and the second sub-sampling data; The first encryption parameter and the second encryption parameter are determined as the encrypted data.

[0038] For example, the first encryption parameter is p, the second encryption parameter is q, and p is calculated using the following formula:

[0039] in, is a random number; q is calculated using the following formula:

[0040] The first encryption parameter and the second encryption parameter are calculated and obtained in the above manner, and the first encryption parameter and the second encryption parameter are used as encrypted data.

[0041] It should also be noted that, in order to improve the convenience of storage and transmission, after the first encryption parameter and the second encryption parameter are calculated and obtained, the first encryption parameter and the second encryption parameter can also be encoded and compressed, and the encoded and compressed first encryption parameter and the second encryption parameter are used as encrypted data. In an optional implementation provided by this embodiment, in the process of performing encryption calculation based on preset parameters, transformation parameters and second sampled data to obtain encrypted data, encryption calculation can be first performed based on the preset parameters, the transformation parameters and the second sampled data to obtain encryption parameters, and then the encryption parameters are compressed to obtain encrypted data. For example, after calculating and obtaining the above-mentioned p and q, p and q are compressed and encoded to obtain encrypted data f1 and f2.

[0042] Step S108: Send the user identification and the encrypted data to the blockchain node for on-chain storage.

[0043] After the encrypted data is obtained by encrypting the data to be encrypted based on the public key and lattice encryption algorithm, the user identification and encrypted data are sent to the blockchain node for on-chain storage to ensure the transparency and security of the encrypted data. Figure 3 As shown in the data encryption timing diagram, the service agency obtains the user's data to be encrypted, encrypts the data according to the public key and lattice encryption algorithm, obtains the encrypted data, and stores the encrypted data in the blockchain storage system in the cloud environment through the encrypted data blockchain node.

[0044] On this basis, the user can also access the encrypted data. In the process of the user accessing the data to be encrypted corresponding to the encrypted data, it is necessary to decrypt the data starting from the encrypted data and then obtain the data to be encrypted; corresponding to the above-mentioned data encryption based on the public key and the lattice encryption algorithm, in the process of data decryption, the data can be decrypted based on the private key and the lattice decryption algorithm. In an optional implementation manner provided in this embodiment, the data is decrypted in the following manner: Read data from the blockchain according to the user ID in the data access request to obtain encrypted data; Perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; Decrypting and calculating the transformation parameter according to the private key to obtain first sampling data; Transformation processing is performed based on the first sampled data and the encrypted data to obtain data to be encrypted.

[0045] In the specific execution process, since it is necessary to perform decryption calculation on the transformation parameters based on the private key, and the private key is the key to the decryption process, the security and privacy of the private key are extremely important. If the private key is open to the outside, it will lead to the leakage of encrypted data. Therefore, the private key is stored in the blockchain trusted application, and when the identity authentication of the user accessing the data is passed, the private key is issued to the service agency so that the service agency can decrypt the data based on the private key; in the process of identity authentication, in order to protect the user's personal sensitive information and prevent the leakage of user information, zero-knowledge proof technology can be used for identity authentication; specifically, in the technical solution of this application, after reading data in the blockchain according to the user identification in the data access request and obtaining the encrypted data, the following operations are also performed: Generate a zero-knowledge proof based on the user identifier, and send the user identifier and the zero-knowledge proof to the blockchain trusted application; Receive the private key returned by the blockchain trusted application after the user identification and the zero-knowledge proof are verified.

[0046] Specifically, the service agency applies to the zero-knowledge certification agency to generate a zero-knowledge proof. The zero-knowledge certification agency generates a zero-knowledge proof based on the user's password information and randomly generated challenge information and returns it to the service agency. After receiving the zero-knowledge proof, the service agency sends a private key application including the user ID and the zero-knowledge proof to the blockchain trusted application. The blockchain trusted application verifies that the user ID is valid and the zero-knowledge proof is valid and returns the private key to the service agency. In this way, zero-knowledge authentication technology is introduced in the process of private key generation, which ensures the security verification of the user's identity while avoiding the leakage of authentication information, thereby improving the security and privacy of the private key application process and providing users with more secure and reliable encryption services.

[0047] In specific implementation, the service agency reads data on the blockchain according to the user identifier in the data access request, and after obtaining the encrypted data, applies for a private key from the blockchain trusted application, obtains the private key returned by the blockchain trusted application, and then decrypts the data according to the private key and the lattice decryption algorithm; in the process of data decryption, firstly, an encryption inverse calculation is performed based on the preset parameters and the encrypted data to obtain the transformation parameters; corresponding to the above process, after the encryption parameters are calculated, the encryption parameters are compressed. In an optional implementation provided by this embodiment, in the process of performing encryption inverse calculation based on the preset parameters and the encrypted data to obtain the transformation parameters, the encrypted data is first decompressed to obtain the encryption parameters; then, an encryption inverse calculation is performed based on the encryption parameters and the preset parameters to obtain the transformation parameters. In this way, the encryption parameters are restored so that the private key can be used for decryption.

[0048] For example, decompression processing is performed on f1 and f2 in the encrypted data to obtain p and q; and the transformation parameter sr is calculated according to the inverse calculation process of the above calculation of p1 and p2.

[0049] After the transformation parameters are calculated, the transformation parameters are decrypted and calculated according to the private key to obtain the first sampled data; for example, the transformation parameters sr are decrypted and calculated according to the private key to obtain r. Further, the first sampled data and the encrypted data are transformed to obtain the data to be encrypted. Optionally, since the encrypted data includes the first encryption parameter and the second encryption parameter, in an optional implementation provided by this embodiment, in the process of transforming the first sampled data and the encrypted data to obtain the data to be encrypted, the following operations are performed: Calculating a first area according to the first sampling data and the first encryption parameter, and calculating a second area according to the first sampling data and the second encryption parameter; calculating a shared area between the first area and the second area; The shared area in the structure domain is deleted to obtain a remaining area, and the data to be encrypted is determined according to the remaining area.

[0050] For example, the dot products of r with p and q in the NT2 domain are calculated to obtain the common part of the areas corresponding to the two dot products, and the common part is removed from the NT2 domain to obtain the data to be encrypted.

[0051] In summary, the encryption processing method based on blockchain provided in this embodiment, after obtaining the data to be encrypted, encrypts the data to be encrypted according to the public key and the lattice encryption algorithm, obtains the encrypted data, and sends the user identification and the encrypted data to the blockchain node for chain storage. In the process of encrypting the data to be encrypted according to the public key and the lattice encryption algorithm, firstly, the data to be encrypted is sampled to obtain the first sampled data and the second sampled data; then, the first sampled data is subjected to number theory transformation of the structural domain according to the public key to obtain the transformation parameter, and then encryption calculation is performed according to the preset parameter, the transformation parameter and the second sampled data to obtain the encryption parameter and encode and compress the encryption parameter to obtain the encrypted data. In this way, the lattice encryption algorithm is introduced for data encryption, and the high security characteristics of the lattice encryption algorithm are utilized to make it more adaptable to the needs of large-scale data encryption, and improve the resistance to the evolving quantum attack. In addition, the blockchain is introduced into the cloud environment, and the immutability and decentralization characteristics of the blockchain are utilized to enhance the security and credibility of the encrypted data. The blockchain and the lattice encryption algorithm are combined to provide a new data protection mechanism, and a more secure, transparent and reliable cloud data protection solution is provided.

[0052] The following combination Figure 4, taking the application of the encryption processing method based on blockchain provided in this embodiment in the data encryption scenario as an example, the encryption processing method based on blockchain provided in this embodiment is further explained. Figure 4 The blockchain-based encryption processing method applied to the data encryption scenario specifically includes steps S402 to S418.

[0053] Step S402, obtaining data to be encrypted.

[0054] Step S404: sampling data a preset number of times from the random modulus of the data to be encrypted according to the incremental pseudo-random function to obtain first sampled data.

[0055] Step S406: sampling a preset number of data from the first random modulus of the data to be encrypted according to a pseudo-random function to obtain second sampled data.

[0056] Optionally, the first random modulus and the random modulus in step S404 may be the same random modulus or different random moduli.

[0057] Step S408: sampling data once from the second random modulus of the data to be encrypted according to the pseudo-random function to obtain third sampled data.

[0058] Optionally, the second random modulus and the random modulus in step S404 may be the same random modulus or different random moduli, but the second random modulus and the first random modulus are different random moduli of the data to be encrypted.

[0059] It should be noted that the execution order of step S404, step S406 and step S408 is not limited here.

[0060] Step S410: read a public key according to the user identifier, and perform a number theory transformation of the structure domain on the first sample data according to the public key to obtain a transformation parameter.

[0061] Step S412, calculating the first encryption parameter according to the structural domain parameter, the random matrix, the preset number of times, the transformation parameter and the second sampling data.

[0062] Step S414, calculating the second encryption parameter according to the structural domain parameter, the random matrix, the transformation parameter and the third sampling data.

[0063] It should be noted that the execution order of step S412 and step S414 is not limited here.

[0064] Step S416: Encode and compress the first encryption parameter and the second encryption parameter to obtain encrypted data.

[0065] Step S418: Send the user identification and encrypted data to the blockchain node for on-chain storage.

[0066] It should be noted that any one of steps S402 to S418 or any combination of multiple steps can be selected from steps S102 to S108 to form a new implementation method according to the needs of implementation deployment; and any one or multiple technical features in the technical scheme composed of steps S402 to S418 can be selected from steps S102 to S108 to form a new implementation method according to the needs of actual deployment, or the technical features in one or more optional implementation methods provided by steps S102 to S108 can be selected to form a new implementation method, which will not be elaborated here.

[0067] This specification provides an embodiment of a decryption processing method based on blockchain: The blockchain-based decryption processing method provided in this embodiment corresponds to the relevant content of the above-mentioned blockchain-based encryption processing method. Therefore, when reading this embodiment, you can refer to the relevant content of the above-mentioned embodiment, and when reading the above-mentioned embodiment, you can also refer to the relevant content of this embodiment.

[0068] Reference Figure 5 , which shows a processing flow chart of 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.

[0069] Step S502: Read data from the blockchain according to the user identifier in the data access request to obtain encrypted data.

[0070] In the specific execution process, since it is necessary to perform decryption calculation on the transformation parameters based on the private key, and the private key is the key to the decryption process, the security and privacy of the private key are extremely important. If the private key is open to the outside, it will lead to the leakage of encrypted data. Therefore, the private key is stored in the blockchain trusted application, and when the identity authentication of the user accessing the data is passed, the private key is issued to the service agency so that the service agency can decrypt the data based on the private key; in the process of identity authentication, in order to protect the user's personal sensitive information and prevent the leakage of user information, zero-knowledge proof technology can be used for identity authentication; specifically, in the technical solution of this application, after reading data in the blockchain according to the user identification in the data access request and obtaining the encrypted data, the following operations are also performed: Generate a zero-knowledge proof based on the user identifier, and send the user identifier and the zero-knowledge proof to the blockchain trusted application; Receive the private key returned by the blockchain trusted application after the user identification and the zero-knowledge proof are verified.

[0071] Specifically, the service agency applies to the zero-knowledge certification agency to generate a zero-knowledge proof. The zero-knowledge certification agency generates a zero-knowledge proof based on the user's password information and randomly generated challenge information and returns it to the service agency. After receiving the zero-knowledge proof, the service agency sends a private key application including the user ID and the zero-knowledge proof to the blockchain trusted application. The blockchain trusted application verifies that the user ID is valid and the zero-knowledge proof is valid and returns the private key to the service agency. In this way, zero-knowledge authentication technology is introduced in the process of private key generation, which ensures the security verification of the user's identity while avoiding the leakage of authentication information, thereby improving the security and privacy of the private key application process and providing users with more secure and reliable encryption services.

[0072] Step S504: performing encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters.

[0073] In specific implementation, the service agency reads data on the blockchain according to the user identifier in the data access request, and after obtaining the encrypted data, applies for a private key from the blockchain trusted application, obtains the private key returned by the blockchain trusted application, and then decrypts the data according to the private key and the lattice decryption algorithm; in the process of data decryption, firstly, an encryption inverse calculation is performed based on the preset parameters and the encrypted data to obtain the transformation parameters; corresponding to the above process, after the encryption parameters are calculated, the encryption parameters are compressed. In an optional implementation provided by this embodiment, in the process of performing encryption inverse calculation based on the preset parameters and the encrypted data to obtain the transformation parameters, the encrypted data is first decompressed to obtain the encryption parameters; then, an encryption inverse calculation is performed based on the encryption parameters and the preset parameters to obtain the transformation parameters. In this way, the encryption parameters are restored so that the private key can be used for decryption.

[0074] For example, decompression processing is performed on f1 and f2 in the encrypted data to obtain p and q; and the transformation parameter sr is calculated according to the inverse calculation process of the above calculation of p1 and p2.

[0075] Step S506: decrypt the transformation parameter according to the private key to obtain the first sample data.

[0076] After the transformation parameter is obtained by calculation, the transformation parameter is decrypted and calculated according to the private key to obtain the first sampled data; for example, the transformation parameter sr is decrypted and calculated according to the private key to obtain r.

[0077] Step S508: performing transformation processing based on the first sampled data and the encrypted data to obtain data to be encrypted.

[0078] In a specific implementation, the first sampled data and the encrypted data are transformed to obtain the data to be encrypted. Optionally, since the encrypted data includes the first encryption parameter and the second encryption parameter, in an optional implementation provided by this embodiment, in the process of transforming the first sampled data and the encrypted data to obtain the data to be encrypted, the following operations are performed: Calculating a first area according to the first sampling data and the first encryption parameter, and calculating a second area according to the first sampling data and the second encryption parameter; calculating a shared area between the first area and the second area; The shared area in the structure domain is deleted to obtain a remaining area, and the data to be encrypted is determined according to the remaining area.

[0079] For example, the dot products of r with p and q in the NT2 domain are calculated to obtain the common part of the areas corresponding to the two dot products, and the common part is removed from the NT2 domain to obtain the data to be encrypted.

[0080] To summarize, the blockchain-based decryption processing method provided in this embodiment, after obtaining a data access request, first reads data in the blockchain according to the user identifier in the data access request to obtain encrypted data, then generates a zero-knowledge proof based on the user identifier, and sends the user identifier and zero-knowledge proof to the blockchain trusted application, receives the private key returned by the blockchain trusted application after the user identifier and zero-knowledge proof are verified, and performs decryption processing according to the private key and the lattice decryption algorithm. In this way, in the process of private key application, zero-knowledge proof is used to realize identity authentication, and identity authentication is realized without leaking user information. In addition, data is decrypted according to the decryption algorithm corresponding to the private key and the lattice encryption algorithm to obtain the data to be encrypted, thereby utilizing the high security characteristics of the lattice encryption algorithm to enhance the resistance to evolving quantum attacks.

[0081] The following combination Figure 6 and Figure 7 , taking the application of the blockchain-based decryption processing method provided in this embodiment in the data decryption scenario as an example, the blockchain-based decryption processing method provided in this embodiment is further explained. Figure 7 The blockchain-based decryption processing method applied to the data decryption scenario specifically includes steps S702 to S710.

[0082] like Figure 6As shown, after the service agency obtains the user's data access request, it reads the encrypted data in the blockchain storage system in the cloud environment based on the user identifier in the data access request, obtains the encrypted data, and then sends a zero-knowledge authentication application to the zero-knowledge authentication agency and obtains the zero-knowledge proof generated by the zero-knowledge authentication agency and returns it; after receiving the zero-knowledge proof, the service agency sends a private key application containing the user identifier and the zero-knowledge proof to the blockchain trusted application, and the blockchain trusted application effectively verifies the user identifier and the zero-knowledge proof based on the private key application, and returns the private key to the service agency if the verification passes, and the service agency decrypts the encrypted data according to the private key and the decryption algorithm corresponding to the lattice encryption algorithm to obtain the data to be encrypted.

[0083] Step S702: Obtain a data access request and read data from the blockchain according to the user identifier in the data access request to obtain encrypted data.

[0084] Step S704: Generate a zero-knowledge proof based on the user ID, and send the user ID and the zero-knowledge proof to the blockchain trusted application.

[0085] Step S706, receiving the private key returned by the blockchain trusted application after valid verification of the user identification and zero-knowledge proof.

[0086] Step S708, performing encryption inverse calculation based on preset parameters and encrypted data to obtain transformation parameters, and performing decryption calculation on the transformation parameters according to the private key to obtain first sampled data.

[0087] Step S710: Perform transformation processing based on the first sample data and the encrypted data to obtain data to be encrypted.

[0088] It should be noted that any one of steps S702 to S710 or any combination of multiple steps can be selected from steps S502 to S508 to form a new implementation method according to the needs of implementation deployment; and any one or multiple technical features in the technical scheme composed of steps S702 to S710 can be selected from steps S502 to S508 to form a new implementation method according to the needs of actual deployment, or the technical features in one or more optional implementation methods provided by steps S502 to S508 can be selected to form a new implementation method, which will not be described one by one here.

[0089] Figure 8 A schematic diagram of a blockchain-based encryption processing device provided by an embodiment of the present invention is as follows: Figure 8 As shown, the device comprises: A data sampling module 802 is used to obtain the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data; A transformation processing module 804 is used to perform transformation processing on the first sampled data according to the public key to obtain transformation parameters; An encryption calculation module 806, configured to perform encryption calculation based on preset parameters, the transformation parameters and the second sampled data to obtain encrypted data; The data sending module 808 is used to send the user identification and the encrypted data to the blockchain node for on-chain storage.

[0090] The blockchain-based encryption processing device provided in this embodiment, during the data encryption process, firstly performs data sampling on the data to be encrypted by running the data sampling module 802 to obtain the first sampling data and the second sampling data, then performs transformation processing on the first sampling data according to the public key by running the transformation processing module 804 to obtain the transformation parameters, and then performs encryption calculation based on the preset parameters, the transformation parameters and the second sampling data by running the encryption calculation module 806 to obtain the encrypted data. In this way, data encryption is performed in this way to improve the resistance to data attacks. Furthermore, the user identification 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 the encrypted data on the chain, more secure, more transparent and more reliable data protection is achieved.

[0091] The blockchain-based encryption processing device provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0092] Fig. 9 A schematic diagram of a blockchain-based decryption processing device provided by an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the device comprises: A data reading module 902 is used to read data from the blockchain according to the user identifier in the data access request to obtain encrypted data; 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; A decryption calculation module 906, configured to perform a decryption calculation on the transformation parameter according to a private key to obtain first sample data; The transformation processing module 908 is used to perform transformation processing based on the first sampled data and the encrypted data to obtain data to be encrypted.

[0093] The blockchain-based decryption processing device provided in this embodiment, during the data decryption process, firstly reads data on the blockchain according to the user identification by running the data reading module 902 to obtain the encrypted data. During the data decryption of the encrypted data, firstly, the encryption inverse calculation module 904 is run to perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters. Then, the decryption calculation module 906 is run to perform decryption calculation on the transformation parameters according to the private key to obtain the first sampled data. Finally, the transformation processing module 908 is run to perform transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted. In this way, the encrypted data stored on the blockchain is decrypted in combination with the private key and the decryption algorithm to improve the security of the data.

[0094] The blockchain-based decryption processing device provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0095] Furthermore, an embodiment of this specification also provides an encryption processing device based on blockchain, Fig.10 A schematic diagram of a blockchain-based encryption processing device provided in one embodiment of this specification is shown in FIG. Fig.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, and the communication interface 1004 may include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.

[0096] Fig.10 In the embodiment, the memory 1001 stores computer executable instructions that can be run on the processor 1002, and when the computer executable instructions are executed by the processor 1002, the following process is implemented: Acquire the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data; Performing transformation processing on the first sampled data according to the public key to obtain transformation parameters; Perform encryption calculation based on preset parameters, the transformation parameters and the second sampled data to obtain encrypted data; The user identification and the encrypted data are sent to the blockchain node for on-chain storage.

[0097] The blockchain-based encryption processing device provided in this embodiment, through the cooperation of the memory 1001, the processor 1002, the bus 1003 and the communication interface 1004, in the data encryption process, firstly samples the data to be encrypted to obtain the first sampling data and the second sampling data, then transforms the first sampling data according to the public key to obtain the transformation parameters, and then performs encryption calculation based on the preset parameters, the transformation parameters and the second sampling data to obtain the encrypted data. In this way, data encryption is performed in this way to improve the resistance to data attacks. Further, the user identification and the encrypted data are sent to the blockchain node for on-chain storage. In this way, by storing the encrypted data on the chain, more secure, more transparent and more reliable data protection is achieved.

[0098] The blockchain-based encryption processing device provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0099] Furthermore, an embodiment of this specification also provides a decryption processing device based on blockchain, Fig.11 A schematic diagram of a blockchain-based encryption processing device provided in one embodiment of this specification is shown in FIG. Fig.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 through the bus 1103, and the communication interface 1104 may include an input and output interface, which includes but is not limited to a keyboard, a mouse, a display, a microphone, a loudspeaker, etc.

[0100] Fig.11 In the embodiment, the memory 1101 stores computer executable instructions that can be run on the processor 1102, and when the computer executable instructions are executed by the processor 1102, the following process is implemented: Read data from the blockchain according to the user ID in the data access request to obtain encrypted data; Perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; Decrypting and calculating the transformation parameter according to the private key to obtain first sampling data; Transformation processing is performed based on the first sampled data and the encrypted data to obtain data to be encrypted.

[0101] The blockchain-based decryption processing device provided in this embodiment, through the cooperation of the memory 1101, the processor 1102, the bus 1103 and the communication interface 1104, in the process of data decryption, first reads the data on the blockchain according to the user identification to obtain the encrypted data, and in the process of decrypting the encrypted data, first performs encryption inverse calculation based on the preset parameters and the encrypted data to obtain the transformation parameters, and then performs decryption calculation on the transformation parameters according to the private key to obtain the first sampled data, and finally performs transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted, thereby combining the private key and the decryption algorithm to decrypt the encrypted data stored on the blockchain to improve the security of the data.

[0102] The blockchain-based decryption processing device provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0103] Furthermore, another embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented: Acquire the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data; Performing transformation processing on the first sampled data according to the public key to obtain transformation parameters; Perform encryption calculation based on preset parameters, the transformation parameters and the second sampled data to obtain encrypted data; The user identification and the encrypted data are sent to the blockchain node for on-chain storage.

[0104] The computer-readable storage medium 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 transforms the first sampled data according to the public key to obtain transformation parameters, and then performs encryption calculation based on preset parameters, transformation parameters and second sampled data to obtain encrypted data. In this way, data encryption is performed in this manner to improve the ability to resist data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage. In this way, by storing the encrypted data on-chain, more secure, more transparent and more reliable data protection is achieved.

[0105] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0106] The computer-readable storage medium provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0107] Furthermore, another embodiment of the present specification provides another computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented: Read data from the blockchain according to the user ID in the data access request to obtain encrypted data; Perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; Decrypting and calculating the transformation parameter according to the private key to obtain first sampling data; Transformation processing is performed based on the first sampled data and the encrypted data to obtain data to be encrypted.

[0108] The computer-readable storage medium provided in this embodiment, in the process of data decryption, first reads data on the blockchain according to the user identification to obtain encrypted data, and in the process of decrypting the encrypted data, first performs encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters, and then performs decryption calculation on the transformation parameters according to the private key to obtain first sampled data, and finally performs transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted, thereby decrypting the encrypted data stored on the blockchain in combination with the private key and the decryption algorithm to improve the security of the data.

[0109] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0110] The computer-readable storage medium provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0111] Furthermore, another embodiment of the present specification also provides a computer program product, which implements the following process when executed by a processor: Acquire the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data; Performing transformation processing on the first sampled data according to the public key to obtain transformation parameters; Perform encryption calculation based on preset parameters, the transformation parameters and the second sampled data to obtain encrypted data; The user identification and the encrypted data are sent to the blockchain node for on-chain storage.

[0112] The computer program product 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 transforms the first sampled data according to the public key to obtain transformation parameters, and then performs encryption calculation based on preset parameters, transformation parameters and second sampled data to obtain encrypted data. In this way, data encryption is performed in this manner to improve the ability to resist data attacks. Furthermore, the user identifier and encrypted data are sent to the blockchain node for on-chain storage. In this way, by storing the encrypted data on-chain, more secure, more transparent and more reliable data protection is achieved.

[0113] The computer program product provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0114] Furthermore, another embodiment of the present specification provides another computer program product, which implements the following process when executed by a processor: Read data from the blockchain according to the user ID in the data access request to obtain encrypted data; Perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; Decrypting and calculating the transformation parameter according to the private key to obtain first sampling data; Transformation processing is performed based on the first sampled data and the encrypted data to obtain data to be encrypted.

[0115] The computer program product provided in this embodiment first reads data on the blockchain according to the user identification to obtain encrypted data during data decryption. In the process of decrypting the encrypted data, first, encryption inverse calculation is performed based on preset parameters and the encrypted data to obtain transformation parameters. Then, decryption calculation is performed on the transformation parameters according to the private key to obtain first sampled data. Finally, transformation processing is performed based on the first sampled data and the encrypted data to obtain the data to be encrypted. In this way, the encrypted data stored on the blockchain is decrypted in combination with the private key and the decryption algorithm to improve the security of the data.

[0116] The computer program product provided in one embodiment of this specification can implement each process in the aforementioned method embodiment and achieve the same functions and effects, which will not be repeated here.

[0117] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented 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.

[0118] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0119] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

[0122] Memory may include non-permanent storage in a computer-readable storage medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable storage medium.

[0123] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0124] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0125] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0126] The above is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A blockchain-based encryption processing method, characterized in that: The method comprises: Acquire the data to be encrypted and perform data sampling to obtain first sampled data and second sampled data; Performing transformation processing on the first sampled data according to the public key to obtain transformation parameters; Perform encryption calculation based on preset parameters, the transformation parameters and the second sampled data to obtain encrypted data; The user identification and the encrypted data are sent to the blockchain node for on-chain storage.

2. The blockchain-based encryption processing method according to claim 1, characterized in that: The data sampling includes: The data to be encrypted is sampled according to a first sampling strategy to obtain first sampled data, and the data to be encrypted is sampled according to a second sampling strategy to obtain second sampled data.

3. The blockchain-based encryption processing method according to claim 1, characterized in that: The performing encryption calculation based on the preset parameters, the transformation parameters and the second sampled data to obtain the encrypted data includes: Perform encryption calculation according to the preset parameters, the transformation parameters and the second sampled data to obtain encryption parameters; The encryption parameters are compressed to obtain the encrypted data.

4. The blockchain-based encryption processing method according to claim 2, characterized in that: The step of sampling the data to be encrypted according to the second sampling strategy to obtain second sampled data includes: Performing a preset number of data sampling in the first modulus of the data to be encrypted according to a pseudo-random function to obtain first sub-sampled data; and A starting number of data sampling is performed in the second modulus of the data to be encrypted according to a pseudo-random function to obtain second sub-sampled data.

5. The blockchain-based encryption processing method according to claim 4, characterized in that: The performing encryption calculation based on the preset parameters, the transformation parameters and the second sampled data to obtain the encrypted data includes: Calculate a first encryption parameter according to the structural domain parameter, the random matrix, the preset number of times, the transformation parameter and the first sub-sampling data; Calculate a second encryption parameter according to the structural domain parameter, the random matrix, the transformation parameter and the second sub-sampling data; The first encryption parameter and the second encryption parameter are determined as the encrypted data.

6. A decryption processing method based on blockchain, characterized in that: The method comprises: Read data from the blockchain according to the user ID in the data access request to obtain encrypted data; Perform encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters; Decrypting and calculating the transformation parameter according to the private key to obtain first sampling data; Transformation processing is performed based on the first sampled data and the encrypted data to obtain data to be encrypted.

7. The blockchain-based decryption processing method according to claim 6, characterized in that: After the step of reading data from the blockchain according to the user identifier in the data access request to obtain encrypted data is executed, and before the step of performing encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters is executed, the method further includes: Generate a zero-knowledge proof based on the user identifier, and send the user identifier and the zero-knowledge proof to a blockchain trusted application; Receive the private key returned by the blockchain trusted application after verifying the user identification and the zero-knowledge proof.

8. The blockchain-based decryption processing method according to claim 6, characterized in that: The performing encryption inverse calculation based on preset parameters and the encrypted data to obtain transformation parameters includes: Decompressing the encrypted data to obtain encryption parameters; An encryption inverse calculation is performed based on the encryption parameter and the preset parameter to obtain the transformation parameter.

9. The blockchain-based decryption processing method according to claim 6, characterized in that: The encrypted data includes a first encryption parameter and a second encryption parameter.

10. The blockchain-based decryption processing method according to claim 9, characterized in that: The performing transformation processing based on the first sampled data and the encrypted data to obtain the data to be encrypted includes: Calculating a first area according to the first sampling data and the first encryption parameter, and calculating a second area according to the first sampling data and the second encryption parameter; calculating a shared area between the first area and the second area; The shared area in the structure domain is deleted to obtain a remaining area, and the data to be encrypted is determined according to the remaining area.

Citation Information

Patent Citations

  • Block chain crowd sensing system privacy security protection method using zero knowledge proof

    CN114760067A

  • Instruction set-based post-quantum lattice cryptographic hardware optimization structure

    CN116094711A

  • Group user identity authentication system and method based on lattice password

    CN117014147A

  • Block chain oracle machine updatable encryption method and system based on post quantum cryptography

    CN118677687A

  • Executing a cryptographic operation

    US20200082738A1