Encryption method, decryption method and system
Through attribute-based encryption and online/offline hybrid encryption mechanisms, combined with blockchain verification, the security and accurate retrieval of data sharing in the computing power network are achieved, the problems of data privacy protection and illegal access are solved, and the security of data sharing and retrieval efficiency are improved.
Patent Information
- Application Number
- CN202411749099.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In computing networks, data security and privacy protection face severe challenges, especially in data ciphertext retrieval and sharing. Existing methods are difficult to achieve data sharing efficiently and accurately, and also face the risk of illegal access and sensitive information leakage.
It adopts attribute-based encryption technology, uses linear secret sharing matrix and collision-resistant hash function for encryption, combines online/offline hybrid encryption mechanism, generates online ciphertext and verifies signature through blockchain, realizing fine-grained access control and user attribute hiding.
Effectively prevent malicious users from obtaining sensitive information, reduce the computing burden on the user side, improve the accuracy of ciphertext retrieval, and ensure the security and integrity of data sharing.
Smart Images

Figure CN119728172B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data security technology, and in particular to an encryption method, a decryption method and a system. Background Art
[0002] The computing power network provides technical support for processing and storing large-scale data, allowing complex data analysis and computing tasks to be efficiently performed on multiple computing power nodes in different geographical locations.
[0003] However, data security and privacy protection in computing networks present even more severe challenges, especially in data ciphertext retrieval and data sharing. Data is not only at risk of intentional disclosure, but also of unauthorized access, and even threats of forgery or tampering.
[0004] In addition, while ensuring data confidentiality, existing methods often find it difficult to efficiently locate and distribute the required information, making it even more difficult to achieve efficient and accurate retrieval of ciphertext.
[0005] Therefore, how to achieve effective data sharing while protecting data from illegal access is an urgent problem that the computing power network needs to solve.
[0006] The content of the background technology section is merely information known to the inventor personally, and does not mean that the above information has entered the public domain before the application date of this disclosure, nor does it mean that it can become the prior art of the present disclosure. Summary of the Invention
[0007] The present disclosure provides an encryption method, a decryption method and a system to solve at least one of the above technical problems.
[0008] In a first aspect, the present disclosure provides an encryption method, which is applied to a data-owning end and includes:
[0009] Encrypt the plaintext to be encrypted based on the symmetric key;
[0010] Determining a secret value and a random number corresponding to the user attribute respectively, and generating an offline ciphertext from the plaintext encrypted by the symmetric key based on the secret value and the random number corresponding to the user attribute;
[0011] Performing online encryption on the offline ciphertext according to the user attributes, a pre-constructed linear secret sharing matrix, and a vector pre-generated based on the secret value and a series of random numbers to obtain an online ciphertext;
[0012] Generate a verification signature for the online ciphertext, and upload the online ciphertext including the verification signature to the computing power node for storage.
[0013] In some embodiments, the method further comprises:
[0014] Determining an intermediate value and a binding attribute value of the online ciphertext respectively, wherein the binding attribute value is used to indicate that a user with a specific attribute can decrypt the online ciphertext to obtain decrypted data;
[0015] The intermediate value and the binding attribute value of the online ciphertext are transmitted to the blockchain, wherein the intermediate value and the binding attribute value of the online ciphertext are used to authenticate the user who decrypts the online ciphertext.
[0016] In some embodiments, the method further comprises:
[0017] extracting a keyword set from the plaintext;
[0018] Encrypting the keyword set to generate a keyword index;
[0019] The keyword index is sent to a computing power node, wherein the keyword index is used to retrieve the corresponding ciphertext.
[0020] In a second aspect, the present disclosure provides a decryption method, comprising:
[0021] The computing power node obtains a search request for online ciphertext initiated by a data user, wherein the search request includes a trapdoor determined based on a request key subset, wherein the online ciphertext is encrypted based on the method described in the first aspect;
[0022] The computing power node performs keyword index matching based on the trapdoor to obtain a keyword index matching the trapdoor, and determines an online ciphertext corresponding to the keyword index matching the trapdoor;
[0023] The computing power node partially decrypts the online ciphertext based on the conversion key transmitted by the data user to obtain a semi-decrypted ciphertext;
[0024] The computing power node transmits the semi-decrypted ciphertext to the data user, wherein the semi-decrypted ciphertext is used to recover the plaintext corresponding to the online ciphertext according to the symmetric key.
[0025] In some embodiments, the method further comprises:
[0026] In response to the search request, the blockchain obtains the authentication information of the data user and the online ciphertext;
[0027] The blockchain compares the identity verification information with the stored intermediate value and binding attribute value of the online ciphertext to verify the identity of the data user;
[0028] And, the computing node performs the keyword index matching based on the trapdoor includes: in the case that the identity authentication result is passed, the computing node performs the keyword index matching based on the trapdoor.
[0029] In some embodiments, the method further includes:
[0030] The blockchain obtains the online ciphertext sent by the computing node;
[0031] The blockchain verifies the integrity of the online ciphertext based on the interaction between the blockchain and the computing node;
[0032] And, in the case that the identity authentication result is passed, the computing node performs the keyword index matching based on the trapdoor includes: in the case that the identity authentication result is passed and the integrity verification result is passed, the computing node performs the keyword index matching based on the trapdoor.
[0033] In some embodiments, the method further includes:
[0034] The trusted authority end obtains a private key used by the data use end to decrypt the online ciphertext;
[0035] The trusted authority end compares the obtained private key with a private key pre-allocated for the data use end to obtain a comparison result;
[0036] According to the comparison result, the user type of the data use end is determined.
[0037] In a third aspect, the present disclosure provides an encryption system applied to a data possession end, the encryption system comprising:
[0038] An encryption unit configured to encrypt a plaintext to be encrypted based on a symmetric key;
[0039] A determination unit configured to determine a secret value corresponding to a user attribute and a random number, respectively;
[0040] A generation unit configured to generate an offline ciphertext based on the plaintext encrypted based on the symmetric key based on the secret value corresponding to the user attribute and the random number;
[0041] The encryption unit is further configured to perform online encryption on the offline ciphertext according to the user attribute, a linear secret sharing matrix pre-constructed, and a vector pre-generated based on the secret value and a series of random numbers, to obtain an online ciphertext;
[0042] The generation unit is further configured to generate a verification signature of the online ciphertext;
[0043] The transmission unit is used to upload the online ciphertext including the verification signature to the computing power node for storage.
[0044] In some embodiments, the determining unit is further configured to respectively determine an intermediate value and a binding attribute value of the online ciphertext, wherein the binding attribute value is used to indicate that a user with a specific attribute can decrypt the online ciphertext to obtain decrypted data;
[0045] The transmission unit is further configured to transmit the intermediate value and the binding attribute value of the online ciphertext to the blockchain, wherein the intermediate value and the binding attribute value of the online ciphertext are used to authenticate a user who decrypts the online ciphertext.
[0046] In some embodiments, the encryption system further comprises:
[0047] an extraction unit, configured to extract a keyword set from the plaintext;
[0048] The encryption unit is further configured to encrypt the keyword set to generate a keyword index;
[0049] The transmission unit is further used to send the keyword index to the computing power node, wherein the keyword index is used to retrieve the corresponding ciphertext.
[0050] In a fourth aspect, the present disclosure provides a decryption system, comprising: a data user terminal and a computing power node, wherein:
[0051] The computing power node is configured to obtain a search request for online ciphertext initiated by the data user, wherein the search request includes a trapdoor determined based on a request key subset, wherein the online ciphertext is encrypted based on the method described in the first aspect;
[0052] The computing power node is further configured to perform keyword index matching based on the trapdoor to obtain a keyword index matching the trapdoor, and determine an online ciphertext corresponding to the keyword index matching the trapdoor;
[0053] The computing power node is further configured to partially decrypt the online ciphertext based on the conversion key transmitted by the data user to obtain a semi-decrypted ciphertext;
[0054] The computing power node is further used to transmit the semi-decrypted ciphertext to the data user, wherein the semi-decrypted ciphertext is used to recover the plaintext corresponding to the online ciphertext based on the symmetric key.
[0055] In some embodiments, the decryption system further comprises a blockchain, wherein:
[0056] In response to the search request, the blockchain is used to obtain the authentication information of the data user and the online ciphertext;
[0057] The blockchain is further used to compare the identity verification information with the stored intermediate value and binding attribute value of the online ciphertext to verify the identity of the data user;
[0058] Furthermore, when the identity authentication result is verified, the computing power node is further used to perform keyword index matching based on the trapdoor.
[0059] In some embodiments, the blockchain is further used to obtain the online ciphertext sent by the computing power node;
[0060] The blockchain is further used to verify the integrity of the online ciphertext based on the interaction between the blockchain and the computing power node;
[0061] Furthermore, when the identity authentication result is verified and the integrity verification result is verified, the computing power node is further used to perform keyword index matching based on the trapdoor.
[0062] In some embodiments, the decryption system further includes a trusted institution end, wherein:
[0063] The trusted institution end is used to obtain the private key of the data user end for decrypting the online ciphertext;
[0064] The trusted institution end is further used to compare the obtained private key with the private key pre-assigned to the data user end to obtain a comparison result;
[0065] The trusted institution end is further used to determine the user type of the data user end according to the comparison result.
[0066] In a fifth aspect, the present disclosure provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the method described in the first aspect above.
[0067] The present disclosure provides an encryption method, decryption method, and system. In the encryption method, the data owner encrypts the plaintext to be encrypted based on a symmetric key, determines the secret value and random number corresponding to the user attribute, and generates an offline ciphertext from the plaintext encrypted with the symmetric key based on the secret value and random number corresponding to the user attribute. The offline ciphertext is encrypted online based on the user attribute, a pre-constructed linear secret sharing matrix, and a vector pre-generated based on the secret value and a series of random numbers to obtain an online ciphertext. A verification signature of the online ciphertext is generated, and the online ciphertext including the verification signature is uploaded to a computing power node for storage. On the one hand, secret hiding is achieved by constructing a linear secret sharing matrix, and attribute-based encryption technology is used to achieve fine-grained access control for users. On the other hand, collision-resistant hash functions are used to hide user attributes in the access policy, effectively preventing malicious users from indirectly inferring sensitive information from the access policy. On the other hand, a hybrid online / offline encryption mechanism is used to effectively reduce problems such as excessive computing burden on the user end. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0069] Figure 1 A schematic diagram of the encryption method provided by the present disclosure;
[0070] Figure 2 A schematic diagram of the principle of the encryption / decryption method provided by the present disclosure;
[0071] Figure 3 A flowchart of a decryption method provided in an embodiment of the present disclosure;
[0072] Figure 4 A schematic diagram of the structure of an encryption device provided in an embodiment of the present disclosure;
[0073] Figure 5 A schematic diagram of the structure of a decryption system provided in an embodiment of the present disclosure;
[0074] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
[0075] The above drawings illustrate specific embodiments of the present disclosure, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the present disclosure in any way, but rather to illustrate the concepts of the present disclosure to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0076] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0077] It should be understood that the terms "including" and "having" and any variations thereof in the embodiments of the present disclosure are intended to cover but not exclude inclusion. For example, a product or device that includes a series of components is not necessarily limited to those components explicitly listed, but may include other components not explicitly listed or inherent to these products or devices.
[0078] In the embodiments of the present disclosure, the term "and / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0079] In the embodiments of the present disclosure, the term "plurality" refers to two or more than two, and other quantifiers are similar thereto.
[0080] The terms "first," "second," "third," and the like in this disclosure are used to distinguish between similar or similar objects or entities and are not necessarily intended to limit a particular order or precedence, unless otherwise indicated. It should be understood that the terms used in this manner are interchangeable where appropriate, e.g., capable of being implemented in an order other than that given in the illustrations or descriptions of the embodiments of this disclosure.
[0081] The term "unit / module" as used in this disclosure refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0082] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure and not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0083] According to one aspect of the present disclosure, an encryption method is provided. The encryption method can be applied to a data owner (also referred to as a data owner) in a security system based on attribute-based encryption (ABE). The security system is used to securely share sensitive data. The security system includes a trusted authority (TA), a data owner, a data user (also referred to as a data user), a computing node, and a blockchain.
[0084] See also Figure 1 , Figure 1 The following is a flow chart of the encryption method provided by the present disclosure. Figure 1 As shown, the encryption method includes:
[0085] S101: Encrypt the plaintext to be encrypted based on the symmetric key.
[0086] In this embodiment, encryption may include two stages: an offline encryption stage and an online encryption stage. S101 and S102 are the offline encryption process, and S103 is the online encryption process.
[0087] In this step, the data owner can use the symmetric key to encrypt the plaintext to be encrypted. In some embodiments, this step can be expressed by Formula 1:
[0088]
[0089] Among them, C l is the result of encryption in this step, Enc is the encryption algorithm, is the symmetric key, f l In plain text.
[0090] S102: Determine the secret value and random number corresponding to the user attribute respectively, and generate an offline ciphertext from the plaintext encrypted with the symmetric key based on the secret value and random number corresponding to the user attribute.
[0091] For example, the trusted institution can generate security parameters and attribute sets for the security system. And generate global parameters and master private key based on the security parameters and attribute set.
[0092] Security parameters are used to ensure the security of the security system and may include parameters such as key length and hash function. Trusted organizations can generate security parameters based on their needs.
[0093] Global parameters can be understood as parameters shared by all parameters in the security system. Global parameters can include cyclic multiplication groups. and Generator g, pairing operation e, hash function H, etc.
[0094] The master private key can be understood as the private key used to generate and manage users (data owners and data users). The master private key can include random numbers α, β, v i wait.
[0095] User attributes can be understood as user roles. If the technical solution of the present disclosure is applied to a scenario where a hospital needs to securely share patient data, then user attributes can be attribute information such as the doctor's department, authority, and level.
[0096] For example, combined Figure 2 It can be seen that the encryption / decryption method provided by the present disclosure may include a (generation system) initialization phase. In this phase, the trusted institution can generate global parameters and a master private key.
[0097] For example, the trusted institution can and is a cyclic multiplicative group of two prime numbers of order p (i.e. modulo p). Where g is The generator of And choose a collision-resistant hash function H: and two random numbers in, is the multiplicative group modulo p.
[0098] At the same time, for each user attribute Pick a random number and calculate Finally generate global parameters The master private key is msk = {α, β, v i}.
[0099] Continue reading Figure 2 After the initialization phase, the key generation phase can begin. In this phase, the trusted institution can generate a key based on the attribute set. Generate an attribute private key for each user, and the data owner and computing power node can generate public and private key pairs respectively.
[0100] For example, the trusted institution can Choose a random number The trusted institution can generate an attribute private key for each user based on the global parameters and the master private key. The trusted institution can generate an attribute private key SK for each user based on formula 2. u , Formula 2:
[0101]
[0102] Accordingly, the data owner and the computing power node can generate public and private key pairs based on the global parameters. For example, the data owner can randomly select a parameter As the private key, and calculate the public key PK o =g η The computing power node randomly selects a parameter As the private key SK s , and calculate the public key PK s =g μ .
[0103] For each user attribute The data owner chooses a secret value and a random number And finally generate offline ciphertext C0=e(g,g) αs ,
[0104] S103: Perform online encryption on the offline ciphertext according to the user attributes, the pre-built linear secret sharing matrix, and the vector pre-generated based on the secret value and a series of random numbers to obtain the online ciphertext.
[0105] Continue reading Figure 2 S101 to S103 can be understood as the ciphertext generation stage. In this stage, the data owner uses an offline / online encryption mechanism to encrypt the plaintext to obtain the final ciphertext (such as online ciphertext).
[0106] For example, Is a linear secret sharing matrix. The data owner is based on the secret value s and a series of random numbers Generate vector Simultaneous calculation To generate the final ciphertext (i.e. online ciphertext) in, is the linear secret sharing matrix The i-th row of .
[0107] In this step, secret hiding is achieved by constructing a linear secret sharing matrix, and attribute-based encryption technology is used to implement fine-grained access control for users. At the same time, collision-resistant hash functions are used to hide user attributes in access policies, effectively preventing malicious users from indirectly inferring sensitive information from access policies.
[0108] Furthermore, combined with the above analysis of S101 to S103 , it can be seen that in this embodiment, an online / offline hybrid encryption mechanism is used, which effectively reduces problems such as excessive computing burden on the user end.
[0109] S104: Generate a verification signature for the online ciphertext, and upload the online ciphertext including the verification signature to the computing power node for storage.
[0110] Continue reading Figure 2 ,The ciphertext generation stage can also include the signature of the ciphertext.
[0111] For example, the data owner can use the private key η for each online ciphertext C l (1≤l≤d) Generate verification signature The number of online ciphertexts is d, id l It is the identifier of each plaintext file. Finally, the content C T ={C,{C i ,1,C i,2} i∈[1,n] ,{Sig l} l∈[1,d]} is uploaded to the computing power node for storage. Among them, C is the overall ciphertext, {C i,1 , Ci,2} i∈[1,n] is a series of ciphertext fragments, Sig l is a series of signatures corresponding to a series of ciphertext fragments.
[0112] In some embodiments, the data owner may generate information for authenticating the user who decrypts the online ciphertext, so that the online ciphertext can be obtained if the user passes the authentication.
[0113] For example, the data owner can determine the intermediate value and binding attribute value of the online ciphertext, where the binding attribute value indicates that a user with specific attributes can decrypt the online ciphertext and obtain decrypted data. The data owner transmits the intermediate value and binding attribute value of the online ciphertext to the blockchain. The intermediate value and binding attribute value of the online ciphertext are used to authenticate the user who decrypted the online ciphertext.
[0114] For example, the data owner can determine the intermediate value C1=g of the online ciphertext based on the global parameters and its private key ηη ηt t is a parameter randomly selected by the data owner, and
[0115] The data owner can be based on global parameters, private keys, specific attributes att i , the master private key determines the binding attribute value L of the online ciphertext i =e(g βt ,H(att i ) η ).
[0116] In some embodiments, the data owner can generate an index for retrieving online ciphertext and transmit the index to the computing power node so that the computing power node can store the index and retrieve it based on the index when a user needs to obtain online ciphertext.
[0117] Continue reading Figure 2 ,After the ciphertext generation phase, the keyword index generation phase can ,be entered.,In this phase, the data owner can extract the keyword set and ,generate a keyword security index.
[0118] For example, the data owner can extract a keyword set from the plaintext, encrypt the keyword set, generate a keyword index, and send the keyword index to the computing power node, where the keyword index is used to retrieve the corresponding ciphertext.
[0119] For example, the data owner can extract a keyword set Kw including m keywords from the plain text, where Kw={kw1, kw2, ..., kw m}, and pick a random number The keyword index is generated based on the random number, global parameters, master private key, and private key, and sent to the computing power node. The keyword index can be expressed by formula 3:
[0120]
[0121] In this embodiment, by generating and transmitting keyword indexes to computing nodes so that computing nodes can use joint keyword search technology, the retrieval scope of ciphertext can be effectively narrowed, the accuracy of search results can be improved, and the user's search experience can be enhanced.
[0122] According to another aspect of the present disclosure, a decryption method is also provided. For example, the decryption method can be used to decrypt online ciphertext obtained by the above-mentioned encryption method to obtain plaintext. Regarding the contents of this embodiment that are the same as those in the above-mentioned embodiment, this embodiment will not be repeated.
[0123] See also Figure 3 , Figure 3 Schematic diagram of the decryption method provided by the embodiment of the present disclosure. Figure 3 As shown, the method includes:
[0124] S301: The computing power node obtains a search request for online ciphertext initiated by a data user, where the search request includes a trapdoor determined based on a key subset of the request, wherein the online ciphertext is encrypted based on the method described above.
[0125] Continue reading Figure 2 When the data user needs to obtain ciphertext, it can trigger the search trapdoor generation phase. In this phase, the data user can generate a trapdoor for the requested keyword set.
[0126] For example, the data user may input a keyword set Q = {kw′1, kw′2, ..., kw′m′}, and randomly select parameters Calculate the trapdoor by combining random parameters, global parameters, master private key, etc. And the final trapdoor Tr={Tr1,{Tr j,1 , Tr j,2} j∈[1,m′]}Sent to the computing power node.
[0127] S302: The computing power node performs keyword index matching based on the trapdoor to obtain a keyword index that matches the trapdoor, and determines an online ciphertext corresponding to the keyword index that matches the trapdoor.
[0128] See also Figure 2 After the search trapdoor generation phase, the index trapdoor matching phase begins. In this phase, computing nodes can execute the test algorithm.
[0129] For example, after receiving the trapdoor request, the computing power node can execute the test algorithm to perform keyword indexing and trapdoor matching. The matching can be expressed by Formula 4:
[0130]
[0131] If the two match, it means that the online ciphertext corresponding to the matching keyword index is the ciphertext requested by the data user.
[0132] Based on the above analysis, it can be seen that the data owner can transmit the authentication information of the user who can obtain the online ciphertext to the blockchain. Accordingly, in some embodiments, the decryption method may further include: in response to the search request, the blockchain obtains the authentication information and online ciphertext of the data user. The blockchain compares the authentication information with the stored intermediate value and binding attribute value of the online ciphertext to verify the identity of the data user. Furthermore, S302 may include: if the authentication result is passed, the computing power node performs keyword index matching based on the trapdoor.
[0133] Continue reading Figure 2 ,The index trapdoor matching phase can also include the ,computing node interacting with the blockchain to complete identity authentication.
[0134] For example, blockchain can verify whether data users meet access policies, ensuring that only authorized users can perform search and decryption operations. Verification Smart Contracts (VSCs) can be deployed on the blockchain to enforce compliance using their immutability.
[0135] For example, if a data user initiates a search request, the verification smart contract will be forced to perform the calculation shown in Formula 5:
[0136] L′ i= e(K i,3 , C1) = e(H(i β , g ηt )
[0137] Blockchain compares L' i with L i . If they are consistent, the identity verification result is a pass, which means that the data user satisfies the access policy and has the right to obtain the online ciphertext. Otherwise, if they are inconsistent, the identity verification result is a fail, which means that the data user does not satisfy the access policy and does not have the right to obtain the online ciphertext.
[0138] Further, the computing node can send the online ciphertext to the blockchain. The blockchain can verify the integrity of the online ciphertext. In some embodiments, on the basis of the identity verification, the blockchain can further verify the integrity of the online ciphertext.
[0139] Continuing to refer to Figure 2 , the index trapdoor matching stage can further include the computing node interacting with the blockchain to complete the ciphertext integrity verification.
[0140] Illustratively, the blockchain obtains the online ciphertext sent by the computing node, and verifies the integrity of the online ciphertext based on the interaction between the blockchain and the computing node. And S302 can include: in the case that the identity verification result is a pass and the integrity verification result is a pass, the computing node performs the keyword index matching based on the trapdoor.
[0141] For example, in the case that the identity verification result is a pass, for the online ciphertext sent by the computing node, the blockchain can select a random number based on the verification smart contract and send it to the computing node. The computing node calculates the verification parameter in response. Then the blockchain verifies based on the verification smart contract. If they are consistent, it means that the online ciphertext has integrity; otherwise, if they are inconsistent, it means that the online ciphertext does not have integrity.
[0142] That is, by combining the digital signature technology and the blockchain technology, it can be determined whether the online ciphertext has been tampered with or forged during transmission, realizing the integrity and accuracy verification of the online ciphertext.
[0143] S303: The computing node partially decrypts the online ciphertext based on the conversion key transmitted by the data use end to obtain a semi-decrypted ciphertext.
[0144] Illustratively, the data use end can randomly select as the conversion factor, and generate the conversion key based on the conversion factor, the global parameter and the master private key And the final conversion key Tk = {Tk1, Tk i}Sent to the computing power node.
[0145] Correspondingly, the computing power node partially decrypts the online ciphertext based on the conversion key to obtain the semi-decrypted ciphertext.
[0146] For example, combining the above example, if the data user meets the access policy, the computing power node will and a randomly selected set of constants Make its representation a linear combination that satisfies specific conditions So that the partial decryption result (such as semi-decrypted ciphertext) satisfies a specific form, then ∑ i∈I ω i λ i =s to ensure the correctness of the partial decryption results.
[0147] Among them, ρ(i) is the access policy, and the authorization set I is used to characterize which user attributes satisfy the access policy.
[0148] Accordingly, the computing node performs partial decryption based on Equation 6 to obtain the semi-decrypted ciphertext shown in Equation 7. Equation 6:
[0149]
[0150] Formula 7:
[0151]
[0152] That is to say, in this embodiment, the heavy decryption tasks can be evenly offloaded to the computing nodes, so as to achieve the purpose of balanced distribution and dynamic scheduling of computing resources.
[0153] S304: The computing power node transmits the semi-decrypted ciphertext to the data user, where the semi-decrypted ciphertext is used to recover the plaintext corresponding to the online ciphertext based on the symmetric key.
[0154] Continue reading Figure 2 After the index trapdoor matching phase, the ciphertext decryption phase can also be included. Combining 303 and S304, it can be seen that in this phase, the computing power node can assist in completing the semi-decryption operation, and the data user completes the final decryption.
[0155] Correspondingly, the computing power node sends the semi-decrypted key to the data user, and the user end can complete the final decryption by performing only one operation as shown in Formula 8:
[0156]
[0157] Accordingly, the computing power nodes use symmetric keys on this basis Restore plaintext
[0158] In some embodiments, the trusted institution can trace and identify malicious users who intentionally leak or abuse private keys.
[0159] Continue reading Figure 2 After the ciphertext decryption phase, a retroactive revocation phase can also be included. In this phase, the trusted institution can perform white-box tracing to identify malicious users.
[0160] For example, the trusted institution obtains the private key used by the data user to decrypt online ciphertext. The trusted institution compares the obtained private key with the private key pre-assigned to the data user to obtain a comparison result, and determines the user type of the data user based on the comparison result. The user type can include malicious users and normal users.
[0161] For example, a trusted institution can determine Is it true? If it is true, it means that the private key of the data user is in good form and the user type of the data user is a normal user; otherwise, if it is not true, it means that the private key of the data user may have been tampered with and the user type of the data user is a malicious user.
[0162] In some embodiments, the trusted institution can calculate e(g α , K3) = e(g, K1)·e(g, g) αβ To identify the malicious user's identity u id If this equation does not hold, it means that the relationship between K3 and K1 is correct, or in other words, they are not generated with the correct parameters. In other words, they have been tampered with, which can indicate a malicious user.
[0163] In other words, even though the private key is in good form, it cannot completely rule out malicious users. This step can further verify the identity of the data user to ensure that the data user's identity is correct. In other words, this embodiment can track and trace malicious users by determining whether the private key is in good form and has not been tampered with, and identifying the malicious user.
[0164] Accordingly, after the trusted institution has identified a malicious user, it can remove the malicious user from the security system. The trusted institution can also perform a revocation operation to remove the malicious user or a normal user from the security system. That is, to revoke the removal of the malicious user or normal user.
[0165] Continue reading Figure 2 ,In the retrospective revocation stage, the trusted institution can implement fine-grained user revocation.
[0166] For example, a trusted institution can choose a random number And the updated secret key is calculated based on formula 9:
[0167]
[0168] Correspondingly, the trusted institution can calculate the updated private key In order to distribute the updated partial private key K′ to the revoked user i,2 .
[0169] Accordingly, the data owner uses the updated private key to re-encrypt the ciphertext component C′ i,2 . It can be expressed by formula 10:
[0170]
[0171] Combining the background technology and the above analysis of encryption and decryption methods, it can be seen that the present disclosure addresses the problems of sensitive information leakage, difficulty in verifying data integrity, and difficulty in ciphertext retrieval in current computing power networks, and proposes a policy-hidden attribute-based joint search encryption / decryption method that supports traceability and attribute revocation. Attribute-based encryption technology can be used to achieve fine-grained user access control while hiding the access policy, effectively protecting the user's sensitive information. Joint keyword search technology can effectively narrow the search scope of ciphertext, improve the accuracy of search results, and enhance the user's search experience. Digital signature technology realizes the verifiability of search results, ensuring that ciphertext has not been tampered with or forged. Efficient traceability and flexible attribute revocation can dynamically optimize multi-user access control. The present disclosure alleviates to a certain extent the problems encountered in the transmission and communication of private information in computing power network environments, such as unauthorized illegal access, intentional disclosure of sensitive information, difficulty in ciphertext retrieval, and uneven utilization of computing resources.
[0172] According to another aspect of the present disclosure, the present disclosure also provides an encryption device, which is applied to a data-owning end.
[0173] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of the encryption device provided in the embodiment of the present disclosure. Figure 4 As shown, the encryption device 400 includes:
[0174] An encryption unit 401, configured to encrypt the plaintext to be encrypted based on a symmetric key;
[0175] A determination unit 402, configured to determine a secret value and a random number corresponding to a user attribute, respectively;
[0176] A generating unit 403 is configured to generate an offline ciphertext from the plaintext encrypted by the symmetric key based on the secret value corresponding to the user attribute and a random number;
[0177] The encryption unit 401 is further configured to perform online encryption on the offline ciphertext based on the user attributes, a pre-constructed linear secret sharing matrix, and a vector pre-generated based on the secret value and a series of random numbers to obtain an online ciphertext;
[0178] The generating unit 403 is further configured to generate a verification signature for the online ciphertext;
[0179] The transmission unit 404 is used to upload the online ciphertext including the verification signature to the computing power node for storage.
[0180] In some embodiments, the determining unit 402 is further configured to respectively determine an intermediate value and a binding attribute value of the online ciphertext, wherein the binding attribute value is used to indicate that a user with a specific attribute can decrypt the online ciphertext to obtain decrypted data;
[0181] The transmission unit 404 is further configured to transmit the intermediate value and the binding attribute value of the online ciphertext to the blockchain, wherein the intermediate value and the binding attribute value of the online ciphertext are used to authenticate the user who decrypts the online ciphertext.
[0182] In some embodiments, the encryption system further comprises:
[0183] An extraction unit 405 is configured to extract a keyword set from the plain text;
[0184] The encryption unit 401 is further configured to encrypt the keyword set to generate a keyword index;
[0185] The transmission unit 404 is further configured to send the keyword index to a computing power node, wherein the keyword index is used to retrieve a corresponding ciphertext.
[0186] According to another aspect of the present disclosure, the present disclosure also provides a decryption system.
[0187] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of the decryption system provided by the embodiment of the present disclosure. Figure 5 As shown, the decryption system includes: data owner, data user, computing node, blockchain, and trusted institution. Combined with the above analysis, the decryption system can be a security system, that is, the decryption of ciphertext can be completed through the joint participation of various components in the security system.
[0188] The computing power node is configured to obtain a search request for the online ciphertext initiated by the data usage end, the search request including a trapdoor determined based on a request key subset, wherein the online ciphertext is obtained by encryption based on the method in the first aspect;
[0189] The computing power node is further configured to perform keyword index matching based on the trapdoor to obtain a keyword index matched with the trapdoor, and determine the online ciphertext corresponding to the keyword index matched with the trapdoor;
[0190] The computing power node is further configured to perform partial decryption on the online ciphertext based on the conversion key transmitted by the data usage end to obtain a semi-decrypted ciphertext;
[0191] The computing power node is further configured to transmit the semi-decrypted ciphertext to the data usage end, wherein the semi-decrypted ciphertext is used to recover the plaintext corresponding to the online ciphertext according to a symmetric key.
[0192] In some embodiments, the decryption system further includes a blockchain, wherein,
[0193] In response to the search request, the blockchain is configured to obtain identity verification information of the data usage end and the online ciphertext;
[0194] The blockchain is further configured to compare the identity verification information with the intermediate value and the binding attribute value of the online ciphertext stored in the blockchain to verify the identity of the data usage end;
[0195] In addition, in the case where the identity verification result is a pass, the computing power node is further configured to perform keyword index matching based on the trapdoor.
[0196] In some embodiments, the blockchain is further configured to obtain the online ciphertext sent by the computing power node;
[0197] The blockchain is further configured to verify the integrity of the online ciphertext based on the interaction between the blockchain and the computing power node;
[0198] In addition, in the case where the identity verification result is a pass and the integrity verification result is a pass, the computing power node is further configured to perform keyword index matching based on the trapdoor.
[0199] In some embodiments, the decryption system further includes a trusted authority end, wherein,
[0200] The trusted authority end is configured to obtain a private key used by the data usage end to decrypt the online ciphertext;
[0201] The trusted authority end is further configured to compare the obtained private key with a private key pre-allocated for the data usage end to obtain a comparison result.
[0202] The trusted authority end is further configured to determine a user type of the data usage end according to the comparison result.
[0203] According to an embodiment of the present disclosure, the present disclosure further provides a processor-readable storage medium, which stores a computer program for causing a processor to perform the encryption method as described above.
[0204] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information (such as private keys) involved in the technical solution comply with relevant laws and regulations and do not violate public order and good customs.
[0205] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, which can be a data owning end, a data usage end, a computing power node, a blockchain, or a trusted authority end.
[0206] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0207] As shown in Figure 6 The device 600 includes a computing unit 601 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0208] Various components in device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0209] The computing unit 601 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the encryption method in the above examples. For example, in some embodiments, the encryption method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the encryption method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the encryption method by any other appropriate means (e.g., by means of firmware).
[0210] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0211] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0212] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0213] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0214] The systems and techniques described here can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here, or a combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0215] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS (Virtual Private Server, or VPS for short) services. The server can also be a server of a distributed system, or a server combined with a blockchain.
[0216] Those skilled in the art will appreciate that embodiments of the disclosure can be supplied as a method, a system, or a computer program product. Thus, the disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the disclosure can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, magnetic disks and optical storage media) having computer-usable program code embodied in the medium.
[0217] The disclosure is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions, which are executed via the processor of the computer or other programmable data processing apparatus, generate a means for implementing the functions specified in the flowcharts and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the disclosure. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks
[0218] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor-readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0219] These processor-executable instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0220] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.
Claims
1. An encryption method, characterized in that: The method is applied to the data owner, and includes: Encrypt the plaintext to be encrypted based on the symmetric key; Determining a secret value and a random number corresponding to the user attribute respectively, and generating an offline ciphertext from the plaintext encrypted by the symmetric key based on the secret value and the random number corresponding to the user attribute; Performing online encryption on the offline ciphertext according to the user attributes, a pre-constructed linear secret sharing matrix, and a vector pre-generated based on the secret value and a series of random numbers to obtain an online ciphertext; Generate a verification signature for the online ciphertext, and upload the online ciphertext including the verification signature to a computing power node for storage; Determining an intermediate value and a binding attribute value of the online ciphertext respectively, wherein the binding attribute value is used to indicate that a user with a specific attribute can decrypt the online ciphertext to obtain decrypted data; The intermediate value and the binding attribute value of the online ciphertext are transmitted to the blockchain, wherein the intermediate value and the binding attribute value of the online ciphertext are used to authenticate the user who decrypts the online ciphertext.
2. The method according to claim 1, characterized in that The method further comprises: extracting a keyword set from the plaintext; Encrypting the keyword set to generate a keyword index; The keyword index is sent to a computing power node, wherein the keyword index is used to retrieve the corresponding ciphertext.
3. A decryption method, characterized in that: The method comprises: The computing power node obtains a search request for online ciphertext initiated by a data user, wherein the search request includes a trapdoor determined based on a request key subset, wherein the online ciphertext is encrypted based on the method according to any one of claims 1 to 2; The computing power node performs keyword index matching based on the trapdoor to obtain a keyword index matching the trapdoor, and determines an online ciphertext corresponding to the keyword index matching the trapdoor; The computing power node partially decrypts the online ciphertext based on the conversion key transmitted by the data user to obtain a semi-decrypted ciphertext; The computing power node transmits the semi-decrypted ciphertext to the data user, wherein the semi-decrypted ciphertext is used to recover the plaintext corresponding to the online ciphertext according to the symmetric key.
4. The method according to claim 3, characterized in that The method further comprises: In response to the search request, the blockchain obtains the authentication information of the data user and the online ciphertext; The blockchain compares the identity verification information with the stored intermediate value and binding attribute value of the online ciphertext to verify the identity of the data user; Furthermore, the computing power node performs keyword index matching based on the trapdoor, including: when the identity authentication result is verified, the computing power node performs keyword index matching based on the trapdoor.
5. The method according to claim 4, characterized in that The method further comprises: The blockchain obtains the online ciphertext sent by the computing power node; The blockchain verifies the integrity of the online ciphertext based on the interaction between the blockchain and the computing power node; And, when the identity authentication result is verified, the computing power node performs keyword index matching based on the trapdoor, including: when the identity authentication result is verified and the integrity verification result is verified, the computing power node performs keyword index matching based on the trapdoor.
6. The method according to claim 3, characterized in that The method further comprises: The trusted institution obtains the private key of the data user for decrypting the online ciphertext; The trusted institution compares the obtained private key with the private key pre-assigned to the data user to obtain a comparison result; The trusted institution determines the user type of the data user terminal according to the comparison result.
7. An encryption system, characterized in that: The encryption system is applied to the data owner, and the encryption system includes: An encryption unit, used to encrypt the plaintext to be encrypted based on a symmetric key; a determination unit, configured to respectively determine a secret value and a random number corresponding to a user attribute; a generating unit, configured to generate an offline ciphertext from the plaintext encrypted by the symmetric key based on the secret value corresponding to the user attribute and a random number; The encryption unit is further configured to perform online encryption on the offline ciphertext based on the user attributes, a pre-constructed linear secret sharing matrix, and a vector pre-generated based on the secret value and a series of random numbers to obtain an online ciphertext; The generating unit is further configured to generate a verification signature for the online ciphertext; A transmission unit, used to upload the online ciphertext including the verification signature to the computing power node for storage; a unit for respectively determining an intermediate value and a binding attribute value of the online ciphertext, wherein the binding attribute value is used to indicate that a user with a specific attribute can decrypt the online ciphertext to obtain decrypted data; and The intermediate value and the binding attribute value of the online ciphertext are transmitted to a unit of a blockchain, wherein the intermediate value and the binding attribute value of the online ciphertext are used to authenticate a user who decrypts the online ciphertext.
8. A decryption system, characterized in that: The decryption system includes: a data usage terminal and a computing power node, wherein: The computing power node is configured to obtain a search request for online ciphertext initiated by the data user, wherein the search request includes a trapdoor determined based on a request key subset, wherein the online ciphertext is encrypted based on the method according to any one of claims 1 to 2; The computing power node is further configured to perform keyword index matching based on the trapdoor to obtain a keyword index matching the trapdoor, and determine an online ciphertext corresponding to the keyword index matching the trapdoor; The computing power node is further configured to partially decrypt the online ciphertext based on the conversion key transmitted by the data user to obtain a semi-decrypted ciphertext; The computing power node is further used to transmit the semi-decrypted ciphertext to the data user, wherein the semi-decrypted ciphertext is used to recover the plaintext corresponding to the online ciphertext based on the symmetric key.
9. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a computer program, and the computer program is configured to cause the processor to execute the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
ABOOE method capable of being proved to be safe
CN103973449A
Attribute-based searchable encrypted data sharing method based on block chain
CN115834200A