Time-limited entrusted data sharing system and method with revocation security

By adopting time-limited delegation and verification mechanisms in cloud storage scenarios, combined with linear secret sharing technology and Paillier encryption algorithm, the problem of delegation and fine-grained access control for all data permissions in cloud storage is solved, and safe and controllable sharing and privacy of data are achieved. Protection, supporting data ownership management for multiple user modes.

CN118748585APending Publication Date: 2024-10-08QINGDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410735603.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

In cloud-based medical data sharing scenarios, existing technologies are difficult to implement time-limited delegation and fine-grained access control of data ownership, and there are complex key management, computing overhead, and communication burdens, which cannot effectively protect patients' medical data privacy.

Method used

Adopt a time-limited entrustment data sharing method with revocation security, realize time-limited entrustment and verification of data ownership by distributing public and private key pairs, key management and encryption algorithms, and use linear secret sharing technology and Paillier encryption algorithm to ensure the security and privacy of data , and introduces a prefix tree mechanism for dynamic data ownership management.

Benefits of technology

It realizes delegation and fine-grained access control of data ownership in cloud storage scenarios, reduces the complexity of key management, improves data security and privacy protection, supports one-to-one and one-to-many data ownership delegation, and has more Comprehensive undo security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748585A_ABST
    Figure CN118748585A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of privacy protection, and discloses a time-limited entrusting data sharing system and method with revocation security, and the system comprises a trusted authority which is used for generating a data owner and a data user, generating a public and private key pair, and distributing the public and private key pair to the corresponding data owner and data user; the data owner is used for managing the encryption key, encrypting a file according to a set encryption algorithm, generating a ciphertext, uploading the ciphertext to the cloud server for storage, and managing data ownership; the cloud server is used for storing the ciphertext, participating in verification of data ownership and verifying whether the received inner product is consistent with the timestamp or not; and the data user is used for obtaining the authorization of the data ownership, obtaining the ciphertext in the cloud server, recovering the file according to the key and the decryption algorithm, and obtaining the shared data. According to the method and the system, the time-limited entrustment of the data ownership and the safe and controllable data sharing process of the user are realized, the more comprehensive safety is realized, and the revocation of the data ownership and the ciphertext updating are supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of privacy protection, and in particular relates to a time-limited entrusted data sharing system and method with revocation security. Background Art

[0002] The rise of cloud computing technology in recent years has given cloud storage services the ability to provide vast storage capacity with its unique computing and storage resource capabilities. Users can flexibly store massive amounts of data in the cloud according to their needs. This technological innovation has brought convenience and advantages to many data scenarios. For example: cloud storage services can achieve flexible storage space adjustment according to user needs without being constrained by hardware equipment maintenance; cloud storage services provide highly secure data storage and backup mechanisms, usually including data encryption, redundant backup, data recovery and other functions, which can ensure the security and reliability of user data; cloud servers have powerful data centers, and users can achieve data sharing and collaboration and other tasks.

[0003] However, although the popularity of cloud storage has brought convenience to our data, it has also brought some potential threats and security risks. For example, cloud services may be attacked by hackers, resulting in user data leakage; cloud storage services may have configuration errors or improper access control problems, resulting in unauthorized users being able to access data that they should not be able to access. Therefore, when using cloud storage services, a series of measures need to be adopted to minimize the impact of threats.

[0004] Considering the data sharing advantages brought by the cloud, cloud-based data sharing models have emerged. In the field of healthcare, taking electronic medical records as an example, the main subjects involved are patients, doctors, and cloud servers. In the cloud-based data sharing model, patient medical data is uploaded to the cloud for storage, and healthcare professionals access these cloud-stored data for relevant treatment and research.

[0005] Due to the centralized management and incomplete trustworthiness of cloud servers, cloud-based medical data sharing implementation faces security and privacy challenges. First, data stored on cloud servers are centrally managed and vulnerable to attacks by malicious adversaries due to software or hardware errors, resulting in the risk of data leakage and unauthorized access. In addition, due to the sensitivity of user medical information, strict measures must be taken to maintain the confidentiality, integrity and controlled access of medical data. In terms of medical data sharing, public key / private key encryption algorithms are used to encrypt medical data to ensure the confidentiality of data; access policies and verification technologies are used to ensure controlled access to data; and owner transfer technologies are used to transfer medical data permissions to medical institutions to promote efficient healthcare services. However, these technologies still have shortcomings in practical applications: patients only want to allow doctors to share electronic medical records within a limited time, and they cannot continue to access the data outside the time range, thereby protecting the privacy of patients' medical data. In the face of the above needs, if traditional encryption and access control technologies are used directly, patients will need to update access policies and recalculate and upload medical data, which will result in complex key management, computing overhead, data loss and communication burden; if patients adopt data ownership transfer technology, then patients will lose control of the data and thus fail to meet security requirements, so further research is needed. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides a time-limited delegation data sharing system and method with revocation security, which can not only realize the time-limited delegation of data ownership in the data sharing scenario of cloud storage, but also realize data sharing with fine-grained access control, and can ensure the privacy of data and user identity.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0008] The time-limited delegated data sharing method with revocation safety comprises the following steps:

[0009] S1. Distribute public and private key pairs:

[0010] Trusted authorities distribute public-private key pairs to data owners;

[0011] S2. Key management:

[0012] The data owner generates encryption keys based on a random number generator and manages the keys;

[0013] S3, ciphertext encryption:

[0014] The data owner encrypts the shared file M according to the set encryption algorithm, obtains the encrypted ciphertext CT, and stores the encrypted ciphertext CT in the cloud server;

[0015] S4. Data Sharing:

[0016] Including the steps of data ownership delegation and data ownership verification:

[0017] S41. Time-limited delegation of data ownership:

[0018] The data user applies to the data owner for a time-limited delegation request for data ownership; the data owner generates the user's prefix tree based on the delegation request, and then sends the key and timestamp of the relevant share to the data user, and the key of the remaining share to the cloud server;

[0019] S42. Verification of data ownership:

[0020] The verification of data ownership is an interactive verification process among the data owner, data user, and cloud server, including:

[0021] S421, verification of the data owner: the data owner encrypts the weight vector U, calculates the inner product A, calculates the timestamp hash value, and sends the timestamp hash value and the inner product A to the cloud server;

[0022] S422, data user verification: the data user decrypts the weight vector U, calculates the inner product B, and sends the timestamp and the inner product B to the cloud server;

[0023] S423, verification result: the cloud server verifies whether the inner product A and the inner product B are equal and whether the timestamps are consistent; if they are consistent, it means that the authorization has been obtained, and the cloud server sends the remaining key shares to the data user;

[0024] S5. Data decryption:

[0025] After the data user passes the three-party interactive verification, the cloud server will send the remaining key shares and encrypted ciphertext CT to the data user. The data user uses the key shares to first recover the key K, then decrypt the ciphertext and recover the file M.

[0026] Furthermore, in step S1, the public and private key pair of the data owner is obtained through the following steps:

[0027] S11. The trusted authority selects two large prime numbers p and q, and calculates the product of the two large prime numbers p and q m = p·q and λ(m) = LCM(p-1,q-1), where LCM represents the least common multiple;

[0028] S12. The trusted authority calculates g = m + 1 and obtains the public key p k ={m,g}, key s k ={p,q,λ(m)}, and send the public-private key pair to the data owner.

[0029] Furthermore, in step S2, the encryption key is obtained and key management is performed through the following steps:

[0030] S21, the data owner generates the original encryption key K, initialization vector IV, and timestamp τ through a random number generator;

[0031] S22. The data owner divides the original encryption key K into n parts, K = (k1, k2...k n ), set a threshold t, indicating that at least t shares of the key are required to reconstruct the key K;

[0032] S23. The data owner selects a large prime number Z and defines a finite field F Z , a large prime number Z as a finite field F Z The data owner generates a t-1 degree polynomial f(x) and sets f(0) = K;

[0033] f(x)=a0+a1x+a2x 2 +...+a t-1 x (t-1)

[0034] Among them, a0, a1, a2, ...a t-1 is the coefficient of the polynomial, x represents the input variable of the polynomial f(x), which is used to determine the share of each data user. The polynomial f(x) represents the function used to generate the secret share. This process manages the key for the secret sharing scheme and will be used in the subsequent delegation and verification stages.

[0035] Furthermore, in step S3, the encrypted ciphertext is obtained by the following steps:

[0036] S31. The data owner divides the file M into multiple blocks: M=(M1, M2...M r );

[0037] S32, the data owner encrypts each data block according to the AES-GCM algorithm, encryption key K and initialization vector IV to obtain the ciphertext C and authentication tag T, C i =E(K,IV)(M i ), where i = 1, 2...r, C i represents the i-th ciphertext block, T = GCM (K, IV, C) (M); H (K, IV) (M i ) indicates that the data owner uses the AES-GCM algorithm and encryption key K and initialization vector IV to encrypt each data block, M i represents the i-th file block; GCM(K,IV,C)(M) represents the use of encryption key K, initialization vector IV, ciphertext C and AES-GCM algorithm to encrypt and generate authentication tag T;

[0038] S33. The data owner constructs an encrypted ciphertext CT=C1||C2||...||C based on the ciphertext C and the authentication tag T. n ||T||τ; where C1, C2, ...C n They are the 1st, 2nd...nth ciphertext blocks respectively.

[0039] Further, in step S41, the data user applies for a time-limited delegation request for data ownership through the following steps. The time-limited delegation of data ownership is divided into two modes: one-to-one and one-to-many:

[0040] One-to-one mode:

[0041] 1) Send a request: The data user sends a delegation request Q to the data owner, where Q = {id, [T1, T2], e = [1, 1]}; id represents the user's identity, [T1, T2] represents the time range for the authorization request, and e = [1, 1] represents the read and write permissions for the authorization request;

[0042] 2) Generate a prefix tree: The data owner generates a prefix tree T for this user based on the time permission and user ID of the application authorization. id ;

[0043] 3) Sending credentials: The data owner sends t / 2 keys and a timestamp τ to the data user; the data user sends t / 2 keys to the cloud server;

[0044] One-to-many mode:

[0045] 1) Sending a request: The group data user sends a delegation request Q to the data owner, where Q = {gid, [T1, T2], e = [1, 1]}; where gid represents the identity of the group user, [T1, T2] represents the time range for the authorization request, and e = [1, 1] represents the read and write permissions for the authorization request;

[0046] 2) Generate a prefix tree: After the data owner receives the authorization application from the data user, the data owner generates a prefix tree T for this group user based on the time authority of the authorization application and the group user gid. gid ;

[0047] 3) Send credentials: The data owner sends a share of the key k to each user in the group i , and send the timestamp τ to the group of users; the data owner sends tk i The key of each share is sent to the cloud server for storage.

[0048] Furthermore, step S421, the verification process of the data owner is generated by the following steps:

[0049] 1) The data owner randomly assigns a weight value to each data block, and then combines the weight values ​​of the data blocks to obtain a vector U, U = [u1,u2...u t ]; Data ownership is calculated based on the t / 2 share key K{t / 2} and the weight vector U to obtain the inner product A: u i represents the i-th element of the weight vector U, k i represents the i-th key among the first t / 2 shares of keys;

[0050] 2) The data owner calculates the timestamp hash value and obtains V t =H(τ), where H(τ) represents the hash function; the data owner converts the inner product A and the timestamp hash value V t Send to cloud server for storage;

[0051] 3) The data owner encrypts each element u of the weight vector U using the PaIllier homomorphic encryption algorithm i , get the encrypted vector Where g is a parameter of the PaIllier homomorphic encryption algorithm, usually selected as m+1, s represents a random number; m is the product of two large prime numbers p and q, u i represents the i-th element of the weight vector U;

[0052] 4) The data owner will use the encrypted vector Sent to data users.

[0053] Furthermore, step S422, the verification process of the data user is generated by the following steps:

[0054] 1) Data users use the public key p of the data owner k ={m,g} decryption weight vector, the specific operation is as follows: h represents ciphertext The data user decrypts the ciphertext u i It forms a weight vector U, U=[u1,u2...u t ];

[0055] 2) The data user calculates B using the inner product of the weight vector U and the t / 2 share of the key (K{t / 2}):

[0056] 3) The data user sends the inner product B and timestamp τ to the cloud server.

[0057] Further, in step S423, the data ownership verification result is obtained through the following steps:

[0058] 1) The cloud server verifies whether the two inner products received are equal, A=B?

[0059] 2) If A=B, the cloud server then verifies the timestamp τ sent by the data user: V' t =H(τ); V' t is the timestamp hash value sent by the data user to the cloud server, and H(τ) represents the hash function. If the timestamp hash value is consistent with that sent by the data owner, it means that the data ownership has been authorized, otherwise it means that it is not authorized.

[0060] Further, in step S5, the decryption process is generated by the following steps:

[0061] 1) If the data ownership is authorized, the cloud server will send the key share and ciphertext to the data user;

[0062] 2) The data user constructs the Lagrange interpolation polynomial L(x) based on the t-share key: L(x)=L1(x)k1+L2(x)+...+L t (x)k t , where L(0) = K, and the key K is obtained;

[0063] 3) The data user uses the key K, timestamp τ and initialization vector IV to obtain the decrypted file M: ​​M = D(K, IV, τ) = GCM decrypt (K, IV, CT), where GCM decrypt Represents the AES-GCM decryption algorithm.

[0064] Furthermore, the time-limited entrusted data sharing method with revocation security further includes S6, revocation and update of data ownership: when the data user's permission to apply for data ownership expires, the data owner revokes the data ownership and updates the ciphertext CT. Specifically, the revocation and update process is generated through the following steps:

[0065] 1) When the data owner revokes the prefix tree based on the expired prefix tree, he will then update the timestamp to τ+1;

[0066] 2) The data owner regenerates a new encryption key K τ+1 and a new initialization vector IV τ+1 , re-encrypt to obtain the updated ciphertext CT', and send CR' to the cloud server for storage.

[0067] The present invention also provides a time-limited entrusted data sharing system with revocation security, which is used to implement the time-limited entrusted data sharing method with revocation security as described above, and the system includes:

[0068] Trusted authority, used to generate public and private key pairs for data owners and data users, and distribute them to the corresponding data owners and data users;

[0069] Data owners manage encryption keys and encrypt files according to the set encryption algorithm to generate ciphertext and upload it to the cloud server for storage; they manage data ownership, including authorization, revocation, and verification of data ownership according to data users' requests;

[0070] Cloud server, used to store ciphertext; used to participate in the verification of data ownership and verify whether the received inner product and timestamp are consistent;

[0071] Data users use this to obtain authorization for data ownership, obtain ciphertext in the cloud server, restore files based on the key and decryption algorithm, and obtain shared data.

[0072] Compared with the prior art, the present invention has the following advantages:

[0073] (1) The present invention can support a cloud storage-based sharing model, allowing data owners to delegate data ownership to specific trusted entities in a time-controlled manner, thereby enabling users to achieve a secure and controllable data sharing process.

[0074] (2) The present invention adopts linear secret sharing technology to store encryption keys, which improves data security and supports flexible key management.

[0075] (3) The present invention introduces dynamic data ownership management, allowing data owners to flexibly control data access according to time and user needs, enabling users to achieve a secure and controllable data sharing process.

[0076] (4) The present invention uses the Paillier encryption algorithm and inner product calculation to implement interactive verification of data ownership between data users and cloud servers, ensuring that only authorized users can access the data.

[0077] (5) The present invention has more comprehensive revocation security: based on the design of the prefix tree, it provides a data ownership revocation function; at the same time, the introduction of the revocation tree enables the data owner to actively revoke the access rights of the authorized user, thereby revoking the security of the data before and after.

[0078] (6) The present invention not only supports one-to-one user controlled delegation of data ownership, but also supports one-to-many groups of users to achieve controlled delegation of data ownership, which has higher practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0080] Figure 1 is a system structure diagram of the present invention;

[0081] Figure 2 A schematic diagram of a one-to-one user prefix tree of the present invention;

[0082] Figure 3 A schematic diagram of a one-to-many user prefix tree of the present invention;

[0083] Figure 4 This is a schematic diagram of interactive verification of data ownership. DETAILED DESCRIPTION

[0084] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0085] The present invention first establishes a time-limited entrusted data sharing system with revocation security, which includes four types of entities, such as Figure 1 Shown: data owner (DO), data user (DU), cloud server (CS), trusted authority (TA).

[0086] The system is initially divided into two parts: key distribution and encryption key generation. The trusted authority (TA) is responsible for distributing keys to data owners. K and public key p k . The data owner (DO) is responsible for generating the encryption key K, the initialization vector IV, and the timestamp τ. For entities in the system, the trusted authority (TA) is a fully trusted entity that distributes keys to data owners and can be used to ensure secure access control and key management. The data owner (DO) is the owner of the data and is able to manage data ownership, including authorization, revocation, and verification operations. The data owner (DO) is also responsible for encrypting and uploading the shared data to the cloud server and is an honest and trustworthy entity. The cloud server (CS) is responsible for storing ciphertext and participating in verifying data ownership and is an honest but curious entity. The data user (DU) is an accessor to shared data ownership and can request authorization of data ownership from the data user (DU). During the authorization period, the file can be decrypted and the data can be accessed. The data user (DU) may be an entity that is curious about the data when it is unauthorized.

[0087] Combination Figure 1 As shown, the steps of the limited-time delegated data sharing method with revocation security are described in detail below. It includes the following steps:

[0088] S1. Distribute public and private key pairs:

[0089] A trusted authority distributes public-private key pairs to data owners.

[0090] In step S1, specifically, the public and private key pair of the data owner is obtained through the following steps:

[0091] S11. The trusted authority selects two large prime numbers p and q, and calculates the product of the two large prime numbers p and q m = p·q and λ(m) = LCM(p-1,q-1), where LCM represents the least common multiple;

[0092] S12. The trusted authority calculates g = m + 1 and obtains the public key p k ={m,g}, key s k ={p,q,λ(m)}, and send the public-private key pair to the data owner.

[0093] S2. Key management:

[0094] The data owner generates encryption keys based on a random number generator and performs key management.

[0095] In step S2, the encryption key is obtained and key management is performed through the following steps:

[0096] S21. The data owner generates an original encryption key K (e.g., 128 bits), an initialization vector IV (e.g., 96 bits), and a timestamp τ through a random number generator (RNG).

[0097] S22. The data owner divides the original encryption key K into n parts, K = (k1, k2...k n ), setting a threshold t, indicating that at least t shares of the key are required to reconstruct the key K.

[0098] S23. The data owner selects a large prime number Z and defines a finite field F Z , a large prime number Z as a finite field F Z The data owner generates a t-1 degree polynomial f(x) and sets f(0) = K;

[0099] f(x)=a0+a1x+a2x 2 +...+a -1x (t-1)

[0100] Among them, a0, a1, a2, ...a t-1is the coefficient of the polynomial. x represents the input variable of the polynomial f(x), which is used to determine the share of each data user. The polynomial f(x) represents the function used to generate the secret share. This process manages the key for the secret sharing scheme, which will be used in the subsequent delegation and verification stages.

[0101] S3, ciphertext encryption:

[0102] The data owner encrypts the shared file M according to the set encryption algorithm, obtains the encrypted ciphertext CT, and stores the encrypted ciphertext CT in the cloud server.

[0103] In step S3, the encrypted ciphertext is obtained by the following steps:

[0104] S31. The data owner divides the file M into multiple blocks: M=(M1, M2...M r ), where each block is 128 bits long.

[0105] S32. The data owner encrypts each data block according to the AES-GCM algorithm, encryption key K and initialization vector IV to obtain the ciphertext C and authentication tag T.

[0106] C i =E(K,IV)(M i ), where i = 1, 2...r, C i Represents the i-th ciphertext block.

[0107] The data owner calculates a 128-bit authentication tag T = GCM(K, IV, C)(M);

[0108] E(K,IV)(M i ) indicates that the data owner uses the AES-GCM algorithm, encryption key K, and initialization vector IV to encrypt each data block. i Represents the i-th file block. GCM(K,IV,C)(M) represents the use of encryption key K, initialization vector IV, ciphertext C and AES-GCM algorithm to encrypt and generate authentication tag T.

[0109] S33. The data owner constructs an encrypted ciphertext CT=C1||C2||...||C based on the ciphertext C and the authentication tag T. n ||T||τ. Among them, C1, C2, ...C n They are the 1st, 2nd...nth ciphertext blocks respectively.

[0110] S4. Data Sharing:

[0111] Including the steps of data ownership delegation and data ownership verification:

[0112] S41. Time-limited delegation of data ownership:

[0113] The data user applies to the data owner for a time-limited delegation request for data ownership; the data owner generates the user's prefix tree based on the delegation request, and then sends the key and timestamp of the relevant share to the data user, and the key of the remaining share to the cloud server.

[0114] In step S41, the data user applies for a time-limited delegation request for data ownership through the following steps. The time-limited delegation of data ownership is divided into two modes: one-to-one and one-to-many:

[0115] like Figure 2 As shown, one-to-one mode:

[0116] 1) Send a request: The data user sends a delegation request Q to the data owner, where Q = {id, [T1, T2], e = [1, 1]}; where id represents the user's identity, [T1, T2] represents the time range for the authorization request, and e = [1, 1] represents the read and write permissions for the authorization request.

[0117] 2) Generate a prefix tree: The data owner generates a prefix tree T for this user based on the time permission and user ID of the application authorization. id .

[0118] 3) Sending credentials: The data owner sends t / 2 copies of the key and a timestamp τ to the data user; the data user sends t / 2 copies of the key to the cloud server.

[0119] like Figure 3 As shown, one-to-many mode:

[0120] 1) Send a request: The group data user sends a delegation request Q to the data owner, where Q = {gid, [T1, T2], e = [1, 1]}. gid represents the identity of the group user, [T1, T2] represents the time range for the authorization request, and e = [1, 1] represents the read and write permissions for the authorization request.

[0121] 2) Generate a prefix tree: After the data owner receives the authorization application from the data user, the data owner generates a prefix tree T for this group user based on the time authority of the authorization application and the group user gid. gid .

[0122] 3) Send credentials: The data owner sends a share of the key k to each user in the group i , and send the timestamp τ to the group of users; the data owner sends tk i The key of each share is sent to the cloud server for storage. S42. Verification of data ownership:

[0123] like Figure 4As shown in the figure, data ownership verification is an interactive verification process among the data owner, data user, and cloud server, including:

[0124] S421. Verification of data owner: The data owner encrypts the weight vector U, calculates the inner product A, calculates the timestamp hash value, and sends the timestamp hash value and inner product A to the cloud server.

[0125] Specifically, step S421, the verification process of the data owner is generated through the following steps:

[0126] 1) The data owner randomly assigns a weight value to each data block, and then combines the weight values ​​of the data blocks to obtain a vector U, U = [u1,u2...u t ]; Data ownership is calculated based on the t / 2 share key K{t / 2} and the weight vector U to obtain the inner product A: u i represents the i-th element of the weight vector U, k i Represents the i-th key among the first t / 2 shares of keys.

[0127] 2) The data owner calculates the timestamp hash value and obtains V t =H(τ), where H(τ) represents the hash function; the data owner converts the inner product A and the timestamp hash value V t Send to cloud server for storage.

[0128] 3) The data owner encrypts each element u of the weight vector U using the PaIllier homomorphic encryption algorithm i , get the encrypted vector Where g is a parameter of the PaIllier homomorphic encryption algorithm, usually selected as m+1, s represents a random number; m is the product of two large prime numbers p and q, u i Represents the i-th element of the weight vector U.

[0129] 4) The data owner will use the encrypted vector Sent to data users.

[0130] S422, data user verification: the data user decrypts the weight vector U, calculates the inner product B, and sends the timestamp and inner product B to the cloud server.

[0131] Specifically, step S422, the verification process of the data user is generated by the following steps:

[0132] 1) Data users use the public key p of the data owner k ={m,g} decryption weight vector, the specific operation is as follows: h represents ciphertext The data user decrypts the ciphertext ui It forms a weight vector U, U=[u1,u2...u t ].

[0133] 2) The data user calculates B using the inner product of the weight vector U and the t / 2 share of the key (K{t / 2}):

[0134] 3) The data user sends the inner product B and timestamp τ to the cloud server.

[0135] S423, verification result: the cloud server verifies whether the inner product A and the inner product B are equal and whether the timestamps are consistent; if they are consistent, it means that it has been authorized, and the cloud server sends the remaining key shares to the data user.

[0136] Specifically, step S423 obtains the verification result of data ownership through the following steps:

[0137] 1) The cloud server verifies whether the two inner products received are equal, A=B?

[0138] 2) If A=B, the cloud server then verifies the timestamp τ sent by the data user: V' t =H(τ); V' t is the timestamp hash value sent by the data user to the cloud server, and H(τ) represents the hash function. If the timestamp hash value is consistent with that sent by the data owner, it means that the data ownership has been authorized, otherwise it means that it is not authorized.

[0139] S5. Data decryption:

[0140] After the data user passes the three-party interactive verification, the cloud server will send the remaining key shares and encrypted ciphertext CT to the data user. The data user uses the key shares to first recover the key K, then decrypt the ciphertext and recover the file M.

[0141] Specifically, in step S5, the decryption process is generated by the following steps:

[0142] 1) If the data ownership is authorized, the cloud server will send the key share and ciphertext to the data user.

[0143] 2) The data user constructs the Lagrange interpolation polynomial L(x) based on the t-share key: L(x)=L1(x)k1+L2(x)+...+L t (x)k t . Where L(0) = K. The key K is obtained.

[0144] 3) The data user uses the key K, timestamp τ and initialization vector IV to obtain the decrypted file M: ​​M = D(K, IV, τ) = GCM decrypt(K, IV, CT). Among them, GCM decrypt Represents the AES-GCM decryption algorithm.

[0145] As a preferred embodiment, the limited-time delegated data sharing method with revocation security of the present invention also includes S6, revocation and update of data ownership: when the data user's permission to apply for data ownership expires (that is, the timestamp expires), the data owner revokes the data ownership and updates the ciphertext CT.

[0146] Specifically, the undo update process is generated through the following steps:

[0147] 1) When the data owner revokes the prefix tree based on the expired prefix tree, he first updates the timestamp to τ+1.

[0148] 2) The data owner regenerates a new 128-bit encryption key K τ+1 and a new 96-bit initialization vector IV τ+1 , re-encrypt to get the updated ciphertext CT', CT'=C'1||C'2||...||C' n ||T||τ+1. And send CT' to the cloud server for storage.

[0149] As another preferred embodiment of the present invention, a time-limited entrusted data sharing system with revocation security is provided, Figure 1 As shown, including:

[0150] A trusted authority is used to generate public and private key pairs for data owners and data users, and distribute them to the corresponding data owners and data users.

[0151] The data owner manages encryption keys, encrypts files according to the set encryption algorithm, generates ciphertext and uploads it to the cloud server for storage; it manages data ownership, including authorization, revocation and verification of data ownership according to the data user's request.

[0152] The cloud server is used to store ciphertext and participate in the verification of data ownership and verify whether the received inner product and timestamp are consistent.

[0153] Data users use this to obtain authorization for data ownership, obtain ciphertext in the cloud server, restore files based on the key and decryption algorithm, and obtain shared data.

[0154] The limited-time entrusted data sharing method with revocation security as mentioned above is implemented through this system. The specific implementation steps can be found in the method steps recorded above and will not be repeated here.

[0155] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Any changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should fall within the protection scope of the present invention.

Claims

1. A time-limited delegated data sharing method with revocation security, It is characterized in that The following steps are involved: S1. Distribute public and private key pairs: Trusted authorities distribute public-private key pairs to data owners; S2. Key management: The data owner generates encryption keys based on a random number generator and manages the keys; S3, ciphertext encryption: The data owner encrypts the shared file M according to the set encryption algorithm, obtains the encrypted ciphertext CT, and stores the encrypted ciphertext CT in the cloud server; S4. Data Sharing: Including the steps of data ownership delegation and data ownership verification: S41. Time-limited delegation of data ownership: The data user applies to the data owner for a time-limited delegation request for data ownership; the data owner generates the user's prefix tree based on the delegation request, and then sends the key and timestamp of the relevant share to the data user, and the key of the remaining share to the cloud server; S42. Verification of data ownership: The verification of data ownership is an interactive verification process among the data owner, data user, and cloud server, including: S421, verification of the data owner: the data owner encrypts the weight vector U, calculates the inner product A, calculates the timestamp hash value, and sends the timestamp hash value and the inner product A to the cloud server; S422, data user verification: the data user decrypts the weight vector U, calculates the inner product B, and sends the timestamp and the inner product B to the cloud server; S423, verification result: the cloud server verifies whether the inner product A and the inner product B are equal and whether the timestamps are consistent; if they are consistent, it means that the authorization has been obtained, and the cloud server sends the remaining key shares to the data user; S5. Data decryption: After the data user passes the three-party interactive verification, the cloud server will send the remaining key shares and encrypted ciphertext CT to the data user. The data user uses the key shares to first recover the key K, then decrypt the ciphertext and recover the file M.

2. The time-limited entrusted data sharing method with revocation security according to claim 1, It is characterized in that In step S1, the public and private key pair of the data owner is obtained through the following steps: S11. The trusted authority selects two large prime numbers p and q, and calculates the product of the two large prime numbers p and q m = p·q and λ(m) = LCM(p-1,q-1), where LCM represents the least common multiple; S12. The trusted authority calculates g = m + 1 and obtains the public key p k ={m,g}, key s k ={p,q,λ(m)}, and send the public-private key pair to the data owner.

3. The time-limited entrusted data sharing method with revocation security according to claim 1, It is characterized in that In step S2, the encryption key is obtained and key management is performed through the following steps: S21, the data owner generates the original encryption key K, initialization vector IV, and timestamp τ through a random number generator; S22. The data owner divides the original encryption key K into n parts, K = (k 1 ,k 2 ...k n ), set a threshold t, indicating that at least t shares of the key are required to reconstruct the key K; S23. The data owner selects a large prime number Z and defines a finite field F Z , a large prime number Z as a finite field F Z The data owner generates a t-1 degree polynomial f(x) and sets f(0) = K; f(x)=a 0 +a 1 x+a 2 x 2 +...+a t-1 x (t-1) Among them, a 0 , a 1 , a 2 , ...a t-1 is the coefficient of the polynomial, x represents the input variable of the polynomial f(x), which is used to determine the share of each data user. The polynomial f(x) represents the function used to generate the secret share. This process manages the key for the secret sharing scheme and will be used in the subsequent delegation and verification stages.

4. The time-limited entrusted data sharing method with revocation security according to claim 3, It is characterized in that In step S3, the encrypted ciphertext is obtained by the following steps: S31. The data owner divides the file M into multiple blocks: M=(M 1 ,M 2 ...M r ); S32, the data owner encrypts each data block according to the AES-GCM algorithm, encryption key K and initialization vector IV to obtain the ciphertext C and authentication tag T, C i =E(K,IV)(M i ), where i = 1, 2...r, C i represents the i-th ciphertext block, T = GCM (K, IV, C) (M); E (K, IV) (M i ) indicates that the data owner uses the AES-GCM algorithm and encryption key K and initialization vector IV to encrypt each data block, M i represents the i-th file block; GCM(K,IV,C)(M) represents the use of encryption key K, initialization vector IV, ciphertext C and AES-GCM algorithm to encrypt and generate authentication tag T; S33, the data owner constructs the encrypted ciphertext CT=C based on the ciphertext C and the authentication tag T 1 ||C 2 ||...||C n ||T||τ; Among them, C 1 , C 2 ,...C n They are the 1st, 2nd...nth ciphertext blocks respectively.

5. The time-limited entrusted data sharing method with revocation security according to claim 1, It is characterized in that In step S41, the data user applies for a time-limited delegation request for data ownership through the following steps. The time-limited delegation of data ownership is divided into two modes: one-to-one and one-to-many: One-to-one mode: 1) Send request: The data user sends a delegation request Q to the data owner, where Q = {id, [T 1 ,T 2 ],e=[1,1]}; where id represents the user's identity, [T 1 ,T 2 ] represents the time range for applying for authorization, and e=[1,1] represents the read and write permissions for applying for authorization; 2) Generate a prefix tree: The data owner generates a prefix tree T for this user based on the time permission and user ID of the application authorization. id ; 3) Sending credentials: The data owner sends t / 2 keys and a timestamp τ to the data user; the data user sends t / 2 keys to the cloud server; One-to-many mode: 1) Sending a request: The group data user sends a delegation request Q to the data owner, where Q = {gid, [T 1 ,T 2 ],e=[1,1]}; where gid represents the identity of the group user, [T 1 ,T 2 ] represents the time range for applying for authorization, and e=[1,1] represents the read and write permissions for applying for authorization; 2) Generate a prefix tree: After the data owner receives the authorization application from the data user, the data owner generates a prefix tree T for this group user based on the time authority of the authorization application and the group user gid. gid ; 3) Send credentials: The data owner sends a share of the key k to each user in the group i , and send the timestamp τ to the group of users; the data owner sends tk i The key of each share is sent to the cloud server for storage.

6. The time-limited entrusted data sharing method with revocation security according to claim 1, It is characterized in that Step S421: The verification process of the data owner is generated through the following steps: 1) The data owner randomly assigns a weight value to each data block, and then combines the weight values ​​of the data blocks to obtain a vector U, U = [u 1 ,u 2 ...u v ]; Data ownership is calculated based on the t / 2 share key K{t / 2} and the weight vector U to obtain the inner product A: u i represents the i-th element of the weight vector U, k i represents the i-th key among the first t / 2 shares of keys; 2) The data owner calculates the timestamp hash value and obtains V t =H(τ), where H(τ) represents the hash function; the data owner converts the inner product A and the timestamp hash value V t Send to cloud server for storage; 3) The data owner encrypts each element u of the weight vector U using the PaIllier homomorphic encryption algorithm i , get the encrypted vector Where g is a parameter of the PaIllier homomorphic encryption algorithm, usually selected as m+1, s represents a random number; m is the product of two large prime numbers p and q, u i represents the i-th element of the weight vector U; 4) The data owner will use the encrypted vector Sent to data users.

7. The time-limited entrusted data sharing method with revocation security according to claim 2, It is characterized in that Step S422: The verification process of the data user is generated by the following steps: 1) Data users use the public key p of the data owner k ={m,g} decryption weight vector, the specific operation is as follows: D(h)=(h-1) / m, where h represents the ciphertext The data user decrypts the ciphertext u i It forms a weight vector U, U = [u 1 ,u 2 ...u t ]; 2) The data user calculates B using the inner product of the weight vector U and the t / 2 share of the key (K{t / 2}): 3) The data user sends the inner product B and timestamp τ to the cloud server.

8. The time-limited entrusted data sharing method with revocation security according to claim 1, It is characterized in that Step S423: obtain the verification result of data ownership through the following steps: 1) The cloud server verifies whether the two inner products received are equal, A=B? 2) If A=B, the cloud server then verifies the timestamp τ sent by the data user: V' t =H(τ); V' t is the timestamp hash value sent by the data user to the cloud server, and H(τ) represents the hash function; if the timestamp hash value is consistent with that sent by the data owner, it means that the data ownership has been authorized, otherwise it means that it is not authorized.

9. The time-limited entrusted data sharing method with revocation security according to claim 1, It is characterized in that Step S5, the decryption process is generated by the following steps: 1) If the data ownership is authorized, the cloud server will send the key share and ciphertext to the data user; 2) The data user constructs the Lagrange interpolation polynomial L(x) based on the t-share key: L(x) = L 1 (x)k 1 +L 2 (x)+...+L t (x)k t , where L(0) = K, and the key K is obtained; 3) The data user uses the key K, timestamp τ and initialization vector IV to obtain the decrypted file M: ​​M = D(K, IV, τ) = GCM decrypt (K, IV, CT), where GCM decrypt Represents the AES-GCM decryption algorithm.

10. The time-limited entrusted data sharing method with revocation security according to claim 1, It is characterized in that It also includes S6, revocation and update of data ownership: when the data user's permission to apply for data ownership expires, the data owner revokes the data ownership and updates the ciphertext CT. Specifically, the revocation and update process is generated through the following steps: 1) When the data owner revokes the prefix tree based on the expired prefix tree, he will then update the timestamp to τ+1; 2) The data owner regenerates a new encryption key K τ+1 and a new initialization vector IV τ+1 , re-encrypt to obtain the updated ciphertext CT', and send CT' to the cloud server for storage.

11. A time-limited entrusted data sharing system with revocation security, It is characterized in that The system is used to implement the time-limited entrusted data sharing method with revocation security as described in any one of claims 1 to 10, comprising: Trusted authority, used to generate public and private key pairs for data owners and data users, and distribute them to the corresponding data owners and data users; Data owners manage encryption keys and encrypt files according to the set encryption algorithm to generate ciphertext and upload it to the cloud server for storage; they manage data ownership, including authorization, revocation, and verification of data ownership according to data users' requests; Cloud server, used to store ciphertext; used to participate in the verification of data ownership and verify whether the received inner product and timestamp are consistent; Data users use this to obtain authorization for data ownership, obtain ciphertext in the cloud server, restore files based on the key and decryption algorithm, and obtain shared data.