Data sharing method, device and system
By employing double-layer encryption and digital signatures to encrypt shared data and data protocols, the security and integrity issues in the data sharing process are resolved, achieving secure data protection and efficient processing.
Patent Information
- Application Number
- PCT/CN2024/139961
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-30
- Filing Date
- 2024-12-17
- Publication Date
- 2025-11-06
AI Technical Summary
How can we ensure the security, confidentiality, and integrity of data during the data sharing process, and prevent data from being forged, tampered with, or leaked, especially in a data sharing environment involving multiple parties?
The shared data and data protocol are protected by double encryption through trusted devices, and digital signature technology is used to sign the encrypted structure data and retrieval metadata as a whole, ensuring the authenticity and integrity of the data during circulation and sharing. At the same time, data interaction is carried out between trusted devices and sharing agents through a secure transmission channel.
It achieves security protection for shared data and data protocols during the circulation process, prevents data from being forged, tampered with and leaked, reduces waste of processing resources, improves data processing efficiency, and supports the verification and scope control of data usage permissions.
Smart Images

Figure CN2024139961_06112025_PF_FP_ABST
Abstract
Description
Data sharing method, device and system
[0001] The present application claims priority from the Chinese patent application No. 202410547118.X entitled "Data sharing method, device and system" and filed on April 30, 2024, the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the technical field of computer, in particular to a data sharing method, device and system. BACKGROUND
[0003] With the rapid development of computer technology, data has become an important strategic resource and production factor in today's society, and circulation and sharing is the key to realizing the value of data. However, how to ensure the security of data in the process of circulation and sharing is the bottleneck of data sharing at present. SUMMARY
[0004] The present application provides a data sharing method, device and system.
[0005] In a first aspect, a data sharing method is provided. A trusted device obtains ciphertext structure data, which is obtained by encrypting sharing data and data specification corresponding to the sharing data using at least one encryption key. The trusted device signs the ciphertext structure data and retrieval metadata corresponding to the sharing data using a signature private key to obtain an encapsulated signature. The trusted device sends the encapsulated signature to a sharing agent through a first secure transmission channel, so that the sharing agent stores the encapsulated signature, a signature public key certificate and a decryption key corresponding thereto, the signature public key certificate including a signature public key corresponding to the signature private key, and the decryption key being used at least for decrypting the data specification in the ciphertext structure data. The trusted device encapsulates the ciphertext structure data, the retrieval metadata, the encapsulated signature and the signature public key certificate to obtain encapsulated data, and the encapsulated data is used for circulation and sharing.
[0006] The application encrypts the shared data and the data contract set by the data owner, performs digital signature on the whole of the ciphertext structure data and the retrieval metadata, and binds and encapsulates the signature and the signature public key certificate on the ciphertext structure data and the retrieval metadata, so that the encapsulated data can verify the authenticity of the data in the circulation and sharing process, and realize the confidentiality and integrity protection of the shared data and the data contract in the circulation and sharing process. In addition, since the encapsulated data is generated by a trusted device trusted by the data owner, the sharing agent is trusted by multiple participants participating in data sharing, and the trusted device and the sharing agent transmit data through a secure transmission channel, the security, confidentiality and integrity of the shared data and the data contract in the export process are realized. Therefore, the application can realize the security protection of the shared data and the data contract in the export process and the circulation process, prevent the data from being forged, tampered and leaked.
[0007] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key. The ciphertext structure data includes first ciphertext and second ciphertext. The first ciphertext is obtained by encrypting the shared data using the data encryption key. The second ciphertext is obtained by encrypting the encapsulation information using the encapsulation encryption key, and the encapsulation information includes the data contract and a data decryption key corresponding to the data encryption key.
[0008] In the application, the shared data and the data contract corresponding to the shared data are bound and protected by double-layer encryption. Therefore, when a data usage request is processed, the data contract can be decrypted using the encapsulation decryption key corresponding to the encapsulation encryption key first, and it is determined whether the data user has data usage permission based on the data contract. After it is determined that the data user has data usage permission, the shared data is decrypted using the data decryption key, otherwise, the shared data does not need to be decrypted. Since the data volume of the shared data is usually large, the processing resources consumed for decrypting the shared data are more, which can greatly reduce the waste of processing resources and improve the data processing efficiency.
[0009] Optionally, the encapsulation information further includes a password derivation value of the data password.
[0010] Optionally, the implementation of the trusted device obtaining the ciphertext structure data includes: the trusted device obtains the shared data, the retrieval metadata and the data contract; and the trusted device encrypts the shared data and the data contract using the at least one encryption key to obtain the ciphertext structure data.
[0011] Optionally, the signature public key certificate further includes identity information of the data owner of the shared data. That is, the signature public key certificate belongs to the data owner of the shared data.
[0012] Optionally, the trusted device and the data owner of the shared data are different devices. The trusted device sends a data verification request to the data owner through the second secure transmission channel, the data verification request being used to request confirmation that the shared data, the retrieval metadata and the data schema are from the data owner. The trusted device receives a data verification response sent by the data owner through the second secure transmission channel, the data verification response being used to indicate that the shared data, the retrieval metadata and the data schema are from the data owner.
[0013] Since the working environment of the trusted device and the sharing agent is secure and trusted, and the data interaction between the trusted device and the sharing agent is through a secure transmission channel, the entire certificate issuing process is safe and controllable for the data owner.
[0014] In a first possible implementation, the trusted device sends a certificate application request to the sharing agent through the first secure transmission channel, the certificate application request including the identity information of the data owner. The trusted device receives a certificate application response sent by the sharing agent through the first secure transmission channel, the certificate application response including the signature public key certificate and the signature private key, the signature public key certificate further including the signature of the sharing agent on the signature public key and the identity information of the data owner.
[0015] Since the working environment of the trusted device and the sharing agent is secure and trusted, and the data interaction between the trusted device and the sharing agent is through a secure transmission channel, the entire certificate issuing process is safe and controllable for the data owner.
[0016] Optionally, in combination with the first possible implementation described above, the certificate application response further includes the at least one encryption key.
[0017] Optionally, in combination with the first possible implementation described above, the trusted device and the data owner of the shared data are different devices, and the trusted device sends the signature public key certificate and the signature private key to the data owner through the second secure transmission channel.
[0018] In a second possible implementation, the trusted device and the data owner of the shared data are different devices. The trusted device receives at least one encryption key, a decryption key, a signature private key and a signature public key sent by the data owner through the second secure transmission channel. The trusted device sends a certificate application request to the sharing agent through the first secure transmission channel, the certificate application request including the decryption key and the signature public key. The trusted device receives a certificate application response sent by the sharing agent through the first secure transmission channel, the certificate application response including the signature public key certificate. The trusted device sends the signature public key certificate to the data owner through the second secure transmission channel.
[0019] Since the working environment of the trusted device and the sharing agent is secure and trusted, and the trusted device and the sharing agent and the trusted device and the data owner respectively interact with each other through a secure transmission channel, the entire certificate issuing process is safe and controllable for the data owner.
[0020] In a third possible implementation, the trusted device and the data owner of the shared data are the same device. The trusted device sends a certificate application request to the sharing agent through the first secure transmission channel, and the certificate application request includes the decryption key and the signature public key. The trusted device receives the certificate application response sent by the sharing agent through the first secure transmission channel, and the certificate application response includes the signature public key certificate.
[0021] Since the working environment of the trusted device and the sharing agent is secure and trusted, and the trusted device and the sharing agent and the trusted device and the data owner respectively interact with each other through a secure transmission channel, the entire certificate issuing process is safe and controllable for the data owner.
[0022] Optionally, the trusted device and the data owner of the shared data are the same device. The trusted device sends a data invalidation request to the sharing agent, and the data invalidation request includes the signature public key certificate, and the data invalidation request is used to request invalidation of the encapsulated data.
[0023] The present application supports the data owner to delete the shared data after the shared data starts to circulate, and provides technical support for the right to delete or the right to be forgotten of personal information or data.
[0024] Optionally, the data invalidation request includes an indication of an invalidation time, and the data invalidation request is used to request invalidation of the encapsulated data within the invalidation time.
[0025] Optionally, the circulation path of the encapsulated data includes one or more of the following: public network download, fixed-point download, end-to-end transmission, and hardware medium transmission.
[0026] Optionally, the sharing agent is trusted by multiple participants participating in data sharing.
[0027] In a second aspect, a data sharing method is provided. A trusted device obtains a first data usage request and first encapsulated data matched with the first data usage request, the first encapsulated data comprising first ciphertext structure data, first search metadata, a first encapsulation signature, and a first signature public key certificate, the first ciphertext structure data being obtained by encrypting shared data and a first data schema corresponding to the shared data using at least one encryption key, the first signature public key certificate comprising a first signature public key, the first data usage request comprising first data description information and first usage attribute information, wherein the first encapsulated data is matched with the first data usage request, including that, for a same description object, the description object in the first data description information is a subset of the description object in the first search metadata. The trusted device verifies the first encapsulation signature based on the first ciphertext structure data and the first search metadata using the first signature public key. After the verification of the first encapsulation signature is successful, the trusted device sends a key acquisition request to a sharing agent, the key acquisition request comprising the first encapsulation signature. The trusted device receives a key acquisition response sent by the sharing agent through a first secure transmission channel, the key acquisition response comprising a first decryption key corresponding to the first encapsulation signature. The trusted device decrypts the first ciphertext structure data using the first decryption key to obtain at least the first data schema. The trusted device executes the first data usage request according to a matching result of the first usage attribute information and the first data schema, and sends a data processing result corresponding to the first data usage request to a first data user initiating the first data usage request through a second secure transmission channel.
[0028] In the present application, before a data user uses shared data, the sharing agent verifies whether a data processor is trustworthy, and provides a decryption key to the data processor after determining that the data processor is trustworthy; the data processor respectively performs signature verification, data decryption, schema analysis, and attribute extraction, and processes and returns a data processing result to the data user according to a matching result of the attribute extraction content and an attribute range in the data schema. The present application protects the verifiability of attributes matched with the data schema, and prevents attribute impersonation of the user and the processor. In addition, the data owner can set the data schema to make the shared data only be used by data users within a specified range and be processed by specified data processors, and only obtain processing results within the specified range, so as to realize data access control beyond the physical control range of the data owner, and protect the data security of the processing process and the verifiability of the users and processing environments involved in the processing process.
[0029] Optionally, the at least one encryption key includes a data encryption key and a package encryption key, and the first decryption key is a package decryption key corresponding to the package encryption key. The first ciphertext structure data includes a first ciphertext and a second ciphertext. The first ciphertext is obtained by encrypting the shared data using the data encryption key. The second ciphertext is obtained by encrypting package information using the package encryption key, and the package information includes the first data specification and a data decryption key corresponding to the data encryption key. The implementation of the trusted device decrypting the first ciphertext structure data to obtain at least the first data specification includes: the trusted device decrypting the second ciphertext using the package decryption key to obtain the package information. The trusted device can also decrypt the first ciphertext using the data decryption key to obtain the shared data.
[0030] Optionally, the package information further includes a password derivation value of the data password. The trusted device performs identity authentication on the first data user according to the data password locally input by the first data user through a password-based authentication key exchange protocol, and negotiates a session key with the first data user to establish a second secure transmission channel.
[0031] In the present application, only users who have the data password can pass the identity authentication and establish a secure transmission channel with the trusted device. The data password implementation scheme limits the scope of data users and can reduce the risk of data being obtained by attackers.
[0032] Optionally, for the same data user, if the number of consecutive failures of identity authentication on the data user according to the data password locally input by the data user reaches a first number threshold, the trusted device stops responding to data use requests from the data user within a target time length.
[0033] Optionally, the implementation of the trusted device obtaining the first data use request includes: the trusted device receiving the first data use request sent by the data controller. For a plurality of data users accessing the data controller, if the number of consecutive failures of identity authentication on the plurality of data users according to the data passwords locally input by the plurality of data users respectively reaches a second number threshold, the trusted device marks the package data requested to be used by the plurality of data users as invalid.
[0034] Optionally, the first data specification includes a legitimate user attribute, and the first use attribute information includes a user attribute of the first data user. The implementation of the trusted device executing the first data use request according to the matching result of the first use attribute information and the first data specification includes: if the user attribute of the first data user belongs to the legitimate user attribute, the trusted device executes the first data use request.
[0035] Optionally, the first data protocol further comprises an access data range corresponding to the legitimate user, and the first usage attribute information further comprises a requested data range. If the user attribute of the first data user is subordinate to the legitimate user attribute, the trusted device executes the first data usage request in the following manner: if the user attribute of the first data user is subordinate to the legitimate user attribute, and the requested data range belongs to the access data range corresponding to the first data user, the trusted device executes the first data usage request.
[0036] Optionally, the first data protocol comprises an allowed operation type for the shared data, and the first usage attribute information comprises a data operation type. The trusted device executes the first data usage request in the following manner according to the matching result of the first usage attribute information and the first data protocol: if the data operation type belongs to the allowed operation type, the trusted device executes the first data usage request.
[0037] Optionally, after obtaining the first data protocol, the trusted device verifies that the first data usage request is from the first data user. In the case that the attribute source comprises the data usage request, since the data controller is not a fully trusted device, the authenticity of the data usage request is ensured by verifying that the data usage request is from the data user and has not been tampered with, thereby improving the security and reliability of data processing.
[0038] Optionally, the first data protocol comprises a legitimate handler attribute, and after obtaining the first data protocol, the trusted device determines that the trusted device belongs to a legitimate handler device defined by the legitimate handler attribute.
[0039] Optionally, the first data protocol comprises a data usage change attribute, which has the characteristic of changing as the shared data is used, and the shared agent records the data usage change attribute. The trusted device executes the first data usage request in the following manner according to the matching result of the first usage attribute information and the first data protocol: the trusted device acquires the data usage change attribute recorded in the shared agent, and executes the first data usage request according to the matching result of the first usage attribute information and the data usage change attribute recorded in the shared agent.
[0040] Optionally, the data usage change attribute comprises a number of times of data usage.
[0041] Optionally, the trusted device splits the shared data to obtain a plurality of data shards after decrypting the ciphertext structure data to obtain the shared data; and the trusted device performs a trusted derivation process on a single data shard. The trusted derivation process includes: encrypting the data shard and second data specification corresponding to the data shard to obtain second ciphertext structure data; signing the second ciphertext structure data and second search metadata corresponding to the data shard by using a second signature private key to obtain a second encapsulation signature; sending the second encapsulation signature to the sharing agent through the first secure transmission channel, so that the sharing agent stores the second encapsulation signature, a second signature public key certificate and a second decryption key corresponding to the second encapsulation signature, the second signature public key certificate including a second signature public key corresponding to the second signature private key, and the second decryption key being used at least for decrypting the second data specification in the second ciphertext structure data; and encapsulating the second ciphertext structure data, the second search metadata, the second encapsulation signature and the second signature public key certificate to obtain second encapsulation data, the second encapsulation data being used for circulation sharing.
[0042] The application can conditionally realize updating, splitting and re-encapsulating of the shared data and / or the data specification thereof within the scope allowed by the data owner, and expands the processing purposes of the shared data. When the data user is the data owner himself, the application provides technical support for correction and supplement of personal information or data.
[0043] Optionally, the trusted device stores the first decryption key and the first encapsulation signature correspondingly after decrypting the first ciphertext structure data to obtain the first data specification and the shared data.
[0044] Optionally, the implementation manner in which the trusted device stores the first decryption key and the first encapsulation signature correspondingly includes that the trusted device binds the first decryption key and the first encapsulation signature in cache. In this implementation manner, the trusted device can realize offline processing only when it is not powered off.
[0045] Optionally, the implementation manner in which the trusted device stores the first decryption key and the first encapsulation signature correspondingly includes that the trusted device generates a derived key based on a trusted root key of the trusted device by using a key derivation function, encrypts the first decryption key by using the derived key to obtain decryption key ciphertext, and persistently binds and stores the decryption key ciphertext and the first encapsulation signature. In this implementation manner, the trusted device can realize offline processing when it is powered off and then powered on.
[0046] Optionally, the trusted device stores a first signature public key certificate corresponding to an issuing authority public key, and after the trusted device decrypts the first ciphertext structure data to obtain the first data specification and the shared data, the trusted device obtains a second data use request and first encapsulation data matched with the second data use request, the second data use request including second data description information and second use attribute information, wherein the first encapsulation data is matched with the second data use request, including: for the same description object, the description object in the second data description information is a subset of the description object in the first search metadata; the trusted device checks the authenticity of the first signature public key certificate in the first encapsulation data using the issuing authority public key; after the authenticity of the first signature public key certificate is verified, the trusted device verifies the first encapsulation signature in the first encapsulation data using the first signature public key in the first signature public key certificate based on the first ciphertext structure data and the first search metadata in the first encapsulation data; after the first encapsulation signature is verified successfully, the trusted device decrypts the first ciphertext structure data using the stored first decryption key to obtain at least the first data specification; and the trusted device executes the second data use request according to the matching result of the second use attribute information and the first data specification, and sends a data processing result corresponding to the second data use request to a second data user initiating the second data use request through a third secure transmission channel.
[0047] The application can conditionally implement offline processing (without connecting to the sharing agent), get rid of the continuous dependence on the sharing agent and the limitation that the data processor needs to be continuously connected to the sharing agent, and expand the processing scenarios of shared data.
[0048] Optionally, the first data specification includes a data use change attribute, the data use change attribute having the characteristic of changing with the use of the shared data, and the trusted device records the data use change attribute. The implementation manner of the trusted device executing the second data use request according to the matching result of the second use attribute information and the first data specification includes: the trusted device executes the second data use request according to the matching result of the second use attribute information and the data use change attribute recorded in the trusted device.
[0049] Optionally, the sharing agent is trusted by a plurality of participants participating in data sharing.
[0050] Optionally, the trusted device and the sharing agent trust each other, the trusted device performs bidirectional identity authentication with the sharing agent through a first secure transmission channel, and performs static code integrity verification on an operator in the trusted device, the operator being used to execute a data sharing process corresponding to the trusted device.
[0051] In a third aspect, a data sharing method is provided. A sharing agent receives, through a first secure transmission channel, an encapsulation signature sent by a first trusted device, the encapsulation signature being obtained by signing, using a signature private key, search metadata corresponding to shared data and ciphertext structure data obtained by encrypting, using at least one encryption key, the shared data and data specification corresponding to the shared data. The sharing agent stores the encapsulation signature, a signature public key certificate including a signature public key corresponding to the signature private key, and a decryption key used at least for decrypting the data specification in the ciphertext structure data, in correspondence.
[0052] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key. The ciphertext structure data includes first ciphertext and second ciphertext. The first ciphertext is obtained by encrypting the shared data using the data encryption key. The second ciphertext is obtained by encrypting encapsulation information using the encapsulation encryption key, the encapsulation information including the data specification and a data decryption key corresponding to the data encryption key.
[0053] Optionally, before receiving, through the first secure transmission channel, the encapsulation signature sent by the first trusted device, the sharing agent receives, through the first secure transmission channel, a certificate application request sent by the first trusted device, the certificate application request including identity information of a data owner. The sharing agent generates the signature public key certificate and the signature private key according to the certificate application request, and stores the signature public key certificate, the signature public key certificate further including the identity information of the data owner and a signature of the sharing agent on the signature public key and the identity information of the data owner. The sharing agent sends, through the first secure transmission channel, a certificate application response to the first trusted device, the certificate application response including the signature public key certificate and the signature private key.
[0054] Optionally, the sharing agent generates the at least one encryption key and the decryption key, and stores the decryption key, the certificate application response further including the at least one encryption key.
[0055] Optionally, before receiving, through the first secure transmission channel, the encapsulation signature sent by the first trusted device, the sharing agent receives, through the first secure transmission channel, a certificate application request sent by the first trusted device, the certificate application request including the signature public key and the decryption key. The sharing agent generates the signature public key certificate according to the certificate application request, and stores the signature public key certificate and the decryption key in correspondence, the signature public key certificate further including a signature of the sharing agent on the signature public key. The sharing agent sends, through the first secure transmission channel, a certificate application response to the first trusted device, the certificate application response including the signature public key certificate.
[0056] Optionally, after corresponding storage encapsulation signature, signature public key certificate and decryption key, the sharing agent receives a data invalidation request sent by a data owner of the shared data, the data invalidation request includes the signature public key certificate, and the data invalidation request is used to request to invalidate the encapsulation data. The sharing agent authenticates the identity of the data owner. If the authentication of the identity of the data owner succeeds, the sharing agent invalidates at least one of the signature public key certificate, the decryption key or the encapsulation signature according to the data invalidation request.
[0057] Optionally, the data invalidation request includes an indication of an invalidation time, and the implementation of the sharing agent deleting the encapsulation data or invalidating at least one of the signature public key certificate, the decryption key or the encapsulation signature according to the data invalidation request includes: the sharing agent invalidates at least one of the signature public key certificate, the decryption key or the encapsulation signature within the invalidation time according to the data invalidation request.
[0058] Optionally, the sharing agent receives a key acquisition request sent by a second trusted device, the key acquisition request includes the encapsulation signature. The sharing agent verifies whether the second trusted device is trusted. After determining that the second trusted device is trusted, the sharing agent sends a key acquisition response to the second trusted device through a second secure transmission channel, and the key acquisition response includes the decryption key corresponding to the encapsulation signature.
[0059] Optionally, the sharing agent is a trusted third party, and the implementation of the sharing agent verifying whether the second trusted device is trusted includes: initiating remote attestation to the second trusted device to perform code integrity verification on an operator in the second trusted device, the operator being used to execute a data sharing process corresponding to the second trusted device.
[0060] Optionally, after sending the key acquisition response to the second trusted device through the second secure transmission channel, the sharing agent performs run-time measurement on the operator in the second trusted device.
[0061] Optionally, the sharing agent and the second trusted device are mutually trusted, and the implementation of the sharing agent verifying whether the second trusted device is trusted includes: the sharing agent authenticates the identity of the second trusted device and determines that the second trusted device completes static code integrity verification on an operator, the operator being used to execute a data sharing process corresponding to the second trusted device.
[0062] In a fourth aspect, a trusted device is provided, and the trusted device includes a plurality of functional modules that interact with each other to implement the data sharing method provided in the first aspect or any optional manner of the first aspect. The plurality of functional modules can be implemented based on software, hardware or a combination of software and hardware, and the plurality of functional modules can be combined or divided in any manner based on specific implementation.
[0063] For example, the trusted device includes, but is not limited to, an acquisition module, a signature module, a transceiver module, and an encapsulation module.
[0064] The acquisition module is configured to acquire ciphertext structure data, the ciphertext structure data being obtained by encrypting shared data and data specification corresponding to the shared data by using at least one encryption key. The signature module is configured to sign the ciphertext structure data and search metadata corresponding to the shared data by using a signature private key to obtain an encapsulation signature. The transceiver module is configured to send the encapsulation signature to a sharing agent through a first secure transmission channel, so that the sharing agent stores the encapsation signature, a signature public key certificate, and a decryption key corresponding thereto, the signature public key certificate including a signature public key corresponding to the signature private key, and the decryption key being used at least for decryption of the data specification in the ciphertext structure data. The encapsulation module is configured to encapsulate the ciphertext structure data, the search metadata, the encapsulation signature, and the signature public key certificate to obtain encapsulation data, the encapsulation data being used for circulation sharing.
[0065] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, the decryption key being an encapsulation decryption key corresponding to the encapsulation encryption key; the ciphertext structure data includes first ciphertext and second ciphertext, the first ciphertext being obtained by encrypting the shared data by using the data encryption key, and the second ciphertext being obtained by encrypting encapsulation information by using the encapsulation encryption key, the encapsulation information including the data specification and a data decryption key corresponding to the data encryption key.
[0066] Optionally, the encapsulation information further includes a password derivation value of a data password.
[0067] Optionally, the acquisition module is configured to acquire the shared data, the search metadata, and the data specification; and encrypt the shared data and the data specification by using the at least one encryption key to obtain the ciphertext structure data.
[0068] Optionally, the signature public key certificate further includes identity information of a data owner of the shared data.
[0069] Optionally, the trusted device and a data owner of the shared data are different devices. The transceiver module is further configured to send a data verification request to the data owner through a second secure transmission channel, the data verification request being used for requesting confirmation of whether the shared data, the search metadata, and the data specification come from the data owner; and receive a data verification response sent by the data owner through the second secure transmission channel, the data verification response being used for indicating that the shared data, the search metadata, and the data specification come from the data owner.
[0070] Optionally, the transceiver module is further configured to: send, to the sharing agent, a certificate application request through the first secure transmission channel, the certificate application request comprising the identity information of the data owner; and receive, from the sharing agent, a certificate application response through the first secure transmission channel, the certificate application response comprising the signature public key certificate and the signature private key, the signature public key certificate further comprising a signature of the sharing agent on the signature public key and the identity information of the data owner.
[0071] Optionally, the certificate application response further comprises the at least one encryption key.
[0072] Optionally, the trusted device and the data owner of the shared data are different devices, and the transceiver module is further configured to: send, to the data owner, the signature public key certificate and the signature private key through the second secure transmission channel.
[0073] Optionally, the trusted device and the data owner of the shared data are different devices, and the transceiver module is further configured to: receive, from the data owner, the at least one encryption key, the decryption key, the signature private key and the signature public key through the second secure transmission channel; send, to the sharing agent, a certificate application request through the first secure transmission channel, the certificate application request comprising the decryption key and the signature public key; receive, from the sharing agent, a certificate application response through the first secure transmission channel, the certificate application response comprising the signature public key certificate; and send, to the data owner, the signature public key certificate through the second secure transmission channel.
[0074] Optionally, the trusted device and the data owner of the shared data are the same device, and the transceiver module is further configured to: send, to the sharing agent, a certificate application request through the first secure transmission channel, the certificate application request comprising the decryption key and the signature public key; and receive, from the sharing agent, a certificate application response through the first secure transmission channel, the certificate application response comprising the signature public key certificate.
[0075] Optionally, the trusted device and the data owner of the shared data are the same device, and the transceiver module is further configured to: send, to the sharing agent, a data invalidation request, the data invalidation request comprising the signature public key certificate, the data invalidation request being used to request invalidation of the encapsulated data.
[0076] Optionally, the data invalidation request comprises an indication of an invalidation time, and the data invalidation request is used to request invalidation of the encapsulated data within the invalidation time.
[0077] Optionally, the circulation path of the packaged data comprises one or more of the following: public network download, fixed-point download, end-to-end transmission, and hardware medium transmission.
[0078] Optionally, the sharing agent is trusted by a plurality of participants involved in data sharing.
[0079] In a fifth aspect, a trusted device is provided, which comprises a plurality of functional modules that interact with each other to implement the data sharing method provided in the second aspect or any optional mode of the second aspect. The plurality of functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules can be combined or divided in any manner based on specific implementation.
[0080] For example, the trusted device includes but is not limited to an acquisition module, a signature verification module, a transceiver module, a decryption module, and a request processing module. Optionally, the trusted device further comprises an authentication module, a trusted derivation module, or a storage module.
[0081] The acquisition module is configured to acquire a first data usage request and first packaged data matched with the first data usage request, the first packaged data comprising first ciphertext structure data, first retrieval metadata, a first packaged signature, and a first signature public key certificate, the first ciphertext structure data being obtained by encrypting shared data and a first data reduction corresponding to the shared data using at least one encryption key, the first signature public key certificate comprising a first signature public key, the first data usage request comprising first data description information and first usage attribute information, wherein the first packaged data is matched with the first data usage request, including that, for a same description object, the description object in the first data description information is a subset of the description object in the first retrieval metadata. The signature verification module is configured to verify the first packaged signature based on the first ciphertext structure data and the first retrieval metadata using the first signature public key. The transceiver module is configured to send a key acquisition request to a sharing agent after successfully verifying the first packaged signature, the key acquisition request comprising the first packaged signature, and receive a key acquisition response sent by the sharing agent through a first secure transmission channel, the key acquisition response comprising a first decryption key corresponding to the first packaged signature. The decryption module is configured to decrypt the first ciphertext structure data using the first decryption key to obtain at least the first data reduction. The request processing module is configured to execute the first data usage request according to a matching result of the first usage attribute information and the first data reduction, and send a data processing result corresponding to the first data usage request to a first data user initiating the first data usage request through a second secure transmission channel.
[0082] Optionally, the at least one encryption key comprises a data encryption key and a package encryption key, the first decryption key is a package decryption key corresponding to the package encryption key; the first cipher text structure data comprises a first cipher text and a second cipher text, the first cipher text is obtained by encrypting the shared data using the data encryption key, and the second cipher text is obtained by encrypting package information using the package encryption key, the package information comprises the first data specification and a data decryption key corresponding to the data encryption key; the decryption module is configured to decrypt the second cipher text using the package decryption key to obtain the package information, and decrypt the first cipher text using the data decryption key to obtain the shared data.
[0083] Optionally, the package information further comprises a password derivation value of a data password. The authentication module is configured to perform identity authentication on the first data user according to a data password input locally by the first data user through a password-based authentication key exchange protocol, and negotiate a session key with the first data user to establish the second secure transmission channel.
[0084] Optionally, the authentication module is further configured to, for the same data user, if a number of consecutive failures of identity authentication on the data user according to a data password input locally by the data user reaches a first number threshold, stop responding to a data use request from the data user within a target time length.
[0085] Optionally, the obtaining module is configured to receive the first data use request sent by a data controller. The authentication module is further configured to, for a plurality of data users accessing the data controller, if a number of consecutive failures of identity authentication on the plurality of data users according to data passwords input locally by the plurality of data users respectively reaches a second number threshold, mark package data requested to be used by the plurality of data users as invalid.
[0086] Optionally, the first data specification comprises a legitimate user attribute, the first use attribute information comprises a user attribute of the first data user, and the request processing module is configured to execute the first data use request if the user attribute of the first data user is subordinate to the legitimate user attribute.
[0087] Optionally, the first data specification further comprises an access data range corresponding to a legitimate user, the first use attribute information further comprises a request data range, and the request processing module is configured to execute the first data use request if the user attribute of the first data user is subordinate to the legitimate user attribute and the request data range belongs to the access data range corresponding to the first data user.
[0088] Optionally, the first data schema includes allowed operation types for the shared data, the first usage attribute information includes a data operation type, and the request processing module is configured to execute the first data usage request if the data operation type belongs to the allowed operation types.
[0089] Optionally, after obtaining the first data schema, the authentication module is further configured to verify that the first data usage request is from the first data user to the first data user.
[0090] Optionally, the first data schema includes a legitimate handler attribute, and the authentication module is further configured to determine that the trusted device belongs to a legitimate handling device defined by the legitimate handler attribute.
[0091] Optionally, the first data schema includes a data usage change attribute, the data usage change attribute has the characteristic of changing as the shared data is used, and the data usage change attribute is recorded in the sharing agent. The request processing module is configured to: obtain the data usage change attribute recorded in the sharing agent; and execute the first data usage request according to a matching result of the first usage attribute information and the data usage change attribute recorded in the sharing agent.
[0092] Optionally, the data usage change attribute includes a number of data usage times.
[0093] Optionally, a trusted derivation module is configured to: split the shared data to obtain a plurality of data shards; and perform a trusted derivation process on a single data shard. The trusted derivation process includes: encrypting the data shard and a second data schema corresponding to the data shard to obtain second ciphertext structured data; signing the second ciphertext structured data and second search metadata corresponding to the data shard with a second signature private key to obtain a second encapsulation signature; sending the second encapsulation signature to a sharing agent through the first secure transmission channel, so that the sharing agent stores the second encapsulation signature, a second signature public key certificate and a second decryption key corresponding thereto, the second signature public key certificate includes a second signature public key corresponding to the second signature private key, and the second decryption key is used at least for decrypting the second data schema in the second ciphertext structured data; and encapsulating the second ciphertext structured data, the second search metadata, the second encapsulation signature and the second signature public key certificate to obtain second encapsulation data, the second encapsulation data is used for circulation and sharing.
[0094] Optionally, a storage module is configured to store the first decryption key and the first encapsulation signature correspondingly.
[0095] Optionally, the storage module is configured to bind and cache the first decryption key and the first package signature.
[0096] Optionally, the storage module is configured to generate a derived key based on a trusted root key of the trusted device by using a key derivation function, encrypt the first decryption key by using the derived key to obtain decryption key ciphertext, and persistently bind and store the decryption key ciphertext and the first package signature.
[0097] Optionally, the trusted device stores a certificate authority public key corresponding to the first signature public key certificate. The acquisition module is further configured to acquire a second data use request and the first packaged data matching the second data use request, the second data use request including second data description information and second use attribute information, wherein the first packaged data matching the second data use request includes that, for a same description object, the description object in the second data description information is a subset of the description object in the first search metadata. The authentication module is further configured to verify the authenticity of the first signature public key certificate in the first packaged data by using the certificate authority public key. The signature verification module is further configured to, after the authenticity verification of the first signature public key certificate passes, verify the first package signature in the first packaged data by using the first signature public key in the first signature public key certificate based on the first ciphertext structure data and the first search metadata in the first packaged data. The decryption module is further configured to, after the verification of the first package signature succeeds, decrypt the first ciphertext structure data by using the stored first decryption key to obtain at least the first data reduction. The request processing module is further configured to execute the second data use request according to a matching result of the second use attribute information and the first data reduction, and send a data processing result corresponding to the second data use request to a second data user initiating the second data use request through a third secure transmission channel.
[0098] Optionally, the first data reduction includes a data use change attribute, the data use change attribute having a feature of changing with the shared data being used, and the request processing module is configured to execute the second data use request according to a matching result of the second use attribute information and the data use change attribute recorded in the trusted device.
[0099] Optionally, the shared agent is trusted by a plurality of participants participating in data sharing.
[0100] Optionally, the trusted device is trusted by the sharing agent, and the authentication module is further configured to perform mutual authentication with the sharing agent via the first secure transmission channel, and perform static code integrity verification on an operator in the trusted device, the operator being configured to execute a data sharing process corresponding to the trusted device.
[0101] In a sixth aspect, a sharing agent is provided, which includes a plurality of functional modules that interact with each other to implement the data sharing method according to the third aspect or any possible implementation of the third aspect. The plurality of functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules can be combined or divided in any manner based on specific implementation.
[0102] For example, the sharing agent includes, but is not limited to, a transceiver module and a storage module. Optionally, the sharing agent further includes a certificate issuing module, a key generation module, an authentication module, and a data management module.
[0103] The transceiver module is configured to receive an encapsulation signature sent by a first trusted device via a first secure transmission channel, the encapsulation signature being obtained by signing search metadata corresponding to shared data and ciphertext structure data using a signature private key, and the ciphertext structure data being obtained by encrypting the shared data and a data schema corresponding to the shared data using at least one encryption key. The storage module is configured to store the encapsulation signature, a signature public key certificate, and a decryption key in correspondence, the signature public key certificate including a signature public key corresponding to the signature private key, and the decryption key being used at least to decrypt the data schema in the ciphertext structure data.
[0104] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key; the ciphertext structure data includes first ciphertext and second ciphertext, the first ciphertext being obtained by encrypting the shared data using the data encryption key, and the second ciphertext being obtained by encrypting encapsulation information using the encapsulation encryption key, the encapsulation information including the data schema and a data decryption key corresponding to the data encryption key.
[0105] Optionally, the transceiver module is further configured to receive, through the first secure transmission channel, a certificate application request sent by the first trusted device, the certificate application request comprising identity information of the data owner. The certificate issuing module is configured to generate the signature public key certificate and the signature private key according to the certificate application request. The storage module is configured to store the signature public key certificate, the signature public key certificate further comprising the identity information of the data owner, and the signature public key certificate further comprising a signature of the shared agent on the signature public key and the identity information of the data owner. The transceiver module is further configured to send, through the first secure transmission channel, a certificate application response to the first trusted device, the certificate application response comprising the signature public key certificate and the signature private key.
[0106] Optionally, the key generation module is configured to generate the at least one encryption key and the decryption key, and store the decryption key, and the certificate application response further comprises the at least one encryption key.
[0107] Optionally, the transceiver module is further configured to receive, through the first secure transmission channel, a certificate application request sent by the first trusted device, the certificate application request comprising the signature public key and the decryption key. The certificate issuing module is configured to generate the signature public key certificate according to the certificate application request. The storage module is configured to store the signature public key certificate and the decryption key correspondingly, the signature public key certificate further comprising a signature of the shared agent on the signature public key. The transceiver module is further configured to send, through the first secure transmission channel, a certificate application response to the first trusted device, the certificate application response comprising the signature public key certificate.
[0108] Optionally, the transceiver module is further configured to receive a data invalidation request sent by a data owner of the shared data, the data invalidation request comprising the signature public key certificate, and the data invalidation request being used to request invalidation of the encapsulated data. The authentication module is configured to perform identity authentication on the data owner. The data management module is configured to invalidate at least one of the signature public key certificate, the decryption key, or the encapsulation signature according to the data invalidation request if the identity authentication on the data owner is successful.
[0109] Optionally, the data invalidation request comprises an indication of an invalidation time, and the data management module is configured to invalidate at least one of the signature public key certificate, the decryption key, or the encapsulation signature within the invalidation time according to the data invalidation request.
[0110] Optionally, the transceiver is further configured to receive a key acquisition request sent by a second trusted device, the key acquisition request comprising the package signature; the authentication module is further configured to verify whether the second trusted device is trusted; and the transceiver is further configured to send a key acquisition response to the second trusted device through a second secure transmission channel after determining that the second trusted device is trusted, the key acquisition response comprising a decryption key corresponding to the package signature.
[0111] Optionally, the sharing agent is a trusted third party, and the authentication module is configured to perform code integrity verification on an operator in the second trusted device by initiating remote attestation to the second trusted device, the operator being configured to execute a data sharing process corresponding to the second trusted device.
[0112] Optionally, the authentication module is further configured to perform runtime measurement on the operator.
[0113] Optionally, the sharing agent is trusted by the second trusted device, and the authentication module is configured to perform identity authentication on the second trusted device and determine that the second trusted device has completed static code integrity verification on an operator, the operator being configured to execute a data sharing process corresponding to the second trusted device.
[0114] In a seventh aspect, a data sharing system is provided, comprising: a first trusted device configured to perform the method provided in the first aspect or any possible implementation of the first aspect, and a sharing agent configured to perform the method provided in the third aspect or any possible implementation of the third aspect.
[0115] Optionally, the data sharing system further comprises a second trusted device configured to perform the method provided in the second aspect or any possible implementation of the second aspect.
[0116] In an eighth aspect, a trusted device is provided, comprising: a processor and a memory.
[0117] The memory is configured to store a computer program, the computer program comprising program instructions.
[0118] The processor is configured to invoke the computer program to implement the method provided in the first aspect or any possible implementation of the first aspect.
[0119] In a ninth aspect, a trusted device is provided, comprising: a processor and a memory.
[0120] The memory is configured to store a computer program, the computer program comprising program instructions.
[0121] The processor is configured to invoke the computer program to implement the method provided in the second aspect or any possible implementation of the second aspect.
[0122] In a tenth aspect, a sharing agent is provided, comprising a processor and a memory.
[0123] The memory is configured to store a computer program, the computer program comprising program instructions.
[0124] The processor is configured to invoke the computer program to implement the method provided in the third aspect or any possible implementation of the third aspect.
[0125] In an eleventh aspect, a computer readable storage medium is provided, the computer readable storage medium storing instructions thereon, when the instructions are executed by a processor, implementing the method provided in the first aspect or any possible implementation of the first aspect, or implementing the method provided in the second aspect or any possible implementation of the second aspect, or implementing the method provided in the third aspect or any possible implementation of the third aspect.
[0126] In a twelfth aspect, a computer program product is provided, comprising a computer program, when the computer program is executed by a processor, implementing the method provided in the first aspect or any possible implementation of the first aspect, or implementing the method provided in the second aspect or any possible implementation of the second aspect, or implementing the method provided in the third aspect or any possible implementation of the third aspect.
[0127] In a thirteenth aspect, a chip is provided, the chip comprising programmable logic circuitry and / or program instructions, when the chip is running, implementing the method provided in the first aspect or any possible implementation of the first aspect, or implementing the method provided in the second aspect or any possible implementation of the second aspect, or implementing the method provided in the third aspect or any possible implementation of the third aspect. BRIEF DESCRIPTION OF DRAWINGS
[0128] FIG. 1 is an implementation schematic diagram of a data sharing scheme in a semi-honest threat model provided by the related art;
[0129] FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0130] FIG. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0131] FIG. 4 is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0132] FIG. 5 is a flow schematic diagram of a data sharing method provided by an embodiment of the present application;
[0133] FIG. 6 is a flow model diagram of a trusted derivation scheme according to an embodiment of the present application;
[0134] FIG. 7 is a flow model diagram of another trusted derivation scheme according to an embodiment of the present application;
[0135] FIG. 8 is a flow diagram of another data sharing method according to an embodiment of the present application;
[0136] FIG. 9 is an implementation flow diagram of a data sharing method according to another embodiment of the present application;
[0137] FIG. 10 is an implementation flow diagram of another data sharing method according to another embodiment of the present application;
[0138] FIG. 11 is an implementation flow diagram of yet another data sharing method according to another embodiment of the present application;
[0139] FIG. 12 is a structural diagram of a trusted device according to an embodiment of the present application;
[0140] FIG. 13 is a structural diagram of another trusted device according to an embodiment of the present application;
[0141] FIG. 14 is a structural diagram of a sharing agent according to an embodiment of the present application;
[0142] FIG. 15 is a hardware structural diagram of a device according to an embodiment of the present application. DETAILED DESCRIPTION
[0143] To make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the drawings.
[0144] To facilitate the reader's understanding of the technical scheme of the present application, some terms involved in the present application will be explained first.
[0145] 1. Trusted platform module (TPM): generally refers to a secure microprocessor with cryptographic functions. The TPM is used to provide a trusted root of trust for a computer platform.
[0146] 2. Trusted execution environment (TEE): generally refers to a secure area existing in the main processor of any mobile device such as a smart phone or a tablet computer. The TEE is used to meet the needs of storing, processing and protecting various sensitive data in a trusted environment. The TEE provides a secure execution environment for authorized security software, also known as "trusted applications", to ensure end-to-end security by implementing protection, confidentiality, integrity and data access permissions.
[0147] 3. Secure transmission channel: support secure end-to-end communication in an insecure network, provide tamper-proof, anti-fraud, anti-eavesdropping and one / two-way identity verification mechanism. Secure transmission channel can be implemented based on transport layer security (TLS) protocol or secure sockets layer (SSL) protocol, etc.
[0148] 4. Digital certificate (abbreviation: certificate): is the identity card of device, user or application in the digital world. Digital certificate contains applicant information and certificate authority (CA) signature on applicant information. Applicant information includes the public key of the key pair held by the applicant. Optionally, the applicant information also includes the identity information of the applicant. For example, the applicant is a device, and the identity information of the applicant is a device identifier that can uniquely identify the device. Optionally, the device identifier of a device includes but is not limited to one or more of the device serial number, the media access control (MAC) address of the device, or the Internet protocol (IP) address of the device. It is worth noting that the signature public key certificate in this application refers to the digital certificate, the signature public key refers to the public key in the digital certificate (the public key of the key pair held by the applicant), and the signature private key refers to the private key corresponding to the signature public key (the private key of the key pair held by the applicant).
[0149] 5. Digital certificate verification: the verifier uses the public key in the "unified key pair" of the certificate authority (also known as the CA root certificate) to verify the signature in the digital certificate. If the verification is successful, the digital certificate is not expired, and the digital certificate is not in the revocation list of the certificate authority, it means that the digital certificate verification is passed.
[0150] 6. Digital signature (abbreviation: signature): is a digital string that only the sender of the message can produce and cannot be forged by others. Digital signature is a protection means for the sender's data. The sender uses the signature private key to sign the message. Any third party without the signature private key cannot forge the signature. Any third party with the signature public key corresponding to the signature private key held by the sender can verify the signature to confirm the source and integrity of the message (i.e. prove the authenticity of the message). Digital signature generally needs to use asymmetric encryption technology and digital digest technology. For example, the sender uses the signature private key to encrypt the digital digest of the message to be transmitted, and the obtained ciphertext is called the signature of this transmission process.
[0151] 7、signature verification (short for verification): the verifier uses the same digest function as the sender to generate a digital digest for the signed message, and compares it with the result of decrypting the digital signature with the corresponding signature public key. If the two digests are the same, the verification is passed, indicating that the message has not been tampered with. Otherwise, the verification is not passed, indicating that the message has been tampered with. Signature verification can be used to verify the integrity of the message (not tampered with) and the reliability of the message source (not false data or fake data). In this application, verifying the integrity of the message and the reliability of the message source are collectively referred to as verifying the authenticity of the message.
[0152] 8、symmetric encryption algorithm: refers to an algorithm that uses the same key for encryption and decryption. Symmetric encryption algorithms include, for example, the advanced encryption standard (AES) algorithm or the national standard SM4 algorithm (see standard GBT.32907-2016) and the like.
[0153] 9、asymmetric encryption algorithm: refers to an algorithm that uses different keys for encryption and decryption, also known as public key cryptography algorithm. In asymmetric cryptography technology, there is a key pair, including a private key and a public key. The private key is kept secret by the owner of the key pair and cannot be published. The public key is published by the owner of the key pair to others. Data encrypted with the public key can only be decrypted using the corresponding private key. Data signed with the private key can only be verified using the corresponding public key. Asymmetric encryption algorithms include, for example, the RSA (rivest-shamir-adleman) algorithm and the elliptic curve cryptography (ECC) algorithm.
[0154] 10、derivation function: an irreversible function. Among them, the key derivation function (KDF) is used to generate a derived key, and the key derivation function can be, for example, a hash message authentication code (HMAC) based key derivation function (HKDF) (see request for comments (RFC) document No. 5869 (RFC 5869)). The password derivation function is used to generate a password-derived value, and the password derivation function can be, for example, a password-based key derivation function (PBKDF) (see RFC 8018 or NIST SP 800-132).
[0155] 11、Data processing strategy: a set of rules that data processing should follow, described by formal language and implemented by program language. Data processing strategy includes but not limited to operation audit, blood record, read-write control, retention period protection, database access control, file access control and other strategies, rules or properties.
[0156] 12、Data rule / policy: a subset of data processing strategy customized by data owner. A data rule / policy made by data owner is usually only applicable to the data within its specified range.
[0157] 13、Property / attribute: in this application, property / attribute does not refer to data property, but to the rules in data rule / policy customized by data owner. Property / attribute can refer to data type and other data properties, current time, current processor identity and other processor properties, operation type such as adding, deleting, modifying and querying, and current user identity and other user properties.
[0158] 14、Remote attestation (RA): an important core concept of trusted computing, which is to check the trustworthiness of target computer on the server side of remote attestation. The specific implementation is that the remote attestation server collects computer state data by using the remote attestation client deployed on the target computer, and compares it with the corresponding software reference baseline value on the server side of remote attestation, and takes the next action according to whether the computer state is trustworthy. Remote attestation can be realized through "challenge-response" protocol.
[0159] 15、Running measurement: through remote attestation, the integrity of key data during the continuous running process after the device starts is ensured. Files, process memory, configuration data, user behavior, process behavior, etc. can be included in the scope of measurement, and the system integrity is guaranteed from multiple dimensions to ensure that it has not been tampered with.
[0160] 16、Secure boot: based on digital signature technology, during the device startup process, the digital signature of the software of the previous layer is verified layer by layer from the trusted root, and if the verification is passed, it is run, if the verification fails, it is stopped and enters the emergency process. The purpose of secure boot is to ensure that every program loaded and run by the device is not tampered with.
[0161] 17. Code integrity: also known as software integrity, mainly including software program file integrity, software running state integrity or control flow integrity. Software program file integrity means that the program file of the software on the file system itself is not modified by unauthorized modification. Software running state integrity means that in the running state of the software, the code, static data and dynamic data must be ensured not to be modified by unauthorized modification. Control flow integrity means that the execution path of the software when running is consistent with the flowchart reflected by the static code of the software, that is, the behavior of the software cannot be changed and manipulated by unauthorized users through any means. Static code integrity includes software program file integrity and control flow integrity. The static code integrity checking means is as follows: an integrity protection mechanism based on digital signature is provided for the software (including software package / patch package) released to the outside of the product, and the integrity of the software is verified during installation, upgrading and starting. Among them, the implementation mode of the digital signature can be realized by connecting the digital signature platform with the release system, signing the large package before the product is released, or integrating the digital signature plug-in on the construction platform, and digitally signing the non-variable files of the product in the software construction stage. Dynamic code integrity includes software program file integrity, software running state integrity and control flow integrity. Dynamic code integrity verification is realized based on remote attestation.
[0162] 18. Trusted third party: refers to an independent, third-party entity trusted by all participants and capable of verifying the identity of the participants and ensuring the security of the transaction.
[0163] 19. Entity mutual trust: in the present application, the mutual trust between two entities means that in a non-secure network environment, an entity only needs to prove its identity to another entity in a secure manner, that is, it can ensure that when the data is transmitted to another entity through a secure transmission channel, the same data is processed and stored in the same form in the two entities. A secure way includes but is not limited to device identity certificate, pre-shared key, etc. For example, if the business data or key in an entity can be cached or written in plaintext form, after being transmitted to another entity through a secure transmission channel, it can still be cached or written in plaintext form without worrying about its leakage.
[0164] 20. One-way authentication based on random challenge value: the authenticator can obtain the valid public key of the authenticated party, and can easily generate a secure random number, then the public key authentication with random challenge value can be used. The authenticator sends a random number B to the authenticated party, and adds a timer after sending, if the message from the authenticated party is not received after the timer expires, the authentication is aborted. The authenticated party sends to the authenticator: public key || random number A generated by the authenticated party || B || identity C of the authenticator || signature of the authenticated party on (A || B || C). The authenticator verifies the signature of the authenticated party on (A || B || C) to verify the identity of the authenticated party. Wherein, "||" is a string concatenation symbol.
[0165] 21. Semi-honest threat model: the attacker will perform attacks according to the predetermined protocol to obtain the predetermined execution result. Specifically, the attacker will attack the confidentiality of data and data encryption key, etc. The attack approaches mainly include data in reading storage, processing process, return value, and also include bypassing the original authorized access range through impersonation, unauthorized access, etc.
[0166] 22. Malicious threat model: the attacker will try all attack methods, including but not limited to impersonation, forgery, tampering, theft, etc., and can collude with external attackers, that is, the attacker may not perform attacks according to the predetermined protocol. It is worth noting that the malicious threat model in the present application does not include physical attacks, non-intrusive attacks and lazy behavior.
[0167] 23. Directional transmission: data is transmitted from one device to another device designated by the sender through a secure transmission channel. The directional transmission in the present application can refer to the directional transmission under the malicious threat model, in which case the data receiver itself needs to resist malicious attacks such as mirroring and data reuse.
[0168] 24. Non-directional transmission: data is not necessarily transmitted from one device to another device designated by the sender through a secure transmission channel. The data flow channels of non-directional transmission include but are not limited to public network download, fixed-point download, end-to-end transmission, and hardware medium transmission.
[0169] 25. Data pseudonymization: refers to a data processing method of replacing the original identifier (usually a direct identifier) with a new character.
[0170] 26. Data anonymization: the process of replacing the actual identifier with the attribute obtained by randomization or generalization, the replaced information has reasonable confidence and cannot identify any individual.
[0171] Data has become an important strategic resource and production factor in today's society. The background of the present application is mainly derived from the following two factors. One is that data sharing is the key to realizing the value of data. Adequate high-quality data is the basis for the release of data value (such as the construction and quality improvement of large models). However, objectively, data distribution is uneven, and data collection has strong industry attributes, and the characteristics are not comprehensive; at the same time, small and medium-sized enterprises collect too few data samples, which is difficult to support business. The collection and distribution of data become a natural choice to solve the problem of data quality and distribution. The second is that the multi-party security concerns of data subjects, data owners and regulators restrict data sharing. For example, data leakage, tampering, misuse, and damage to the privacy and other rights of data subjects and the interests of data owners. How to ensure the security of data in the process of sharing is the premise and key to realizing data sharing.
[0172] However, at present, directly using existing technologies in other fields cannot completely solve the problem of data sharing. For example, if data pseudonymization technology (such as encryption) is used, the encryption and decryption keys and other confidential information still face the same sharing problem as the original data set. If data anonymization technology (such as differential privacy) is used, the use of data is basically bound to its anonymization processing method, resulting in a sharp decline in data use flexibility and inability to fully release data value. If a platform solution is used, first, data can only be processed on a specified architecture and platform, which greatly limits the flexibility of data processors and the overall data processing architecture, especially offline processing in most scenarios; second, the platform solution actually solves the sharing of data processing results, which objectively limits the scope of data sharing between data owners and data users, and cannot meet the practical needs of data set circulation; third, the credibility of data sharing or data processing on the platform is verifiable by data subjects or data owners, and the platform can prove its innocence, but it is still a technical challenge that exists continuously. The means of mirror, backup, and forward recovery "steal the day and change the day".
[0173] In related technologies, the following two technical solutions are mainly proposed for data sharing.
[0174] The first related technology is a data sharing scheme under a semi-honest threat model. An adversary, an attacker, under the semi-honest threat model will perform according to a predetermined protocol and obtain a predetermined execution result. The technical solution only needs to consider the confidentiality of data, data specification, and data encryption key. For example, FIG. 1 is a schematic diagram of implementation of a data sharing scheme under a semi-honest threat model provided by the related technology. As shown in FIG. 1, the technical solution is as follows: a data owner defines a data access policy, such as who (entity or individual) is allowed to access data, what operation can be performed on data, security requirements for accessing or storing data, and the like, and uses an encryption key to encrypt a data set (the access policy can be encrypted at the same time), encapsulates the encrypted data and the data access policy into a data capsule. A data consumer can request to perform one or more operations on the encrypted data. A permission agent receives a data use request and a data access policy, determines whether the data use request passes an access authority verification based on the data access policy through a policy checker. A key manager, after receiving a verification proof from the policy checker, instantiates a secure execution environment (SEE) (or other similar trusted environment for running a program), and transmits a decryption key into the secure execution environment; at this time, the permission agent can transmit the data use request, the encrypted data into the secure execution environment. The verified data access request (or the rejected access request) can be written into a distributed ledger. A data owner (or other entity) can access the distributed ledger to audit the data access requests that have occurred. The secure execution environment processes data according to the decryption key, the encrypted data, and the data use request, obtains a processed result data capsule, and encrypts and stores or securely transmits the result data capsule to the data consumer. In some embodiments, the data access policy defines whether the data consumer can access or decrypt the generated encrypted result.
[0175] The first related technology has the following defects: from the perspective of the overall scheme, this technology can only solve the data sharing problem under the semi-honest threat model, and cannot resist malicious attacks such as tampering with data, forging data, attribute impersonation / reuse, that is, cannot resist the adversary under the malicious threat model. The policy checking is equivalent to assuming that the information input by the data consumer is real. If the permission agent is deployed as a trusted role, the running cost is too high because the request parsing and policy matching are all placed in the permission agent. If the permission agent is not deployed as a trusted role, all links in the permission agent cannot resist malicious attacks, such as malicious administrators and code tampering. From the perspective of technical design, no cryptography technology such as digital signature and public key certificate is introduced to protect the authenticity of data and the verifiability of attributes, and the permission agent bears a relatively heavy process.
[0176] The second related technology is a platform-based data sharing solution. For example, trusted-environment-based cryptographic computing (TECC) refers to computing, storing, and transferring data in a trusted node cluster connected by high-speed interconnection in a cryptographic form, realizing effective protection of data possession, controllable use of use rights, and supporting secure, reliable, and efficient fusion and transfer of large-scale data of multiple parties. The implementation mode of the TECC solution includes the following features: the data provider splits the data into multiple cryptographic shard data locally, and transmits each cryptographic shard data to a trusted computing node in a different partition, and a single cryptographic shard data does not leak any information of the original data. Each partition of the computing node only contacts the cryptographic shard data and does not contact any plaintext data; multiple partitions of the trusted computing stage complete target computing through a cryptographic protocol (multi-party computing, secure federated learning, etc.), and a single partition being attacked does not cause data leakage risk; the trusted computing node uses trusted computing technology (TEE / TPM / full-stack trusted, etc.), ensuring that the operator cannot spy; the same role of the cryptographic protocol is assumed by a trusted computing partition cluster, and the computing resources can be dynamically scaled horizontally; the data is stored in the form of a cryptographic capsule, including cryptographic shard data and access rules bound thereto, and the operator cannot misuse the cryptographic data.
[0177] The TECC overall solution focuses on the cryptographic computing part, and for the content related to secure sharing in the solution, two ways of constraining the computing logic used by the trusted computing center are proposed in the related technology. The first way: the data provider pre-examines the computing logic, and then saves the code hash of the examined computing logic. Then, the data provider can obtain the code hash of the computing logic running in the trusted computing node, and in the case that the obtained code hash is consistent with the saved code hash, the data provider provides an encryption key of the data to the trusted computing node to realize corresponding data authorization. The second way: the trusted computing node pre-proves the code hash of the computing logic running therein in a proof center. Then, the proxy node of the trusted computing node can obtain the code hash of the computing logic running in the trusted computing node, and in the case that the obtained code hash is consistent with the proved code hash, the proxy node provides an encryption key of the data previously obtained from the data provider to the trusted computing node to realize corresponding data authorization. In the second way, the data provider can obtain the code hash from the proof center, and based on the code hash, pull the corresponding computing logic from the trusted computing center for legitimacy examination.
[0178] The second related technology has the following defects: from the perspective of the overall scheme, the technology is subject to all limitations of the platform solution itself, such as whether the platform can be self-vindicated in all links, the high cost of platform construction or deployment, the inability to solve the security requirements of the original data set after flowing out of the platform, and the inability of the platform solution to handle offline processing. From the perspective of technical design, the technology does not introduce cryptographic techniques such as digital signatures and public key certificates to protect data authenticity, does not directly protect the confidentiality of data specifications, and does not provide iteration capabilities for global attributes in data specifications.
[0179] The present application provides a technical solution that can resist malicious threat models, implement non-directional sharing and secure processing of data between data owners and data users, and does not rely on specific controllers, and the processor and processing results are controlled by the data specification set by the data owner. The data sharing solution provided by the present application mainly involves two stages of trusted derivation and secure use.
[0180] In the trusted derivation phase, before the shared data is derived from the controllable range of the data owner, the shared data and the data regulation are bound and encapsulated by technologies such as data encryption, digital signature, public key certificate, etc. The specific implementation process of the trusted derivation scheme provided by the application is as follows: a trusted device trusted by the data owner obtains ciphertext structure data, which is obtained by encrypting the shared data and the data regulation corresponding to the shared data by using at least one encryption key. The trusted device uses a signature private key to sign the ciphertext structure data and the search metadata corresponding to the shared data to obtain an encapsulation signature. The trusted device sends the encapsulation signature to a sharing agent through a secure transmission channel, so that the sharing agent stores the encapsulation signature, a signature public key certificate and a decryption key corresponding thereto. The signature public key certificate includes a signature public key corresponding to the signature private key. The decryption key is used at least for decrypting the data regulation in the ciphertext structure data. The trusted device encapsulates the ciphertext structure data, the search metadata, the encapsulation signature and the signature public key certificate to obtain encapsulation data. The encapsulation data is used for circulation sharing. Wherein, the sharing agent is trusted by multiple participants participating in data sharing. In the application, the shared data is bound and encrypted with the data regulation, the ciphertext structure data and the search metadata are digitally signed as a whole, and the encapsulation signature and the signature public key certificate are bound and encapsulated on the ciphertext structure data and the search metadata, so that the encapsulation data can verify the authenticity of the data in the circulation sharing process, and realize the confidentiality and integrity protection of the shared data and the data regulation in the circulation sharing process. In addition, since the encapsulation data is generated by the trusted device trusted by the data owner, the sharing agent is trusted by multiple participants participating in data sharing, and the trusted device and the sharing agent transmit data through a secure transmission channel, the security, confidentiality and integrity of the shared data and the data regulation in the derivation process are realized. Therefore, the application can realize the security protection of the shared data and the data regulation in the derivation process and the circulation process, prevent the data from being forged, tampered and leaked.
[0181] In the safe use stage, the identity of the processor and the code integrity are verified through remote attestation, the corresponding attributes in the data specification are extracted and verified through user attribute certificate, and the encapsulated data is conditionally allowed to be post-processed, and the processor is conditionally allowed to process data online and / or offline. The specific implementation process of the safe use scheme provided in the application is as follows: a trusted device is used as a data processor, a data use request and encapsulated data matched with the data use request are obtained. The encapsulated data includes ciphertext structure data, retrieval metadata, encapsulated signature and signature public key certificate. The ciphertext structure data is encrypted by at least one encryption key to obtain shared data and the data specification corresponding to the shared data. The signature public key certificate includes a signature public key. The data use request includes data description information and use attribute information. Wherein, the encapsulated data is matched with the data use request, including: for the same description object, the description object in the data description information is a subset of the description object in the retrieval metadata. The trusted device verifies the encapsulated signature based on the key structure data and the retrieval metadata using the signature public key. After the encapsulated signature is verified successfully, the trusted device sends a key acquisition request to the shared agent, and the key acquisition request includes the encapsulated signature. The shared agent verifies whether the trusted device is trusted. After determining that the trusted device is trusted, the shared agent sends a key acquisition response to the trusted device through a secure transmission channel, and the key acquisition response includes a decryption key corresponding to the encapsulated signature. The trusted device decrypts the ciphertext structure data using the decryption key to obtain at least the data specification. If the use attribute information matches the data specification, the trusted device sends the data requested by the data use request to the data user initiating the data use request through a secure transmission channel, and the data belongs to the shared data. In the application, before the data user uses the shared data, the shared agent verifies whether the data processor is trusted, and provides the decryption key to the data processor after determining that the data processor is trusted; the data processor performs signature verification, data decryption, specification analysis, and verifiable attribute extraction, and processes and returns the data processing result to the data user according to the matching result of the attribute extraction content and the attribute range in the data specification. The application protects the verifiability of the attributes matched with the data specification, and prevents attribute impersonation of the user and the processor. In addition, the data owner can set the data specification to allow the shared data to be used only by the data users within the specified range and processed only by the specified data processors, and only obtain the processing result within the specified range, thereby realizing data access control beyond the physical control range of the data owner.
[0182] The technical scheme of the application is described in detail from the aspects of system architecture, application scenario, method flow, hardware device, software device, etc.
[0183] The system architecture of the embodiments of the present application is described below.
[0184] For example, FIG. 2 is a schematic diagram of a system architecture provided by the embodiments of the present application. As shown in FIG. 2, the system architecture mainly involves five roles, which are a data owner, a data controller, a data processor, a data user and a sharing agent. The five roles are described below.
[0185] (1) Data owner
[0186] The data owner has the legal right to the data, and is usually an entity that collects or creates the data. The data owner can encapsulate and export target data that needs to be shared from the local, or send encapsulation instructions to a data controller (such as data controller A in FIG. 2) that stores the data to which the data owner can connect, and the data controller A cooperates with the data owner to perform the encapsulation method allowed by the data owner. For example, the data controller A can return the target data to the data owner, and the data owner can encapsulate the target data by itself, or the data controller A can encapsulate the target data locally and then return the encapsulation content to the data owner. The encapsulation content contains the target data and the data specification.
[0187] (2) Data controller
[0188] The data controller is an entity that decides the purpose and method of data processing. For example, the data controller A in FIG. 2 cooperates with the data owner to perform the encapsulation method allowed by the data owner. The data controller B in FIG. 2 imports encapsulated data and allows non-directional import. The meaning of non-directional import is that the data does not have to be transmitted from the data owner or other data controllers to the current data controller or data processor through a secure transmission channel, but can be obtained or downloaded from the public network as needed.
[0189] (3) Data processor
[0190] The data processor is an entity that processes data for the data controller. In the embodiments of the present application, the data processor is limited to a trusted device, for example, a TEE or a TPM with equivalent security strength or an independent module with equivalent security strength and remote attestation capability. For example, the data processor A in FIG. 2 is an entity that processes data for the data controller A, and the data processor B is an entity that processes data for the data controller B. For example, the data processor A receives target data and a data specification from the data controller A, and encapsulates and exports the target data and the data specification. The data processor B receives encapsulated data and a data use request of a data user from the data controller B, processes the data according to the data specification, and directly returns a data processing result to the data user.
[0191] (4) Data user
[0192] Data user refers to an end user in a data system. The data user accesses and uses data according to work needs, and needs to follow data access and use rules set by a data owner. When using data, the data user can initiate a data use request to any data controller controlling encapsulated data, and finally obtains a data processing result within a data specification set by the data owner from a data processor.
[0193] (5) Shared agent
[0194] A role that provides key management capabilities (including generation, storage, update or deletion, etc.), certificate issuing and management capabilities, remote attestation services, etc. is needed in the process of trusted derivation and secure use of data, and is called a shared agent. In a malicious threat model, the shared agent must be provided by a public trusted third party (the role form is similar to a well-known commercial CA or a CA issued by a state qualification). In other scenarios, the agent role can be deployed under the condition that the data processor and the shared agent trust each other under the condition agreed by the data owner.
[0195] It should be noted that the roles involved in the system architecture shown in FIG. 2 are only used as an example for illustration, and more or fewer roles can be included in the actual system architecture. For example, in a scenario where the data owner encapsulates and derives target data that needs to be shared by himself, the data controller A and the data processor A can not be included in the system architecture. For another example, the system architecture can further include a data provider, i.e., a data subject for providing data. The embodiments of the present application do not limit the type and number of roles involved in the system architecture.
[0196] The application scenarios of the embodiments of the present application are described below.
[0197] The embodiments of the present application can be applied to various scenarios with data sharing needs. The public cloud scenario and the terminal device scenario are taken as examples for description.
[0198] For example, FIG. 3 is a schematic diagram of an application scenario provided by the embodiments of the present application. The application scenario is a public cloud scenario. The hotel alliance hopes to obtain the personal information of passengers, such as name, phone, itinerary, etc. from the ticket information stored by the airline in the public cloud for commercial promotion or promotion within the scope of the consent of the passengers. As shown in FIG. 3, the application scenario includes an aircraft passenger, an airline, a public cloud, a hotel alliance, a TEE / TPM, and a sharing agent. Among them, the aircraft passenger is the data subject. The airline is equivalent to the data owner in FIG. 2. The public cloud is equivalent to the data controller A and the data controller B in FIG. 2. In the public cloud scenario, all data controllers are the public cloud. The TEE / TPM is a trusted component / module deployed by the public cloud, which is equivalent to the data processor A and the data processor B in FIG. 2. The hotel alliance is equivalent to the data user in FIG. 2. The sharing agent is the sharing agent in FIG. 2.
[0199] In the application scenario as shown in FIG. 3, the implementation of the data sharing scheme may be different from the system architecture scheme shown in FIG. 2. For example, the airline as the data owner needs to obtain the consent of the aircraft passenger as the data subject before collecting, storing, and using the personal data of the data subject. This architectural difference is only used to show the possible data source when the data owner encapsulates the data, and is not a limitation on the scheme of the embodiments of the present application. For another example, according to the shared data use logic of the system architecture shown in FIG. 2, the hotel alliance does not need to apply directly to the airline when using data, but sends a data use request directly to the public cloud, and whether to allow the hotel alliance to use the related data is determined by the TEE / TPM according to the security processing process. However, in the actual use process, the airline may not have encapsulated the data in advance, and the hotel alliance cannot obtain effective data by sending a request to the public cloud. In this scenario, the airline can write the allowed data use range, the allowed data user, the data validity period, the maximum number of data uses, and other attributes and policies into the data specification and initiate encapsulation after the hotel alliance purchases data services from the airline. Thereafter, the hotel alliance can normally obtain effective data processing results. That is, the order of the steps in the actual execution of the data sharing scheme may change, and is not a limitation on the scheme of the embodiments of the present application.
[0200] For example, FIG. 4 is another application scenario provided by the embodiments of the present application. The application scenario is a terminal device scenario. In some cases, a laboratory needs to be powered off for a long time or to update a system, but there are still some data that need to be browsed, calculated, and plotted by a corresponding graduate student during this period. The laboratory needs to limit some data from being tampered with, stolen, and exported, and also needs to ensure that some data can be searched, calculated, and counted. As shown in FIG. 4, the application scenario includes a laboratory, a laboratory server, a personal terminal, a TEE / TPM, a graduate student, and a sharing agent. The laboratory corresponds to the data owner in FIG. 2. The laboratory server corresponds to the data controller A in FIG. 2. The graduate student corresponds to the data user in FIG. 2. The personal terminal A is a personal terminal held by the graduate student and corresponds to the data controller B in FIG. 2. The TEE / TPM is a trusted component / module in the personal terminal A and corresponds to the data processor B in FIG. 2. The sharing agent is the sharing agent in FIG. 2. The personal terminal B is another personal terminal different from the personal terminal A. The personal terminal B can be held by the graduate student or by another person other than the graduate student. In the system architecture shown in FIG. 2, the data controller B allows non-directional import, and accordingly, in the application scenario shown in FIG. 4, the personal terminal A can obtain the encapsulated data in the laboratory server by means of non-directional import, for example, the personal terminal A can download the encapsulated data from the laboratory server or from the personal terminal B, and the embodiments of the present application do not limit this.
[0201] The method flow of the embodiments of the present application is described below.
[0202] The data sharing method provided by the embodiments of the present application includes a trusted export scheme and a secure use scheme. The purpose of the trusted export scheme is that the data owner can encapsulate its data, so that the encapsulated data has the ability of safe circulation and secure use. The data must be structured or partially structured before being encapsulated, that is, the data must have metadata that can be used for plaintext search without causing privacy leakage, such as data table names, file names, etc., which are collectively referred to as search metadata in the present application. The sharing agent must be provided by a public trusted third party to provide agent services, and the functions of the sharing agent can include a certificate issuing authority, a key management service provider, or a processor remote attestation service provider, etc. Under the condition agreed by the data owner, the agent role can be deployed under the condition that the data processor and the sharing agent trust each other. The secure use scheme can enable the data controller to import the encapsulated data generated based on the trusted export scheme at any time, and the circulation path of the encapsulated data includes but is not limited to public network download, fixed-point download, end-to-end transmission, or hardware medium transmission, etc. It is worth noting that the trusted export scheme and the secure use scheme are independent of each other. After the data of the data owner is trusted to be exported once, it can be securely used by the same or different data users multiple times.
[0203] In the first embodiment of the present application, the implementation process of the trusted derivation scheme is described. For example, FIG. 5 is a flowchart of a data sharing method 500 provided by an embodiment of the present application. The method 500 only shows the implementation process of the trusted derivation scheme. As shown in FIG. 5, the method 500 includes, but is not limited to, the following steps 501 to 505.
[0204] It is worth noting that the trusted device 1 in the method 500 is a data processor. In combination with the system architecture shown in FIG. 2, the trusted device 1 in the method 500 is, for example, the data processor A. Alternatively, in combination with the application scenario shown in FIG. 3, the trusted device 1 in the method 500 is, for example, the TEE / TPM. Alternatively, in combination with the application scenario shown in FIG. 4, the trusted device 1 in the method 500 is, for example, the laboratory server.
[0205] Step 501: The trusted device 1 obtains ciphertext structure data, which is obtained by encrypting the shared data and the data regulation corresponding to the shared data by using at least one encryption key.
[0206] The shared data is provided by a data owner, and the data regulation is set by the data owner of the shared data.
[0207] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key. The ciphertext structure data includes a first ciphertext and a second ciphertext. The first ciphertext is obtained by encrypting the shared data by using the data encryption key, and the second ciphertext is obtained by encrypting encapsulation information by using the encapsulation encryption key. The encapsulation information includes the data regulation corresponding to the shared data and a data decryption key corresponding to the data encryption key. Optionally, the encapsulation information further includes a password derivation value of a data password.
[0208] In an embodiment of the present application, the shared data and the data regulation corresponding to the shared data are bound and protected by double-layer encryption. Thus, when a data processing request is received, the data regulation can be decrypted by using the encapsulation decryption key corresponding to the encapsulation encryption key, and it is determined whether the data user has data use permission based on the data regulation. After it is determined that the data user has data use permission, the shared data is decrypted by using the data decryption key, otherwise, the shared data does not need to be decrypted. Since the data volume of the shared data is usually large, the processing resources consumed for decrypting the shared data are more, which can greatly reduce the waste of processing resources and improve the data processing efficiency.
[0209] Alternatively, the at least one encryption key can only include one encryption key, and the ciphertext structure data is ciphertext obtained by encrypting the shared data and the data regulation corresponding to the shared data by using the encryption key.
[0210] Optionally, the ciphertext structure data can be generated by the trusted device 1, and the implementation process of the step 501 can include the following steps 5011 and 5012.
[0211] In the step 5011, the trusted device 1 acquires the shared data, the search metadata corresponding to the shared data, and the data specification corresponding to the shared data.
[0212] Optionally, the trusted device 1 and the data owner of the shared data can be different devices or the same device, and the roles of the trusted device 1 are different, so that the implementation manners of acquiring the shared data, the search metadata, and the data specification are different. The embodiments of the present application are exemplarily described in the following two implementation scenarios.
[0213] In a first implementation scenario, the shared data to be encapsulated by the data owner is stored in a data controller independent of the data owner. In this implementation scenario, the trusted device 1 and the data owner of the shared data can be different devices, or the trusted device 1 can also be the data owner itself.
[0214] In combination with the first possible implementation manner of the above first implementation scenario, the data controller has a TEE or a TPM of the same security strength or an independent module with remote attestation capability of the same security strength securely connected thereto, as the trusted device 1. The data owner sends an encapsulation instruction to the data controller, the encapsulation instruction including an encapsulation range and a data specification corresponding to the shared data in the encapsulation range. The data controller acquires the shared data in the encapsulation range according to the encapsulation instruction and confirms that the owner of the shared data matches the sender of the encapsulation instruction, and then transmits the shared data, the search metadata corresponding to the shared data, and the data specification into the trusted device 1. That is, in this implementation manner, the implementation manner of the step 5011 can be that the trusted device 1 receives the shared data, the search metadata, and the data specification sent by the data controller.
[0215] Optionally, after the trusted device 1 receives the shared data, the search metadata, and the data specification sent by the data controller, the trusted device 1 establishes a secure transmission channel A with the data owner and sends a data verification request to the data owner through the secure transmission channel A, the data verification request being used to request to confirm whether the shared data, the search metadata, and the data specification come from the data owner. The trusted device 1 also receives a data verification response sent by the data owner through the secure transmission channel A, the data verification response being used to indicate that the shared data, the search metadata, and the data specification come from the data owner.
[0216] In the embodiments of the present application, since the data controller is not a fully trusted device, the trusted device 1, as the data processor, can ensure the authenticity of the shared data and the data regulation by verifying whether the shared data and the metadata and the data regulation are truly from the data owner, and can also limit the data owner to set the data regulation for the shared data only, thereby preventing data forgery and denial.
[0217] In combination with the second possible implementation manner of the first implementation scenario, the trusted device 1 can be the data owner itself, since the data controller does not have or cannot securely connect to a TEE or a TPM with equivalent security strength or an independent module with remote attestation capability with equivalent security strength. The data owner sends an encapsulation instruction to the data controller, the encapsulation instruction including an encapsulation range. The data controller returns the shared data and the metadata thereof to the data owner after querying the shared data in the encapsulation range and confirming that the owner of the shared data matches the sender of the encapsulation instruction. That is, in this implementation manner, the implementation manner of step 5011 can be that the trusted device 1 receives the shared data and the metadata sent by the data controller and the locally set data regulation.
[0218] In the second implementation scenario, the shared data to be encapsulated by the data owner is stored in the data owner itself. In this implementation scenario, the trusted device 1 and the data owner of the shared data are the same device. The implementation manner of step 5011 can be that the trusted device 1 acquires the locally stored shared data and metadata and the locally set data regulation.
[0219] In step 5012, the trusted device 1 encrypts the shared data and the data regulation by using at least one encryption key to obtain the ciphertext structure data.
[0220] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key. The implementation manner of step 5012 can be that the trusted device 1 first encrypts the shared data by using the data encryption key to obtain first ciphertext; then encrypts the encapsulation information by using the encapsulation encryption key to obtain second ciphertext, the encapsulation information including the data regulation and a data decryption key corresponding to the data encryption key; and finally splices the first ciphertext and the second ciphertext to obtain the ciphertext structure data.
[0221] Optionally, the trusted device 1 symmetrically or asymmetrically encrypts the shared data by using a data encryption key to obtain first ciphertext. That is, the data encryption key is a symmetric key or an asymmetric key. If the data encryption key is a symmetric key, a data decryption key corresponding to the data encryption key is the same as the data encryption key; if the data encryption key is an asymmetric key, a data decryption key corresponding to the data encryption key is a pair of public and private keys. Similarly, the trusted device 1 symmetrically or asymmetrically encrypts the encapsulation information by using an encapsulation encryption key to obtain second ciphertext. That is, the encapsulation encryption key is a symmetric key or an asymmetric key. If the encapsulation encryption key is a symmetric key, an encapsulation decryption key corresponding to the encapsulation encryption key is the same as the encapsulation encryption key; if the encapsulation encryption key is an asymmetric key, an encapsulation decryption key corresponding to the encapsulation encryption key is a pair of public and private keys.
[0222] In step 502, the trusted device 1 signs the ciphertext structure data and the search metadata corresponding to the shared data by using a signature private key to obtain an encapsulation signature.
[0223] In the embodiment of the present application, in the case that the ciphertext structure data is generated by the trusted device 1, the trusted device 1 needs to obtain the at least one encryption key, the signature public key certificate and the signature private key of the data owner of the shared data. The signature public key certificate includes a signature public key, and the signature public key and the signature private key are a pair of public and private keys. Optionally, the signature public key certificate further includes identity information (publicly available information) of the data owner of the shared data. In addition, the trusted device 1 needs to establish a secure transmission channel B with the sharing agent.
[0224] Optionally, the signature public key certificate can be issued by the sharing agent, and in this implementation, the sharing agent needs to have the function of a certificate authority / certificate center. Alternatively, the signature public key certificate can also be issued by other commercial or certificate authorities with a legal certificate issuing function, and in this implementation, the sharing agent does not need to have the function of a certificate authority / certificate center. The embodiment of the present application takes the case that the signature public key certificate of the data owner is issued by the sharing agent as an example for description.
[0225] In the first possible case, the at least one encryption key, the signature public key and the signature private key are provided by the sharing agent. The trusted device 1 obtains the signature public key certificate and the signature private key of the data owner of the shared data from the sharing agent, and the implementation process includes the following steps A1 to A3.
[0226] In step A1, the trusted device 1 sends a certificate application request to the sharing agent through the secure transmission channel B, and the certificate application request includes the identity information of the data owner.
[0227] Optionally, after the trusted device 1 determines that the obtained shared data, the retrieved metadata and the data specification are all from the data owner, the trusted device 1 can establish a secure transmission channel B with the sharing agent, and send a certificate application request to the sharing agent through the secure transmission channel B, so as to apply for a certificate from the sharing agent on behalf of the data owner.
[0228] In step A2, the sharing agent generates a signature public key certificate and a signature private key according to the certificate application request, and stores the signature public key certificate, which includes the signature public key, the identity information of the data owner, and the signature of the sharing agent on the signature public key and the identity information of the data owner.
[0229] Optionally, after the sharing agent receives the certificate application request, the sharing agent generates a signature public key and a signature private key, and signs the signature public key and the identity information of the data owner (i.e., binds the signature public key to the data owner), to further generate a signature public key certificate. In addition, after receiving the certificate application request, the sharing agent can also generate at least one encryption key and a decryption key, and store the decryption key. For example, the sharing agent stores the generated signature public key certificate and the decryption key correspondingly.
[0230] In step A3, the sharing agent sends a certificate application response to the trusted device 1 through the secure transmission channel B, and the certificate application response includes the signature public key certificate and the signature private key.
[0231] Optionally, the certificate application response also includes the at least one encryption key. Alternatively, the at least one encryption key can also be sent separately, i.e., the sharing agent sends the at least one encryption key to the trusted device 1 through the secure transmission channel B.
[0232] In the embodiments of the present application, since the working environment of the trusted device 1 and the sharing agent is secure and trusted, and the data interaction between the trusted device 1 and the sharing agent is through a secure transmission channel, the entire certificate issuing process is secure and controllable for the data owner.
[0233] Optionally, in the case that the trusted device 1 and the data owner of the shared data are different devices, after step A3 is performed, the trusted device 1 sends the signature public key certificate and the signature private key to the data owner through the secure transmission channel A, so that the data owner holds its own signature public key certificate and signature private key.
[0234] The second possible case is that the trusted device 1 and the data owner of the shared data are different devices, and the at least one encryption key, the signature public key and the signature private key are provided by the data owner. The trusted device 1 obtains the signature public key certificate of the data owner from the sharing agent, and the implementation process includes the following steps B1 to B5.
[0235] In step B1, the trusted device 1 receives at least one encryption key, decryption key, signature private key and signature public key sent by the data owner through the secure transmission channel A.
[0236] In step B2, the trusted device 1 sends a certificate application request including the decryption key and the signature public key to the sharing agent through the secure transmission channel B.
[0237] Optionally, after determining that the obtained shared data, the retrieved metadata and the data schema are all from the data owner, the trusted device 1 can establish the secure transmission channel B with the sharing agent and send the certificate application request to the sharing agent through the secure transmission channel B, instead of the data owner.
[0238] In step B3, the sharing agent generates a signature public key certificate according to the certificate application request, and stores the signature public key certificate and the decryption key correspondingly, the signature public key certificate further including a signature of the sharing agent on the signature public key.
[0239] In step B4, the sharing agent sends a certificate application response including the signature public key certificate to the trusted device 1 through the secure transmission channel B.
[0240] In step B5, the trusted device 1 sends the signature public key certificate to the data owner through the secure transmission channel A.
[0241] In the embodiments of the present application, since the working environment of the trusted device 1 and the sharing agent is secure and trusted, and the data interaction between the trusted device 1 and the sharing agent and between the trusted device 1 and the data owner is carried out through the secure transmission channel respectively, the whole certificate issuing process is safe and controllable for the data owner.
[0242] In the third possible case, the trusted device 1 and the data owner of the shared data are the same device, and the above-mentioned at least one encryption key, signature public key and signature private key are provided by the data owner. The trusted device 1 obtains the signature public key certificate of the data owner from the sharing agent, and the implementation process includes the following steps C1 to C3.
[0243] In step C1, the trusted device 1 sends a certificate application request including the decryption key and the signature public key to the sharing agent through the secure transmission channel B.
[0244] In step C2, the sharing agent generates a signature public key certificate according to the certificate application request, and stores the signature public key certificate and the decryption key correspondingly, the signature public key certificate further including a signature of the sharing agent on the signature public key.
[0245] In step C3, the sharing agent sends a certificate application response including the signed public key certificate to the trusted device 1 through the secure transmission channel B.
[0246] In the embodiments of the present application, since the working environment of the sharing agent is secure and trusted, and the data interaction between the trusted device 1 (i.e., the data owner) and the sharing agent is performed through the secure transmission channel, the entire certificate issuing process is secure and controllable for the data owner.
[0247] In step 503, the trusted device 1 sends the encapsulation signature to the sharing agent through the secure transmission channel B.
[0248] In step 504, the sharing agent stores the encapsulation signature, the signed public key certificate and the decryption key.
[0249] The decryption key is used at least to decrypt the data specification in the ciphertext structure data. Optionally, in combination with step 501, when the at least one encryption key includes a data encryption key and an encapsulation encryption key, the decryption key stored in the sharing agent in correspondence with the encapsulation signature and the signed public key certificate includes an encapsulation decryption key corresponding to the encapsulation encryption key.
[0250] In step 505, the trusted device 1 encapsulates the ciphertext structure data, the search metadata, the encapsulation signature and the signed public key certificate to obtain encapsulation data, which is used for circulation and sharing.
[0251] At this point, the trusted derivation of the shared data is completed. Optionally, after the trusted device 1 generates the encapsulation data, the encapsulation data can be freely derived by the data controller or directly provided with a public network access interface, and the circulation mode of the encapsulation data is not limited in the embodiments of the present application.
[0252] Optionally, the encapsulation data can be directly transmitted on the public network without additional encryption through the secure transmission channel, thereby realizing non-directional transmission. Of course, when the encapsulation data is actually transmitted, the encapsulation data can also be encrypted and integrity protected to reduce the risk of mirror attack and denial of service attack.
[0253] In the embodiments of the present application, the shared data is bound to the data specification set by the data owner for encryption protection, the ciphertext structure data and the search metadata are digitally signed as a whole, and the encapsulation signature and the signature public key certificate are bound and encapsulated on the ciphertext structure data and the search metadata, so that the authenticity of the encapsulated data can be verified in the circulation and sharing process, and the confidentiality and integrity of the shared data and the data specification in the circulation and sharing process are protected. In addition, since the encapsulated data is generated by a trusted device trusted by the data owner, the sharing agent is trusted by multiple participants participating in data sharing, and the trusted device and the sharing agent transmit data through a secure transmission channel, the security, confidentiality and integrity of the shared data and the data specification in the derivation process are protected. Therefore, the embodiments of the present application can realize the security protection of the shared data and the data specification in the derivation process and the circulation process, and prevent the data from being forged, tampered and leaked.
[0254] Optionally, the present application illustrates the trusted derivation scheme for the case that the data processor (i.e. the trusted device 1) and the data owner are different devices, and the case that the data processor and the data owner are the same device through the following embodiments.
[0255] For example, FIG. 6 is a flow model schematic diagram of a trusted derivation scheme provided by the embodiments of the present application. In the flow model, the data processor and the data owner are different devices, and the data to be encapsulated by the data owner is stored in the data controller. As shown in FIG. 6, the flow model includes the following 9 steps.
[0256] 1. The data owner sends an encapsulation instruction to the data controller, and the encapsulation instruction includes an encapsulation range and a data specification corresponding to the shared data in the encapsulation range.
[0257] 2. The data controller queries the shared data in the encapsulation range according to the encapsulation instruction, and confirms that the data owner of the shared data matches the sender of the encapsulation instruction, and then transmits the shared data, the corresponding search metadata and the data specification to the data processor.
[0258] 3. The data processor establishes a secure transmission channel with the data owner and a secure transmission channel with the sharing agent, respectively, and confirms again that the data owner matches the data owner without error, and then sends the identity information of the data owner (at this time, the data owner) to the sharing agent through the secure transmission channel.
[0259] 4. The sharing agent generates a data encryption key, an encapsulation encryption key, a signature public key certificate and a signature private key, and sends them to the data processor through the secure transmission channel, and the signature public key certificate contains the signature public key and the identity information of the data owner.
[0260] 5. The data processor encrypts the shared data by using the data encryption key.
[0261] 6. The data processor encrypts the data schema and the data encryption key using the encapsulation encryption key, and splices the encrypted shared data and the encrypted data schema and data encryption key into ciphertext structure data.
[0262] 7. The data processor digitally signs the ciphertext structure data and the search metadata using the signature private key to obtain an encapsulation signature.
[0263] 8. The data processor combines the ciphertext structure data, the search metadata, the encapsulation signature, and the signature public key certificate into a fixed data structure to become encapsulation data, which can be used for subsequent storage, transmission, and search.
[0264] 9. The data processor transmits the signature public key certificate and the signature private key to the data owner through a secure transmission channel, and transmits the encapsulation signature to the sharing agent through a secure transmission channel.
[0265] The sharing agent stores the signature public key certificate, the encapsulation key, the encapsulation signature, and establishes a corresponding relationship, thus completing the trusted derivation of the shared data.
[0266] For another example, FIG. 7 is a flow model schematic diagram of another trusted derivation scheme provided by the embodiments of the present application. In the flow model, the trusted device 1 is the same device as the data owner, and the data to be encapsulated by the data owner is stored locally. As shown in FIG. 7, the flow model includes the following 7 steps.
[0267] 1. The data owner establishes a secure transmission channel with the sharing agent, and sends the identity information of the data owner to the sharing agent through the secure transmission channel.
[0268] 2. The sharing agent generates and sends the data encryption key, the encapsulation encryption key, the signature public key certificate, and the signature private key to the data owner through the secure transmission channel, wherein the signature public key certificate contains the signature public key and the identity information of the data owner.
[0269] 3. The data owner encrypts the shared data using the data encryption key.
[0270] 4. The data owner encrypts the data schema and the data encryption key using the encapsulation encryption key, and splices the encrypted shared data and the encrypted data schema and data encryption key into ciphertext structure data.
[0271] 5. The data owner digitally signs the ciphertext structure data and the search metadata using the signature private key to obtain an encapsulation signature.
[0272] 6. The data owner combines the ciphertext structure data, the retrieval metadata, the encapsulation signature and the signature public key certificate into a fixed data structure, as encapsulated data, which can be used for subsequent storage, transmission and retrieval.
[0273] 7. The data owner transmits the encapsulation signature to the sharing agent through a secure transmission channel.
[0274] The sharing agent stores the signature public key certificate, the encapsulation key, the encapsulation signature and establishes a corresponding relationship, thus completing the trusted derivation of the shared data.
[0275] Optionally, the embodiments of the present application also support the data owner's deletability of the shared data after the shared data starts to circulate, and provide technical support for the deletion right or the right to be forgotten of personal information or data. Optionally, after completing the trusted derivation of the shared data, the data owner can send a data invalidation request to the sharing agent, the data invalidation request including a signature public key certificate, the data invalidation request being used to request invalidation of corresponding encapsulated data. The sharing agent performs identity authentication on the data owner. If the identity authentication on the data owner succeeds, the sharing agent invalidates at least one of the signature public key certificate, a decryption key corresponding to the signature public key certificate or an encapsulation signature corresponding to the signature public key certificate according to the data invalidation request. The implementation manner of the sharing agent performing identity authentication on the data owner includes but is not limited to initiating one-way authentication based on a random challenge value to the data owner, or using the authentication manner of ISO 9798 or GB / T 15843.3.
[0276] Optionally, after receiving the data invalidation request, the sharing agent can first verify the validity of the signature public key certificate in the data invalidation request, for example, verifying whether the sharing agent locally stores the signature public key certificate, whether the signature public key certificate is within a valid period, and the like. The sharing agent performs identity authentication on the data owner after determining that the signature public key certificate is valid.
[0277] Optionally, the data invalidation request includes an indication of an invalidation time, the data invalidation request being used to request invalidation of corresponding encapsulated data within the invalidation time. Correspondingly, the sharing agent invalidates at least one of the signature public key certificate, a decryption key corresponding to the signature public key certificate or an encapsulation signature corresponding to the signature public key certificate within the invalidation time according to the data invalidation request.
[0278] In the embodiments of the present application, when the data owner needs to delete or temporarily freeze some encapsulated data, the signature public key certificate associated with the encapsulated data can be sent to the sharing agent. The sharing agent makes at least one of the signature public key certificate, the decryption key corresponding to the signature public key certificate, or the encapsulation signature corresponding to the signature public key certificate permanently or temporarily invalid, so that the data user cannot obtain the shared data in the encapsulated data through the verification of the sharing agent, thereby achieving the purpose of forcibly deleting or temporarily freezing the shared data.
[0279] In the second embodiment of the present application, the implementation process of the secure use stage is described. For example, FIG. 8 is a flowchart of another data sharing method 800 provided by the embodiments of the present application. The method 800 only shows the implementation process of the secure use scheme. As shown in FIG. 8, the method 800 includes but is not limited to the following steps 801 to 807. Optionally, the method 800 further includes the following steps 808 to 812.
[0280] It is worth noting that the trusted device 2 in the method 800 is a data processor. In combination with the system architecture shown in FIG. 2, the trusted device 2 in the method 800 is, for example, the data processor B. Alternatively, in combination with the application scenario shown in FIG. 3, the trusted device 2 in the method 800 is, for example, the TEE / TPM. Alternatively, in combination with the application scenario shown in FIG. 4, the trusted device 2 in the method 800 is, for example, the TEE / TPM.
[0281] In step 801, the trusted device 2 obtains a data use request 1 and encapsulated data 1 matched with the data use request 1. The encapsulated data 1 includes ciphertext structure data 1, retrieval metadata 1, encapsulation signature 1, and signature public key certificate 1. The data use request 1 includes data description information 1 and use attribute information 1.
[0282] The ciphertext structure data 1 is encrypted by using at least one encryption key on the shared data and the data specification 1 corresponding to the shared data. The signature public key certificate 1 includes the signature public key 1. Here, the explanations of the encapsulated data 1, the ciphertext structure data 1, the encapsulated signature 1, and the signature public key certificate 1 can refer to the related explanations of the encapsulated data, the ciphertext structure data, the encapsulated signature, and the signature public key certificate in the method 500, which will not be repeated here. The data description information is used for matching the search metadata, including but not limited to the file name, the data owner, and the like. The encapsulated data 1 is matched with the data usage request 1, including: for the same description object, the description object in the data description information 1 is a subset of the description object in the search metadata 1. For example, the description object is the file name, the file name in the search metadata 1 is “A+B”, and the file name in the data description information 1 is “A”, “B”, or “A+B”, which are considered to be matched with the data usage request 1. If the file name in the data description information 1 is “A+C”, it is considered that the encapsulated data 1 is not matched with the data usage request 1.
[0283] In the embodiment of the application, the data usage request 1 is initiated by the data user 1, and the data user 1 can send the data usage request to any data controller who can obtain the encapsulated data 1. When the data controller receives the data usage request and starts the processing flow, the data controller must internally own or securely connect to the TEE or the TPM of the same security strength or the independent module of the same security strength with remote attestation capability, and as a data processor, the trusted device 2 in the embodiment of the application meets the condition. The data controller searches the search metadata of all encapsulated data controlled by the data controller, reads all encapsulated data covered by the data usage request, and imports the encapsulated data into the data processor (i.e., the trusted device 2) for processing one by one or at one time. Alternatively, one data usage request can cover one or more encapsulated data, and the embodiment of the application takes the processing of one encapsulated data by the data processing device as an example for description.
[0284] Alternatively, the trusted device 2 receives the data usage request 1 and the encapsulated data 1 sent by the data controller.
[0285] In step 802, the trusted device 2 verifies the encapsulated signature 1 by using the signature public key 1 based on the key structure data 1 and the search metadata 1.
[0286] Alternatively, after obtaining the encapsulated data 1, the trusted device 2 first verifies the authenticity of the signature public key certificate 1 in the encapsulated data 1, and then verifies the encapsulated signature 1 in the encapsulated data 1 locally by using the signature public key 1 in the signature public key certificate 1 after the authenticity of the signature public key certificate 1 is verified. In the embodiment of the application, the authenticity of the signature public key certificate is ensured by verifying the certificate chain, and the encapsulated data 1 is further ensured to be undamaged.
[0287] Step 803, after successfully verifying the package signature 1, the trusted device 2 sends a key acquisition request to the sharing agent, the key acquisition request including the package signature 1.
[0288] Step 804, the sharing agent verifies whether the trusted device 2 is trusted.
[0289] Optionally, after receiving the key acquisition request, the sharing agent first searches whether the package signature 1 is stored locally, and after searching that the package signature 1 is stored locally, and that the corresponding stored package signature 1, decryption key 1 and signature public key certificate 1 are valid and not frozen, the sharing agent verifies whether the trusted device 2 is trusted. After determining that the trusted device 2 is trusted, the sharing agent establishes a secure transmission channel C with the trusted device 2.
[0290] In a first implementation scenario, the sharing agent is a trusted third party. The implementation of step 804 can be that the sharing agent initiates remote attestation to the trusted device 2 to perform code integrity verification on an operator in the trusted device 2, the operator being used to execute the data sharing process corresponding to the trusted device 2. The operator includes operators involved in each link of data unsealing, schema parsing and attribute extraction of the data processing device in the entire data security use scheme.
[0291] In a second implementation scenario, the sharing agent and the trusted device 2 are mutually trusted, for example, under the condition that the data owner agrees, the agent role can be deployed under the condition that the data processor and the sharing agent are mutually trusted. The implementation of step 804 can be that the sharing agent performs identity authentication on the trusted device 2 and determines that the trusted device 2 completes static code integrity verification on the operator, the operator being used to execute the data sharing process corresponding to the trusted device 2. In this implementation scenario, the trusted device 2 can perform mutual identity authentication with the sharing agent through the secure transmission channel C and perform static code integrity verification on the operator in the trusted device 2. The operator in the trusted device 2 can be a pre-installed internal operator, and then the trusted device 2 can complete the static code integrity verification on the internal operator after being started safely. Alternatively, the operator in the trusted device 2 can also be an external operator imported by the data controller, and then the trusted device 2 can perform static code integrity verification on the external operator when the external operator is imported.
[0292] Step 805, after determining that the trusted device 2 is trusted, the sharing agent sends a key acquisition response including the decryption key 1 corresponding to the package signature 1 to the trusted device 2 through the secure transmission channel C.
[0293] Optionally, after performing step 805, the sharing agent can also perform run-time measurement on the operators in the trusted device 2 during the whole process of the data processing step performed after the trusted device 2, to ensure that the system integrity of the trusted device 2 has not been compromised. Of course, if all the operators or interfaces involved in the data processing device in the whole data security use scheme, such as data unsealing, schema parsing, attribute extraction, etc., have been pre-embedded in the trusted device 2 (such as embedded in TEE / TPM), or the sharing agent and the trusted device 2 are mutually trusted, the sharing agent does not need to perform run-time measurement on the trusted device 2.
[0294] Step 806, the trusted device 2 decrypts the ciphertext structure data 1 using the decryption key 1 to obtain at least the data schema 1.
[0295] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key 1 is an encapsulation decryption key corresponding to the encapsulation encryption key. The ciphertext structure data 1 includes a first ciphertext and a second ciphertext, and the first ciphertext is obtained by encrypting the shared data using the data encryption key. The second ciphertext is obtained by encrypting the encapsulation information using the encapsulation encryption key. The encapsulation information includes the data schema 1 and a data decryption key corresponding to the data encryption key. Then, the implementation of step 806 can be that the trusted device 2 decrypts the second ciphertext using the encapsulation decryption key to obtain the encapsulation information. Further, the trusted device 2 can also decrypt the first ciphertext using the data decryption key to obtain the shared data.
[0296] Optionally, the encapsulation information further includes a password derivation value of a data password. The trusted device 2 performs identity authentication on the data user 1 through a password-authenticated key exchange (PAKE) protocol based on the data password input by the data user 1 locally, and negotiates a session key with the data user 1 to establish a secure transmission channel D with the data user 1.
[0297] The embodiment of the present application can apply a data password implementation scheme. In the trusted derivation scheme, the trusted device 1 encapsulates and encrypts the password derivation value of the data password together with the data specification and the data encryption key as encapsulation information (as described above with reference to the related description in step 5012). In the secure use scheme, the trusted device 2 decrypts the password derivation value by using the encapsulation decryption key. In the process of establishing a secure transmission channel between the trusted device 2 and the data user 1, the data user 1 locally inputs the data password, and the data user 1 and the trusted device 2 can use a PAKE protocol to achieve mutual authentication and negotiate a session key. The PAKE protocol used herein includes but is not limited to an Augmented PAKE protocol. When the Augmented PAKE protocol is used to negotiate the session key, the data user 1 needs to use the password derivation value to participate in the derivation of the session key. The embodiment of the present application does not limit the type and version of the PAKE protocol used. In the embodiment of the present application, only the user who has the data password can pass the identity authentication and establish a secure transmission channel with the trusted device 2. The data password implementation scheme limits the scope of the data user, which can reduce the risk of data being obtained by attackers.
[0298] Optionally, for the same data user, if the number of consecutive failures of the identity authentication of the data user by the trusted device 2 according to the data password locally input by the data user reaches a first number threshold, the trusted device 2 stops responding to the data use request from the data user within a target time length. For example, the trusted device 2 notifies the data controller to perform operations such as locking the user account for a period of time, locking the user IP, setting an IP blacklist, and the like. In this way, the illegal user who does not have the data password can be prevented from obtaining the data use permission through trial and error.
[0299] Optionally, for a plurality of data users accessing the same data controller, if the number of consecutive failures of the identity authentication of the plurality of data users by the trusted device 2 according to the data passwords locally input by the plurality of data users respectively reaches a second number threshold, the trusted device 2 marks the encapsulated data requested to be used by the plurality of data users as invalid. For example, the trusted device 2 marks the current encapsulated data as temporarily invalid, and further can notify the sharing agent to be activated actively or at a fixed time.
[0300] Step 807, the trusted device 2 executes the data use request 1 according to the matching result of the use attribute information 1 and the data specification 1, and sends the data processing result corresponding to the data use request 1 to the data user 1 through the secure transmission channel D.
[0301] After the trusted device 2 obtains the data regulation 1, the trusted device 2 parses the data regulation 1 to parse various attribute requirements of the data owner on data usage. Accordingly, the trusted device 2 extracts corresponding attribute information from the usage attribute information 1 according to the attribute requirements in the data regulation 1 in sequence, and compares the attribute information with the attribute range defined in the data regulation 1. If the comparison result is that the attribute information extracted from the usage attribute information 1 belongs to the attribute range defined in the data regulation 1, the data usage request 1 is allowed to be executed, and a data processing result allowed by the data regulation 1 is returned.
[0302] Optionally, the data regulation 1 includes one or more of a legal user attribute, an access data range corresponding to the legal user, an allowed operation type for the shared data, a legal processor attribute, or a data usage change attribute. The data usage change attribute has the characteristic of changing with the usage of the shared data, for example, including the number of times of data usage.
[0303] In a first possible implementation, the data regulation 1 includes a legal user attribute, and accordingly, the usage attribute information 1 includes a user attribute of the data user 1. Then, in the step 807, if the user attribute of the data user 1 belongs to the legal user attribute, the trusted device 2 executes the data usage request 1. For example, the legal user attribute is a user attribute range, and it is required to prove that the user attribute of the data user 1 belongs to the user attribute range. In this implementation, the attribute source includes the data user itself (user name, user IP, etc.). Before the data user wants to use the data shared by the data owner, if the attribute range of the data user is limited in the data regulation, the data user needs to register a certificate (hereinafter referred to as a user attribute certificate) for one or more attributes of the data user in advance. For example, the data user can register a user attribute certificate with a sharing agent or other certificate issuing agency. In the attribute extraction stage, the data user 1 sends the user attribute certificate to the trusted device 2 through the secure transmission channel D, and the trusted device 2 authenticates the data user 1 when the user attribute certificate is valid. The implementation of the trusted device 2 authenticating the data user 1 includes but is not limited to initiating a one-way authentication based on a random challenge value for the data user, or using the authentication mode of ISO 9798 or GB / T 15843.3.
[0304] In a second possible implementation, the data regulation 1 includes a legitimate user attribute and an access data range corresponding to the legitimate user, and the usage attribute information 1 includes a user attribute of the data user 1 and a requested data range. In the step 807, if the user attribute of the data user 1 belongs to the legitimate user attribute and the requested data range belongs to the access data range corresponding to the data user 1, the trusted device 2 executes the data usage request 1. The access data range corresponding to the legitimate user is a data range that the legitimate user has access to, and different legitimate users have different access data ranges. In this implementation, the attribute source includes the data user itself and the data usage request.
[0305] In a third possible implementation, the data regulation 1 includes an allowed operation type for the shared data, and the usage attribute information 1 includes a data operation type. In the step 807, if the data operation type belongs to the allowed operation type, the trusted device 2 executes the data usage request 1. Optionally, the data operation type includes, but is not limited to, adding, deleting, modifying, querying, and aggregation. In this implementation, the attribute source includes the data usage request. Of course, the allowed operation type in the data regulation 1 can also be set for legitimate users, for example, the legitimate user A is allowed to perform an aggregation operation on the shared data, and the legitimate user B is not allowed to perform an aggregation operation on the shared data.
[0306] Optionally, in combination with the second possible implementation and the third possible implementation, after obtaining the data regulation 1, the trusted device 2 verifies the data usage request 1 from the data user 1. For example, the data user 1 sends the data usage request to the trusted device 2 again through a secure transmission channel D, and the trusted device 2 needs to confirm that the data usage request sent by the data user 1 matches the data usage request 1 sent by the data controller. Since the attribute source includes the data usage request, and the data controller is not a fully trusted device, the authenticity of the data usage request is ensured by verifying the data usage request from the data user and ensuring that the data usage request is not tampered with, thereby improving the security and reliability of data processing.
[0307] In a fourth possible implementation, the data regulation 1 includes a legitimate processor attribute, and after obtaining the data regulation 1, the trusted device 2 determines that the trusted device 2 belongs to a legitimate processing device defined by the legitimate processor attribute. In this implementation, the attribute source includes the data processor. The trusted device 2 needs to determine whether it has the right to process the corresponding shared data.
[0308] Optionally, for the case that the attribute source is beyond the data user, the data use request and the data handler, the data handler needs to send the attribute extraction request to the sharing agent, and the sharing agent extracts or rejects it. For example, the data specification requires to provide the system time of the data processing, and the data handler cannot provide the trusted system time, so the sharing agent needs to provide the real-time time service.
[0309] In the fifth possible implementation, the data specification 1 includes a data use change attribute, such as a data useable times attribute, which needs global or local synchronization, and the sharing agent needs to be additionally registered for attribute update, and a post-processing process is triggered after the output of the data processing result in the secure use scheme. For example, the sharing agent records that the data useable times is 10, and after outputting a data processing result, the data useable times recorded in the sharing agent is changed to 9. In this implementation, in the specification analysis and attribute extraction stage, the attribute comparison between the two parties is changed to the attribute range in the specification and the extracted attribute, and the attribute range recorded in the sharing agent and the extracted attribute. For example, the sharing agent records the data use change attribute, and in the above step 807, the trusted device 2 acquires the data use change attribute recorded in the sharing agent, and according to the matching result of the use attribute information 1 and the data use change attribute recorded in the sharing agent, the data use request 1 is executed. For example, the trusted device 2 executes the data use request 1 in the case that the data useable times recorded in the sharing agent is not 0.
[0310] If the sharing agent retrieves the encapsulation signature, but it does not exist or is not available, or the signature public key certificate fails to be verified or the registered attribute is not available (such as the data useable times is zero), the trusted device 2 can prompt the data controller to delete the corresponding encapsulation data.
[0311] It is worth noting that if any step in the above secure use process does not meet the execution requirements, the trusted device 2 rejects the processing, such as the data controller does not retrieve the encapsulation data covered by the data use request 1 in step 801, or the sharing device fails to measure the running state of the trusted device 2, etc.
[0312] In the embodiments of the present application, before the data user uses the shared data, the shared agent checks whether the data processor is trustworthy, and provides the decryption key to the data processor after determining that the data processor is trustworthy; the data processor respectively performs signature verification, data decryption, schema analysis, and verifiable attribute extraction, and processes and returns the data processing result to the data user according to the matching result of the attribute extraction content and the attribute range in the data schema. The embodiments of the present application protect the verifiability of the attributes matched with the data schema, and prevent attribute forgery of the user and the processor. In addition, the data owner can set the data schema to enable the shared data to be used only by the data users within a specified range and processed only by the specified data processors, and enable the processing result to be obtained only within a specified range, thereby realizing data access control beyond the physical control range of the data owner, and protecting the data security of the processing process and the verifiability of the users and processing environments involved in the processing process.
[0313] Optionally, after the trusted device 2 decrypts the ciphertext structure data 1 to obtain the shared data, the trusted device 2 converts the role of the trusted device 2 from the data processor to a new data owner to update the encapsulated content such as the shared data and / or the data schema, if the data schema 1 allows. For example, the trusted device 2 splits the shared data to obtain a plurality of data shards, and performs a trusted derivation process on a single data shard. The trusted derivation process includes: encrypting the data shard and the data schema 2 corresponding to the data shard to obtain ciphertext structure data 2; signing the ciphertext structure data 2 and the search metadata 2 corresponding to the data shard by using the signature private key 2 to obtain an encapsulation signature 2; sending the encapsulation signature 2 to the shared agent through the secure transmission channel C, so that the shared agent stores the encapsulation signature 2, the signature public key certificate 2, and the decryption key 2 corresponding to the encapsulation signature 2, the signature public key certificate 2 includes the signature public key 2 corresponding to the signature private key 2, and the decryption key 2 is used at least to decrypt the data schema 2 in the ciphertext structure data 2; and encapsulating the ciphertext structure data 2, the search metadata 2, the encapsulation signature 2, and the signature public key certificate 2 to obtain encapsulation data 2, which is used for circulation sharing. The trusted derivation process specifically refers to the method 500 described above, and will not be described here again in the embodiments of the present application. The data schema 2 can be set by the trusted device 2, and the signature public key certificate 2 and the signature private key 2 can be the signature public key certificate and the signature private key of the trusted device 2.
[0314] Optionally, the data processor can also modify and re-encapsulate the encapsulation data if the data schema 1 allows. At this time, the re-encapsulation process is similar to the data splitting process described above, and each re-encapsulation is equivalent to performing the trusted derivation scheme in the method 500 described above once.
[0315] In the embodiments of the present application, within the scope allowed by the data owner, the update, splitting, re-encapsulation and extension of the shared data and / or its data specification can be conditionally implemented, which extends the processing purposes of the shared data. When the data user is the data owner himself, the technical support is provided for the correction and supplement of personal information or data.
[0316] In the secure use scheme shown in steps 801 to 807, the data processor (trusted device 2) must be connected to the sharing agent online, which is referred to as an online processing mode in the embodiments of the present application. Alternatively, the embodiments of the present application can also provide a data secure use mode for the data processor without connecting to the sharing agent, which is referred to as an offline processing mode in the embodiments of the present application.
[0317] When the offline processing mode is implemented, the following three mandatory conditions and at least one optional condition need to be met.
[0318] Mandatory condition one: the same piece of encapsulated data has been processed by the online processing mode at least once in the same data processor.
[0319] Mandatory condition two: the data processor contains an offline available trusted root (such as a hardware trusted root key) that can be used for local self-checking of code integrity and secure boot.
[0320] Mandatory condition three: the data processor is pre-installed with a public key of a certificate issuing agency corresponding to a signed public key certificate (hereinafter referred to as an issuing agency public key). If the data specification involves user attributes, the data processor also needs to be pre-installed with a public key of a certificate issuing agency corresponding to a user attribute certificate.
[0321] Optional condition one: the data specification of the data owner stipulates that the encapsulated data can only be directly imported into another data processor by a data processor through a secure transmission channel, and the encapsulated data is not exposed to a non-trusted environment such as a data controller even in the encapsulated form.
[0322] Optional condition two: the data specification does not contain attribute contents such as the number of data uses that need to be globally synchronized.
[0323] Optionally, the trusted device 2 stores the decryption key 1 and the package signature 1 after performing the above steps 801 to 807. In one implementation, the trusted device 2 can bind the cached decryption key 1 and the package signature 1 in the scenario of not powering off. In another implementation, the trusted device 2 generates a derived key based on a trusted root key of the trusted device 2 using a key derivation function, encrypts the decryption key 1 using the derived key to obtain a decryption key ciphertext, and persistently binds and stores the decryption key ciphertext and the package signature 1. The embodiments of the present application protect the decryption key (e.g., the package decryption key) by key caching or internal root key encryption of a data processor after the data processor first connects to the sharing agent for a piece of packaged data. Further, the embodiments of the present application illustrate the implementation process of the offline processing mode by the following steps 808 to 812.
[0324] In step 808, the trusted device 2 obtains the data usage request 2 and the package data 1 matched with the data usage request 2, where the data usage request 2 includes the data description information 2 and the usage attribute information 2.
[0325] Here, the explanation of the package data 1 can refer to the above step 801, which will not be repeated here. The package data 1 is matched with the data usage request 2, including that for the same description object, the description object in the data description information 2 is a subset of the description object in the search metadata 1.
[0326] Optionally, the implementation of this step 808 is that the trusted device 2 receives the data usage request 2 and the package data 1 sent by the data controller. If the trusted device 2 is in an unstarted state, it is started securely; if the trusted device 2 is in a started state, it is subjected to static code integrity verification.
[0327] In step 809, the trusted device 2 verifies the authenticity of the signature public key certificate 1 in the package data 1 using the issuing authority public key.
[0328] The embodiments of the present application verify the certificate chain to ensure the authenticity of the signature public key certificate 1 in the package data 1.
[0329] In step 810, after the authenticity verification of the signature public key certificate 1 passes, the trusted device 2 verifies the package signature 1 in the package data 1 using the signature public key 1 in the signature public key certificate 1 based on the ciphertext structure data 1 and the search metadata 1 in the package data 1.
[0330] In step 811, after the verification of the package signature 1 succeeds, the trusted device 2 decrypts the ciphertext structure data 1 using the stored decryption key 1 to obtain at least the data reduction 1.
[0331] Optionally, the trusted device 2 locally queries the corresponding stored decryption key 1 according to the package signature 1, specifically, directly calls the cached decryption key 1, or decrypts the persisted decryption key ciphertext to obtain the decryption key 1. If the trusted device 2 does not locally query the package signature 1, subsequent data processing is performed according to the online processing mode, and specific reference is made to steps 803 to 806 described above.
[0332] Step 812: The trusted device 2 executes the data use request 2 according to the matching result of the use attribute information 2 and the data regulation 1, and sends a data processing result corresponding to the data use request 2 to the data user 2 through the secure transmission channel E.
[0333] The implementation mode of this step 812 can refer to the implementation mode of the above-described step 807, and the embodiments of the present application will not be described here. The offline processing mode is different from the online processing mode in the processing mode of the data use change attribute. Different from the fifth possible implementation mode under the above-described step 807, if the data regulation 1 includes the data use change attribute, such as the number of times of data use of the current processor, in the offline processing mode, the attribute update needs to be additionally registered in the data processor, and a post-processing process is triggered after the data processing result is output in the secure use scheme. For example, the number of times of data use of the data processor is registered as 10, and after the data processing result is output once, the number of times of data use recorded in the data processor is changed to 9. In this implementation mode, in the regulation analysis and attribute extraction stage, the attribute comparison parties change the attribute range in the regulation and the extracted attribute to the attribute range registered in the data processor and the extracted attribute. For example, the data use change attribute is recorded in the trusted device 2, and in the above-described step 812, the trusted device 2 executes the data use request 2 according to the matching result of the use attribute information 2 and the data use change attribute recorded in the trusted device 2. For example, the trusted device 2 executes the data use request 2 in the case that the number of times of data use recorded in the trusted device 2 is not 0.
[0334] It is worth noting that for the case that the attribute source is beyond the data user, the data use request and the data processor, the trusted device 2 directly rejects the processing. In addition, in the offline processing mode, the operation of the data owner notifying the sharing agent to delete or freeze the packaged data is invalid for the current data processor, and the validity period of the data depends on the validity period of the signature public key certificate and the user attribute certificate.
[0335] The embodiments of the present application can conditionally implement offline processing, get rid of the continuous dependence on the sharing agent and the restriction that the data processor needs to be continuously connected to the sharing agent, and expand the processing scenarios of shared data.
[0336] Optionally, if the data regulation allows offline splitting of the encapsulated data, the offline splitting can only be used after splitting in the data processor, and the split encapsulated data is not allowed to be transmitted externally (including not allowed to be transmitted in plaintext / ciphertext to the data controller). In addition, in order to prevent external attackers from forcing a local attribute to be reset, if the data regulation supports local attribute update, the data processor must have the ability to safely store its registered local attribute before power-off, otherwise it should be rejected.
[0337] The above-mentioned data sharing method provided by the embodiments of the present application can be embedded as a whole security function in a database, the database serving as a data controller, and the related operators of the present application required to be called during processing being synchronized to the data processor for calling and verifying the code integrity. Alternatively, the above-mentioned data sharing method provided by the embodiments of the present application can be an independent application / software module in an operating system, and can be independently called by various forms of data controllers and data processors. Alternatively, the above-mentioned data sharing method provided by the embodiments of the present application can be pre-embedded as a software module in a TEE / TPM, and become a part of the data processor, and only the interface for setting the data regulation by the data owner and the interface for downloading or receiving shared data from the public network are reserved outside the data processor.
[0338] The order of the steps of the data sharing method provided by the embodiments of the present application can be adjusted appropriately, and the steps can be increased or decreased accordingly. Any person skilled in the art can easily think of changes within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. For example, from the application perspective, the embodiments of the present application do not limit the data sharing scene, and provide online processing mode and offline processing mode to meet the needs of distributed, terminal, Internet of Things, cloud and other scenes. Taking the sharing agent as an example, in the case of a trusted third party, the service requires the sharing agent to provide a signature public key certificate, a decryption key, a storage and management service of the encapsulated signature, and a remote proof service of the code integrity of the data processor and the external operator participating in each processing step in the data processor. In the case of mutual trust between the sharing agent and the data processor, and when the operators of the security use scheme are pre-embedded in the data processor, the service requires the sharing agent to provide a signature public key certificate, a decryption key, a storage and management service of the encapsulated signature, and a two-way identity verification and static code integrity verification capability of the data processor. Under objective conditions, the deployment or implementation of the sharing agent is relatively more convenient than other platformized or non-platformized schemes in the industry.
[0339] For example, FIG. 9 is an implementation flow diagram of a data sharing method 900 provided by another embodiment of the present application. As shown in FIG. 9, the method 900 includes but is not limited to the following steps 901 to 904.
[0340] The trusted device obtains ciphertext structure data, which is obtained by encrypting the shared data and a data specification corresponding to the shared data using at least one encryption key.
[0341] The trusted device signs the ciphertext structure data and the search metadata corresponding to the shared data using a signature private key to obtain an encapsulated signature.
[0342] The trusted device sends the encapsulated signature to the sharing agent through a first secure transmission channel, so that the sharing agent stores the encapsulated signature, a signature public key certificate including a signature public key corresponding to the signature private key, and a decryption key used at least for decrypting the data specification in the ciphertext structure data.
[0343] The trusted device encapsulates the ciphertext structure data, the search metadata, the encapsulated signature, and the signature public key certificate to obtain encapsulated data, which is used for circulation sharing.
[0344] When the method 900 is specifically used to implement the method 500, the trusted device is, for example, the trusted device 1, and the first secure transmission channel is, for example, the secure transmission channel B. The implementation processes of steps 901 to 904 can refer to steps 501 to 505 in the method 500.
[0345] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key. The ciphertext structure data includes first ciphertext and second ciphertext. The first ciphertext is obtained by encrypting the shared data using the data encryption key. The second ciphertext is obtained by encrypting encapsulation information using the encapsulation encryption key, and the encapsulation information includes the data specification and a data decryption key corresponding to the data encryption key.
[0346] Optionally, the encapsulation information further includes a password derivation value of a data password.
[0347] Optionally, the trusted device obtains the ciphertext structure data in the following manner: the trusted device obtains the shared data, the search metadata, and the data specification; and the trusted device encrypts the shared data and the data specification using the at least one encryption key to obtain the ciphertext structure data.
[0348] Optionally, the signature public key certificate further includes identity information of a data owner of the shared data.
[0349] Optionally, the trusted device and the data owner of the shared data are different devices. The trusted device sends a data validation request to the data owner through the second secure transmission channel, the data validation request being used to request confirmation that the shared data, the retrieval metadata and the data schema are from the data owner. The trusted device receives a data validation response sent by the data owner through the second secure transmission channel, the data validation response being used to indicate that the shared data, the retrieval metadata and the data schema are from the data owner. The second secure transmission channel is, for example, the secure transmission channel A described above.
[0350] In a first possible implementation, the trusted device sends a certificate application request to the sharing agent through the first secure transmission channel, the certificate application request including the identity information of the data owner. The trusted device receives a certificate application response sent by the sharing agent through the first secure transmission channel, the certificate application response including the signature public key certificate and the signature private key, the signature public key certificate further including the signature of the sharing agent on the signature public key and the identity information of the data owner.
[0351] Optionally, in combination with the first possible implementation described above, the certificate application response further includes the at least one encryption key.
[0352] Optionally, in combination with the first possible implementation described above, the trusted device and the data owner of the shared data are different devices, and the trusted device sends the signature public key certificate and the signature private key to the data owner through the second secure transmission channel.
[0353] In a second possible implementation, the trusted device and the data owner of the shared data are different devices. The trusted device receives at least one encryption key, a decryption key, a signature private key and a signature public key sent by the data owner through the second secure transmission channel. The trusted device sends a certificate application request to the sharing agent through the first secure transmission channel, the certificate application request including the decryption key and the signature public key. The trusted device receives a certificate application response sent by the sharing agent through the first secure transmission channel, the certificate application response including the signature public key certificate. The trusted device sends the signature public key certificate to the data owner through the second secure transmission channel.
[0354] In a third possible implementation, the trusted device and the data owner of the shared data are the same device. The trusted device sends a certificate application request to the sharing agent through the first secure transmission channel, the certificate application request including the decryption key and the signature public key. The trusted device receives a certificate application response sent by the sharing agent through the first secure transmission channel, the certificate application response including the signature public key certificate.
[0355] Optionally, the trusted device and the data owner of the shared data are the same device. The trusted device sends a data invalidation request to the sharing agent, the data invalidation request including the signature public key certificate, the data invalidation request being used to request invalidation of the encapsulated data.
[0356] Optionally, the data invalidation request comprises an indication of an invalidation time, and the data invalidation request is used to request invalidation of the encapsulated data within the invalidation time.
[0357] Optionally, the circulation path of the encapsulated data comprises one or more of the following: public network download, fixed-point download, end-to-end transmission, and hardware medium transmission.
[0358] Optionally, the sharing agent is trusted by a plurality of participants involved in the data sharing.
[0359] For another example, FIG. 10 is an implementation flow diagram of another data sharing method 1000 according to another embodiment of the present application. As shown in FIG. 10, the method 1000 comprises, but is not limited to, the following steps 1001 to 1006.
[0360] In step 1001, the trusted device obtains a first data usage request and first encapsulated data matched with the first data usage request, the first encapsulated data comprising first ciphertext structure data, first retrieval metadata, a first encapsulation signature, and a first signature public key certificate, the first ciphertext structure data being obtained by encrypting shared data and a first data schema corresponding to the shared data using at least one encryption key, the first signature public key certificate comprising a first signature public key, the first data usage request comprising first data description information and first usage attribute information, wherein the first encapsulated data is matched with the first data usage request, including that, for a same description object, the description object in the first data description information is a subset of the description object in the first retrieval metadata.
[0361] In step 1002, the trusted device verifies the first encapsulation signature based on the first ciphertext structure data and the first retrieval metadata using the first signature public key.
[0362] In step 1003, after the first encapsulation signature is verified successfully, the trusted device sends a key acquisition request to the sharing agent, the key acquisition request comprising the first encapsulation signature.
[0363] In step 1004, the trusted device receives a key acquisition response sent by the sharing agent through a first secure transmission channel, the key acquisition response comprising a first decryption key corresponding to the first encapsulation signature.
[0364] In step 1005, the trusted device decrypts the first ciphertext structure data using the first decryption key to obtain at least the first data schema.
[0365] In step 1006, the trusted device executes the first data usage request according to a matching result of the first usage attribute information and the first data schema, and sends a data processing result corresponding to the first data usage request to a first data user initiating the first data usage request through a second secure transmission channel.
[0366] When the method 1000 is specifically used to implement the method 800, the trusted device is, for example, the trusted device 2, the first data usage request is, for example, the data usage request 1, the first encapsulation data is, for example, the encapsulation data 1, the first ciphertext structure data is, for example, the ciphertext structure data 1, the first retrieval metadata is, for example, the retrieval metadata 1, the first encapsulation signature is, for example, the encapsulation signature 1, the first signature public key certificate is, for example, the signature public key certificate 1, the first data specification is, for example, the data specification 1, the first signature public key is, for example, the signature public key 1, the first data description information is, for example, the data description information 1, the first usage attribute information is, for example, the usage attribute information 1, the first secure transmission channel is, for example, the secure transmission channel C, and the second secure transmission channel is, for example, the secure transmission channel D. The implementation processes of steps 1001 to 1006 can refer to steps 801 to 807 in the method 800.
[0367] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the first decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key. The first ciphertext structure data includes a first ciphertext and a second ciphertext. The first ciphertext is obtained by encrypting the shared data by using the data encryption key. The second ciphertext is obtained by encrypting encapsulation information by using the encapsulation encryption key, and the encapsulation information includes the first data specification and a data decryption key corresponding to the data encryption key. The implementation manner in which the trusted device decrypts the first ciphertext structure data to obtain at least the first data specification includes: the trusted device decrypts the second ciphertext by using the encapsulation decryption key to obtain the encapsulation information. The trusted device can further decrypt the first ciphertext by using the data decryption key to obtain the shared data.
[0368] Optionally, the encapsulation information further includes a password derivation value of a data password. The trusted device performs identity authentication on the first data user according to a data password input locally by the first data user, and negotiates a session key with the first data user by using a password-based authentication key exchange protocol, to establish the second secure transmission channel.
[0369] Optionally, for the same data user, if the number of consecutive failures in identity authentication on the data user according to a data password input locally by the data user reaches a first number threshold, the trusted device stops responding to data usage requests from the data user within a target time length.
[0370] Optionally, the implementation of the trusted obtaining of the first data usage request comprises that the trusted device receives the first data usage request sent by the data controller. For a plurality of data users accessing the data controller, if the number of consecutive failures of the identity authentication of the plurality of data users reaches a second number threshold according to the data passwords input by the plurality of data users locally and respectively, the trusted device marks the encapsulated data requested to be used by the plurality of data users as invalid.
[0371] Optionally, the first data specification comprises a legitimate user attribute, and the first usage attribute information comprises a user attribute of the first data user. The trusted device executes the implementation of the first data usage request according to the matching result of the first usage attribute information and the first data specification, which comprises that if the user attribute of the first data user belongs to the legitimate user attribute, the trusted device executes the first data usage request.
[0372] Optionally, the first data specification further comprises an access data range corresponding to a legitimate user, and the first usage attribute information further comprises a requested data range. The trusted device executes the implementation of the first data usage request according to the matching result of the first usage attribute information and the first data specification, which comprises that if the user attribute of the first data user belongs to the legitimate user attribute, and the requested data range belongs to the access data range corresponding to the first data user, the trusted device executes the first data usage request.
[0373] Optionally, the first data specification comprises an allowed operation type for the shared data, and the first usage attribute information comprises a data operation type. The trusted device executes the implementation of the first data usage request according to the matching result of the first usage attribute information and the first data specification, which comprises that if the data operation type belongs to the allowed operation type, the trusted device executes the first data usage request.
[0374] Optionally, after obtaining the first data specification, the trusted device verifies that the first data usage request is from the first data user.
[0375] Optionally, the first data specification comprises a legitimate processor attribute, and after obtaining the first data specification, the trusted device determines that the trusted device belongs to a legitimate processing device defined by the legitimate processor attribute.
[0376] Optionally, the first data schema includes a data usage change attribute, the data usage change attribute having a characteristic that changes as the shared data is used, and the data usage change attribute is recorded in the sharing agent. The trusted device, according to a matching result of the first usage attribute information and the first data schema, implements the first data usage request in a manner comprising: the trusted device acquires the data usage change attribute recorded in the sharing agent, and according to a matching result of the first usage attribute information and the data usage change attribute recorded in the sharing agent, executes the first data usage request.
[0377] Optionally, the data usage change attribute includes a data usage frequency.
[0378] Optionally, after the trusted device decrypts the first ciphertext structure data to obtain the first data schema and the shared data, the trusted device splits the shared data to obtain a plurality of data shards, and the trusted device executes a trusted derivation process on a single data shard. The trusted derivation process comprises: encrypting the data shard and a second data schema corresponding to the data shard to obtain second ciphertext structure data; signing the second ciphertext structure data and second search metadata corresponding to the data shard using a second signature private key to obtain a second encapsulation signature; sending the second encapsulation signature to the sharing agent through the first secure transmission channel, so that the sharing agent stores the second encapsulation signature, a second signature public key certificate and a second decryption key corresponding thereto, the second signature public key certificate including a second signature public key corresponding to the second signature private key, and the second decryption key being used at least for decrypting the second data schema in the second ciphertext structure data; and encapsulating the second ciphertext structure data, the second search metadata, the second encapsulation signature and the second signature public key certificate to obtain second encapsulation data, the second encapsulation data being used for circulation sharing. The second data schema is, for example, data schema 2, the second ciphertext structure data is, for example, ciphertext structure data 2, the second signature private key is, for example, signature private key 2, the second search metadata is, for example, search metadata 2, the second encapsulation signature is, for example, encapsulation signature 2, the second signature public key certificate is, for example, signature public key certificate 2, the second signature public key is, for example, signature public key 2, and the second encapsulation data is, for example, encapsulation data 2.
[0379] Optionally, after the trusted device decrypts the first ciphertext structure data to obtain the first data schema and the shared data, the trusted device stores the first decryption key and the first encapsulation signature correspondingly.
[0380] Optionally, the trusted device stores the first decryption key and the first encapsulation signature correspondingly in a manner comprising: the trusted device binds the first decryption key and the first encapsulation signature in a cache.
[0381] Optionally, the implementation of the trusted device corresponding to storing the first decryption key and the first encapsulation signature comprises: the trusted device generates a derived key based on a trusted root key of the trusted device using a key derivation function, encrypts the first decryption key using the derived key to obtain decryption key ciphertext, and persistently binds and stores the decryption key ciphertext and the first encapsulation signature.
[0382] Optionally, the trusted device stores a certificate authority public key corresponding to the first signature public key certificate, and after the trusted device decrypts the first ciphertext structure data to obtain the first data schema and the shared data, the implementation of obtaining a second data use request and first encapsulation data matched with the second data use request comprises: for the same description object, the description object in the second data description information is a subset of the description object in the first search metadata; verifying the authenticity of the first signature public key certificate in the first encapsulation data using the certificate authority public key; after the authenticity verification of the first signature public key certificate passes, verifying the first encapsulation signature in the first encapsulation data using the first signature public key in the first signature public key certificate based on the first ciphertext structure data and the first search metadata in the first encapsulation data; after the first encapsulation signature verification succeeds, decrypting the first ciphertext structure data using the stored first decryption key to obtain at least the first data schema; and executing the second data use request according to the matching result of the second use attribute information and the first data schema, and sending a data processing result corresponding to the second data use request to a second data user initiating the second data use request through a third secure transmission channel. The second data use request is, for example, data use request 2, the second data description information is, for example, data description information 2, the second use attribute information is, for example, use attribute information 2, and the third secure transmission channel is, for example, secure transmission channel E. The implementation process can refer to steps 808 to 812 in the above method 800.
[0383] Optionally, the first data schema includes a data use change attribute, which has the characteristic of changing with the use of the shared data, and the trusted device records the data use change attribute. The implementation of the trusted device executing the second data use request according to the matching result of the second use attribute information and the first data schema comprises: the trusted device executes the second data use request according to the matching result of the second use attribute information and the recorded data use change attribute in the trusted device.
[0384] Optionally, the shared agent is trusted by a plurality of participants participating in data sharing.
[0385] Optionally, the trusted device is trusted by the sharing agent, the trusted device performs mutual authentication with the sharing agent through the first secure transmission channel, and a static code integrity check is performed on an operator in the trusted device, the operator being used to execute a data sharing process corresponding to the trusted device.
[0386] For another example, FIG. 11 is a flow diagram illustrating implementation of another data sharing method 1100 according to another embodiment of the present application. As shown in FIG. 11, the method 1100 includes, but is not limited to, the following steps 1011 to 1102.
[0387] In step 1101, the sharing agent receives an encapsulation signature sent by the first trusted device through the first secure transmission channel, the encapsulation signature being obtained by signing the ciphertext structure data and the retrieval metadata corresponding to the shared data using the signature private key, the ciphertext structure data being obtained by encrypting the shared data and the data schema corresponding to the shared data using at least one encryption key.
[0388] In step 1102, the sharing agent stores the encapsulation signature, a signature public key certificate, and a decryption key, the signature public key certificate including a signature public key corresponding to the signature private key, the decryption key being used at least to decrypt the data schema in the ciphertext structure data.
[0389] When the method 1100 is used to implement the method 500, the first secure transmission channel is, for example, the secure transmission channel B, and the first trusted device is, for example, the trusted device 1. The implementation of steps 1101 to 1102 can refer to steps 503 to 504 in the method 500.
[0390] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key. The ciphertext structure data includes a first ciphertext and a second ciphertext. The first ciphertext is obtained by encrypting the shared data using the data encryption key. The second ciphertext is obtained by encrypting encapsulation information using the encapsulation encryption key, the encapsulation information including the data schema and a data decryption key corresponding to the data encryption key.
[0391] Optionally, before receiving the encapsulation signature sent by the first trusted device through the first secure transmission channel, the sharing agent receives a certificate application request sent by the first trusted device through the first secure transmission channel, the certificate application request including identity information of the data owner. The sharing agent generates a signature public key certificate and a signature private key according to the certificate application request, and stores the signature public key certificate, the signature public key certificate further including the identity information of the data owner, the signature public key certificate further including a signature of the sharing agent on the signature public key and the identity information of the data owner. The sharing agent sends a certificate application response to the first trusted device through the first secure transmission channel, the certificate application response including the signature public key certificate and the signature private key.
[0392] Optionally, the sharing agent generates at least one encryption key and a decryption key, and stores the decryption key, and the certificate application response further comprises the at least one encryption key.
[0393] Optionally, the sharing agent receives, through the first secure transmission channel, a certificate application request sent by the first trusted device before receiving the encapsulation signature sent by the first trusted device through the first secure transmission channel, the certificate application request comprising the signature public key and the decryption key. The sharing agent generates a signature public key certificate according to the certificate application request, and stores the signature public key certificate and the decryption key correspondingly, the signature public key certificate further comprising a signature of the sharing agent on the signature public key. The sharing agent sends, through the first secure transmission channel, a certificate application response to the first trusted device, the certificate application response comprising the signature public key certificate.
[0394] Optionally, the sharing agent receives a data invalidation request sent by a data owner of the shared data after storing the encapsulation signature, the signature public key certificate and the decryption key correspondingly, the data invalidation request comprising the signature public key certificate, the data invalidation request being used to request invalidation of the encapsulation data. The sharing agent authenticates the identity of the data owner. If the authentication of the identity of the data owner is successful, the sharing agent invalidates at least one of the signature public key certificate, the decryption key or the encapsulation signature according to the data invalidation request.
[0395] Optionally, the data invalidation request comprises an indication of an invalidation time, and the implementation manner in which the sharing agent deletes the encapsulation data or invalidates at least one of the signature public key certificate, the decryption key or the encapsulation signature according to the data invalidation request comprises: the sharing agent invalidates at least one of the signature public key certificate, the decryption key or the encapsulation signature within the invalidation time according to the data invalidation request.
[0396] Optionally, the sharing agent receives a key acquisition request sent by a second trusted device, the key acquisition request comprising the encapsulation signature. The sharing agent verifies whether the second trusted device is trusted. The sharing agent sends, through a second secure transmission channel, a key acquisition response to the second trusted device after determining that the second trusted device is trusted, the key acquisition response comprising the decryption key corresponding to the encapsulation signature. When the implementation process is specifically used to implement the method 800, the second trusted device is, for example, the trusted device 2, and the second secure transmission channel is, for example, the secure transmission channel C. The implementation process can refer to steps 803 to 805 in the method 800.
[0397] Optionally, the sharing agent is a trusted third party, and the implementation manner in which the sharing agent verifies whether the second trusted device is trusted comprises: initiating remote attestation to the second trusted device to perform code integrity verification on an operator in the second trusted device, the operator being used to execute a data sharing process corresponding to the second trusted device.
[0398] Optionally, the sharing agent runs the runtime measurement on the operator in the second trusted device after sending the key acquisition response to the second trusted device through the second secure transmission channel.
[0399] Optionally, the sharing agent is mutually trusted with the second trusted device, and the implementation manner in which the sharing agent verifies whether the second trusted device is trusted includes: the sharing agent performs identity authentication on the second trusted device, and determines that the second trusted device completes the static code integrity verification on the operator used to execute the data sharing process corresponding to the second trusted device.
[0400] The following is an example of a software device of an embodiment of the present application.
[0401] For example, FIG. 12 is a structural schematic diagram of a trusted device 1200 provided by an embodiment of the present application. The trusted device 1200 is, for example, the trusted device 1 in the method 500, and the trusted device 1200 includes but is not limited to an acquisition module 1201, a signature module 1202, a transceiver module 1203, and an encapsulation module 1204.
[0402] The acquisition module 1204 is configured to acquire ciphertext structure data, the ciphertext structure data being obtained by encrypting shared data and data specification corresponding to the shared data by using at least one encryption key. The signature module 1202 is configured to sign the ciphertext structure data and search metadata corresponding to the shared data by using a signature private key to obtain an encapsulation signature. The transceiver module 1203 is configured to send the encapsulation signature to the sharing agent through a first secure transmission channel, so that the sharing agent stores the encapsulation signature, a signature public key certificate, and a decryption key corresponding thereto, the signature public key certificate including a signature public key corresponding to the signature private key, and the decryption key being used at least for decryption to obtain the data specification in the ciphertext structure data. The encapsulation module 1204 is configured to encapsulate the ciphertext structure data, the search metadata, the encapsulation signature, and the signature public key certificate to obtain encapsulation data, the encapsulation data being used for circulation sharing.
[0403] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key; the ciphertext structure data includes first ciphertext and second ciphertext, the first ciphertext being obtained by encrypting the shared data by using the data encryption key, and the second ciphertext being obtained by encrypting encapsulation information by using the encapsulation encryption key, the encapsulation information including the data specification and a data decryption key corresponding to the data encryption key.
[0404] Optionally, the encapsulation information further includes a password derivation value of a data password.
[0405] Optionally, the acquisition module 1201 is configured to: acquire the shared data, the search metadata, and the data specification; and encrypt the shared data and the data specification by using the at least one encryption key to obtain the ciphertext structure data.
[0406] Optionally, the signature public key certificate further comprises identity information of the data owner of the shared data.
[0407] Optionally, the trusted device and the data owner of the shared data are different devices. The transceiver 1203 is further configured to send, to the data owner, a data verification request through the second secure transmission channel, the data verification request being used to request confirmation that the shared data, the retrieval metadata and the data schema are from the data owner; and receive, from the data owner, a data verification response sent through the second secure transmission channel, the data verification response being used to indicate that the shared data, the retrieval metadata and the data schema are from the data owner.
[0408] Optionally, the transceiver 1203 is further configured to send, to the sharing agent, a certificate application request through the first secure transmission channel, the certificate application request comprising the identity information of the data owner; and receive, from the sharing agent, a certificate application response sent through the first secure transmission channel, the certificate application response comprising the signature public key certificate and the signature private key, the signature public key certificate further comprising a signature of the sharing agent on the signature public key and the identity information of the data owner.
[0409] Optionally, the certificate application response further comprises at least one encryption key.
[0410] Optionally, the trusted device and the data owner of the shared data are different devices, and the transceiver 1203 is further configured to send, to the data owner, the signature public key certificate and the signature private key through the second secure transmission channel.
[0411] Optionally, the trusted device and the data owner of the shared data are different devices, and the transceiver 1203 is further configured to receive, from the data owner, at least one encryption key, a decryption key, a signature private key and a signature public key sent through the second secure transmission channel; send, to the sharing agent, a certificate application request through the first secure transmission channel, the certificate application request comprising the decryption key and the signature public key; receive, from the sharing agent, a certificate application response sent through the first secure transmission channel, the certificate application response comprising the signature public key certificate; and send, to the data owner, the signature public key certificate through the second secure transmission channel.
[0412] Optionally, the trusted device and the data owner of the shared data are the same device, and the transceiver 1203 is further configured to send, to the sharing agent, a certificate application request through the first secure transmission channel, the certificate application request comprising the decryption key and the signature public key; and receive, from the sharing agent, a certificate application response sent through the first secure transmission channel, the certificate application response comprising the signature public key certificate.
[0413] Optionally, the trusted device is the same device as a data owner of the shared data, and the transceiver 1203 is further configured to send a data invalidation request to the sharing agent, the data invalidation request including the signed public key certificate, the data invalidation request being used to request invalidation of the encapsulated data.
[0414] Optionally, the data invalidation request includes an indication of an invalidation time, the data invalidation request being used to request invalidation of the encapsulated data within the invalidation time.
[0415] Optionally, the circulation path of the encapsulated data includes one or more of the following: public network download, fixed-point download, end-to-end transmission, and hardware medium transmission.
[0416] Optionally, the sharing agent is trusted by a plurality of participants involved in the data sharing.
[0417] For example, FIG. 13 is a structural schematic diagram of a trusted device 1300 according to an embodiment of the present application. The trusted device 1300 is, for example, the trusted device 2 in the method 800, and the trusted device 1300 includes, but is not limited to, an acquisition module 1301, a signature verification module 1302, a transceiver 1303, a decryption module 1304, and a request processing module 1305. Optionally, the trusted device further includes an authentication module 1306, a trusted derivation module 1307, or a storage module 1308.
[0418] The obtaining module 1301 is configured to obtain a first data usage request and first encapsulated data matched with the first data usage request, the first encapsulated data including first ciphertext structure data, first search metadata, a first encapsulated signature, and a first signature public key certificate, the first ciphertext structure data being obtained by encrypting shared data and first data reduction corresponding to the shared data using at least one encryption key, the first signature public key certificate including a first signature public key, the first data usage request including first data description information and first usage attribute information, wherein the first encapsulated data is matched with the first data usage request, including that, for a same description object, the description object in the first data description information is a subset of the description object in the first search metadata. The signature verification module 1302 is configured to verify the first encapsulated signature based on the first ciphertext structure data and the first search metadata using the first signature public key. The transceiver module 1303 is configured to send a key acquisition request to a sharing agent after the first encapsulated signature is verified successfully, the key acquisition request including the first encapsulated signature; and receive a key acquisition response sent by the sharing agent through a first secure transmission channel, the key acquisition response including a first decryption key corresponding to the first encapsulated signature. The decryption module 1304 is configured to decrypt the first ciphertext structure data using the first decryption key to obtain at least the first data reduction. The request processing module 1305 is configured to execute the first data usage request according to a matching result of the first usage attribute information and the first data reduction, and send a data processing result corresponding to the first data usage request to a first data user initiating the first data usage request through a second secure transmission channel.
[0419] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, the first decryption key being an encapsulation decryption key corresponding to the encapsulation encryption key; the first ciphertext structure data including first ciphertext and second ciphertext, the first ciphertext being obtained by encrypting the shared data using the data encryption key, the second ciphertext being obtained by encrypting encapsulation information using the encapsulation encryption key, the encapsulation information including the first data reduction and a data decryption key corresponding to the data encryption key; the decryption module 1304 is configured to decrypt the second ciphertext using the encapsulation decryption key to obtain the encapsulation information, and decrypt the first ciphertext using the data decryption key to obtain the shared data.
[0420] Optionally, the encapsulation information further includes a password derivation value of a data password. The authentication module 1306 is configured to perform identity authentication on the first data user through a password-based authentication key exchange protocol according to a data password input locally by the first data user, and negotiate a session key between the first data user to establish the second secure transmission channel.
[0421] Optionally, the authentication module 1306 is further configured to, for the same data user, if the number of consecutive failures of identity authentication of the data user according to the data password input by the data user locally reaches a first number threshold, stop responding to the data use request from the data user within a target time length.
[0422] Optionally, the obtaining module 1301 is configured to receive the first data use request sent by the data controller. The authentication module 1306 is further configured to, for a plurality of data users accessing the data controller, if the number of consecutive failures of identity authentication of the plurality of data users according to the data passwords input by the plurality of data users locally respectively reaches a second number threshold, mark the encapsulated data requested to be used by the plurality of data users as invalid.
[0423] Optionally, the first data specification includes a legitimate user attribute, the first use attribute information includes a user attribute of the first data user, and the request processing module 1305 is configured to execute the first data use request if the user attribute of the first data user belongs to the legitimate user attribute.
[0424] Optionally, the first data specification further includes an access data range corresponding to a legitimate user, the first use attribute information further includes a requested data range, and the request processing module 1305 is configured to execute the first data use request if the user attribute of the first data user belongs to the legitimate user attribute and the requested data range belongs to the access data range corresponding to the first data user.
[0425] Optionally, the first data specification includes an allowed operation type for the shared data, the first use attribute information includes a data operation type, and the request processing module 1305 is configured to execute the first data use request if the data operation type belongs to the allowed operation type.
[0426] Optionally, after obtaining the first data specification, the authentication module 1306 is further configured to verify that the first data use request is from the first data user to the first data user.
[0427] Optionally, the first data specification includes a legitimate handler attribute, and the authentication module 1306 is further configured to determine that the trusted device belongs to a legitimate handling device defined by the legitimate handler attribute.
[0428] Optionally, the first data specification includes a data use change attribute, the data use change attribute has the characteristic of changing as the shared data is used, the data use change attribute is recorded in the sharing agent, and the request processing module 1305 is configured to: obtain the data use change attribute recorded in the sharing agent; and execute the first data use request according to a matching result of the first use attribute information and the data use change attribute recorded in the sharing agent.
[0429] Optionally, the data usage change attribute comprises a data available times.
[0430] Optionally, the trusted derivation module 1307 is configured to: split the shared data to obtain a plurality of data shards; and perform a trusted derivation process on a single data shard. The trusted derivation process comprises: encrypting the data shard and second data specification corresponding to the data shard to obtain second ciphertext structured data; signing the second ciphertext structured data and second search metadata corresponding to the data shard by using a second signature private key to obtain a second encapsulation signature; sending the second encapsulation signature to the sharing agent through the first secure transmission channel, so that the sharing agent stores the second encapsulation signature, a second signature public key certificate and a second decryption key corresponding to the second encapsulation signature, the second signature public key certificate comprising a second signature public key corresponding to the second signature private key, and the second decryption key being used at least for decrypting the second data specification in the second ciphertext structured data; and encapsulating the second ciphertext structured data, the second search metadata, the second encapsulation signature and the second signature public key certificate to obtain second encapsulation data, the second encapsulation data being used for circulation sharing.
[0431] Optionally, the storage module 1308 is configured to store the first decryption key and the first encapsulation signature correspondingly.
[0432] Optionally, the storage module 1308 is configured to bind and cache the first decryption key and the first encapsulation signature.
[0433] Optionally, the storage module 1308 is configured to: generate a derived key based on a trusted root key of the trusted device by using a key derivation function; encrypt the first decryption key by using the derived key to obtain decryption key ciphertext; and persistently bind and store the decryption key ciphertext and the first encapsulation signature.
[0434] Optionally, the trusted device stores a signing authority public key corresponding to the first signed public key certificate. The obtaining module 1301 is further configured to obtain a second data usage request and first encapsulated data corresponding to the second data usage request, the second data usage request comprising second data description information and second usage attribute information, and the first encapsulated data corresponding to the second data usage request, wherein, for the same description object, the description object in the second data description information is a subset of the description object in the first search metadata. The authentication module 1306 is further configured to verify the authenticity of the first signed public key certificate in the first encapsulated data by using the signing authority public key. The signature verification module 1302 is further configured to, after the authenticity verification of the first signed public key certificate passes, verify the first encapsulation signature in the first encapsulated data by using the first signature public key in the first signed public key certificate based on the first ciphertext structure data and the first search metadata in the first encapsulated data. The decryption module 1304 is further configured to, after the first encapsulation signature is successfully verified, decrypt the first ciphertext structure data by using the stored first decryption key to obtain at least the first data reduction. The request processing module 1305 is further configured to execute the second data usage request according to a matching result of the second usage attribute information and the first data reduction, and send a data processing result corresponding to the second data usage request to a second data user initiating the second data usage request through a third secure transmission channel.
[0435] Optionally, the first data reduction comprises a data usage change attribute, the data usage change attribute having a characteristic of changing with the shared data being used, and the trusted device records the data usage change attribute. The request processing module 1305 is configured to execute the second data usage request according to a matching result of the second usage attribute information and the data usage change attribute recorded in the trusted device.
[0436] Optionally, the sharing agent is trusted by a plurality of participants participating in data sharing.
[0437] Optionally, the trusted device and the sharing agent are mutually trusted. The authentication module 1306 is further configured to perform bidirectional identity authentication with the sharing agent through the first secure transmission channel, and perform static code integrity verification on an operator in the trusted device, the operator being configured to execute a data sharing process corresponding to the trusted device.
[0438] For example, FIG. 14 is a structural schematic diagram of a sharing agent 1400 provided by an embodiment of the present application. The sharing agent 1400 is, for example, a sharing agent in the method 500 or the method 800, and the sharing agent 1400 comprises but is not limited to a transceiver module 1401 and a storage module 1402. Optionally, the sharing agent 1400 further comprises a certificate signing module 1403, a key generation module 1404, an authentication module 1405, and a data management module 1406.
[0439] The transceiving module 1401 is configured to receive, through the first secure transmission channel, an encapsulation signature sent by the first trusted device, the encapsulation signature being obtained by signing, by a signature private key, search metadata corresponding to the ciphertext structure data and the shared data, and the ciphertext structure data being obtained by encrypting, by at least one encryption key, the shared data and data specification corresponding to the shared data. The storage module 1402 is configured to store the encapsulation signature, a signature public key certificate, and a decryption key correspondingly, the signature public key certificate including a signature public key corresponding to the signature private key, and the decryption key being used at least for decryption of the data specification in the ciphertext structure data.
[0440] Optionally, the at least one encryption key includes a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key; the ciphertext structure data includes first ciphertext and second ciphertext, the first ciphertext being obtained by encrypting, by the data encryption key, the shared data, and the second ciphertext being obtained by encrypting, by the encapsulation encryption key, encapsulation information, the encapsulation information including the data specification and a data decryption key corresponding to the data encryption key.
[0441] Optionally, the transceiving module 1401 is further configured to receive, through the first secure transmission channel, a certificate application request sent by the first trusted device, the certificate application request including identity information of a data owner. The certificate issuing module 1403 is configured to generate, according to the certificate application request, the signature public key certificate and the signature private key. The storage module 1402 is configured to store the signature public key certificate, the signature public key certificate further including the identity information of the data owner, and the signature public key certificate further including a signature of the shared agent on the signature public key and the identity information of the data owner. The transceiving module 1401 is further configured to send, through the first secure transmission channel, a certificate application response to the first trusted device, the certificate application response including the signature public key certificate and the signature private key.
[0442] Optionally, the key generating module 1404 is configured to generate the at least one encryption key and the decryption key, and store the decryption key, and the certificate application response further includes the at least one encryption key.
[0443] Optionally, the transceiving module 1401 is further configured to receive, through the first secure transmission channel, a certificate application request sent by the first trusted device, the certificate application request including the signature public key and the decryption key. The certificate issuing module 1403 is configured to generate, according to the certificate application request, the signature public key certificate. The storage module 1402 is configured to store the signature public key certificate and the decryption key correspondingly, the signature public key certificate further including a signature of the shared agent on the signature public key. The transceiving module 1401 is further configured to send, through the first secure transmission channel, a certificate application response to the first trusted device, the certificate application response including the signature public key certificate.
[0444] Optionally, the transceiver 1401 is further configured to receive a data invalidation request sent by a data owner of the shared data, the data invalidation request comprising the signed public key certificate, and the data invalidation request being used to request invalidation of the encapsulated data. The authentication module 1405 is configured to perform identity authentication on the data owner. The data management module 1406 is configured to invalidate at least one of the signed public key certificate, the decryption key, or the encapsulation signature according to the data invalidation request if the identity authentication on the data owner is successful.
[0445] Optionally, the data invalidation request comprises an indication of an invalidation time, and the data management module 1406 is configured to invalidate at least one of the signed public key certificate, the decryption key, or the encapsulation signature according to the data invalidation request within the invalidation time.
[0446] Optionally, the transceiver 1401 is further configured to receive a key acquisition request sent by a second trusted device, the key acquisition request comprising the encapsulation signature; the authentication module 1405 is further configured to verify whether the second trusted device is trusted; and the transceiver 1401 is further configured to send, to the second trusted device, a key acquisition response comprising the decryption key corresponding to the encapsulation signature through a second secure transmission channel after it is determined that the second trusted device is trusted.
[0447] Optionally, the sharing agent is a trusted third party, and the authentication module 1405 is configured to perform code integrity verification on an operator in the second trusted device by initiating remote attestation to the second trusted device, the operator being used to execute a data sharing process corresponding to the second trusted device.
[0448] Optionally, the authentication module 1405 is further configured to perform runtime measurement on the operator.
[0449] Optionally, the sharing agent and the second trusted device are mutually trusted, and the authentication module 1405 is configured to perform identity authentication on the second trusted device and determine that the second trusted device completes static code integrity verification on the operator, the operator being used to execute a data sharing process corresponding to the second trusted device.
[0450] The hardware structure of the embodiments of the present application is described below.
[0451] For example, FIG. 15 is a schematic diagram of a hardware structure of a device according to an embodiment of the present application. As shown in FIG. 15, the device 1500 comprises a processor 1501 and a memory 1502, and the memory 1501 and the memory 1502 are connected through a bus 1503. FIG. 15 illustrates the processor 1501 and the memory 1502 as independent from each other. Optionally, the processor 1501 and the memory 1502 are integrated together. Optionally, the device 1500 in FIG. 15 can be any trusted device or sharing agent in the above embodiments.
[0452] The memory 1502 is various types of storage media, such as a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), a flash memory, an optical storage, a register, a disk storage, a disk storage, a magnetic disk or other magnetic storage devices.
[0453] The processor 1501 is a general processor or a special-purpose processor. The processor 1501 can be a single-core processor or a multi-core processor. The processor 1501 includes at least one circuit to perform the actions of any trusted device or shared agent in the above method embodiments provided by the embodiments of the present application.
[0454] Optionally, the device 1500 further includes a network interface 1504 connected with the processor 1501 and the memory 1502 through the bus 1503. The network interface 1504 enables the device 1500 to communicate with other devices. The processor 1501 can interact with other devices through the network interface 1504.
[0455] Optionally, the device 1500 further includes an input / output (I / O) interface 1505 connected with the processor 1501 and the memory 1502 through the bus 1503. The processor 1501 can receive input commands or data through the I / O interface 1505. The I / O interface 1505 is used to connect the input devices of the device 1500, such as a keyboard and a mouse. Optionally, in some possible scenarios, the network interface 1504 and the I / O interface 1505 are collectively referred to as a communication interface.
[0456] Optionally, the device 1500 further includes a display 1506 connected with the processor 1501 and the memory 1502 through the bus 1503. The display 1506 can be used to display the intermediate results and / or final results generated by the processor 1501 executing the above method. In a possible implementation manner, the display 1506 is a touch display screen to provide a human-computer interaction interface.
[0457] The bus 1503 is any type of communication bus, for example, a system bus, for implementing interconnection of internal devices of the device 1500. The above-mentioned devices inside the device 1500 are interconnected by the bus 1503 in the embodiment of the present application, and alternatively, the above-mentioned devices inside the device 1500 are communicatively connected to each other by other connection manners other than the bus 1503, for example, the above-mentioned devices inside the device 1500 are interconnected by a logical interface inside the device 1500.
[0458] The above-mentioned devices can be respectively arranged on independent chips, or at least partially or entirely arranged on the same chip. Whether the devices are arranged independently on different chips or integrated on one or more chips often depends on the needs of product design. The embodiment of the present application does not limit the specific implementation form of the above-mentioned devices.
[0459] The device 1500 shown in FIG. 15 is merely exemplary, and in the implementation process, the device 1500 includes other components, which are not listed one by one herein.
[0460] The system structure of the embodiment of the present application is exemplarily described below.
[0461] The embodiment of the present application provides a data sharing system, comprising: a first trusted device and a sharing agent, the first trusted device is configured to execute the steps performed by the trusted device 1 in the method 500, and the sharing agent is configured to execute the steps performed by the sharing agent in the method 500.
[0462] Optionally, the data sharing system further comprises a second trusted device, the second trusted device is configured to execute the steps performed by the trusted device 2 in the method 800, and the sharing agent is further configured to execute the steps performed by the sharing agent in the method 800.
[0463] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing related hardware to complete, and the program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0464] In the embodiment of the present application, the terms "first", "second" and "third" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance.
[0465] In the present application, the term "and / or" is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are in an "or" relationship.
[0466] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0467] The above only describes optional embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the concept and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A data sharing method, characterized by, Applied to a trusted device, the method comprises: obtaining ciphertext structure data, the ciphertext structure data being obtained by encrypting shared data and data specification corresponding to the shared data by using at least one encryption key; signing the ciphertext structure data and retrieval metadata corresponding to the shared data by using a signature private key to obtain an encapsulation signature; sending the encapsulation signature to a sharing agent through a first secure transmission channel, so that the sharing agent stores the encapsulation signature, a signature public key certificate and a decryption key corresponding to the shared data, the signature public key certificate comprising a signature public key corresponding to the signature private key, and the decryption key being used at least for decrypting the data specification in the ciphertext structure data; encapsulating the ciphertext structure data, the retrieval metadata, the encapsulation signature and the signature public key certificate to obtain encapsulation data, the encapsulation data being used for circulation sharing.
2. The method of claim 1, wherein, The at least one encryption key comprises a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key. The ciphertext structure data comprises a first ciphertext and a second ciphertext, the first ciphertext being obtained by encrypting the shared data by using the data encryption key, and the second ciphertext being obtained by encrypting encapsulation information by using the encapsulation encryption key, the encapsulation information comprising the data specification and a data decryption key corresponding to the data encryption key.
3. The method of claim 2, wherein, The encapsulation information further comprises a password derivation value of a data password.
4. The method according to any one of claims 1 to 3, characterized in that, The obtaining of the ciphertext structure data comprises: obtaining the shared data, the retrieval metadata and the data specification; encrypting the shared data and the data specification by using the at least one encryption key to obtain the ciphertext structure data.
5. The method according to any one of claims 1 to 4, characterized in that, The signature public key certificate further comprises identity information of a data owner of the shared data.
6. The method according to any one of claims 1 to 5, characterized in that, The trusted device and the data owner of the shared data are different devices, and the method further comprises: sending a data verification request to the data owner through a second secure transmission channel, the data verification request being used for requesting to confirm whether the shared data, the retrieval metadata and the data specification come from the data owner; receiving a data verification response sent by the data owner through the second secure transmission channel, the data verification response being used for indicating that the shared data, the retrieval metadata and the data specification come from the data owner.
7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: sending a certificate application request to the sharing agent through the first secure transmission channel, the certificate application request comprising the identity information of the data owner; receiving a certificate application response sent by the sharing agent through the first secure transmission channel, the certificate application response comprising the signature public key certificate and the signature private key, and the signature public key certificate further comprising a signature of the sharing agent on the signature public key and the identity information of the data owner.
8. The method of claim 7, wherein, The certificate application response further comprises the at least one encryption key.
9. The method according to claim 7 or 8, characterized in that, The trusted device and the data owner of the shared data are different devices, and the method further comprises: sending the signature public key certificate and the signature private key to the data owner through the second secure transmission channel.
10. The method according to any one of claims 1 to 6, characterized in that, The trusted device is different from a data owner of the shared data, and the method further comprises: receiving, through the second secure transmission channel, the at least one encryption key, the decryption key, the signature private key and the signature public key sent by the data owner; sending, through the first secure transmission channel, a certificate application request to the sharing agent, the certificate application request comprising the decryption key and the signature public key; receiving, through the first secure transmission channel, a certificate application response sent by the sharing agent, the certificate application response comprising the signature public key certificate; sending, through the second secure transmission channel, the signature public key certificate to the data owner.
11. The method according to any one of claims 1 to 5, characterized in that, The trusted device is the same as a data owner of the shared data, and the method further comprises: sending, through the first secure transmission channel, a certificate application request to the sharing agent, the certificate application request comprising the decryption key and the signature public key; receiving, through the first secure transmission channel, a certificate application response sent by the sharing agent, the certificate application response comprising the signature public key certificate.
12. The method according to any one of claims 1 to 5, 11, characterized in that, The trusted device is the same as a data owner of the shared data, and the method further comprises: sending a data invalidation request to the sharing agent, the data invalidation request comprising the signature public key certificate, the data invalidation request being used to request invalidation of the encapsulated data.
13. The method of claim 12, wherein, The data invalidation request comprises an indication of an invalidation time, and the data invalidation request is used to request invalidation of the encapsulated data within the invalidation time.
14. The method according to any one of claims 1 to 13, characterized in that, The circulation path of the encapsulated data comprises one or more of the following: public network download, fixed-point download, end-to-end transmission, and hardware medium transmission.
15. The method according to any one of claims 1 to 14, characterized in that, The sharing agent is trusted by a plurality of participants involved in data sharing.
16. A data sharing method, comprising: The method applied to a trusted device comprises: obtaining a first data use request and first encapsulated data matched with the first data use request, the first encapsulated data comprising first ciphertext structure data, first retrieval metadata, a first encapsulated signature and a first signature public key certificate, the first ciphertext structure data being obtained by encrypting shared data and a first data reduction corresponding to the shared data by using at least one encryption key, the first signature public key certificate comprising a first signature public key, and the first data use request comprising first data description information and first use attribute information, wherein the first encapsulated data is matched with the first data use request, including that, for a same description object, the description object in the first data description information is a subset of the description object in the first retrieval metadata; based on the first ciphertext structure data and the first retrieval metadata, verifying the first encapsulated signature by using the first signature public key; after successful verification of the first encapsulated signature, sending a key acquisition request to a sharing agent, the key acquisition request comprising the first encapsulated signature; receiving, through a first secure transmission channel, a key acquisition response sent by the sharing agent, the key acquisition response comprising a first decryption key corresponding to the first encapsulated signature; decrypt the first ciphertext structure data by using the first decryption key to obtain at least the first data reduction; execute the first data usage request according to a matching result of the first usage attribute information and the first data reduction, and send a data processing result corresponding to the first data usage request to a first data user initiating the first data usage request through a second secure transmission channel.
17. The method of claim 16, wherein, The at least one encryption key comprises a data encryption key and an encapsulation encryption key, and the first decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key. The first ciphertext structure data comprises a first ciphertext and a second ciphertext, the first ciphertext is obtained by encrypting the shared data by using the data encryption key, and the second ciphertext is obtained by encrypting encapsulation information by using the encapsulation encryption key, and the encapsulation information comprises the first data reduction and a data decryption key corresponding to the data encryption key. The decrypting the first ciphertext structure data by using the first decryption key to obtain at least the first data reduction comprises: decrypting the second ciphertext by using the encapsulation decryption key to obtain the encapsulation information; The method further comprises: decrypting the first ciphertext by using the data decryption key to obtain the shared data.
18. The method of claim 17, wherein, The encapsulation information further comprises a password derivation value of a data password, and the method further comprises: performing identity authentication on the first data user by using a password-based authentication key exchange protocol according to a data password input locally by the first data user, and obtaining a session key between the first data user by negotiation to establish the second secure transmission channel.
19. The method of claim 18, wherein, The method further comprises: For the same data user, if a continuous failure number of identity authentication on the data user according to a data password input locally by the data user reaches a first number threshold, stop responding to a data usage request from the data user within a target time length.
20. The method of claim 18 or 19, wherein, The obtaining the first data usage request comprises: receiving the first data usage request sent by the data controller; The method further comprises: For a plurality of data users accessing the data controller, if a continuous failure number of identity authentication on the plurality of data users according to data passwords input locally by the plurality of data users respectively reaches a second number threshold, mark encapsulation data requested to be used by the plurality of data users as invalid.
21. The method of any one of claims 16 to 20, wherein, The first data reduction comprises a legitimate user attribute, the first usage attribute information comprises a user attribute of the first data user, and the executing the first data usage request according to a matching result of the first usage attribute information and the first data reduction comprises: if the user attribute of the first data user is subordinate to the legitimate user attribute, execute the first data usage request.
22. The method of claim 21, wherein, The first data protocol further comprises an access data range corresponding to a legitimate user, and the first usage attribute information further comprises a requested data range, and the execution of the first data usage request comprises: If the user attribute of the first data user belongs to the legitimate user attribute, and the requested data range belongs to the access data range corresponding to the first data user, the first data usage request is executed.
23. The method of any one of claims 16 to 22, wherein, The first data protocol comprises an allowed operation type for the shared data, and the first usage attribute information comprises a data operation type, and the execution of the first data usage request according to the matching result of the first usage attribute information and the first data protocol comprises: If the data operation type belongs to the allowed operation type, the first data usage request is executed.
24. The method of claim 22 or 23, wherein, After obtaining the first data protocol, the method further comprises: Verifying, to the first data user, that the first data usage request comes from the first data user.
25. The method of any one of claims 16 to 24, wherein, The first data protocol comprises a legitimate handler attribute, and after obtaining the first data protocol, the method further comprises: Determining that the trusted device belongs to a legitimate handling device defined by the legitimate handler attribute.
26. The method of any one of claims 16 to 25, wherein, The first data protocol comprises a data usage change attribute, the data usage change attribute has the characteristic of changing with the use of the shared data, and the data usage change attribute is recorded in the sharing agent, and the execution of the first data usage request according to the matching result of the first usage attribute information and the first data protocol comprises: Obtaining the data usage change attribute recorded in the sharing agent; According to the matching result of the first usage attribute information and the data usage change attribute recorded in the sharing agent, the first data usage request is executed.
27. The method of claim 26, wherein, The data usage change attribute comprises a data usage frequency.
28. The method of any one of claims 16 to 27, wherein, After decrypting the ciphertext structure data to obtain the shared data, the method further comprises: Splitting the shared data to obtain a plurality of data shards; For a single data shard, a trusted derivation process is performed on the data shard; wherein the trusted derivation process comprises: Encrypting the data shard and a second data protocol corresponding to the data shard to obtain second ciphertext structure data; Signing the second ciphertext structure data and second retrieval metadata corresponding to the data shard by using a second signature private key to obtain a second encapsulated signature; Sending the second encapsulated signature to a sharing agent through the first secure transmission channel, so that the sharing agent stores the second encapsulated signature, a second signature public key certificate and a second decryption key corresponding to the second encapsulated signature, the second signature public key certificate comprises a second signature public key corresponding to the second signature private key, and the second decryption key is used at least for decrypting the second data protocol in the second ciphertext structure data; The second ciphertext structure data, the second search metadata, the second encapsulation signature and the second signature public key certificate are encapsulated to obtain second encapsulation data, and the second encapsulation data is used for circulation and sharing.
29. The method of any one of claims 16 to 28, wherein, After the first ciphertext structure data is decrypted to obtain the first data reduction and the shared data, the method further comprises: The first decryption key and the first encapsulation signature are correspondingly stored.
30. The method of claim 29, wherein, The first decryption key and the first encapsulation signature are correspondingly stored. The first decryption key and the first encapsulation signature are bound and cached.
31. The method of claim 29, wherein, The first decryption key and the first encapsulation signature are correspondingly stored. A derived key is generated based on a trusted root key of the trusted device by using a key derivation function; The first decryption key is encrypted by using the derived key to obtain decryption key ciphertext; The decryption key ciphertext and the first encapsulation signature are bound and stored persistently.
32. The method of any one of claims 29 to 31, wherein, The trusted device stores a certificate authority public key corresponding to the first signature public key certificate, and after the first ciphertext structure data is decrypted to obtain the first data reduction and the shared data, the method further comprises: A second data use request and the first encapsulation data matched with the second data use request are obtained, the second data use request comprises second data description information and second use attribute information, and the first encapsulation data is matched with the second data use request, that is, for the same description object, the description object in the second data description information is a subset of the description object in the first search metadata; The authenticity of the first signature public key certificate in the first encapsulation data is verified by using the certificate authority public key; After the authenticity of the first signature public key certificate is verified, the first encapsulation signature in the first encapsulation data is verified by using the first signature public key in the first signature public key certificate based on the first ciphertext structure data and the first search metadata in the first encapsulation data; After the first encapsulation signature is verified successfully, the first ciphertext structure data is decrypted by using the stored first decryption key to obtain at least the first data reduction; According to a matching result of the second use attribute information and the first data reduction, the second data use request is executed, and a data processing result corresponding to the second data use request is sent to a second data user initiating the second data use request through a third secure transmission channel.
33. The method of any one of claims 29 to 32, wherein, The first data reduction comprises data use change attribute, the data use change attribute has the characteristic of changing with the shared data being used, the data use change attribute is recorded in the trusted device, and according to the matching result of the second use attribute information and the first data reduction, the second data use request is executed, comprising: According to a matching result of the second use attribute information and the data use change attribute recorded in the trusted device, the second data use request is executed.
34. The method of any one of claims 16 to 33, wherein, The sharing agent is trusted by a plurality of participants involved in data sharing.
35. The method of claim 34, wherein, The trusted device and the sharing agent are mutually trusted, and the method further comprises: Through the first secure transmission channel, bidirectional identity authentication is performed with the sharing agent, and a static code integrity check is performed on an operator in the trusted device, the operator being used to execute a data sharing process corresponding to the trusted device.
36. A data sharing method, comprising: The method is applied to a sharing agent, and the method comprises: Through the first secure transmission channel, a first trusted device sends an encapsulation signature, the encapsulation signature being obtained by signing ciphertext structure data and retrieval metadata corresponding to shared data using a signature private key, the ciphertext structure data being obtained by encrypting the shared data and data specification corresponding to the shared data using at least one encryption key; The encapsulation signature, a signature public key certificate, and a decryption key are stored correspondingly, the signature public key certificate comprising a signature public key corresponding to the signature private key, and the decryption key being used at least to decrypt the data specification in the ciphertext structure data.
37. The method of claim 36, wherein, The at least one encryption key comprises a data encryption key and an encapsulation encryption key, and the decryption key is an encapsulation decryption key corresponding to the encapsulation encryption key; The ciphertext structure data comprises first ciphertext and second ciphertext, the first ciphertext being obtained by encrypting the shared data using the data encryption key, and the second ciphertext being obtained by encrypting encapsulation information using the encapsulation encryption key, the encapsulation information comprising the data specification and a data decryption key corresponding to the data encryption key.
38. The method of claim 36 or 37, wherein, Before the first secure transmission channel is used to receive the encapsulation signature sent by the first trusted device, the method further comprises: Through the first secure transmission channel, a certificate application request sent by the first trusted device is received, the certificate application request comprising identity information of a data owner; According to the certificate application request, the signature public key certificate and the signature private key are generated, and the signature public key certificate is stored, the signature public key certificate further comprising the identity information of the data owner, and the signature public key certificate further comprising a signature of the sharing agent on the signature public key and the identity information of the data owner; Through the first secure transmission channel, a certificate application response is sent to the first trusted device, the certificate application response comprising the signature public key certificate and the signature private key.
39. The method of claim 38, wherein, The method further comprises: The at least one encryption key and the decryption key are generated, and the decryption key is stored, and the certificate application response further comprises the at least one encryption key.
40. The method of claim 38 or 39, wherein, Before the first secure transmission channel is used to receive the encapsulation signature sent by the first trusted device, the method further comprises: Through the first secure transmission channel, a certificate application request sent by the first trusted device is received, the certificate application request comprising the signature public key and the decryption key; According to the certificate application request, the signature public key certificate is generated, and the signature public key certificate and the decryption key are stored correspondingly, the signature public key certificate further comprising a signature of the sharing agent on the signature public key. sending, to the first trusted device, a certificate application response over the first secure transmission channel, the certificate application response including the signed public key certificate.
41. The method of any one of claims 36 to 40, wherein, After the corresponding storing of the package signature, the signed public key certificate, and the decryption key, the method further includes: receiving a data invalidation request sent by a data owner of the shared data, the data invalidation request including the signed public key certificate, the data invalidation request being used to request invalidation of the package data; authenticating the data owner; if the authentication of the data owner is successful, invalidating at least one of the signed public key certificate, the decryption key, or the package signature according to the data invalidation request.
42. The method of claim 41, wherein, The data invalidation request includes an indication of an invalidation time, and the deleting of the package data or the invalidating of at least one of the signed public key certificate, the decryption key, or the package signature according to the data invalidation request includes: invalidating at least one of the signed public key certificate, the decryption key, or the package signature within the invalidation time according to the data invalidation request.
43. The method of any one of claims 36 to 42, wherein, The method further includes: receiving a key acquisition request sent by a second trusted device, the key acquisition request including the package signature; verifying whether the second trusted device is trusted; after determining that the second trusted device is trusted, sending, to the second trusted device, a key acquisition response over a second secure transmission channel, the key acquisition response including a decryption key corresponding to the package signature.
44. The method of claim 43, wherein, The sharing agent is a trusted third party, and the verifying whether the second trusted device is trusted includes: initiating remote attestation to the second trusted device to perform code integrity verification on an operator in the second trusted device, the operator being used to execute a data sharing process corresponding to the second trusted device.
45. The method of claim 44, wherein, After the sending, to the second trusted device, of the key acquisition response over the second secure transmission channel, the method further includes: performing runtime measurement on the operator.
46. The method of claim 43, wherein, The sharing agent and the second trusted device are mutually trusted, and the verifying whether the second trusted device is trusted includes: authenticating the second trusted device and determining that the second trusted device has completed static code integrity verification on an operator, the operator being used to execute a data sharing process corresponding to the second trusted device.
47. A trusted device, comprising: The trusted device includes a plurality of functional modules that interact with each other to implement the method of any one of claims 1 to 15.
48. A trusted device, comprising: The trusted device includes a plurality of functional modules that interact with each other to implement the method of any one of claims 16 to 35.
49. A sharing agent, comprising: The sharing agent includes a plurality of functional modules that interact with each other to implement the method of any one of claims 36 to 46.
50. A data sharing system, comprising: The method includes: a first trusted device and a sharing agent, the first trusted device being used to implement the method of any one of claims 1 to 15, and the sharing agent being used to implement the method of any one of claims 36 to 42.
51. The data sharing system of claim 50, wherein, The data sharing system further comprises a second trusted device configured to perform the method of any one of claims 16 to 35, and the sharing agent is further configured to perform the method of any one of claims 43 to 46.
52. A trusted device, comprising: Comprising: a processor and a memory; the memory is configured to store a computer program, the computer program comprising program instructions; the processor is configured to invoke the computer program to implement the method of any one of claims 1 to 35.
53. A sharing agent, comprising: Comprising: a processor and a memory; the memory is configured to store a computer program, the computer program comprising program instructions; the processor is configured to invoke the computer program to implement the method of any one of claims 36 to 46.
54. A computer-readable storage medium, comprising: The computer readable storage medium has stored thereon instructions which, when executed by a processor, implement the method of any one of claims 1 to 46.
55. A computer program product, characterised in that, A computer program which, when executed by a processor, implements the method of any one of claims 1 to 46.
Citation Information
Patent Citations
Data security sharing method and device based on open protocol, equipment and medium
CN115242549A
Continuous trusted data sharing method based on block chain
CN115834047A
Data sharing method, system and device based on service chain
CN115987526A
Data certification system and process for centralized user file encapsulation, encryption, notarization, and verification using a blockchain
US11550931B1
Verifiable Encryption Based on Trusted Execution Environment
US20200028693A1
Cited By
Personalized transaction data processing method and system based on privacy preference and credibility
CN121723509A
Transaction data personalization processing method and system based on privacy preference and trust degree
CN121723509B
Data integration method and system for multi-source heterogeneous data
CN121887540A