Encryption method, decryption method and system
By using symmetric key encryption and attribute-based encryption technology in the computing power network, combining linear secret sharing matrix and anti-collision hash function, offline and online ciphertexts are generated, and data security and ciphertext retrieval problems in computing power network are solved, achieving efficient and secure data sharing and retrieval.
Patent Information
- Application Number
- CN202411749099.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Data in computing power networks faces the risk of illegal access, leakage and tampering during transmission and storage, and existing methods are difficult to efficiently locate and distribute required information, resulting in difficulty in retrieving ciphertexts.
An encryption method is adopted to encrypt plaintext through a symmetric secret key, and to generate offline ciphertext and online ciphertext using user attributes, combining linear secret sharing matrix and anti-collision hash function to achieve secure storage and accurate retrieval of ciphertext.
Effectively protect data from illegal access, realize efficient and accurate retrieval of ciphertexts, reduce the computing burden on the user side, and ensure the integrity and traceability of data through blockchain technology.
Smart Images

Figure CN119728172A_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 face more severe challenges, especially in data ciphertext retrieval and data sharing. Not only does it face the risk of intentional disclosure, but it may also be subject to unauthorized access and even the threat of being forged or tampered with.
[0004] In addition, while ensuring data confidentiality, existing methods often find it difficult to efficiently locate and distribute 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 only the 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 owner, and comprises:
[0009] Encrypt the plaintext to be encrypted based on the symmetric key;
[0010] Determine a secret value and a random number corresponding to the user attribute respectively, and generate 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] 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, the offline ciphertext is online encrypted 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] Determine the intermediate value and the 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 identity of the user who decrypts the online ciphertext.
[0016] In some embodiments, the method further comprises:
[0017] extracting a set of keywords 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 a 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 identity authentication information of the data user and the online ciphertext;
[0027] The blockchain compares the identity authentication 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 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.
[0029] In some embodiments, the method further comprises:
[0030] The blockchain obtains the online ciphertext sent by the computing power node;
[0031] The blockchain verifies the integrity of the online ciphertext based on the interaction between the blockchain and the computing power node;
[0032] 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.
[0033] In some embodiments, the method further comprises:
[0034] The trusted institution obtains the private key used by the data user to decrypt the online ciphertext;
[0035] The trusted institution compares the obtained private key with the private key pre-allocated to the data user to obtain a comparison result;
[0036] The user type of the data user is determined according to the comparison result.
[0037] In a third aspect, the present disclosure provides an encryption system, which is applied to a data owner, and includes:
[0038] An encryption unit, used for encrypting the plaintext to be encrypted based on a symmetric key;
[0039] a determination unit, used to respectively determine a secret value and a random number corresponding to a user attribute;
[0040] 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;
[0041] The encryption unit is further used to perform 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;
[0042] The generating unit is further used 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 used 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 used 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.
[0046] In some embodiments, in some embodiments, the encryption system further comprises:
[0047] An extraction unit, used for extracting a keyword set from the plain text;
[0048] The encryption unit is also used to encrypt the keyword set to generate a keyword index;
[0049] The transmission unit is also 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, the decryption system comprising: a data usage terminal and a computing power node, wherein:
[0051] The computing power node is used 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 used 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 used 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 also 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 according to 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 identity authentication information of the data user and the online ciphertext;
[0057] The blockchain is also used to compare the identity authentication information with the stored intermediate value and binding attribute value of the online ciphertext to verify the identity of the data user;
[0058] And, when the identity authentication result is verified, the computing power node is also 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 also 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 verification result is passed and the integrity verification result is passed, the computing power node is also 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 used by the data user end to decrypt the online ciphertext;
[0064] The trusted institution end is also 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, wherein the computer program is used to enable the processor to execute the method described in the first aspect above.
[0067] The encryption method, decryption method and system provided by the present disclosure, in the encryption method: the data owner encrypts the plaintext to be encrypted based on the symmetric key, determines the secret value and random number corresponding to the user attribute respectively, and generates offline ciphertext based on the plaintext encrypted by the symmetric key based on the secret value and random number corresponding to the user attribute, and encrypts the offline ciphertext online according to the user attribute, the pre-constructed 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, generate the verification signature of the online ciphertext, and upload the online ciphertext including the verification signature to the 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, the anti-collision hash function is used to achieve the hiding of user attributes in the access policy, which effectively prevents malicious users from indirectly inferring sensitive information from the access policy. On the other hand, the online / offline hybrid encryption mechanism is used to effectively reduce problems such as excessive computing burden on the user side. 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 invention;
[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 by 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 show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0076] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some 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 comprising 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 of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0079] The term "plurality" in the embodiments of the present disclosure refers to two or more than two, and other quantifiers are similar thereto.
[0080] The terms "first", "second", "third", etc. in the present disclosure are used to distinguish similar or similar objects or entities, and are not necessarily meant to limit a specific order or sequence, unless otherwise indicated. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, for example, they can be implemented in an order other than those given in the diagrams or descriptions of the embodiments of the present 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 a 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 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 described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0083] According to one aspect of the present disclosure, the present disclosure provides an encryption method. Among them, the encryption method can be applied to the data owner (also referred to as the 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) end, a data owner end, a data user end (also referred to as a data user), a computing power 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 offline encryption processes, and S103 is an 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 the 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 the 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] Among them, security parameters are used to ensure the security of the security system, and may include parameters such as key length, hash function, etc. Trusted institutions can generate security parameters based on demand.
[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 a 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 share patient data securely, then the user attributes can be attribute information such as the doctor's department, authority, and level.
[0096] Exemplary, 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 end may generate global parameters and a master private key.
[0097] For example, a 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 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 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 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-constructed 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 uses 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] In combination 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 phase can also include the signature of the ciphertext.
[0111] For example, the data owner can use the private key n for each online ciphertext C l (1≤l≤d) Generate verification signature The number of online ciphertexts is d, id l 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 may be obtained if the user passes the authentication.
[0113] Exemplarily, the data owner can determine the intermediate value and 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 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 decrypts the online ciphertext.
[0114] For example, the data owner can determine the intermediate value C1=g of the online ciphertext based on the global parameter and its private key ηη ηt t is a parameter randomly selected by the data owner, and
[0115] The data owner can use global parameters, private keys, and specific attributes to 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 the 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 the keyword security index.
[0118] Exemplarily, 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, wherein 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. m}, and pick a random number A 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 the keyword index to the computing power node so that the computing power node can use the joint keyword search technology, the retrieval scope of the ciphertext can be effectively narrowed, the accuracy of the search results can be improved, and the user's search experience can be enhanced.
[0122] According to another aspect of the present disclosure, the present disclosure also provides a decryption method. For example, the decryption method can be used to decrypt the online ciphertext obtained by the above encryption method to obtain the plaintext. Regarding the same contents of this embodiment as the above embodiment, this embodiment will not be repeated.
[0123] See also Figure 3 , Figure 3 The following is a flow chart 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, wherein 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 has a need to obtain the 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 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.
[0128] Combined with reference Figure 2 ,After the search trap generation phase, the index trap matching phase is entered.,In this phase, the computing power 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] Combined with 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 also include: in response to the search request, the blockchain obtains the identity authentication information and online ciphertext of the data user. The blockchain compares the identity authentication information with the intermediate value and binding attribute value of the stored online ciphertext to verify the identity of the data user. And S302 may include: when the identity authentication result is verified, 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 power node interacting with the blockchain to complete identity authentication.
[0134] For example, blockchain can verify whether data users meet access policies and ensure that only authorized users can perform search and decryption operations. Among them, verification smart contracts (VSCs) can be deployed on blockchain to enforce them by 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 Comparison L′ i With L i Are they consistent? If they are consistent, the authentication result is authentication passed, which means that the data user meets the access policy and has the authority to obtain online ciphertext; otherwise, if they are inconsistent, the authentication result is authentication failed, which means that the data user does not meet the access policy and does not have the authority to obtain online ciphertext.
[0138] Furthermore, the computing node may send the online ciphertext to the blockchain. The blockchain may verify the integrity of the online ciphertext. For example, in some embodiments, on the basis of identity verification, the blockchain may further verify the integrity of the online ciphertext.
[0139] Continue reading Figure 2 ,The index trapdoor matching phase can also include the interaction between the computing node and the blockchain to complete the ciphertext integrity verification.
[0140] Exemplarily, the blockchain obtains the online ciphertext sent by the computing power node, and the blockchain verifies the integrity of the online ciphertext based on the interaction between the blockchain and the computing power node. And S302 may include: including: when the identity verification result is passed and the integrity verification result is passed, the computing power node performs keyword index matching based on the trapdoor.
[0141] For example, if the identity verification result is passed, for the online ciphertext sent by the computing power node, the blockchain can select a random number based on the verification smart contract Sent to the computing power node. The computing power node calculates and verifies the parameters In response. Then the blockchain verifies based on the verification smart contract If the two are consistent, it means that the online ciphertext has integrity; otherwise, if the two are inconsistent, it means that the online ciphertext does not have integrity.
[0142] That is to say, by combining digital signature technology and blockchain technology, it is possible to determine whether the online ciphertext has been tampered with or forged during the transmission process, thereby achieving verification of the integrity and accuracy of the online ciphertext.
[0143] S303: 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.
[0144] For example, the data user can randomly select As a conversion factor, and based on the conversion factor, global parameters, and master private key, a conversion key is generated 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, combined with 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 certain 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 Formula 6 to obtain the semi-decrypted ciphertext shown in Formula 7. Formula 6:
[0149]
[0150] Formula 7:
[0151]
[0152] That is to say, in this embodiment, the heavy decryption tasks can be evenly unloaded to the computing power nodes, so as to achieve the purpose of balanced allocation and dynamic scheduling of computing power resources.
[0153] S304: 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.
[0154] Continue reading Figure 2 After the index trapdoor matching stage, the ciphertext decryption stage can also be included. Combining 303 and S304, it can be seen that in this stage, the computing power node can assist in completing the semi-decryption operation, and the data user end completes the final decryption.
[0155] Correspondingly, the computing power node sends the semi-decrypted code 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 nodes use symmetric keys on this basis Recover the plaintext
[0158] In some embodiments, the trusted institution can trace back 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] Exemplarily, the trusted institution obtains the private key used by the data user to decrypt the online ciphertext, and 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 according to the comparison result. The user type may 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 the formula is not true, it means that the relationship between K3 and K1 is correct, or in other words, the two are not generated by the correct parameters. That is, the two have been tampered with, which can represent a malicious user.
[0163] That is to say, the form of the private key is in good form, but malicious users cannot be completely excluded. This step can further verify the identity of the data user to ensure that the identity of the data user is correct. That is, this embodiment realizes the tracking and tracing of malicious users by determining whether the private key is in good form and has not been tampered with, and identifying the identity of the malicious user.
[0164] Accordingly, after the trusted institution has identified a malicious user, the malicious user can be removed from the security system. The trusted institution can also perform a revocation operation to remove the malicious user or normal users in the security system, that is, to revoke the removal of the malicious user or normal user.
[0165] Continue reading Figure 2 ,In the retroactive revocation phase, 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 re-encrypts the ciphertext component C′ using the updated private key i,2 Among them, it can be expressed by formula 10, formula 10:
[0170]
[0171] Combined with the background technology and the above analysis of encryption and decryption methods, it can be seen that the present disclosure proposes a policy-hidden attribute-based joint search encryption / decryption method that supports traceability and attribute revocation to address the problems of sensitive information leakage, difficulty in verifying data integrity, and difficulty in ciphertext retrieval in the current computing power network. 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 to ensure that the 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 the problems of unauthorized illegal access, deliberate disclosure of sensitive information, difficulty in ciphertext retrieval, and uneven utilization of computing resources encountered in the transmission and communication of private information in the computing power network environment to a certain extent.
[0172] According to another aspect of the present disclosure, the present disclosure also provides an encryption device, which is applied to a data owner.
[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, used for encrypting the plaintext to be encrypted based on a symmetric key;
[0175] A determination unit 402, configured to respectively determine a secret value and a random number corresponding to a user attribute;
[0176] A generating unit 403, 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 used to perform 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;
[0178] The generating unit 403 is also used to generate a verification signature of 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 used 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 used 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, in some embodiments, the encryption system further comprises:
[0183] An extraction unit 405, configured to extract a keyword set from the plain text;
[0184] The encryption unit 401 is also used to encrypt the keyword set to generate a keyword index;
[0185] The transmission unit 404 is further used 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 the ciphertext can be completed through the participation of various components in the security system.
[0188] The computing power node is used 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;
[0189] The computing power node is further used 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;
[0190] The computing power node is further used to partially decrypt the online ciphertext based on the conversion key transmitted by the data user to obtain a semi-decrypted ciphertext;
[0191] The computing power node is also 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 according to the symmetric key.
[0192] In some embodiments, the decryption system further comprises a blockchain, wherein:
[0193] In response to the search request, the blockchain is used to obtain the identity authentication information of the data user and the online ciphertext;
[0194] The blockchain is also used to compare the identity authentication information with the stored intermediate value and binding attribute value of the online ciphertext to verify the identity of the data user;
[0195] And, when the identity authentication result is verified, the computing power node is also used to perform keyword index matching based on the trapdoor.
[0196] In some embodiments, the blockchain is further used to obtain the online ciphertext sent by the computing power node;
[0197] The blockchain is also used to verify the integrity of the online ciphertext based on the interaction between the blockchain and the computing power node;
[0198] Furthermore, when the identity verification result is passed and the integrity verification result is passed, the computing power node is also used to perform keyword index matching based on the trapdoor.
[0199] In some embodiments, the decryption system further includes a trusted institution end, wherein:
[0200] The trusted institution end is used to obtain the private key used by the data user end to decrypt the online ciphertext;
[0201] The trusted institution end is also used to compare the obtained private key with the private key pre-assigned to the data user end to obtain a comparison result;
[0202] The trusted institution end is further used to determine the user type of the data user 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, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the encryption method as described above.
[0204] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information (such as private keys, etc.) involved are in compliance with the relevant laws and regulations and do not violate public order and good morals.
[0205] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which can be a data owner, a data user, a computing power node, a blockchain, or a trusted institution.
[0206] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0207] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to 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. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0208] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0209] The computing unit 601 may be a variety of general and / or special 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 running 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 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the encryption method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the encryption method in any other appropriate manner (e.g., by means of firmware).
[0210] Various implementations of the systems and techniques described above herein 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), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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 may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0212] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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 herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may 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] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0216] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure 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 and optical storage, etc.) containing computer-usable program code.
[0217] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 device to generate 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.
[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 including 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.
[0219] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed 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 A step that specifies a function in one or more boxes.
[0220] Obviously, those skilled in the art can 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 also intended to include these modifications and variations.
Claims
1. An encryption method, characterized in that: The method is applied to the data owner, and comprises: Encrypt the plaintext to be encrypted based on the symmetric key; Determine a secret value and a random number corresponding to the user attribute respectively, and generate 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; 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, the offline ciphertext is online encrypted to obtain an online ciphertext; Generate a verification signature for the online ciphertext, and upload the online ciphertext including the verification signature to the computing power node for storage.
2. The method according to claim 1, characterized in that The method further comprises: Determine the intermediate value and the 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 identity of the user who decrypts the online ciphertext.
3. The method according to claim 1, characterized in that: The method further comprises: extracting a set of keywords 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 a corresponding ciphertext.
4. 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 3; 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.
5. The method according to claim 4, characterized in that The method further comprises: In response to the search request, the blockchain obtains the identity authentication information of the data user and the online ciphertext; The blockchain compares the identity authentication information with the stored intermediate value and binding attribute value of the online ciphertext to verify the identity of the data user; And, 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.
6. The method according to claim 5, 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.
7. The method according to claim 4, characterized in that The method further comprises: The trusted institution obtains the private key used by the data user to decrypt the online ciphertext; The trusted institution compares the obtained private key with the private key pre-allocated to the data user to obtain a comparison result; The trusted institution determines the user type of the data user according to the comparison result.
8. An encryption system, characterized in that: The encryption system is applied to the data owner, and the encryption system includes: An encryption unit, used for encrypting the plaintext to be encrypted based on a symmetric key; A determination unit, used 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 used to perform 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; The generating unit is further used to generate a verification signature of the online ciphertext; The transmission unit is used to upload the online ciphertext including the verification signature to the computing power node for storage.
9. 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 used 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 3; The computing power node is further used 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 used 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 also 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 according to the symmetric key.
10. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a computer program, and the computer program is used to cause the processor to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
ABOOE method capable of being proved to be safe
CN103973449A
Cloud storage-oriented online / offline searchable encryption method based on identity
CN108924103A
Block chain privacy protection method based on online and offline attribute encryption
CN114640468A
Attribute-based searchable encrypted data sharing method based on block chain
CN115834200A