Data security sharing method, device, equipment, medium and product
Through online encryption and attribute authorization agency verification, combined with cloud storage and cloud computing servers, the problems of privacy leakage and low transmission efficiency in data sharing are solved, and safe and efficient data sharing is achieved.
Patent Information
- Application Number
- CN202510988931.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-10
AI Technical Summary
Existing technologies have risks of data privacy leakage, insufficient data authenticity and controllability in data sharing, and the encryption algorithms and communication protocols are costly, making it difficult to adapt to the needs of resource-constrained devices, resulting in low data transmission efficiency.
When the data owner meets the online encryption conditions, the final ciphertext and symmetric key are generated and uploaded to the cloud storage server and blockchain. The attribute authorization agency is used to verify and generate attribute keys. The data user verifies and decrypts the ciphertext through the cloud computing server to achieve secure data sharing.
While ensuring data security, it improves the efficiency of data transmission between data owners and data users, and realizes safe and efficient data sharing.
Smart Images

Figure CN120768628A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security, and in particular to a data security sharing method, device, equipment, medium and product. BACKGROUND
[0002] With the rapid development of big data and artificial intelligence technology, the demand for data sharing is increasing, but data owners often refuse to actively participate in data sharing due to concerns about privacy leakage or lack of incentive mechanisms, resulting in frequent data island phenomenon, which limits the mining of data value. In addition, existing solutions have deficiencies in the authenticity and controllability of data, such as data may be forged or tampered with, and it is difficult to flexibly control access rights. At the same time, complex encryption algorithms and communication protocols usually bring high computing and communication costs, which are difficult to meet the actual needs of resource-constrained devices.
[0003] Therefore, how to improve the data transmission efficiency between data owners and data users while ensuring data security, and realize data security sharing, is a problem to be solved at present. SUMMARY
[0004] The present application provides a data security sharing method, device, equipment, medium and product to improve the data transmission efficiency between data owners and data users while ensuring data security, and realize data security sharing.
[0005] According to an aspect of the present application, a data security sharing method is provided, comprising:
[0006] The data owner determines the data ciphertext corresponding to the original data, the symmetric key, the final ciphertext and the verification code when detecting that the online encryption condition is met, and sends the final ciphertext and the symmetric key to the cloud storage server, and uploads the verification code to the blockchain;
[0007] The attribute authority responds to the data acquisition request issued by the data user, and performs time verification, identity verification and attribute domain verification, and generates an attribute key and sends the data user in the case of passing the verification;
[0008] The data user determines the conversion key according to the attribute key and sends it to the cloud computing server to instruct the cloud computing server to perform identity verification and ciphertext verification, and determines the conversion ciphertext corresponding to the final ciphertext in the case of passing the verification, to feed back the conversion ciphertext to the data user;
[0009] The data user decrypts the data ciphertext according to the retrieval key, the verification code downloaded from the blockchain and the conversion ciphertext fed back by the cloud computing server, to obtain the original data, and realizes the data security sharing of the data owner to the data user.
[0010] According to another aspect of the present application, a data security sharing device is provided, comprising:
[0011] An encryption module is configured to control the data owner to determine the data ciphertext corresponding to the original data, the symmetric key, the final ciphertext and the verification code when detecting that the online encryption condition is met, and send the final ciphertext and the symmetric key to the cloud storage server, and upload the verification code to the blockchain;
[0012] A verification module is configured to control the attribute authority to perform time verification, identity verification and attribute domain verification in response to a data acquisition request issued by the data user, and generate an attribute key and send the data user in the case of passing the verification;
[0013] A conversion module is configured to control the data user to determine a conversion key according to the attribute key and send it to the cloud computing server, to instruct the cloud computing server to perform identity verification and ciphertext verification, and in the case of passing the verification, determine the conversion ciphertext corresponding to the final ciphertext, to feed back the conversion ciphertext to the data user;
[0014] A decryption module is configured to control the data user to decrypt the data ciphertext according to the retrieval key, the verification code downloaded from the blockchain and the conversion ciphertext fed back by the cloud computing server, to obtain the original data, and realize data security sharing of the data owner to the data user.
[0015] According to another aspect of the present application, an electronic device is provided, comprising:
[0016] At least one processor; and
[0017] A memory connected in communication with the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the data security sharing method of any embodiment of the present application.
[0019] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to execute the data security sharing method of any embodiment of the present application when executed.
[0020] According to another aspect of the present application, a computer program product is also provided, which comprises a computer program, and the computer program implements the data security sharing method of any embodiment of the present application when executed by a processor.
[0021] The technical scheme of the embodiment of the present application is that the data owner sends the final ciphertext and the symmetric key to the cloud storage server when detecting that the online encryption condition is met, and uploads the verification code to the block chain; the attribute authorization agency responds to the data acquisition request issued by the data user, performs time verification, identity verification and attribute domain verification, and generates an attribute key and sends the data user in the case of passing the verification; the data user determines the conversion key according to the attribute key and sends it to the cloud computing server to instruct the cloud computing server to feed back the conversion ciphertext to the data user; the data user decrypts the data ciphertext according to the search key, the verification code downloaded from the block chain and the conversion ciphertext fed back by the cloud computing server to obtain the original data, so as to realize the data security sharing of the data owner to the data user. The technical scheme of the present application can effectively protect the data security by using the attribute authorization agency, and can improve the data transmission efficiency between the data owner and the data user by using the cloud computing server to perform data decryption for the data user, so as to realize the efficient sharing of the data security.
[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0024] Figure 1 is a flowchart of a data security sharing method provided by the first embodiment of the present application;
[0025] Figure 2 is a structural schematic diagram of a data security sharing system provided by the second embodiment of the present application;
[0026] Figure 3 is a structural block diagram of a data security sharing device provided by the third embodiment of the present application;
[0027] Figure 4 is a structural schematic diagram of an electronic device provided by the fourth embodiment of the present application. DETAILED DESCRIPTION
[0028] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of embodiments of the present application, rather than all embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work should fall within the protection scope of the present application.
[0029] It should be noted that the terms "first", "second", "target", "candidate", "alternative" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing and the like of data in the technical solutions of the present application comply with the relevant provisions of laws and regulations.
[0030] It should be noted that the user information collected in the present application is information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards of relevant countries and regions, necessary security measures are taken, public order and good customs are not violated, and appropriate operation portals are provided for users to choose authorization or refuse automated decision results; if the user chooses to refuse, the expert decision process is entered.
[0031] It should be noted that the related information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present disclosure are information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data comply with relevant laws, regulations and standards of relevant regions.
[0032] Embodiment one
[0033] Figure 1is a flowchart of a data security sharing method provided by an embodiment of the present application; the embodiment can be applicable to the interaction of a trusted center, a data owner, a data user, a blockchain, a cloud storage server, a cloud computing server and an attribute authority in a data security sharing system, and can realize the case of data security sharing; the method can be executed by a data security sharing device, which can be realized in the form of hardware and / or software, and can be configured in an electronic device, such as an electronic device configured with a data security sharing system, and the trusted center, the data owner, the data user, the blockchain, the cloud storage server, the cloud computing server and the attribute authority can be instructed by the data security sharing system to interact to realize data security sharing, such as shown in FIG. Figure 1 The data security sharing method comprises the following steps.
[0034] In S101, when the data owner detects that the online encryption condition is met, the data owner determines the data ciphertext corresponding to the original data, the symmetric key, the final ciphertext and the verification code, and sends the final ciphertext and the symmetric key to the cloud storage server, and uploads the verification code to the blockchain.
[0035] The data owner (DO) refers to a party that owns data and performs data sharing, the online encryption condition refers to a condition that the data owner sends the final ciphertext to the cloud storage server for online storage after encryption and verifies it in combination with the blockchain. The original data refers to the data to be shared owned by the data owner. The data ciphertext is obtained by encrypting the original data with the symmetric key. The final ciphertext is obtained by encrypting the intermediate ciphertext corresponding to the data ciphertext. The verification code is a verification code stored on the blockchain for indicating the data user to perform verification. The verification code can be obtained by performing hash calculation on the data ciphertext and the symmetric key. The cloud storage server (CSS) refers to a preset server for storing the final ciphertext and the symmetric key.
[0036] Optionally, the data owner can consider that the online encryption condition is met when detecting a data acquisition request, or consider that the online encryption condition is met based on a preset online encryption period when the period condition is met, and the present application does not limit this.
[0037] Optionally, the data owner can periodically perform offline encryption to generate the intermediate ciphertext, and generate the final ciphertext based on the intermediate ciphertext generated during offline encryption, in combination with the public parameter and the symmetric key, when detecting that the online encryption condition is met.
[0038] Optionally, the data owner determines the data ciphertext corresponding to the original data, the symmetric key, the final ciphertext and the verification code when detecting that the online encryption condition is met, including: the data owner selects a symmetric encryption algorithm and a symmetric key based on a preset period, encrypts the original data to generate a data ciphertext, and generates an intermediate ciphertext according to a public parameter, to realize offline encryption; when detecting that the online encryption condition is met, the data owner determines the data ciphertext and the intermediate ciphertext obtained during offline encryption, and generates a final ciphertext according to the public parameter, the intermediate ciphertext and the symmetric key, and generates a verification code according to the data ciphertext and the symmetric key.
[0039] The public parameter (denoted as pp) is a parameter generated by the trusted center according to a preset security parameter, and the public parameter can include at least one of the following: an initialized cyclic group G of prime order q, a master public key (MPK), an attribute public key set PK_i (where i represents the index of the attribute, and n is the total number of attributes, each attribute has a corresponding public key), and a generator g of the cyclic group G.
[0040] For example, the data owner can run a preset custom algorithm, which can be specifically denoted as an EMABE.OffEnc (pp, (M, p)) algorithm, to generate an intermediate ciphertext (denoted as IC), where M is an l-row-n-column matrix, and p maps each row to an attribute. According to the public parameter pp, the intermediate ciphertext IC and the symmetric key K, the data owner can run a preset custom algorithm, which can be specifically denoted as an EMABE.OnEnc (pp, IC, K) algorithm, to generate a final ciphertext (denoted as CT).
[0041] It should be noted that the encryption method mainly adopted by the present application is divided into two modules, an auditable anonymity authentication module (AAAM) including seven preset algorithms, mainly used for anonymous calculation, and a multi-authority attribute-based encryption module (MAABEM) including eight preset algorithms, realizing online and offline attribute encryption and decryption.
[0042] Optionally, the process of registration of the data user by the trusted center comprises the following steps: the trusted center determines the pseudo-identity, the user public key and the user private key corresponding to the data user according to the public parameter, the master public key and the target identity of the data user in response to the registration request sent by the data user; determines the user attribute domain corresponding to the data user from the system attribute set, and generates the user cumulative value and the user membership proof according to the public parameter, the master secret key, the pseudo-identity and the user attribute domain; and feeds back the pseudo-identity, the user public key, the user private key, the user cumulative value and the user membership proof to the data user through a secure channel to realize the registration of the data user.
[0043] The master secret key (MSK) is kept secret by the trusted center and is used to generate attribute keys and other key materials. The cumulative value is a kind of cryptographic tool used to accumulate a group of elements (attributes) into a single value. This value can be public and can be used to verify whether a certain specific element belongs to the group. The membership proof is a kind of cryptographic proof used to prove that a certain element indeed belongs to a certain set without revealing other elements in the set.
[0044] Optionally, the trusted center can generate the pseudo-identity PID (Pseudonymous Identifier), the user public key and the user private key based on a preset custom algorithm such as 3A.UAnon (pp, MPK, GID) algorithm according to the public parameter, the master public key and the target identity of the data user, and generate the user cumulative value and the user membership proof based on a preset custom algorithm, which can be represented as 3A.UCIssue (pp, MSK, PID, Su) algorithm, according to the public parameter, the master secret key, the pseudo-identity and the user attribute domain. Wherein, GID (Globally Unique Identifier) represents the identity of the data user.
[0045] Optionally, after feeding back the pseudo-identity, the user public key, the user private key, the user cumulative value and the user membership proof to the data user through a secure channel, the data user can publicize the user public key and keep other parameters secret.
[0046] S102, the attribute authority responds to the data acquisition request issued by the data user, performs time verification, identity verification and attribute domain verification, and generates an attribute key and sends the data user in the case of passing the verification.
[0047] The data user (DU) refers to a party requesting to obtain data of a data owner. The attribute authority (AA) refers to an authority authorized by a trusted center and used to issue attribute keys to the data user. The attribute key refers to a key issued by the attribute authority to the data user and used to indicate that the data user determines a conversion key. The time verification refers to a verification manner for verifying whether the data user is within an authorized validity period. The identity verification refers to a verification manner for verifying whether the identity of the data user DU is valid. The attribute domain verification refers to a verification manner for verifying whether the attribute requested by the data user DU is within the attribute domain of the data user.
[0048] Optionally, the data user DU can send a pseudo identity (denoted as PID), a user membership proof and an attribute public key (denoted as PKI) to the attribute authority to issue a data obtaining request.
[0049] Optionally, the attribute authority performs the time verification, the identity verification and the attribute domain verification in response to the data obtaining request issued by the data user, including: the attribute authority determines a current timestamp, and determines a user cumulative value, a user timestamp and a time threshold in response to the data obtaining request issued by the data user; performs the time verification according to the current timestamp, the user cumulative value, the user timestamp and the time threshold, and performs the identity verification according to the public parameter, the pseudo identity, the user cumulative value and the user membership proof in a case where the time verification is passed; and performs the attribute domain verification according to the public parameter, the authority cumulative value and the authority membership proof in a case where the identity verification is passed.
[0050] The user cumulative value (denoted as Δu), the user timestamp and the time threshold are user information pre-stored by the attribute authority. The user timestamp T1 refers to a record timestamp of the user information, that is, a time point at which the user information is recorded or last updated by the authority. The time threshold T_{expiry} represents a validity period of the user request, that is, the user request is valid within how long time from T1.
[0051] Optionally, after the attribute authority determines the user cumulative value corresponding to the data user, the attribute authority can first determine whether the user cumulative value is empty. If the user cumulative value is empty, the data obtaining request of the data user is directly rejected. If the user cumulative value is not empty, the attribute authority further performs the time verification, the identity verification and the attribute domain verification.
[0052] Optionally, according to the current timestamp, the user timestamp and the time threshold, the time interval between the current timestamp and the user timestamp can be first determined, and the time verification is performed according to the size relationship between the time interval and the time threshold. If the time interval is greater than the time threshold, it is determined that the time verification is passed. Otherwise, it is considered that the time verification is not passed. At this time, the data obtaining request of the data user can be rejected.
[0053] Optionally, the attribute authority can verify whether the attribute of the data user is valid based on the public parameter, the pseudo identity, the user cumulative value and the user membership proof according to a preset custom algorithm, denoted as a return value of 3A.UAuth algorithm, if the return value is 0, it indicates that the identity of the data user is not authorized, if the return value is 1, it is determined that the identity verification of the data user is passed.
[0054] Optionally, in the case of identity verification, according to the public parameter, the authority cumulative value and the authority membership proof, a preset custom algorithm can be run, denoted as 3A.AAuth algorithm, to verify whether the attribute requested by the data user is within its own attribute domain, if the return value of the preset custom algorithm 3A.AAuth algorithm is 1, it can be determined that the attribute domain verification of the data user is passed.
[0055] Optionally, in the case of time verification, identity verification and attribute domain verification, the attribute key SK can be generated based on the following formula:
[0056] SK = Ki, 1≤i≤n k,u
[0057] Wherein, n k,u represents the intersection domain of the authority attribute domain and the user attribute domain, K i can be represented by the following formula:
[0058] K i = (PK·Δ u ) ak ,n k,u = ||S k ∈S u ||
[0059] Wherein, PK represents the authority public key, Δu represents the user cumulative value, Sk represents the authority attribute domain, Su represents the user attribute domain, and ak represents the authority private key.
[0060] Optionally, the process of registration of the attribute authority by the trusted center includes the following steps: the trusted center determines the public parameter, the master key, the master public key, the system attribute set and the attribute public key according to the preset security parameter; the trusted center determines the authority public key and the authority private key corresponding to the attribute authority according to the public parameter in response to the registration request sent by the attribute authority, and determines the authority attribute domain corresponding to the attribute authority from the system attribute set; the authority cumulative value and the authority membership proof corresponding to the authority attribute domain are determined according to the public parameter, the master key and the authority attribute domain; the authority public key, the authority private key, the authority cumulative value and the authority membership proof are fed back to the attribute authority through a secure channel to realize the registration of the attribute authority.
[0061] Optionally, the trusted center can input a preset security parameter λ into a preset system initialization algorithm, such as a 3A.Setup(λ) algorithm, to initialize the system and generate a master key and a master public key, wherein the master key is randomly selected, and the master public key is a value calculated by taking the master key as an exponent and taking a generator g of a multiplicative group G as a base.
[0062] Optionally, the trusted center can input a preset security parameter λ into a preset ABE (Attribute-Based Encryption) initialization algorithm, such as an EMABE.Setup(λ) algorithm, to set a system attribute set Sn=Xi, wherein i=1,2,…,n, and determine a product of the generator g and an attribute corresponding to the attribute authority as an attribute public key.
[0063] Optionally, the trusted center can input a public parameter into a preset trusted center algorithm, such as an EMABE.AASetup(pp) algorithm, to generate an authority public key and an authority private key corresponding to the attribute authority.
[0064] Optionally, the trusted center can distribute an attribute domain to the attribute authority and run an attribute authority preset algorithm according to the public parameter, the master key, and the authority attribute domain, which can be specifically represented as a 3A.ACIssue(pp,MSK,Sk) algorithm, to generate an accumulated value of the attribute domain and a membership proof of each attribute, that is, to determine an authority accumulated value and an authority membership proof.
[0065] S103, the data user determines a conversion key according to the attribute key and sends it to the cloud computing server to instruct the cloud computing server to perform identity verification and ciphertext verification, and in the case of passing the verification, determines a conversion ciphertext corresponding to the final ciphertext to feed back the conversion ciphertext to the data user.
[0066] The cloud computing server (CSP) refers to a server used to assist the data user in decryption operation.
[0067] Optionally, the data user can determine a conversion key TK and a retrieval key RK according to the public parameter pp and the attribute key SK based on a preset conversion key generation algorithm, represented as an EMABE.TKeyGen algorithm, to send the conversion key to the cloud computing server and secretly store the retrieval key RK.
[0068] Optionally, the data user can determine the conversion key according to the attribute key and send it to the cloud computing server to issue a decryption request. The cloud computing server can authenticate the data user and verify the ciphertext in response to the decryption request issued by the data user. If the authentication is passed, the conversion ciphertext TCT is generated according to the public parameter pp, the user attribute domain Su corresponding to the data user, the final ciphertext CT and the conversion key TK.
[0069] Optionally, the cloud computing server can verify whether the identity of the data user is within the valid period, that is, perform identity authentication. If it is expired, the cloud computing server terminates the session. Otherwise, the cloud computing server downloads the corresponding ciphertext from the cloud storage server and verifies it in combination with the index on the blockchain, that is, performs ciphertext verification. If the ciphertext hash and the hash on the blockchain are inconsistent, it means that the ciphertext information has been modified, and the verification is not passed. Otherwise, the cloud computing server can generate the conversion ciphertext TCT according to the public parameter pp, the user attribute domain Su corresponding to the data user, the final ciphertext CT and the conversion key TK based on a preset pre-decryption algorithm or a partial decryption algorithm, denoted as EMABE.ParDec algorithm.
[0070] S104, the data user decrypts the data ciphertext according to the search key, the verification code downloaded from the blockchain and the conversion ciphertext fed back by the cloud computing server to obtain the original data, realizing the data security sharing of the data owner to the data user.
[0071] Optionally, the data user decrypts the data ciphertext to obtain the original data according to the search key, the verification code downloaded from the blockchain and the conversion ciphertext fed back by the cloud computing server, including: the data user restores the symmetric key according to the conversion ciphertext fed back by the cloud computing server and the search key, and downloads the verification code from the blockchain; decrypts and verifies according to the data ciphertext, the symmetric key and the verification code, and in the case of passing the decryption verification, uses the symmetric key to decrypt the data ciphertext to obtain the original data.
[0072] Optionally, the data user can restore the symmetric key K based on a preset final decryption algorithm, denoted as EMABE.FulDec algorithm, according to the search key and the conversion ciphertext, then download the verification code VK from the blockchain, hash calculate the data ciphertext and the symmetric key to obtain the target hash value, and determine whether the target hash value and the verification code VK are equal to perform decryption verification. If they are equal, the decryption verification is passed, and if they are not equal, the decryption verification is not passed. In the case of passing the decryption verification, the data user can use the symmetric key to decrypt the data ciphertext to obtain the original data.
[0073] The technical scheme of the embodiment of the application, when the data owner detects that the online encryption condition is met, the final ciphertext and the symmetric key are sent to the cloud storage server, and the verification code is uploaded to the blockchain; the attribute authorization agency responds to the data acquisition request issued by the data user, performs time verification, identity verification and attribute domain verification, and generates an attribute key and sends the data user in the case of passing the verification; the data user determines the conversion key according to the attribute key and sends it to the cloud computing server to instruct the cloud computing server to feed back the conversion ciphertext to the data user; the data user decrypts the data ciphertext according to the search key, the verification code downloaded from the blockchain and the conversion ciphertext fed back by the cloud computing server, to obtain the original data, realizing the data security sharing of the data owner to the data user, the technical scheme of the application, by using the attribute authorization agency, the data security can be effectively guaranteed, by using the cloud computing server to perform data decryption for the data user, the data transmission efficiency between the data owner and the data user can be improved, so that the data security and efficient sharing is realized.
[0074] Embodiment two
[0075] Figure 2 is a structural schematic diagram of a data security sharing system provided by the second embodiment of the application; based on the above-mentioned embodiment, the embodiment provides an interaction between the trusted center, the data owner, the data user, the blockchain, the cloud storage server, the cloud computing server and the attribute authorization agency in the data security sharing system, and realizes an optimal example of data security sharing, specifically, as shown in the figure, Figure 2 The data security sharing system at least includes: a data owner DO, a data user DU, a blockchain (denoted as BC), a cloud storage server CSS and an attribute authorization agency AA.
[0076] Optionally, the data owner DO can upload the verification code to the blockchain BC, and upload the encrypted data to the cloud storage server CSS, the data user DU can download the verification code from the blockchain BC, request the attribute key from the attribute authorization agency AA, and obtain the attribute key generated by the attribute authorization agency AA, and finally upload the attribute key obtained from the attribute authorization agency AA to the cloud storage server CSS to download the encrypted data from the cloud storage server, realizing data security sharing.
[0077] Optionally, the trusted center can perform the following process for the registration of the attribute authority: determining public parameters pp, a master key MSK, a master public key MPK, a system attribute set Sn, and an attribute public key PKI according to preset security parameters; in response to a registration request sent by the attribute authority AAk, the trusted center determines an authority public key Pkk and an authority private key Skk corresponding to the attribute authority according to the public parameters pp, and determines an authority attribute domain Sk corresponding to the attribute authority from the system attribute set; determines an authority cumulative value Δk and an authority membership proof Wki corresponding to the authority attribute domain Sk according to the public parameters pp, the master key MSK, and the authority attribute domain Sk; and feeds back the authority public key Pkk, the authority private key Skk, the authority cumulative value Δk, and the authority membership proof Wki to the attribute authority AAk through a secure channel.
[0078] Optionally, the trusted center can perform the following process for the registration of the data user: in response to a registration request sent by the data user, the trusted center determines a pseudo identity PID and a user public key au and a user private key Yu corresponding to the data user according to the public parameters pp, the master public key MPK, and a target identity GID of the data user; determines a user attribute domain Su corresponding to the data user from the system attribute set, and generates a user cumulative value Δu and a user membership proof Wui according to the public parameters pp, the master key MSK, the pseudo identity PID, and the user attribute domain Su; and feeds back the pseudo identity PID, the user public key au, the user private key Yu, the user cumulative value Δu, and the user membership proof Wui to the data user through a secure channel.
[0079] Optionally, the data owner can periodically select a symmetric encryption algorithm and a symmetric key K, encrypt the original data m to generate a data ciphertext C, and then generate an intermediate ciphertext IC according to the public parameters; the data owner can also generate a final ciphertext CT according to the public parameters pp, the intermediate ciphertext IC, and the symmetric key K in response to a data acquisition request, and send the final ciphertext CT and the symmetric key K to the cloud storage server (CSS), while generating a verification code VK according to the data ciphertext C and the symmetric key K and uploading it to the blockchain.
[0080] Optionally, the data user DU can send the pseudo identity PID, the user membership proof Wui, and the attribute public key PKI to the attribute authority AAk to issue a data acquisition request; the attribute authority AAk determines a current timestamp T2 in response to the data acquisition request issued by the data user DU, and determines the user cumulative value Δu, the user timestamp T1, and the time threshold Texpiry.
[0081] Optionally, the attribute authority can perform time verification according to the current timestamp T2, the user cumulative value Δu, the user timestamp T1 and the time threshold Texpiry; if the time verification passes, verify whether the data user DU identity is valid according to the public parameter pp, the pseudo identity PID, the user cumulative value Δu and the user membership proof Wui; if yes, verify whether the attribute requested by the data user DU is within its own attribute domain according to the public parameter pp, xi, the authority cumulative value Δk and the authority membership proof Wki; if yes, generate the attribute key SK and send it to the data user.
[0082] Optionally, the data user can determine the conversion key TK and the retrieval key RK according to the public parameter pp and the attribute key SK; the cloud computing server responds to the decryption request issued by the data user to perform identity verification and ciphertext verification on the data user; if the verification passes, generate the conversion ciphertext TCT according to the public parameter pp, the user attribute domain Su corresponding to the data user, the final ciphertext CT and the conversion key TK.
[0083] Optionally, the data user can determine the symmetric key K according to the conversion ciphertext TCT and the retrieval key RK, and download the verification code VK from the blockchain; perform decryption verification according to the data ciphertext C, the symmetric key K and the verification code VK, and in the case that the decryption verification passes, decrypt the data ciphertext C using the symmetric key K to obtain the original data m.
[0084] Embodiment Three
[0085] Figure 3 is a structural block diagram of a data security sharing device provided by Embodiment Three of the present application; the present embodiment can be applicable to the interaction of the trusted center, the data owner, the data user, the blockchain, the cloud storage server, the cloud computing server and the attribute authority in the data security sharing system, and can realize the data security sharing; the data security sharing device provided by the present embodiment can execute the data security sharing method provided by any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method; the data security sharing device can be realized in the form of hardware and / or software, and can be configured in an electronic device with a data security sharing function, such as an electronic device configured with a data security sharing system, and the trusted center, the data owner, the data user, the blockchain, the cloud storage server, the cloud computing server and the attribute authority are instructed by the data security sharing system to interact, as shown in Figure 3 The data security sharing device can specifically include:
[0086] The encryption module 301 is configured to control the data owner to determine data ciphertext corresponding to the original data, a symmetric key, final ciphertext and a verification code when it is detected that the online encryption condition is met, and send the final ciphertext and the symmetric key to the cloud storage server, and upload the verification code to the blockchain;
[0087] The verification module 302 is configured to control the attribute authority to perform time verification, identity verification and attribute domain verification in response to a data acquisition request issued by the data user, and generate an attribute key and send the data user in the case of passing the verification.
[0088] The conversion module 303 is configured to control the data user to determine a conversion key according to the attribute key and send it to the cloud computing server, to instruct the cloud computing server to perform identity verification and ciphertext verification, and in the case of passing the verification, determine the conversion ciphertext corresponding to the final ciphertext, to feed back the conversion ciphertext to the data user.
[0089] The decryption module 304 is configured to control the data user to decrypt the data ciphertext according to the retrieval key, the verification code downloaded from the blockchain and the conversion ciphertext fed back by the cloud computing server, to obtain the original data, and realize the data security sharing of the data owner to the data user.
[0090] The technical scheme of the embodiment of the application, when the data owner detects that the online encryption condition is met, the final ciphertext and the symmetric key are sent to the cloud storage server, and the verification code is uploaded to the blockchain; the attribute authority performs time verification, identity verification and attribute domain verification in response to a data acquisition request issued by the data user, and generates an attribute key and sends the data user in the case of passing the verification; the data user determines a conversion key according to the attribute key and sends it to the cloud computing server, to instruct the cloud computing server to feed back the conversion ciphertext to the data user; the data user decrypts the data ciphertext according to the retrieval key, the verification code downloaded from the blockchain and the conversion ciphertext fed back by the cloud computing server, to obtain the original data, and realize the data security sharing of the data owner to the data user. The technical scheme of the application can effectively protect data security by using the attribute authority, and can improve the data transmission efficiency between the data owner and the data user by using the cloud computing server to perform data decryption for the data user, so as to realize the safe and efficient sharing of data.
[0091] Further, the encryption module 301 is specifically configured to:
[0092] Control the data owner to select a symmetric encryption algorithm and a symmetric key based on a preset period, encrypt the original data to generate data ciphertext, and generate intermediate ciphertext according to public parameters, to realize offline encryption.
[0093] When it is detected that the online encryption condition is met, the data ciphertext and the intermediate ciphertext obtained in the offline encryption are determined, and the final ciphertext is generated according to the public parameter, the intermediate ciphertext and the symmetric key, and the verification code is generated according to the data ciphertext and the symmetric key.
[0094] Further, the decryption module 304 is specifically configured to:
[0095] The control data user recovers the symmetric key according to the conversion ciphertext and the retrieval key fed back by the cloud computing server, and downloads the verification code from the blockchain;
[0096] According to the data ciphertext, the symmetric key and the verification code, decryption verification is performed, and in the case that the decryption verification is passed, the symmetric key is used to decrypt the data ciphertext to obtain the original data.
[0097] Further, the process of the trusted center registering the attribute authority includes the following steps:
[0098] The trusted center determines the public parameter, the master key, the master public key, the system attribute set and the attribute public key according to the preset security parameter;
[0099] The trusted center determines the organization public key and the organization private key corresponding to the attribute authority according to the public parameter, and determines the organization attribute domain corresponding to the attribute authority from the system attribute set in response to the registration request sent by the attribute authority;
[0100] The organization attribute domain corresponding organization cumulative value and organization member proof are determined according to the public parameter, the master key and the organization attribute domain;
[0101] The organization public key, the organization private key, the organization cumulative value and the organization member proof are fed back to the attribute authority through a secure channel to realize the registration of the attribute authority.
[0102] Further, the process of the trusted center registering the data user includes the following steps:
[0103] The trusted center determines the pseudo-identity, the user public key and the user private key corresponding to the data user according to the public parameter, the master public key and the target identity of the data user in response to the registration request sent by the data user;
[0104] The user attribute domain corresponding to the data user is determined from the system attribute set, and the user cumulative value and the user member proof are generated according to the public parameter, the master key, the pseudo-identity and the user attribute domain;
[0105] The pseudo-identity, the user public key, the user private key, the user cumulative value and the user member proof are fed back to the data user through a secure channel to realize the registration of the data user.
[0106] Further, the above device is also used for:
[0107] The control attribute authority determines a current timestamp, and determines a user accumulation value, a user timestamp and a time threshold in response to a data acquisition request issued by the data user;
[0108] According to the current timestamp, the user accumulation value, the user timestamp and the time threshold, time verification is performed, and in the case that the time verification is passed, identity authentication is performed according to the public parameter, the pseudo identity identifier, the user accumulation value and the user membership proof;
[0109] In the case that the identity authentication is passed, attribute domain verification is performed according to the public parameter, the authority accumulation value and the authority membership proof.
[0110] Embodiment four
[0111] Figure 4 is a structural schematic diagram of an electronic device provided by an embodiment four of the present application. Figure 4 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application 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, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), 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 intended to limit implementations of the present application described and / or claimed in this document.
[0112] As shown in Figure 4 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected with the at least one processor 11, wherein the memory stores a computer program which can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12 and the RAM 13 are connected with each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0113] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0114] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the data security sharing method.
[0115] In some embodiments, the data security sharing method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the data security sharing method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the data security sharing method by any other appropriate means, such as by means of firmware.
[0116] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0117] Computer programs for implementing the methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, enables the functions / acts specified in the flowcharts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine or entirely on a remote machine or server.
[0118] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of electrical connections, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0119] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, 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, speech, or tactile input.
[0120] 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 any combination of 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), blockchain network, and the Internet.
[0121] The computing 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 service.
[0122] In an embodiment, the present application also includes a computer program product, which comprises a computer program, wherein the computer program is executed by a processor to implement the data security sharing method of any embodiment of the present application.
[0123] The computer program code implementing the application can be written in one or more programming languages or combinations of languages including object oriented languages, and conventional procedural programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0124] It should be understood that various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the spirit of the present application. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, and the present application is not limited in this regard as long as the desired results of the present application are achieved. The present application is not limited in this regard.
[0125] The foregoing detailed description has set forth various embodiments of the application via specific examples. However, it is noted that various modifications, combinations, sub-combinations, and equivalents can be employed, and will be apparent to one skilled in the art in view of this disclosure. Accordingly, the particular description set forth is not intended to be limiting to the scope of the application, as claimed.
Claims
1. A data security sharing method, characterized in that: include: When the data owner detects that the online encryption conditions are met, it determines the data ciphertext, symmetric key, final ciphertext, and verification code corresponding to the original data, and sends the final ciphertext and symmetric key to the cloud storage server, while uploading the verification code to the blockchain; The attribute authority responds to the data acquisition request from the data user, performs time verification, identity verification, and attribute domain verification, and generates an attribute key and sends it to the data user if the verification passes. The data user determines the conversion key based on the attribute key and sends it to the cloud computing server, instructing the cloud computing server to perform identity authentication and ciphertext verification. If the verification passes, the cloud computing server determines the converted ciphertext corresponding to the final ciphertext and feeds the converted ciphertext back to the data user. The data user decrypts the data ciphertext based on the retrieval key, the verification code downloaded from the blockchain, and the converted ciphertext fed back by the cloud computing server to obtain the original data, thereby realizing the secure sharing of data between the data owner and the data user.
2. The method according to claim 1, characterized in that When the data owner detects that the online encryption conditions are met, it determines the data ciphertext, symmetric key, final ciphertext, and verification code corresponding to the original data, including: The data owner selects a symmetric encryption algorithm and a symmetric key based on a preset period to encrypt the original data to generate data ciphertext, and then generates an intermediate ciphertext based on public parameters to achieve offline encryption; When it is detected that the online encryption conditions are met, the data ciphertext and intermediate ciphertext obtained during offline encryption are determined, and the final ciphertext is generated based on the public parameters, the intermediate ciphertext and the symmetric key, and the verification code is generated based on the data ciphertext and the symmetric key.
3. The method according to claim 1, characterized in that The data user decrypts the data ciphertext based on the retrieval key, the verification code downloaded from the blockchain, and the converted ciphertext fed back by the cloud computing server to obtain the original data, including: The data user recovers the symmetric key based on the converted ciphertext and retrieval key fed back by the cloud computing server, and downloads the verification code from the blockchain; Decryption verification is performed based on the data ciphertext, symmetric key and verification code. If the decryption verification passes, the data ciphertext is decrypted using the symmetric key to obtain the original data.
4. The method according to claim 1, wherein in, The process of a trusted center registering an attribute authority includes the following steps: The trusted center determines the public parameters, master key, master public key, system attribute set and attribute public key based on the preset security parameters; The trusted center responds to the registration request sent by the attribute authority, determines the institution public key and institution private key corresponding to the attribute authority according to the public parameters, and determines the institution attribute domain corresponding to the attribute authority from the system attribute set; Determine the organization cumulative value and organization member certificate corresponding to the organization attribute domain based on the public parameters, the master key, and the organization attribute domain; The institution's public key, institution's private key, institution's accumulated value, and institution's membership certificate are fed back to the attribute authorization agency through a secure channel to register the attribute authorization agency.
5. The method according to claim 1, wherein in, The process of registering a data user by a trusted center includes the following steps: In response to the registration request sent by the data user, the trusted center determines the pseudo identity and the user public key and user private key corresponding to the data user based on the public parameters, the master public key, and the target identity of the data user; Determine the user attribute domain corresponding to the data user from the system attribute set, and generate the user cumulative value and user membership certificate based on the public parameters, master key, pseudo identity and user attribute domain; The pseudo identity, user public key, user private key, user accumulated value and user membership certificate are fed back to the data user through a secure channel to realize the registration of the data user.
6. The method according to claim 1, characterized in that The attribute authority responds to the data acquisition request from the data user and performs time verification, identity verification, and attribute domain verification, including: The attribute authority determines the current timestamp in response to the data acquisition request issued by the data user, and determines the user accumulated value, the user timestamp and the time threshold; Perform time verification based on the current timestamp, user accumulated value, user timestamp, and time threshold. If the time verification passes, perform identity authentication based on the public parameters, pseudo-identity, user accumulated value, and user membership certificate. When identity authentication is passed, attribute domain verification is performed based on public parameters, organization cumulative values, and organization membership certificates.
7. A data security sharing device, characterized in that: include: The encryption module is used to control the data owner to determine the data ciphertext, symmetric key, final ciphertext and verification code corresponding to the original data when it detects that the online encryption conditions are met, and send the final ciphertext and symmetric key to the cloud storage server, and upload the verification code to the blockchain at the same time; The verification module is used to control the attribute authorization agency to respond to the data acquisition request issued by the data user, perform time verification, identity verification and attribute domain verification, and generate the attribute key and send it to the data user if the verification passes; The conversion module is used to control the data user to determine the conversion key based on the attribute key and send it to the cloud computing server, so as to instruct the cloud computing server to perform identity authentication and ciphertext verification. If the verification is successful, the conversion ciphertext corresponding to the final ciphertext is determined and the conversion ciphertext is fed back to the data user. The decryption module is used to control the data user to decrypt the data ciphertext based on the retrieval key, the verification code downloaded from the blockchain, and the converted ciphertext fed back by the cloud computing server to obtain the original data, thereby realizing the secure sharing of data between the data owner and the data user.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so as to enable the at least one processor to execute the data security sharing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data security sharing method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the data security sharing method according to any one of claims 1 to 6.