File hosting method, authorization certificate generation method, file access method and key distribution method
By constructing an access tree and combining it with an encryption mechanism, the problem of the separation between access control and encryption mechanism in the trusted data space is solved, realizing the integration of secure data storage and access control, and improving the security of data use and the efficiency of policy lookup.
Patent Information
- Application Number
- CN202511298192.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2026-01-09
Smart Images

Figure CN121309028A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security, and particularly relates to a file hosting method, an authorized certificate generation method, a file access method and a key allocation method. BACKGROUND
[0002] A trusted data space is a new type of data circulation infrastructure, aiming to build a secure, controllable, mutually trusted and compliant environment to realize data sharing across organizations, industries and regions. In the capability view of the trusted data space, the trusted data space includes a trusted data space operator, a data service provider, a data provider and a data user. Among them, the data service provider includes a data operator, a data hosting party and a data developer. The implementation of the trusted data space requires effective coordination of various participants to create a data circulation ecosystem that is trusted by participants, has data privacy and effective protection mechanisms. For the privacy protection problem of data circulation in the trusted data space, privacy protection computing technology is particularly important, which can realize the calculation and use of data in the ciphertext state, so that the data can be safely circulated without revealing the plaintext.
[0003] Typical privacy computing technologies include multi-party secure computation, homomorphic encryption, federated learning, etc. Among them, multi-party secure computation can realize the calculation and use of data in the ciphertext state of multiple participants, homomorphic encryption technology can realize ciphertext-based calculation, which can be commonly applied in multi-party secure computation architecture, and federated learning realizes local training of data and gradient uploading, avoiding the privacy leakage problem caused by direct data uploading for training. The above technologies give a secure solution to the data calculation problem in the flow process, but the trusted data space has multiple roles such as a trusted data space operator and a data hosting party. The data hosting party can be borne by the operator or by a third-party unit or institution, so there is a data security hosting problem caused by outsourcing storage of data, which is difficult to effectively protect through the above technologies. The encryption storage mode can realize the privacy protection problem in the outsourcing storage process, but its access control mechanism and encryption mechanism are independent, and there is a lack of unified policy execution closed loop between them, which has the risk of being accessible but not decryptable, or bypassing the access control to directly decrypt.
[0004] Therefore, there is an urgent need for a file hosting mode to combine the access control mechanism and the encryption mechanism. SUMMARY
[0005] The present application provides a file hosting method, an authorized certificate generation method, a file access method and a key allocation method to solve the defect that the access control mechanism and the encryption mechanism of the trusted data space are separated in the prior art.
[0006] The present application provides a file hosting method, comprising the following steps: Send a file encryption request to the first server and receive the public key returned by the first server; An access tree is constructed based on plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure. Based on the public key, the plaintext data and the access tree are encrypted to obtain ciphertext data; The encrypted data is sent to the second server; The authorization information corresponding to the plaintext data is sent to the fourth server.
[0007] According to a file hosting method provided in this application, the access tree includes an identity attribute subtree and an access permission attribute subtree; the identity attribute subtree and the access permission attribute subtree are connected by a root node, and the root node reflects the number of child nodes that need to be satisfied to access the plaintext data; The identity attribute subtree is used to store identity attribute information that has access rights to the plaintext data; The permission attribute subtree is used to store various access permissions for the plaintext data.
[0008] According to a file hosting method provided in this application, the identity attribute subtree is constructed with identity attributes as leaf nodes and threshold values as non-leaf nodes; the threshold values reflect the number of child nodes that must be satisfied to access the plaintext data.
[0009] According to a file hosting method provided in this application, the leaf nodes of the permission attribute subtree include data ownership rights, authorization time of data ownership rights, data usage and processing rights, authorization time of data usage and processing rights, data product operation rights, and authorization time of data product operation rights.
[0010] This application also provides a file hosting method, including the following steps: Receive encrypted data sent by the first device; Authorized ciphertext data is generated based on the first authorization certificate and the ciphertext data; the first authorization certificate is generated based on a public key. Receive data access requests sent by the second device; Based on the data access request, the authorized encrypted data is sent to the second device.
[0011] According to a file hosting method provided in this application, the file hosting method further includes: Receive the re-encryption key and the new first authorization certificate sent by the third server; Based on the re-encryption key, the existing authorized ciphertext data is updated to obtain new authorized ciphertext data.
[0012] This application also provides a method for generating an authorization certificate, including the following steps: Receive the authorization certificate acquisition request sent by the second server; Send a public key retrieval request to the first server and obtain the public key returned by the first server; Based on the first random number and the public key, generate a first authorization certificate and a second authorization certificate; Send the first authorization certificate to the second server; Send the second authorization certificate to the first server.
[0013] According to the authorization certificate generation method provided in this application, the authorization certificate generation method further includes: Generate a second random number; Based on the first random number and the second random number, determine the re-encryption key; Based on the re-encryption key, the first authorization certificate and the second authorization certificate are updated respectively, resulting in a new first authorization certificate and a new second authorization certificate; Send the new first authorization certificate to the second server; Send the new second authorization certificate to the first server.
[0014] This application also provides a file access method, including the following steps: A private key retrieval request is sent to the first server, and the private key returned by the first server is obtained; the private key is generated based on the second authorization certificate. Receive the authorized encrypted data returned by the second server; Based on the private key, the authorized ciphertext data is decrypted to obtain plaintext data.
[0015] According to a file access method provided in this application, the step of decrypting the authorized ciphertext data based on the private key to obtain plaintext data includes: For any node in the tree that is not a leaf node, the following recursive algorithm is invoked. For all child nodes of the node, a non-recursive algorithm is called respectively to obtain the output result; If the output result indicates that the child node meets the threshold condition, then based on the private key and the authorized ciphertext data, the plaintext data is determined and output; If the output result indicates that the child node does not meet the threshold condition, then the output represents an abnormal value indicating decryption failure.
[0016] This application provides a key distribution method, including the following steps: Generate a public key based on the first authorized certificate; Upon receiving a file encryption request from the first device, the public key is returned to the first device; Receive the identity attribute information of the first device; Request a second authorization certificate from a third server; Request authorization information from the fourth server; Based on the identity attribute information, the authorization information, and the second authorization certificate, a private key is generated; Upon receiving a private key retrieval request from the second device, the private key is returned to the second device; Receive a public key retrieval request sent by a third server and return the public key to the third server.
[0017] According to a key distribution method provided in this application, the key distribution method further includes: Receive the new second authorization certificate sent by the third server; Based on the second authorization certificate, the existing private key is updated to obtain a new private key.
[0018] This application also provides a file hosting device, including the following modules: The public key acquisition module is used to: send a file encryption request to the first server and obtain the public key returned by the first server; An access tree construction module is used to: construct an access tree based on plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure; An encryption processing module is used to: encrypt the plaintext data and the access tree based on the public key to obtain ciphertext data; The encrypted data sending module is used to: send the encrypted data to the second server; The authorization sending module is used to send the authorization information corresponding to the plaintext data to the fourth server.
[0019] This application also provides a file hosting device, including the following modules: The encrypted data receiving module is used to: receive encrypted data sent by the first device; The encrypted data encryption module is used to: generate authorized encrypted data based on a first authorization certificate and the encrypted data; the first authorization certificate is generated based on a public key; The access request receiving module is used to: receive data access requests sent by the second device; The encrypted data sending module is used to: send the authorized encrypted data to the second device based on the data access request.
[0020] This application also provides an authorization certificate generation apparatus, including the following modules: The certificate request receiving module is used to: receive authorization certificate acquisition requests sent by the second server; The public key request module is used to: send a public key retrieval request to the first server and obtain the public key returned by the first server; The certificate generation module is used to: generate a first authorization certificate and a second authorization certificate based on a first random number and the public key; The first certificate sending module is used to: send the first authorization certificate to the second server; The second certificate sending module is used to send the second authorization certificate to the first server.
[0021] This application also provides a file access device, including the following modules: The private key acquisition module is used to: send a private key acquisition request to the first server and obtain the private key returned by the first server; the private key is generated based on the second authorization certificate; The ciphertext acquisition module is used to: receive authorized ciphertext data returned by the second server; The ciphertext decryption module is used to: decrypt the authorized ciphertext data based on the private key to obtain plaintext data.
[0022] This application also provides a key distribution device, including the following modules: The public key generation module is used to: generate a public key based on the first authorized certificate; The first public key sending module is used to: return the public key to the first device when it receives a file encryption request from the first device; The attribute receiving module is used to: receive the identity attribute information of the first device; The certificate request module is used to request a second authorization certificate from a third server. The authorization acquisition module is used to request authorization information from the fourth server. The private key generation module is used to: generate a private key based on the identity attribute information, the authorization information, and the second authorization certificate; The private key sending module is used to: return the private key to the second device upon receiving a private key acquisition request from the second device; The second public key sending module is used to: receive a public key acquisition request sent by a third server and return the public key to the third server.
[0023] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the file hosting methods, authorization certificate generation methods, file access methods, or key distribution methods described above.
[0024] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the file hosting method, authorization certificate generation method, file access method, or key distribution method as described above.
[0025] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the file hosting methods, authorization certificate generation methods, file access methods, or key distribution methods described above.
[0026] This application provides a file hosting method, an authorization certificate generation method, a file access method, and a key distribution method. A first device sends a file encryption request to a first server and receives a public key returned by the first server. Based on plaintext data, an access tree is constructed. The access tree stores the access control policies of the plaintext data in a tree structure. Based on the public key, the plaintext data and the access tree are encrypted to obtain ciphertext data. The ciphertext data is sent to a second server. The authorization information corresponding to the plaintext data is sent to a fourth server. In this application, the access control policies are organized into an access tree according to a hierarchical relationship, resulting in a clear structure. Path matching allows for rapid policy location, improving the efficiency of policy lookup and matching. Encrypting the access tree storing the access control policies along with the plaintext data integrates the access control mechanism and the encryption mechanism, ensuring that only users who meet the corresponding access control policies can decrypt the ciphertext, thus guaranteeing data security. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is one of the flowcharts illustrating the file hosting method provided in this application; Figure 2 This is the second flowchart illustrating the file hosting method provided in this application; Figure 3 This is an exemplary schematic diagram of the identity attribute subtree provided in this application; Figure 4 This is an exemplary schematic diagram of the permission attribute subtree provided in this application; Figure 5 This is a schematic diagram of the file encryption and hosting process provided in this application; Figure 6This is a flowchart illustrating the authorization certificate generation method provided in this application; Figure 7 This is a flowchart illustrating the file access method provided in this application; Figure 8 This is a flowchart illustrating the key distribution method provided in this application; Figure 9 This is a schematic diagram of the key distribution process provided in this application; Figure 10 This is a schematic diagram of the encrypted access control and managed authentication scheme provided in this application; Figure 11 This is one of the structural schematic diagrams of the document hosting device provided in this application; Figure 12 This is the second schematic diagram of the document hosting device provided in this application; Figure 13 This is a schematic diagram of the authorization certificate generation device provided in this application; Figure 14 This is a schematic diagram of the structure of the file access device provided in this application; Figure 15 This is a schematic diagram of the key distribution device provided in this application; Figure 16 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] It should be noted that in the description of the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The terms "upper," "lower," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly, for example, they can be fixed connections, detachable connections, or integral connections; they can be mechanical connections or electrical connections; they can be direct connections or indirect connections through an intermediate medium; and they can be internal connections between two elements. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0031] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, without limiting the number of objects; for example, a first object can be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects have an "or" relationship.
[0032] The following is combined Figures 1-16 This application describes the file hosting method, authorization certificate generation method, file access method, and key distribution method provided in the embodiments of this application.
[0033] Figure 1 This is a flowchart illustrating the file hosting method provided in this application, such as... Figure 1 As shown, the method includes the following: S110, send a file encryption request to the first server and obtain the public key returned by the first server; S120, construct an access tree based on plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure; S130, based on the public key, the plaintext data and the access tree are encrypted to obtain ciphertext data; S140, the encrypted data is sent to the second server; S150, the authorization information corresponding to the plaintext data is sent to the fourth server.
[0034] It should be noted that the entity executing the file hosting method provided in this application embodiment is the data provider, that is, the device that provides the data hosting service. Specifically, it can be a server or computer equipment.
[0035] Here, the first server is the Access Key Management Server (AKMS), used to create, store, distribute, rotate, revoke, and audit encryption keys. The second server is the Data Custody Server (DCS), used to host data and provide services for storing, managing, protecting, and accessing data. The fourth server is the Access Authorization Server (AAS), used to control access permissions.
[0036] The file hosting method provided in this application organizes access control policies into an access tree T according to hierarchical relationships. The structure is clear, and policies can be quickly located through path matching, improving the efficiency of policy search and matching. The access tree storing access control policies is encrypted together with the plaintext data, so that only users who meet the corresponding access control policies can decrypt the ciphertext, ensuring the security of data use.
[0037] In an optional embodiment, the access tree includes an identity attribute subtree and an access permission attribute subtree; the identity attribute subtree and the access permission attribute subtree are connected by a root node, and the root node reflects the number of child nodes that need to be satisfied to access the plaintext data; The identity attribute subtree is used to store identity attribute information that has access rights to the plaintext data; The permission attribute subtree is used to store various access permissions for the plaintext data.
[0038] In this embodiment, the identity attribute subtree T id Stores identity attribute information that grants access rights to plaintext data, such as doctors, hospitals, research institutes, and researchers; permission attribute subtree T au Store specific access rights to plaintext data, such as ownership, usage, and management rights.
[0039] Here, the identity attribute subtree and the permission attribute subtree are connected through the root node to obtain the complete access tree. For example, using AND as the root node indicates that users who meet the identity attribute information and have been authorized by the access permission can access the site; using OR as the root node indicates that users who meet the identity attribute information or have been authorized by the access permission can access the site.
[0040] The file hosting method provided in this application divides the access tree into an identity attribute subtree and a permission attribute subtree, which has a simple and clear structure and implements different access control through different root nodes.
[0041] In an optional embodiment, the identity attribute subtree is constructed with identity attributes as leaf nodes and threshold values as non-leaf nodes; the threshold values reflect the number of child nodes that must be satisfied to access the plaintext data.
[0042] Figure 3 This is an exemplary schematic diagram of the identity attribute subtree provided in this application, such as... Figure 3 As shown, the identity attribute subtree T id Using identity attribute information as leaf nodes, and threshold values (AND(n of n, conditions of both left and right child nodes are satisfied), OR(1 of n, conditions of any child node are satisfied), and n of m(m>n, conditions of n child nodes are satisfied)) are used as non-leaf nodes to construct access strategies.
[0043] like Figure 3 As shown, taking medical data access as an example, an identity attribute subtree is constructed to indicate that doctors in Hospital 1 and Hospital 2, as well as researchers in Medical Research Institution 3 and Medical Research Institution 4, have access permissions.
[0044] The file hosting method provided in this application embodiment uses identity attribute subtrees with identity attribute information as leaf nodes and threshold values as non-leaf nodes to achieve multi-level, fine-grained control of access permissions. It can be widely applied to data access permission storage in different fields.
[0045] In an optional embodiment, the leaf nodes of the permission attribute subtree include data holding rights, the authorization time of data holding rights, data use and processing rights, the authorization time of data use and processing rights, data product operation rights, and the authorization time of data product operation rights.
[0046] Figure 4 This is an exemplary diagram of the permission attribute subtree provided in this application, such as... Figure 4 As shown, the permission attribute subtree involves two categories of attributes: permissions and time. Auc, aus, and auj represent data ownership, data usage and processing rights, and data product management rights, respectively; time... auc time aus and timeauj These represent the authorization period for data ownership, the authorization period for data use and processing, and the authorization period for data product operation, respectively.
[0047] Here, each type of permission is connected to its corresponding authorization time using AND, and subtrees between different permissions are connected using other required threshold values. Figure 3 The permission attribute subtree shown represents the files that a user with one of three permissions and whose validity period is within the specified range can access.
[0048] The file hosting method provided in this application embodiment separately authorizes and distinguishes three rights: data ownership, data use and processing rights, and data product operation rights, thereby achieving the separation of the three rights and realizing fine-grained control over access permissions.
[0049] Figure 2 This is the second flowchart illustrating the file hosting method provided in this application, such as... Figure 2 As shown, the method includes the following: S210, Receive encrypted data sent by the first device; S220, Generate authorized ciphertext data based on the first authorization certificate and the ciphertext data; the first authorization certificate is generated based on a public key; S230, Receive data access request sent by the second device; S240, based on the data access request, the authorized encrypted data is sent to the second device.
[0050] It should be noted that the execution entity of the file hosting method provided in this application embodiment is a data hosting provider. Specifically, it can be a data hosting server (DCS), computer equipment, etc. For ease of understanding, this application embodiment uses a DCS as the execution entity for description.
[0051] The Custody Authorization Server (CAS) acts as a custodial agent for the data sovereign, ensuring secure, controllable, and auditable cross-domain access authorization management while protecting the data holder's control. New data custodial servers (DCS) joining the Trusted Data Space must apply for certification and authorization from CAS. After verifying the DCS provider's qualifications and other information, CAS calculates and distributes authorization certificates. Specifically: CAS requests a public key (PK) from the Access Key Management Server (AKMS); CAS uses a pre-built certificate generation algorithm to generate an authorization certificate based on the public key PK and distributes it to DCS; DCS can then provide data hosting services after obtaining the authorization certificate.
[0052] Here, CAS executes the certificate generation algorithm CertGen: CertGen(PK)→cert,cert'; Select random number , , ; in, Z p It is a p-order cyclic group, g is a generator, cert is the first authorization certificate, and cert' is the second authorization certificate.
[0053] With an authorized certificate, DCS manages encrypted (CT) data sent by the Data Provider (DP). The encrypted data is obtained by encrypting the plaintext data using a public key (PK); whereby... , It is a bilinear group of order p with prime numbers, and g is a generator.
[0054] Furthermore, DCS uses the pre-built certificate encryption algorithm CertEn(CT, cert) to generate authorized encrypted data CT' based on the encrypted data CT and the authorization certificate cert.
[0055] Understandably, the Data Hosting Server (DCS) can generate authorized encrypted data based on the corresponding encrypted data and authorization certificate after receiving an access request from a Data User (DU); alternatively, it can generate authorized encrypted data in advance based on the encrypted data and authorization certificate, store the authorized encrypted data, and directly query the corresponding authorized encrypted data after receiving an access request from a Data User (DU).
[0056] The file hosting method provided in this application generates authorized ciphertext data based on the authorization certificate of the data hosting server and the ciphertext data to be hosted. Decryption of the authorized ciphertext data requires not only a key but also an authorization certificate. Therefore, only the authorized ciphertext data generated by a compliant data hosting server can be decrypted. This protects the privacy of the hosted data while authenticating the data hosting party, integrating the authentication process into the ciphertext storage access control process, thereby improving the overall efficiency of the system.
[0057] In an optional embodiment, the file hosting method further includes: Receive the re-encryption key and the new first authorization certificate sent by the third server; Based on the re-encryption key, the existing authorized ciphertext data is updated to obtain new authorized ciphertext data.
[0058] In this embodiment, the re-encryption key RK and the new first authorization certificate cert new After delivery of DCS, the following procedures shall be performed: For newly hosted encrypted data by the user, use the new authorization certificate cert. new Directly execute the certificate encryption algorithm CertEn to generate authorized ciphertext data; For files that are currently being hosted and have already undergone the CertEn algorithm, perform the following algorithm to update them: CT'Up(CT',RK)→CT' new : CT' new =(T, , , ).
[0059] The authorization certificate update method provided in this application embodiment can directly update managed data with a re-encryption key for already generated authorized ciphertext data, without needing to decrypt the old authorized ciphertext data, thus ensuring the security of ciphertext data and improving data update efficiency.
[0060] Figure 5 This is a schematic diagram of the file encryption and hosting process provided in this application, such as... Figure 5 As shown, DP sends a file encryption request to AKMS to obtain the public key PK required for encryption, specifies the file M (plaintext data) to be hosted, constructs an access tree T for it, and executes the encryption algorithm: Encrypt(PK,M,T)→CT, obtaining the ciphertext data CT=(T, , , ); where T represents the visit tree; , , ; Y represents visiting the set of leaf nodes; q x Represent the polynomial of node x; for the root node R, select a random number. , ; This represents the function that converts attribute i into a binary value. DP outsources the ciphertext data CT to DCS for storage; CT is ciphertext, and DCS cannot see the plaintext content.
[0061] After receiving the DU's access request to the CT, the DCS executes the following certificate generation algorithm, CertGen: CT'=(T, , , ); After the calculation is completed, the authorized encrypted data CT' is sent back to DU.
[0062] DP assigns access permissions to plaintext data M as shown in Table 1, using a matrix format for access authorization. Entries with "auc", "aus", or "auj" indicate authorized access, while "*" indicates no such permission. For authorized entries, the validity period of the authorization is also specified. Based on the file authorization table, a user's authorization attribute set S can be constructed. au That is, S of DU1 au For {auc, timeauc, *, *, *}, S of DU2 au Let {*, *, aus, timeaus, *, *} be the values.
[0063] Table 1 Document Authorization Table
[0064] Figure 6 This is a flowchart illustrating the authorization certificate generation method provided in this application, such as... Figure 6 As shown, the method includes the following: S610 receives an authorization certificate acquisition request sent by the second server; S620, send a public key acquisition request to the first server and obtain the public key returned by the first server; S630, Based on the first random number and the public key, generate a first authorization certificate and a second authorization certificate; S640, the first authorization certificate is sent to the second server; S650, the second authorization certificate is sent to the first server.
[0065] It should be noted that the executing entity of the private key generation and update method provided in this application embodiment is the hosting authorization party. Specifically, it can be a hosting authorization server (CAS), computer equipment, etc. For ease of understanding, this application embodiment uses CAS as the executing entity for description.
[0066] The Custody Authorization Server (CAS) acts as a custodial agent for the data sovereign, ensuring secure, controllable, and auditable cross-domain access authorization management while protecting the data holder's control. New data custodial servers (DCS) joining the Trusted Data Space must apply for certification and authorization from CAS. After verifying the DCS provider's qualifications and other information, CAS calculates and distributes authorization certificates. Specifically: CAS requests a public key (PK) from the Access Key Management Server (AKMS); CAS uses a pre-built certificate generation algorithm to generate an authorization certificate based on the public key PK and distributes it to DCS; DCS can then provide data hosting services after obtaining the authorization certificate.
[0067] Here, CAS executes the certificate generation algorithm CertGen: CertGen(PK)→cert,cert'; Select random number , , ; Where Zp is a p-order cyclic group, g is a generator, cert is the first authorization certificate, and cert' is the second authorization certificate.
[0068] It should be noted that S640 and S650 do not have strict timing constraints.
[0069] The authorization certificate generation method provided in this application divides the authorization certificate into two parts. One part is stored by the data custodian (DCS) and, after calculation with the ciphertext, generates a new ciphertext which is then stored by the data custodian. The other part is associated with the user's private key by the trusted server (AKMS). This enables authentication of the custodian's identity while the user decrypts the ciphertext: only ciphertext processed by a compliant custodian based on the authorization certificate can be decrypted by the user.
[0070] In an optional embodiment, the authorization certificate generation method further includes: Generate a second random number; Based on the first random number and the second random number, determine the re-encryption key; Based on the re-encryption key, the first authorization certificate and the second authorization certificate are updated respectively, resulting in a new first authorization certificate and a new second authorization certificate; Send the new first authorization certificate to the second server; Send the new second authorization certificate to the first server.
[0071] In this embodiment of the application, when the authorization content or authorization time of the old authorization certificate needs to be updated, it is necessary to verify the qualification of DCS service and update the authorization certificate of DCS that can continue to provide managed services.
[0072] In this embodiment, CAS queries the DCS for the random number u of cert, and executes the certificate generation and update algorithm CertGenUp(u)→cert. new ,cert' new RK: Select a new random number , , ; Among them, cert new This is the new first authorized certificate, cert' new It is a new second authorization certificate, and RK is the re-encryption key.
[0073] The authorization certificate generation method provided in this application embodiment directly uses a re-encryption key to update the old authorization certificate, thereby achieving efficient updating of the authorization certificate without decrypting the original data.
[0074] Figure 7 This is a flowchart illustrating the file access method provided in this application, such as... Figure 7 As shown, the method includes: S710, a private key acquisition request is sent to the first server, and the private key returned by the first server is obtained; the private key is generated based on the second authorization certificate; S720 receives authorized encrypted data returned by the second server; S730, based on the private key, the authorized ciphertext data is decrypted to obtain plaintext data.
[0075] It should be noted that the executing entity of the file hosting method provided in this application embodiment is a data user (DU), that is, a device that provides the data that needs to be used. Specifically, it can be a server or a computer device.
[0076] The file access method provided in this application embodiment obtains private keys and authorized ciphertext data from a first server and a second server respectively, and then uses the private key to decrypt the authorized ciphertext data to obtain the required data.
[0077] In an optional embodiment, the step of decrypting the authorized ciphertext data based on the private key to obtain plaintext data includes: For any node in the tree that is not a leaf node, the following recursive algorithm is invoked. For all child nodes of the node, a non-recursive algorithm is called respectively to obtain the output result; If the output result indicates that the child node meets the threshold condition, then based on the private key and the authorized ciphertext data, the plaintext data is determined and output; If the output result indicates that the child node does not meet the threshold condition, then the output represents an abnormal value indicating decryption failure.
[0078] Here, after DU obtains the private key SK and the authorized ciphertext data CT', it executes the decryption algorithm Decrypt(CT',SK)→M: x is the node in the tree to be visited, and i is the attribute corresponding to the node. The non-recursive algorithm DecryptNodeL(CT',SK,x) decrypts the leaf nodes, and the recursive algorithm DecryptNodeNL(CT',SK,x) decrypts the non-leaf nodes.
[0079] like Then DecryptNodeL(CT',SK,x) = = ; like Then DecryptNodeNL(CT',SK, x)= .
[0080] When x is a non-leaf node, the recursive algorithm DecryptNodeNL(CT',SK,x) is called: For all child nodes z of x, call the algorithm DecryptNodeL(CT',SK,z) and store its output as... ; let I x is the k of child node z x Any set of sizes (threshold values for non-leaf nodes) such that If the set cannot be found, then the node will not satisfy the function, and the function will return a value. ; Otherwise, perform the following calculations and return the results: where = = = = ; Here, Index(z) is the unique index value of node z as a child node of x.
[0081] During decryption, a function is called on the root node R of T. If the user's attribute set S satisfies the access tree, the following result can be obtained: A = DecryptNodeNL(CT', SK, r) = = The following calculations are then performed to decrypt the code: = / ( / =M.
[0082] The file access method provided in this application decrypts data based on an access tree, ensuring that only users with the corresponding attributes and permissions can decrypt authorized confidential data, thus guaranteeing data security.
[0083] Figure 8 This is a flowchart illustrating the key distribution method provided in this application, as follows: Figure 8 As shown, the method includes the following: S810 generates a public key based on the first authorized certificate; S820: Upon receiving a file encryption request from the first device, the public key is returned to the first device; S830, Receive the identity attribute information of the first device; S840 requests a second authorization certificate from a third server; S850 requests authorization information from the fourth server; S860, Generate a private key based on the identity attribute information, the authorization information, and the second authorization certificate; Upon receiving a private key acquisition request from the second device, S870 returns the private key to the second device; S880 receives a public key retrieval request sent by a third server and returns the public key to the third server.
[0084] It should be noted that the execution entity of the key distribution method provided in this application embodiment is the access key management party. Specifically, it can be an access key management server (AKMS), computer equipment, etc. For ease of understanding, this application embodiment uses AKMS as the execution entity for description.
[0085] Here, the third server is the hosting authorization server CAS.
[0086] To access files stored in DCS, user DU constructs an attribute set S based on their identity information. id Request a key from AKMS.
[0087] Figure 9 This is a schematic diagram of the key distribution process provided in this application, such as... Figure 9 As shown, user DU constructs an identity attribute set S based on identity information. id It then requests a key from AKMS to access the DCS; AKMS queries the access authorization server AAS for the authorization set S of this DU. au AAS queries table 1 to form set S au Return to AKMS; AKMS will S id With S au Take the set to form the complete attribute set S; AKMS queries CAS for the DCS's authorization certificate cert; AKMS executes the following key generation algorithm KeyGen based on S and the second authorization certificate cert': KeyGen(MK,S,cert')→SK: SK = ( , ); Where MK is the master key; SK is the generated private key; and the random number is... For each attribute in set S Choose a random number .
[0088] It should be noted that there are no strict time restrictions on sending the public key to the first device, the private key to the second device, and the public key to the third server.
[0089] The key distribution method provided in this application generates a private key based on identity attribute information, authorization information, and authorization certificate. This ensures that only authorized users can decrypt encrypted data provided by compliant custodians, and that only users with the corresponding permissions can do so. This prevents data custodians from impersonating each other and guarantees the security of data storage and circulation.
[0090] In an optional embodiment, the key allocation method further includes: Receive the new second authorization certificate sent by the third server; Based on the second authorization certificate, the existing private key is updated to obtain a new private key.
[0091] Specifically, for new key requests, the key generation algorithm KeyGen is executed directly using the new authorized certificate; for existing keys, the original private key is updated directly.
[0092] Specifically, RK and cert' new After AKMS is delivered, the following procedures will be performed: For new key requests, use 'cert'. newExecute the KeyGen key generation algorithm; For an existing key, perform the following key generation and update algorithm to update it: KeyGenUp(SK,cert' new →SK new : SK new = ).
[0093] The key distribution method provided in this application embodiment achieves efficient private key updates without decrypting the original data through re-encryption.
[0094] Figure 10 This is a structural diagram of the encrypted access control and managed authentication scheme provided in this application. The following is a combination of... Figure 10 This application describes the overall process of encrypted access control and managed authentication.
[0095] DCS Authorization: DCS joins the Trusted Data Space and applies for service registration with CSA. After reviewing DCS's background and capabilities, CAS sends an authorization certificate to qualified applicants.
[0096] File hosting: The DP encrypts the file and its specified access tree (composed of an identity attribute subtree and a permission subtree) and stores it in the DCS, while synchronizing the authorization information with three rights (data ownership, data usage and processing rights, and data product operation rights) to the AAS. The authorization information specifically includes the permissions corresponding to the DU and the authorization validity period. After receiving the hosted file, DCS further encrypts it using its own authorized certificate while the file is in encrypted form.
[0097] File access: When DU requests access to a file, it first requests a private key from AKMS; AKMS forms a complete DU attribute set based on the user's identity attribute set information and their permission information; AKMS uses the PK and the authorization certificate of the DCS to be accessed to calculate the private key SK for DU; DU downloads the file to the local machine and uses SK to decrypt the file. DU can only decrypt the plaintext information if DU's attribute set matches the file's access policy and DCS is a compliant service provider.
[0098] Key Update: When updating the DCS authorized certificate, or the authorized content, authorization time, or other information of the DU, a re-encryption key RK is constructed to enable the certificate and key to be updated directly based on the ciphertext without decryption.
[0099] The file hosting device provided in the embodiments of this application is described below. The file hosting device described below can be referred to in correspondence with the file hosting method described above.
[0100] Figure 11 This is one of the structural schematic diagrams of the file hosting device provided in this application, such as... Figure 11 As shown, the file hosting device may include, but is not limited to: The public key acquisition module 1110 is used to: send a file encryption request to the first server and obtain the public key returned by the first server; The access tree construction module 1120 is used to: construct an access tree based on plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure; Encryption processing module 1130 is used to: encrypt the plaintext data and the access tree based on the public key to obtain ciphertext data; The encrypted sending module 1140 is used to: send the encrypted data to the second server; The authorization sending module 1150 is used to send the authorization information corresponding to the plaintext data to the fourth server.
[0101] It should be noted that the file hosting device provided in this application embodiment can execute the file hosting method described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.
[0102] The file hosting device provided in the embodiments of this application is described below. The file hosting device described below and the file encryption method described above can be referred to in correspondence.
[0103] Figure 12 This is the second structural schematic diagram of the document hosting device provided in this application, as shown below. Figure 12 As shown, the file hosting device may include, but is not limited to: The encrypted data receiving module 1210 is used to: receive encrypted data sent by the first device; The encrypted data encryption module 1220 is used to: generate authorized encrypted data based on the first authorization certificate and the encrypted data; the first authorization certificate is generated based on a public key; The access request receiving module 1230 is used to: receive a data access request sent by the second device; The encrypted data sending module 1240 is used to: send the authorized encrypted data to the second device based on the data access request.
[0104] It should be noted that the file hosting device provided in this application embodiment can execute the file hosting method described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.
[0105] The authorization certificate generation apparatus provided in the embodiments of this application is described below. The authorization certificate generation apparatus described below and the authorization certificate generation method described above can be referred to in correspondence.
[0106] Figure 13 This is a schematic diagram of the authorization certificate generation device provided in this application, such as... Figure 13 As shown, the file hosting device may include, but is not limited to: The certificate request receiving module 1310 is used to: receive an authorization certificate acquisition request sent by the second server; The public key request module 1320 is used to: send a public key acquisition request to the first server and obtain the public key returned by the first server; Certificate generation module 1330 is used to: generate a first authorization certificate and a second authorization certificate based on a first random number and the public key; The first certificate sending module 1340 is used to: send the first authorization certificate to the second server; The second certificate sending module 1350 is used to send the second authorization certificate to the first server.
[0107] It should be noted that the authorization certificate generation device provided in this application embodiment can execute the authorization certificate generation method described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.
[0108] The file access device provided in the embodiments of this application is described below. The file access device described below can be referred to in correspondence with the file access method described above.
[0109] Figure 14 This is the second schematic diagram of the file access device provided in this application, as shown below. Figure 14 As shown, the file hosting device may include, but is not limited to: The private key acquisition module 1410 is used to: send a private key acquisition request to the first server and obtain the private key returned by the first server; the private key is generated based on the second authorization certificate; The ciphertext acquisition module 1420 is used to: receive authorized ciphertext data returned by the second server; The ciphertext decryption module 1430 is used to: decrypt the authorized ciphertext data based on the private key to obtain plaintext data.
[0110] It should be noted that the file access device provided in this application embodiment can execute the file access method described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.
[0111] The key distribution apparatus provided in the embodiments of this application is described below. The key distribution apparatus described below can be referred to in correspondence with the key distribution method described above.
[0112] Figure 15 This is a schematic diagram of the key distribution device provided in this application, as shown below. Figure 15 As shown, the file hosting device may include, but is not limited to: Public key generation module 1510 is used to: generate a public key based on the first authorized certificate; The first public key sending module 1520 is used to: return the public key to the first device when it receives a file encryption request from the first device; Attribute receiving module 1530 is used to: receive the identity attribute information of the first device; Certificate request module 1540 is used to: request a second authorization certificate from a third server; The authorization acquisition module 1550 is used to: request authorization information from the fourth server; The private key generation module 1560 is used to: generate a private key based on the identity attribute information, the authorization information and the second authorization certificate; The private key sending module 1570 is used to: return the private key to the second device upon receiving a private key acquisition request from the second device; The second public key sending module 1580 is used to: receive a public key acquisition request sent by a third server and return the public key to the third server.
[0113] It should be noted that the key distribution device provided in this application embodiment can execute the key distribution method described in any of the above embodiments during actual operation, and this embodiment will not elaborate on this.
[0114] Figure 16 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 16 As shown, the electronic device may include: a processor 1610, a communications interface 1620, a memory 1630, and a communication bus 1640, wherein the processor 1610, the communications interface 1620, and the memory 1630 communicate with each other via the communication bus 1640. The processor 1610 can call logical instructions in the memory 1630 to execute a file hosting method, which includes: Send a file encryption request to a first server and obtain a public key returned by the first server; construct an access tree based on the plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure; encrypt the plaintext data and the access tree based on the public key to obtain ciphertext data; send the ciphertext data to a second server; send the authorization information corresponding to the plaintext data to a fourth server; or execute a file hosting method, which includes: The method includes: receiving encrypted data sent by a first device; generating authorized encrypted data based on a first authorization certificate and the encrypted data; wherein the first authorization certificate is generated based on a public key; receiving a data access request sent by a second device; and sending the authorized encrypted data to the second device based on the data access request; or executing an authorization certificate generation method, the method comprising: The method includes: receiving an authorization certificate retrieval request from a second server; sending a public key retrieval request to a first server and obtaining the public key returned by the first server; generating a first authorization certificate and a second authorization certificate based on a first random number and the public key; sending the first authorization certificate to the second server; sending the second authorization certificate to the first server; or executing a file access method, the method comprising: Send a private key acquisition request to a first server and obtain a private key returned by the first server; the private key is generated based on a second authorization certificate; receive authorized ciphertext data returned by the second server; decrypt the authorized ciphertext data based on the private key to obtain plaintext data; or execute a key distribution method, the method including: Generate a public key based on the first authorization certificate; upon receiving a file encryption request from the first device, return the public key to the first device; receive the identity attribute information of the first device; request a second authorization certificate from the third server; request authorization information from the fourth server; generate a private key based on the identity attribute information, the authorization information, and the second authorization certificate; upon receiving a private key retrieval request from the second device, return the private key to the second device; receive a public key retrieval request from the third server and return the public key to the third server.
[0115] Furthermore, the logical instructions in the aforementioned memory 1630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0116] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the video ringback tone interaction method provided by the above methods, the method including: Send a file encryption request to a first server and obtain a public key returned by the first server; construct an access tree based on the plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure; encrypt the plaintext data and the access tree based on the public key to obtain ciphertext data; send the ciphertext data to a second server; send the authorization information corresponding to the plaintext data to a fourth server; or execute a file hosting method, which includes: The method includes: receiving encrypted data sent by a first device; generating authorized encrypted data based on a first authorization certificate and the encrypted data; wherein the first authorization certificate is generated based on a public key; receiving a data access request sent by a second device; and sending the authorized encrypted data to the second device based on the data access request; or executing an authorization certificate generation method, the method comprising: The method includes: receiving an authorization certificate retrieval request from a second server; sending a public key retrieval request to a first server and obtaining the public key returned by the first server; generating a first authorization certificate and a second authorization certificate based on a first random number and the public key; sending the first authorization certificate to the second server; sending the second authorization certificate to the first server; or executing a file access method, the method comprising: Send a private key acquisition request to a first server and obtain a private key returned by the first server; the private key is generated based on a second authorization certificate; receive authorized ciphertext data returned by the second server; decrypt the authorized ciphertext data based on the private key to obtain plaintext data; or execute a key distribution method, the method including: Generate a public key based on the first authorization certificate; upon receiving a file encryption request from the first device, return the public key to the first device; receive the identity attribute information of the first device; request a second authorization certificate from the third server; request authorization information from the fourth server; generate a private key based on the identity attribute information, the authorization information, and the second authorization certificate; upon receiving a private key retrieval request from the second device, return the private key to the second device; receive a public key retrieval request from the third server and return the public key to the third server.
[0117] Furthermore, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the video ringback tone interaction methods provided by the methods described above, the method comprising: Send a file encryption request to a first server and obtain a public key returned by the first server; construct an access tree based on the plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure; encrypt the plaintext data and the access tree based on the public key to obtain ciphertext data; send the ciphertext data to a second server; send the authorization information corresponding to the plaintext data to a fourth server; or execute a file hosting method, which includes: The method includes: receiving encrypted data sent by a first device; generating authorized encrypted data based on a first authorization certificate and the encrypted data; wherein the first authorization certificate is generated based on a public key; receiving a data access request sent by a second device; and sending the authorized encrypted data to the second device based on the data access request; or executing an authorization certificate generation method, the method comprising: The method includes: receiving an authorization certificate retrieval request from a second server; sending a public key retrieval request to a first server and obtaining the public key returned by the first server; generating a first authorization certificate and a second authorization certificate based on a first random number and the public key; sending the first authorization certificate to the second server; sending the second authorization certificate to the first server; or executing a file access method, the method comprising: Send a private key acquisition request to a first server and obtain a private key returned by the first server; the private key is generated based on a second authorization certificate; receive authorized ciphertext data returned by the second server; decrypt the authorized ciphertext data based on the private key to obtain plaintext data; or execute a key distribution method, the method including: Generate a public key based on the first authorization certificate; upon receiving a file encryption request from the first device, return the public key to the first device; receive the identity attribute information of the first device; request a second authorization certificate from the third server; request authorization information from the fourth server; generate a private key based on the identity attribute information, the authorization information, and the second authorization certificate; upon receiving a private key retrieval request from the second device, return the private key to the second device; receive a public key retrieval request from the third server and return the public key to the third server.
[0118] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A file hosting method, characterized in that, Applied to the first device, including: Send a file encryption request to the first server and receive the public key returned by the first server; An access tree is constructed based on plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure. Based on the public key, the plaintext data and the access tree are encrypted to obtain ciphertext data; The encrypted data is sent to the second server; The authorization information corresponding to the plaintext data is sent to the fourth server.
2. The file hosting method according to claim 1, characterized in that, The access tree includes an identity attribute subtree and an access permission attribute subtree; the identity attribute subtree and the access permission attribute subtree are connected by a root node, and the root node reflects the number of child nodes that need to be satisfied to access the plaintext data; The identity attribute subtree is used to store identity attribute information that has access rights to the plaintext data; The permission attribute subtree is used to store various access permissions for the plaintext data.
3. The file hosting method according to claim 2, characterized in that, The identity attribute subtree is constructed with identity attributes as leaf nodes and threshold values as non-leaf nodes; the threshold value reflects the number of child nodes that must be satisfied to access the plaintext data.
4. The file hosting method according to claim 2, characterized in that, The leaf nodes of the permission attribute subtree include data ownership rights, the authorization time of data ownership rights, data usage and processing rights, the authorization time of data usage and processing rights, data product operation rights, and the authorization time of data product operation rights.
5. A file hosting method, characterized in that, Applied to the second server, including: Receive encrypted data sent by the first device; Authorized ciphertext data is generated based on the first authorization certificate and the ciphertext data; the first authorization certificate is generated based on a public key. Receive data access requests sent by the second device; Based on the data access request, the authorized encrypted data is sent to the second device.
6. The file hosting method according to claim 5, characterized in that, The file hosting method also includes: Receive the re-encryption key and the new first authorization certificate sent by the third server; Based on the re-encryption key, the existing authorized ciphertext data is updated to obtain new authorized ciphertext data.
7. A method for generating an authorization certificate, characterized in that, Applications to third-party servers include: Receive the authorization certificate acquisition request sent by the second server; Send a public key retrieval request to the first server and obtain the public key returned by the first server; Based on the first random number and the public key, generate a first authorization certificate and a second authorization certificate; Send the first authorization certificate to the second server; Send the second authorization certificate to the first server.
8. The method for generating an authorization certificate according to claim 7, characterized in that, The authorization certificate generation method further includes: Generate a second random number; Based on the first random number and the second random number, determine the re-encryption key; Based on the re-encryption key, the first authorization certificate and the second authorization certificate are updated respectively, resulting in a new first authorization certificate and a new second authorization certificate; Send the new first authorization certificate to the second server; Send the new second authorization certificate to the first server.
9. A file access method, characterized in that, Applied to a second device, including: A private key retrieval request is sent to the first server, and the private key returned by the first server is obtained; the private key is generated based on the second authorization certificate. Receive the authorized encrypted data returned by the second server; Based on the private key, the authorized ciphertext data is decrypted to obtain plaintext data.
10. The file access method according to claim 9, characterized in that, The step of decrypting the authorized ciphertext data based on the private key to obtain plaintext data includes: For any node in the tree that is not a leaf node, the following recursive algorithm is invoked. For all child nodes of the node, a non-recursive algorithm is called respectively to obtain the output result; If the output result indicates that the child node meets the threshold condition, then based on the private key and the authorized ciphertext data, the plaintext data is determined and output; If the output result indicates that the child node does not meet the threshold condition, then the output represents an abnormal value indicating decryption failure.
11. A key distribution method, characterized in that, Applied to the first server, including: Generate a public key based on the first authorized certificate; Upon receiving a file encryption request from the first device, the public key is returned to the first device; Receive the identity attribute information of the first device; Request a second authorization certificate from a third server; Request authorization information from the fourth server; Based on the identity attribute information, the authorization information, and the second authorization certificate, a private key is generated; Upon receiving a private key retrieval request from the second device, the private key is returned to the second device; Receive a public key retrieval request sent by a third server and return the public key to the third server.
12. The key distribution method according to claim 11, characterized in that, The key distribution method further includes: Receive the new second authorization certificate sent by the third server; Based on the second authorization certificate, the existing private key is updated to obtain a new private key.
13. A file hosting device, characterized in that, include: The public key acquisition module is used to: send a file encryption request to the first server and obtain the public key returned by the first server; An access tree construction module is used to: construct an access tree based on plaintext data; the access tree stores the access control policy of the plaintext data in a tree structure; An encryption processing module is used to: encrypt the plaintext data and the access tree based on the public key to obtain ciphertext data; The encrypted data sending module is used to: send the encrypted data to the second server; The authorization sending module is used to send the authorization information corresponding to the plaintext data to the fourth server.
14. A file hosting device, characterized in that, include: The encrypted data receiving module is used to: receive encrypted data sent by the first device; The encrypted data encryption module is used to: generate authorized encrypted data based on the first authorization certificate and the encrypted data; The first authorization certificate was generated based on a public key; The access request receiving module is used to: receive data access requests sent by the second device; The encrypted data sending module is used to: send the authorized encrypted data to the second device based on the data access request.
15. An authorization certificate generation device, characterized in that, include: The certificate request receiving module is used to: receive authorization certificate acquisition requests sent by the second server; The public key request module is used to: send a public key retrieval request to the first server and obtain the public key returned by the first server; The certificate generation module is used to: generate a first authorization certificate and a second authorization certificate based on a first random number and the public key; The first certificate sending module is used to: send the first authorization certificate to the second server; The second certificate sending module is used to send the second authorization certificate to the first server.
16. A file access device, characterized in that, include: The private key acquisition module is used to: send a private key acquisition request to the first server and obtain the private key returned by the first server; The private key was generated based on the second authorization certificate; The ciphertext acquisition module is used to: receive authorized ciphertext data returned by the second server; The ciphertext decryption module is used to: decrypt the authorized ciphertext data based on the private key to obtain plaintext data.
17. A key distribution device, characterized in that, include: The public key generation module is used to: generate a public key based on the first authorized certificate; The first public key sending module is used to: return the public key to the first device when it receives a file encryption request from the first device; The attribute receiving module is used to: receive the identity attribute information of the first device; The certificate request module is used to request a second authorization certificate from a third server. The authorization acquisition module is used to request authorization information from the fourth server. The private key generation module is used to: generate a private key based on the identity attribute information, the authorization information, and the second authorization certificate; The private key sending module is used to: return the private key to the second device upon receiving a private key acquisition request from the second device; The second public key sending module is used to: receive a public key acquisition request sent by a third server and return the public key to the third server.
18. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the file hosting method as described in any one of claims 1-6, or the authorization certificate generation method as described in any one of claims 7-8, or the file access method as described in any one of claims 9-10, or the key distribution method as described in any one of claims 11-12.
19. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the file hosting method as described in any one of claims 1-6, or the authorization certificate generation method as described in any one of claims 7-8, or the file access method as described in any one of claims 9-10, or the key distribution method as described in any one of claims 11-12.
20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the file hosting method as described in any one of claims 1-6, or the authorization certificate generation method as described in any one of claims 7-8, or the file access method as described in any one of claims 9-10, or the key distribution method as described in any one of claims 11-12.