Data transmission method, device and electronic device
By using key encryption and attribute information matching mechanisms during the data transmission process, the data sender cannot control the problem of the data receiver's operation of the shared file, and realizes the security control and improvement of the shared file.
Patent Information
- Application Number
- CN202210137364.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-15
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-02-15
AI Technical Summary
In the prior art, the data sender cannot control the subsequent operations of the shared files by the data receiver, resulting in a degradation of the security performance of the shared files.
By generating the first key in the first terminal, and the shared file based on the second key, the second key is included in the attribute information. Only when the state information of the second terminal is matched with the attribute information, can Allow decryption sharing files.
The security control of shared files is implemented to ensure that the second terminal can decrypt and operate shared files only when meeting specific conditions, thereby improving the security performance of the file.
Smart Images

Figure CN114490552B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and specifically relates to a data transmission method, device and electronic equipment. Background Art
[0002] In the related art, for the sharing of confidential files, the data sender can first encrypt the shared file locally, and then transmit the encrypted shared file to the data recipient through instant messaging software, email, File Transfer Protocol (FTP) network transmission, etc., and inform the data recipient user of the encryption password so that the data recipient can use the encryption password to decrypt the shared file; or the data recipient uploads the shared file to the cloud (or a third-party storage facility) and sets access permissions for the cloud so that designated users can download the shared file.
[0003] However, the file sharing method in the related technology can only perform encrypted file transmission and encrypted storage. When the data receiving user obtains the decrypted file, the data receiving user can modify, store, and re-forward the file, while the data sender cannot control these operations, thereby reducing the security performance of the shared file. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a data transmission method, device and electronic device, which can solve the problem that the data sender cannot control the subsequent operations of the data receiver on the shared file in the file sharing method in the related art, thereby reducing the security performance of the shared file.
[0005] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a first terminal, and the method includes:
[0006] The first terminal generates a first key according to the first identification information of the second terminal;
[0007] The first terminal encrypts the shared file based on the second key, and encrypts the attribute information of the shared file based on the first key, wherein the attribute information includes the second key;
[0008] The first terminal sends target information to the second terminal, where the target information includes: a ciphertext of the attribute information and a ciphertext of the shared file.
[0009] In a second aspect, an embodiment of the present application provides a data transmission device, which is applied to a first terminal, and includes:
[0010] A first generating module, used to generate a first key according to the first identification information of the second terminal;
[0011] an encryption module, configured to encrypt the shared file based on the second key, and encrypt the attribute information of the shared file based on the first key, wherein the attribute information includes the second key;
[0012] The sending module is used to send target information to the second terminal, where the target information includes: the ciphertext of the attribute information and the ciphertext of the shared file.
[0013] In a third aspect, an embodiment of the present application provides a data transmission method, which is applied to a second terminal, and the method includes:
[0014] The second terminal receives target information from the first terminal, the target information including: ciphertext of attribute information and ciphertext of a shared file, the attribute information including a second key, wherein the ciphertext of the attribute information is encrypted based on the first identification information of the second terminal;
[0015] The second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information;
[0016] When detecting that the state information of the second terminal matches the attribute information, the second terminal decrypts the ciphertext of the shared file based on the second key.
[0017] In a fourth aspect, an embodiment of the present application provides a data transmission device, which is applied to a second terminal and includes:
[0018] A receiving module, configured to receive target information from a first terminal, the target information comprising: ciphertext of attribute information and ciphertext of a shared file, the attribute information comprising a second key, wherein the ciphertext of the attribute information is encrypted based on the first identification information of the second terminal;
[0019] A first decryption module, configured to decrypt the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information;
[0020] The second decryption module is configured to decrypt the ciphertext of the shared file based on the second key when it is detected that the state information of the second terminal matches the attribute information.
[0021] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect or the third aspect are implemented.
[0022] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the third aspect are implemented.
[0023] In the seventh aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect or the third aspect.
[0024] In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect or the third aspect.
[0025] In an embodiment of the present application, the first terminal generates a first key according to the first identification information of the second terminal; the first terminal encrypts the shared file based on the second key, and encrypts the attribute information of the shared file based on the first key, wherein the attribute information includes the second key; the first terminal sends target information to the second terminal, wherein the target information includes: the ciphertext of the attribute information and the ciphertext of the shared file. In this way, the first terminal generates the first key according to the first identification information of the second terminal, and accordingly, when the second terminal receives the target information, it can decrypt the ciphertext of the attribute information according to its own first identification information, and when it is judged that the state of the second terminal matches the attribute information (for example: the current time is within the sharing effective time in the attribute information, the number of times the second terminal opens the shared file is less than or equal to the preset number of times, etc.), the second key in the attribute information is used to decrypt the ciphertext of the shared file. That is, the embodiment of the present application enables the first terminal to share the encrypted shared file with the second terminal without sending the encryption password to the second terminal through other communication methods, or informing the user of the second terminal of the encryption password; in addition, the attribute information can also be used to restrict the second terminal's operation and read and write permissions on the shared file, thereby improving the security performance of the shared file. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a flow chart of a data transmission method provided in an embodiment of the present application;
[0027] Figure 2 is a schematic diagram of functions and interactions between the first terminal and the second terminal;
[0028] Figure 3 is a flow chart of another data transmission method provided by an embodiment of the present application;
[0029] Figure 4is a block diagram of a data transmission device provided in an embodiment of the present application;
[0030] Figure 5 is a block diagram of another data transmission device provided in an embodiment of the present application;
[0031] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0032] Figure 7 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0034] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0035] In the data encryption sharing method of the related art, the data sender encrypts the shared file, and then needs to send the encrypted shared file (i.e., the ciphertext of the shared file) to the data receiver. At the same time, the data sender also needs to inform the data receiver of the encryption password and / or encryption method through other means so that the data receiver can decrypt the ciphertext of the shared file. As can be seen from the above, when the data receiver obtains the decrypted file, the data receiver can modify, store, and re-forward the file, while the data sender cannot control these operations, thereby reducing the security performance of the shared file.
[0036] In the implementation mode of the present application, the first terminal (i.e., the data sender) may include the second key of the shared file in the attribute information, so that the second terminal (i.e., the data receiver) can use the second key to decrypt the ciphertext of the shared file only when the state of the second terminal (i.e., the data receiver) conforms to the attribute information of the shared file. For example, when the attribute information is used to indicate that the editing function is prohibited, the second terminal can use the second key to decrypt the ciphertext of the shared file only when the editing function corresponding to the shared file is turned off; when the attribute information is used to indicate the effective time for viewing the shared file, the second terminal can use the second key to decrypt the ciphertext of the shared file only within the effective time, etc., which are not exhaustively listed here. In addition, the first terminal uses the first key related to the first identification information of the second terminal to encrypt the attribute information. In this way, when the second terminal receives the ciphertext of the attribute information, it can generate the corresponding first key according to its own first identification information to decrypt the attribute information. Since other terminals do not have the first identification information, they cannot decrypt the encrypted attribute information and the encrypted shared file even if they obtain it, thereby improving the security of the shared file.
[0037] In conjunction with the accompanying drawings, the data transmission method, data transmission device, electronic device, readable storage medium and terminal provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios.
[0038] See also Figure 1 The embodiment of the present application provides a data transmission method, the execution subject of which may be a first terminal, which may be a mobile phone, a computer, a vehicle-mounted terminal or other device capable of data transmission, which is not specifically limited here. Figure 1 As shown, the data transmission method may include the following steps:
[0039] Step 101: A first terminal generates a first key according to first identification information of a second terminal.
[0040] In implementation, the first identification information may be account information, identity information, device identification code, or other information that can uniquely identify the second terminal. For example, if the first terminal and the second terminal share data through a file sharing application, the first identification information may be the login account (such as a mobile phone number, email address, etc.) of the data recipient in the file sharing application. The first identification information is not specifically limited here. It can be understood that in the data sharing process, the first terminal acts as the data sender and the second terminal acts as the data receiver. In this way, when the first terminal wants to encrypt and share the shared file with the second terminal, the user can enter the attribute information of the shared file and the first identification information of the second terminal on the first terminal, so that the first terminal encrypts the attribute information based on the first identification information. For the sake of convenience, in the following embodiments, the attribute information may be referred to as R, the ciphertext of the attribute information may be referred to as R_c, the shared file may be referred to as F, and the ciphertext of the shared file may be referred to as F_c.
[0041] For example: Figure 2 As shown, the first terminal can obtain the shared file F and attribute information R, and encrypt the shared file F and attribute information R to obtain R_c and F_c. R_c and F_c can be located in a composite file RF_c. Then, RF_c can be sent to the second terminal through an existing communication method (such as WeChat, QQ, email, Bluetooth, etc.). Correspondingly, after receiving RF_c, the second terminal can split it to obtain R_c and F_c, and then, according to its own first identification information, R_c is obtained to obtain R and the second key therein. Furthermore, the second terminal can decrypt F_c based on the second key to obtain F only when its own status information matches R (for example, within the sharing time, etc.).
[0042] It should be noted that the above-mentioned first key is generated and stored in a secure environment, for example: generated in the trusted execution environment (TEE) of the first terminal and stored in the secure element (SE) of the terminal. Similarly, in the embodiments of the present application, the generation of all keys, decryption of file attributes, and decryption of files with high security levels are performed in the trusted execution environment of the terminal, and sensitive information such as user private keys and file attribute encryption keys are stored in the secure unit of the terminal to ensure that they cannot be accessed in an ordinary environment. No further elaboration will be given here.
[0043] Step 102: The first terminal encrypts the shared file based on the second key, and encrypts the attribute information of the shared file based on the first key, wherein the attribute information includes the second key.
[0044] Step 103: The first terminal sends target information to the second terminal, where the target information includes: the ciphertext of the attribute information and the ciphertext of the shared file.
[0045] The first terminal may send the target information to the second terminal in any manner, such as through a social application, email, etc., which is not specifically limited here.
[0046] In an implementation, the first terminal encrypts the shared file based on the second key, which may include:
[0047] The first terminal generates a target key according to the second key and the attribute information;
[0048] The first terminal encrypts the shared file according to the target key to obtain a ciphertext of the shared file.
[0049] Among them, the above-mentioned target key can be a combination of the second key and other attribute information (such as sharing time, number of sharing, editing permissions, relevant information of the data sender, relevant information of the data receiver, etc.), for example: assuming that the target key is Key_F_De, the second key is Key_F, and other attribute information is S1 (S1=number of accesses||sharing time||first identification information||second identification information||...), then the target key can be determined by Key_F_De=KDF(Key_F, S1), wherein KDF can be any key derivation function (Key Derivation Function), such as: HMAC-SHA-256 function, etc., and KDF is not specifically limited here.
[0050] Correspondingly, after receiving the target information, if the second terminal decrypts the attribute information, it can obtain the above attribute information and the second key therein, and determine the target key based on the attribute information and the second key in a similar manner as the above first terminal obtains the target key, so that the target key can be used to decrypt the shared file.
[0051] Of course, in implementation, the first terminal can directly use the second key to encrypt the shared file, and the second terminal can decrypt the shared file using the received second key only when it detects that the status information of the second terminal matches the attribute information, which is not specifically limited here.
[0052] The encryption processing of the attribute information of the shared file by the first terminal based on the first key may be performed by encrypting the attribute information through an identity-based cryptography (IBC) mechanism.
[0053] In addition, in addition to the first identification information of the second terminal, the generation of the first key can also be based on other parameters related to the second terminal, for example: the generation of the first key can also be based on the second parameter (parameter2) corresponding to the second terminal in the IBC system, that is, the ciphertext of the attribute information = IBC encryption algorithm (plaintext of the file attribute, parameter2, first identification information (such as mobile phone number, email address, etc.)).
[0054] In an optional implementation, the first terminal and the second terminal respectively construct an IBC system. For example, in the process of the first terminal and the second terminal respectively constructing the IBC system, the second terminal may perform the following processes a) to d), and the first terminal may perform the following processes A) to D):
[0055] a) The second terminal selects a secret security parameter K2 (referred to as the second secret security parameter in the following embodiment), and generates a public parameter parameter2 (referred to as the second parameter in the following embodiment) and a master key masterKey2 (referred to as the second master key in the following embodiment) through the IBC system;
[0056] b) The second terminal publishes parameter2;
[0057] c) The second terminal generates a private key privateKey2 = IBC key generation algorithm (second parameter parameter2, second master key masterKey2, first identification information). In the following embodiments, privateKey2 may also be referred to as a second private key;
[0058] d) The second terminal obtains the public parameter parameter1 (referred to as the first parameter in the following embodiment) of the first terminal in advance through a public channel (such as QQ, email, WeChat, etc., or an IBC system).
[0059] A) The first terminal selects a secret security parameter K1 (referred to as the first secret security parameter in the following embodiments), and generates a public parameter parameter1 and a master key masterKey1 (referred to as the first master key in the following embodiments) through the IBC system. In the following embodiments, privateKey1 can also be referred to as the first private key;
[0060] B) The first terminal publishes its public parameter parameter1;
[0061] C) The first terminal generates a private key privateKey1 = IBC key generation algorithm (public parameter parameter1, master key masterKey1, second identification information);
[0062] D) The first terminal obtains the public parameter parameter2 of the data receiver in advance through a public channel.
[0063] It should be noted that the first terminal may perform digital signature authentication on the acquired parameter2, and the second terminal may perform digital signature authentication on the acquired parameter1, so as to ensure the integrity and anti-tampering function of parameter2 and parameter1.
[0064] In an optional implementation manner, before the first terminal and the second terminal share a file, the first terminal and the second terminal may jointly construct an IBC system.
[0065] In this implementation, compared with the implementation in which the first terminal and the second terminal separately construct the IBC system, the first terminal and the second terminal jointly construct the IBC system, that is, K1 is equal to K2, privateKey1 is equal to privateKey2, parameter1 is equal to parameter2, and masterKey1 is equal to masterKey2. In this way, the efficiency of data processing can be improved. The manner in which the first terminal and the second terminal construct the IBC system is not specifically limited.
[0066] In this implementation, the first terminal may generate encrypted file attributes based on IBC.
[0067] In implementation, the above attribute information can be used to constrain the second terminal's operation and read and write permissions on the shared file, for example: limiting the second terminal to open the shared file only within a specified time period, only allowing the second terminal to read the shared file, but not allowing the second terminal to edit the shared file, prohibiting the second terminal from forwarding the shared file, etc. Similar to the process of generating the first key by the first terminal, when receiving the target information, the second terminal can generate the first key based on its own first identification information, and then use the first key to decrypt the ciphertext of the attribute information to obtain the attribute information, and then determine whether its own time, authority, settings and other status information conforms to the attribute information, and only when it is determined that its own status information matches the attribute information, decrypt the ciphertext of the shared file based on the second key.
[0068] It is worth mentioning that the first terminal uses the first key related to the first identification information of the second terminal to encrypt the attribute information, so that when the second terminal receives the encrypted attribute information, it can decrypt it using its own first identification information, thereby simplifying the process of the first terminal and the second terminal negotiating the first key or exchanging the first key, and the second terminal that only has the first identification information can decrypt the ciphertext of the attribute according to its own first identification information, thereby enhancing the security of the attribute information.
[0069] Optionally, the attribute information of the shared file may include at least one of the following:
[0070] The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
[0071] Option 1: When the attribute information of the shared file includes the sharing time, the second terminal can decrypt the ciphertext of the shared file only within the sharing time;
[0072] Option 2: When the attribute information of the shared file includes the number of times of sharing, the second terminal may decrypt the ciphertext of the shared file less than or equal to the number of times of sharing. For example, after the second terminal decrypts the ciphertext of the shared file for the N+1th time, the second terminal may not perform the step of decrypting the ciphertext of the shared file based on the number of times of decryption of the ciphertext of the shared file being greater than the number of times of sharing, or prohibit opening the decrypted shared file (i.e., opening the shared file through an application corresponding to the shared file so that the user can view the content of the shared file). In addition, the second terminal may also delete the ciphertext of the shared file, the ciphertext of the attribute information, etc.;
[0073] Option 3: When the attribute information of the shared file includes a read permission, the second terminal only allows the functions permitted by the read permission to be enabled, and does not enable the functions prohibited by the read permission. Otherwise, the step of decrypting the ciphertext of the shared file is not performed, or the decrypted shared file is prohibited from being opened;
[0074] Option 4: when the attribute information of the shared file includes the editing permission, the second terminal only allows the functions allowed by the editing permission to be enabled, and does not enable the functions prohibited by the editing permission. Otherwise, the step of decrypting the ciphertext of the shared file is not performed, or the decrypted shared file (i.e., the plaintext of the shared file, for the sake of convenience, the plaintext of the shared file is referred to as the shared file in the following embodiments) is prohibited from being opened;
[0075] Option 5: When the attribute information of the shared file includes a second digital summary, the second digital summary can be a second digital summary obtained by the first terminal performing hash data processing on the attribute information and the shared file. After decrypting the ciphertext of the attribute information, the second terminal can decrypt the shared file using the second key in a trusted execution environment, and perform hash data processing on the decrypted attribute information and the shared file to obtain a fourth digital summary, and compare the fourth digital summary with the second digital summary. Only when the two match or are consistent, the second terminal is allowed to start the target application matching the attribute information, and the target function of the target application is disabled, and the shared file is displayed through the target application; wherein, the matching of the fourth digital summary with the second digital summary can prove that the attribute information and the shared file received by the second terminal are shared by the first terminal and have not been tampered with by other third parties. Correspondingly, if the fourth digital summary does not match the second digital summary, the second terminal can delete the plaintext and ciphertext of the shared file, as well as the plaintext and ciphertext of the attribute information, which will not be described in detail here.
[0076] Option 6: When the attribute information of the shared file includes the identification information of the data sender (i.e., the second identification information), the identification information of the data sender can be used to specify the sender of the shared file to prevent the terminal receiving the shared file from forwarding the shared file to other terminals. In other words, the second terminal can compare the identification information of the specified data sender with the identification information of the actual sender of the target information, and only when it is determined that the two are consistent, the second terminal performs the step of decrypting the ciphertext of the shared file, or performs the step of opening the decrypted shared file.
[0077] Option seven, when the attribute information of the shared file includes the identification information of the data recipient (i.e., the first identification information), the identification information of the data recipient can be used to specify the recipient of the shared file to prevent the shared file from being sent to other terminals due to misoperation or data forwarding. In other words, the second terminal can compare the identification information of the designated data recipient with its own identification information, and only when it is determined that the two are consistent, the second terminal will perform the step of decrypting the ciphertext of the shared file, or perform the step of opening the decrypted shared file.
[0078] Options eight and nine, when the attribute information of the shared file includes at least one of the third identification information and the file type, the second terminal can determine the target application that can be used to open the shared file based on the third identification information and at least one of the file type, so that the second terminal can successfully decrypt the shared file and, if it meets the attribute information, can use the target application to display the shared file.
[0079] In implementation, in addition to the above R_c and F_c, the target information may also include header information summarizing R_c and F_c by the first terminal. For ease of explanation, R_c and F_c are compound files, and the attribute information also includes the header information of the compound file. In addition, in order to ensure that the target information is not tampered with, the first terminal may digitally sign the digital summary of the header information of the compound file, so that the second terminal will decrypt R_c according to the first key only when it is determined that the digital signature authentication is passed.
[0080] As an optional implementation manner, before the first terminal sends the target information to the second terminal, the method further includes:
[0081] The first terminal generates header information of a compound file according to the second identification information of the first terminal, the first identification information, and the third identification information of the shared file, wherein the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file;
[0082] The first terminal performs hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a first digital summary;
[0083] The first terminal digitally signs the first digital summary to generate a digital signature of the compound file and a first signature verification parameter, wherein the target information also includes: the digital signature of the compound file, the first signature verification parameter and header information of the compound file.
[0084] In this implementation, the target information may be a composite file including the ciphertext of the attribute information and the ciphertext of the shared file. For ease of explanation, the compliant file may be referred to as RF_c in the following implementation. In addition, in implementation, the header information of the RF_c may be an overview of the RF_c, so that the second terminal can determine the purpose, opening method, decryption method, etc. of the RF_c according to the header information of the RF_c.
[0085] The digital signature and the first signature verification parameter of the above-mentioned composite file can indicate that RF_c is digitally signed, so that the anti-forwarding function of RF_c can be realized by means of signature and signature authentication. Specifically, when the second terminal obtains the digital signature of RF_c, the first signature verification parameter and the header information of the composite file, it can authenticate the digital signature of RF_c according to the first signature verification parameter, and if the authentication is passed, it is determined that the ciphertext of the attribute information and the ciphertext of the shared file are sent by the first terminal; in addition, after receiving the target information, the second terminal can obtain the above-mentioned R_c and F_c. At this time, the second terminal can generate a third digital summary according to R_c and F_c in the same way as the first terminal generates the first digital summary, and generate a second signature verification parameter according to the third digital summary, and then compare the second signature verification parameter with the first signature verification parameter generated by the first terminal. If the two match, it means that RF_c has not been tampered with by the second terminal or other third-party devices, so that the subsequent steps of decrypting the attribute information can be executed; otherwise, if the digital signature authentication of RF_c fails and / or the second signature verification parameter does not match the first signature verification parameter, RF_c can be deleted.
[0086] In order to prevent the second terminal or third-party device from tampering with or forwarding RF_c, the first terminal can generate a digital summary of RF_c and digitally sign the digital summary. For example, the first terminal performs hash calculation on the header information, R_c, F_c, etc. of the above composite file to generate a first digital summary, and digitally signs the first digital summary through the IBC signature algorithm (first digital summary, parameter1, privateKey1). Therefore, the data recipient is allowed to decrypt RF_c only when the digital summary of RF_c has not been tampered with and it is ensured that the sender is the first terminal, so as to improve the security of RF_c.
[0087] Optionally, the first terminal digitally signs the first digital summary to generate a digital signature of the composite file and a first signature verification parameter, including:
[0088] The first terminal obtains a first private key (privateKey1) and a first parameter (parameter1);
[0089] The first terminal digitally signs the first digital summary according to first information to generate a digital signature of the compound file and the first signature verification parameter, wherein the first information includes: the first private key and the first parameter.
[0090] In implementation, the first private key is related to second information, and the second information includes: the first parameter parameter1, the first master key masterKey1 and the second identification information;
[0091] The first parameter and the first master key masterKey1 are generated by an identity-based cryptography IBC system according to a first secret security parameter (K1).
[0092] The first private key may be related to the second information in such a way that the first private key can be obtained according to the second information, for example: privateKey1=IBC key generation algorithm (public parameter parameter1, master key masterKey1, second identification information).
[0093] It should be noted that the first terminal may obtain privateKey1 and parameter1 from a third terminal, wherein the third terminal may be any trusted third-party terminal, such as a digital certificate authority (CA) in a public key infrastructure (PKI). The first terminal may obtain privateKey1 and parameter1 before data sharing, or obtain privateKey1 and parameter1 online, or obtain privateKey1 and parameter1 offline, which is not specifically limited here. For example: Figure 2 As shown, assuming that the third terminal is a data server, the data server can build an IBC system and implement the following functions:
[0094] 1. User equipment (including the first terminal and the second terminal, and may also include other terminals for logging into data sharing applications) certificate management;
[0095] 2. Discover the terminal that logs into the data sharing application and assist the data sender and data receiver in key negotiation;
[0096] 3.IBC system time calibration.
[0097] In this implementation manner, the first digital summary is digitally signed according to the first private key and the first parameter corresponding to the second terminal, so that when the second terminal obtains the target information sent by the first terminal, it can split the target information to obtain the header information of the composite file (such as the third identification information, the first identification information, the second identification information, the digital signature of the composite file, the first signature verification parameter and the header information of the composite file, etc.), R_c and F_c, and then the first terminal and the first parameter (parameter1) disclosed by the first terminal can be determined according to the second identification information, and the digital signature of the composite file can be verified according to the first digital summary and the second identification information. For example, the digital signature of the composite file is verified by the IBC signature verification algorithm (first digital summary, parameter1, second identification information). If the verification is successful, it means that the composite file is sent by the first terminal, so that the decryption operation of the attribute information can be performed to obtain the decrypted attribute information (that is, the plaintext of the attribute information, hereinafter referred to as the attribute information); if the verification fails, the second terminal can delete the received RF_c.
[0098] In addition to the above-mentioned digital signature authentication, the first terminal can also identify the shared file sent by the first terminal by generating a digital summary of the attribute information and the shared file, and attach the digital summary to the attribute information for encrypted transmission to the second terminal; in this way, after the second terminal receives the target information from the first terminal and completes the decryption of the attribute information and the shared file, it can also generate a digital summary of the decrypted shared file in the same way as the first terminal, and compare the digital summary of the shared file generated by itself with the digital summary of the shared file generated by the first terminal. If the two match, it means that the second terminal and other third-party devices have not tampered with the shared file. At this time, the second terminal can open the shared file; otherwise, if the two do not match, the second terminal will delete RF_c, the ciphertext R_c of the attribute information, the plaintext R of the attribute information, the ciphertext F_c of the shared file, and the plaintext F of the shared file.
[0099] As an optional implementation manner, the first terminal encrypts the attribute information of the shared file based on the first key, including:
[0100] The first terminal performs hash data processing on the attribute information and the shared file to obtain a second digital summary, and updates the attribute information, wherein the updated attribute information includes the second digital summary;
[0101] The first terminal encrypts the updated attribute information according to third information to obtain a ciphertext of the attribute information, wherein the third information includes: the first identification information and the first parameter (parameter1).
[0102] In this embodiment, the attribute information also includes a second digital summary, which is obtained by performing a hash calculation on the attribute information and the shared file, and can be used as the identification information of the shared file. In this way, after verifying the digital signature of the composite file, the second terminal can use the same method as the first terminal to calculate the above second digital summary. The second terminal generates a fourth digital summary based on the attribute information and the shared file, and compares the fourth digital summary with the above second digital summary, so as to start the target application matching the attribute information when the two match, and disable the target function of the target application, and the shared file is displayed through the target application. Correspondingly, when the fourth digital summary does not match the above second digital summary, the second terminal can delete RF_c, the ciphertext R_c of the attribute information, the plaintext R of the attribute information, the ciphertext F_c of the shared file, and the plaintext F of the shared file.
[0103] In an embodiment of the present application, the first terminal generates a first key according to the first identification information of the second terminal; the first terminal encrypts the shared file based on the second key, and encrypts the attribute information of the shared file based on the first key, wherein the attribute information includes the second key; the first terminal sends target information to the second terminal, wherein the target information includes: the ciphertext of the attribute information and the ciphertext of the shared file. In this way, the first terminal generates the first key according to the first identification information of the second terminal, and accordingly, when the second terminal receives the target information, it can decrypt the ciphertext of the attribute information according to the first identification information of the second terminal, and when it is detected that the state information of the second terminal matches the attribute information (for example: the current time is within the sharing effective time in the attribute information, the number of times the second terminal opens the shared file is less than or equal to the preset number of times, etc.), the ciphertext of the shared file is decrypted using the second key in the attribute information. That is, the embodiment of the present application enables the first terminal to share the encrypted shared file with the second terminal without sending the encryption password to the second terminal through other communication methods, or informing the user of the second terminal of the encryption password; in addition, the attribute information can also be used to restrict the second terminal's operation and read and write permissions on the shared file, thereby improving the security performance of the shared file.
[0104] See also Figure 3 Another data transmission method provided in an embodiment of the present application is similar to Figure 1 The data transmission method shown corresponds to the following, wherein: Figure 1 The execution subject of the data transmission method is a first terminal for sending data, and Figure 3 The execution subject of the data transmission method shown is a second terminal for receiving data. Figure 3 As shown, the data transmission method performed by the second terminal may include the following steps:
[0105] Step 301: The second terminal receives target information from the first terminal, the target information including: ciphertext of attribute information and ciphertext of a shared file, the attribute information including a second key, wherein the ciphertext of the attribute information is encrypted based on the first identification information of the second terminal.
[0106] Step 302: The second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information.
[0107] Step 303: When the second terminal detects that the state information of the second terminal matches the attribute information, the second terminal decrypts the ciphertext of the shared file based on the second key.
[0108] It should be noted that the above steps 301 to 303 are similar to the Figure 1 In the illustrated method embodiment, steps 101 to 103 are inverse to each other, and the difference is that in step 303, the second terminal decrypts the ciphertext of the shared file based on the second key only when it is detected that the status information of the second terminal matches the attribute information. Otherwise, the ciphertext of the shared file, the ciphertext of the attribute information, and the plaintext of the attribute information can be deleted. In this way, the attribute information can be used to limit the editing and viewing permissions of the second terminal to the shared file, and the attribute information can also be used to prohibit the second terminal from forwarding the received shared file.
[0109] As an optional implementation manner, the target information further includes: a digital signature of a compound file, a first signature verification parameter, and header information of the compound file, the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file; the digital signature of the compound file is related to the header information of the compound file, the ciphertext of the attribute information, and the ciphertext of the shared file; the header information of the compound file includes the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file;
[0110] The second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information, including:
[0111] The second terminal verifies the digital signature of the compound file;
[0112] When the digital signature of the compound file is verified successfully, the second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information.
[0113] This embodiment is similar to Figure 1 In the method embodiment shown, the process of the first terminal generating the digital signature of the composite file, the first signature verification parameter and the header information of the composite file corresponds to each other and is used to implement the anti-forwarding function of the attribute information, which will not be described in detail here.
[0114] As an optional implementation manner, the verification of the digital signature of the composite file by the second terminal includes:
[0115] The second terminal obtains a second parameter parameter2, wherein the second parameter is related to a second secret security parameter of the second terminal, the second parameter is a public parameter that can be obtained by an external device, and the second secret security parameter is a private parameter that cannot be obtained by an external device;
[0116] The second terminal performs hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a third digital summary;
[0117] The second terminal verifies the digital signature of the compound file according to the fourth information and generates a second signature verification parameter, wherein the fourth information includes: the third digital summary, the second parameter, and the second identification information;
[0118] The second terminal matches the second signature verification parameter with the first signature verification parameter;
[0119] The second terminal determines that the digital signature verification of the compound file passes when the second signature verification parameter is consistent with the first signature verification parameter.
[0120] This embodiment is similar to Figure 1 In the method embodiment shown, the process of the first terminal generating the digital signature of the first digital summary, the first signature verification parameter and the header information of the composite file is similar, and the second terminal matches the second signature verification parameter with the first signature verification parameter, and decrypts the attribute information only when the two are consistent, thereby realizing the anti-forwarding and anti-tampering functions of the attribute information, which will not be repeated here.
[0121] As an optional implementation manner, the second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information, including:
[0122] The second terminal obtains a second private key (privateKey2), where the second private key is related to the second secret security parameter;
[0123] The second terminal decrypts the ciphertext of the attribute information according to fifth information to obtain the attribute information, wherein the fifth information includes the first identification information and the second private key.
[0124] In implementation, the manner in which the second terminal obtains privateKey2 may be the same as the manner in which the first terminal obtains privateKey1, for example: the second private key is associated with sixth information, and the sixth information includes: the second parameter (parameter2), the second master key (masterKey2) and the second identification information;
[0125] The second parameter and the second master key (masterKey2) are generated by an identity-based cryptography IBC system according to a second secret security parameter (K2).
[0126] The specific process of the above-mentioned IBC system generating parameter2 and masterKey2 according to K2, and the second terminal generating privateKey2 according to parameter2, masterKey2 and the second identification information can be referred to as follows Figure 1 In the illustrated embodiment, the specific process in which the IBC system generates parameter1 and masterKey1 according to K1, and the first terminal generates privateKey1 according to parameter1, masterKey1 and the first identification information will not be described in detail here.
[0127] As an optional implementation manner, the attribute information further includes at least one of the following:
[0128] The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
[0129] The meaning and function of the above attribute information are similar to Figure 1 The meanings and functions of the various attribute information listed in the illustrated method embodiment are the same and will not be repeated here.
[0130] As an optional implementation, the method further includes:
[0131] The second terminal generates a fourth digital summary according to the attribute information and the shared file;
[0132] the second terminal starts a target application matching the attribute information and disables a target function of the target application when the fourth digital digest matches the second digital digest, wherein the shared file is displayed by the target application;
[0133] The target function includes: a function in the target application indicated by the attribute information that is prohibited or not allowed; the fourth digital digest matches the second digital digest, indicating that the attribute information and the shared file are sent by the first terminal and have not been tampered with.
[0134] This embodiment is similar to Figure 1 In the method embodiment shown, the process by which the second terminal generates a fourth digital summary based on the attribute information and the shared file is the same as the process by which the first terminal generates a second digital summary based on the attribute information and the shared file, and by comparing the fourth digital summary with the second digital summary, it can be determined whether the attribute information and the shared file have been tampered with, which can be used to implement anti-forwarding and anti-tampering functions for the attribute information and shared files, and will not be repeated here.
[0135] As an optional implementation manner, after the second terminal starts a target application matching the attribute information and disables a target function of the target application when the fourth digital digest matches the second digital digest, the method further includes:
[0136] The second terminal receives a first input;
[0137] In response to the first input, the second terminal closes the target application and deletes the shared file.
[0138] In implementation, the first input may be any input for closing the target application that opens the shared file or closing the target application window that displays the shared file, which is not specifically limited herein.
[0139] In this implementation, when the user closes the target application that opens the shared file or closes the target application window that displays the shared file, the second terminal also deletes the decrypted shared file. That is, when the second terminal wants to open the shared file next time, it needs to re-determine whether its own status information matches the attribute information, so that when its own status information does match the attribute information, it decrypts the shared file again.
[0140] As an optional implementation manner, when the second terminal detects that the state information of the second terminal matches the attribute information, before decrypting the ciphertext of the shared file based on the second key, the method further includes:
[0141] If the state information of the second terminal meets a preset condition, determining that the state information of the second terminal matches the attribute information;
[0142] The state information of the second terminal satisfies a preset condition, which includes at least one of the following:
[0143] The time of the second terminal is included in the shared time;
[0144] The number of times the second terminal accesses the shared file is included in the number of times of sharing;
[0145] The second terminal disables the function prohibited by the read permission;
[0146] The second terminal disables the functions prohibited by the editing authority;
[0147] The identification information of the sender of the shared file matches the identification information of the data sender;
[0148] The identification information of the recipient of the shared file matches the identification information of the data recipient;
[0149] The fourth digital digest generated by the second terminal matches the second digital digest.
[0150] In implementation, the functions prohibited by the above-mentioned read permission may include a screen capture function; the functions prohibited by the above-mentioned edit permission may include whether to allow the user to edit the content of the shared file, and if the user is not allowed to edit the content of the shared file, disabling the editing function for opening the shared file.
[0151] In addition, the identification information of the sender of the shared file matches the identification information of the data sender, the identification information of the receiver of the shared file matches the identification information of the data receiver, and the fourth digital summary generated by the second terminal matches the second digital summary, which can be used to realize the anti-forwarding and anti-tampering functions of the shared file, respectively. For example: assuming that the second terminal forwards the target information to a third party, the identification information of the sender of the shared file obtained by the third party does not match the identification information of the data sender, and the identification information of the receiver of the shared file does not match the identification information of the data receiver, so that the shared file cannot be decrypted, thereby realizing the anti-forwarding function of the shared file to improve the security of the shared file, which will not be repeated here.
[0152] In an embodiment of the present application, the first identification information of the second terminal has been known in advance by the first terminal, and the first terminal can encrypt the attribute information of the shared file based on the first identification information, so that after the second terminal obtains the target information from the first terminal, it can decrypt the ciphertext of the attribute information based on its own first identification information, thereby simplifying the interaction between the first terminal and the second terminal related to the first key and improving the security of the attribute information; in addition, based on the decrypted attribute information, it is detected whether the status information of the second terminal satisfies the attribute information, and only when the attribute information is satisfied, the ciphertext of the shared file is decrypted based on the second key contained in the attribute information. In this way, the operation authority of the second terminal to the shared file can be controlled by judging whether the status information of the second terminal satisfies the attribute information, so as to further improve the security of the shared file.
[0153] The data transmission method provided in the embodiment of the present application can be executed by a data transmission device. In the embodiment of the present application, a method for a data transmission device to execute data transmission is taken as an example to illustrate the data transmission device provided in the embodiment of the present application.
[0154] See also Figure 4 The first data transmission device 400 provided in the embodiment of the present application can be applied to a first terminal, such as Figure 4 As shown, the first data transmission device 400 may include the following modules:
[0155] A first generating module 401, configured to generate a first key according to first identification information of a second terminal;
[0156] An encryption module 402, configured to encrypt the shared file based on the second key, and encrypt the attribute information of the shared file based on the first key, wherein the attribute information includes the second key;
[0157] The sending module 403 is used to send target information to the second terminal, where the target information includes: the ciphertext of the attribute information and the ciphertext of the shared file.
[0158] Optionally, the first data transmission device 400 further includes:
[0159] A second generating module, configured to generate header information of a compound file according to the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file, wherein the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file;
[0160] A first data processing module, configured to perform hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a first digital summary;
[0161] The digital signature module is used to digitally sign the first digital summary to generate a digital signature of the composite file and a first signature verification parameter, wherein the target information also includes: the digital signature of the composite file, the first signature verification parameter and header information of the composite file.
[0162] Optionally, the digital signature module includes:
[0163] a first acquisition unit, configured to acquire a first private key and a first parameter, wherein the first private key and the first parameter are related to a first secret security parameter of the first terminal, the first parameter is a public parameter that can be acquired by an external device, and the first secret security parameter is a private parameter that cannot be acquired by an external device;
[0164] A digital signature unit is used to digitally sign the first digital summary according to first information to generate a digital signature of the compound file and the first signature verification parameter, wherein the first information includes: the first private key and the first parameter.
[0165] Optionally, the first private key is related to second information, and the second information includes: the first parameter, the first master key and the second identification information;
[0166] The first parameter and the first master key are generated by an identity-based cryptography IBC system according to the first secret security parameter.
[0167] Optionally, the encryption module 402 includes:
[0168] a first data processing unit, configured to perform hash data processing on the attribute information and the shared file to obtain a second digital summary, and update the attribute information, wherein the updated attribute information includes the second digital summary;
[0169] The first encryption unit is used to encrypt the updated attribute information according to third information to obtain the ciphertext of the attribute information, wherein the third information includes: the first identification information and the first parameter.
[0170] Optionally, the attribute information further includes at least one of the following:
[0171] The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
[0172] Optionally, the encryption module 402 includes:
[0173] A first generating unit, configured to generate a target key according to the second key and the attribute information;
[0174] The second encryption unit is used to encrypt the shared file according to the target key to obtain the ciphertext of the shared file.
[0175] The first data transmission module 400 in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0176] The first data transmission module 400 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0177] The first data transmission module 400 provided in the embodiment of the present application can realize Figure 1 To avoid repetition, the various processes implemented in the illustrated method embodiment will not be described again here.
[0178] See also Figure 5The second data transmission device 500 provided in the embodiment of the present application can be applied to a second terminal, such as Figure 5 As shown, the second data transmission device 500 may include the following modules:
[0179] The receiving module 501 is used to receive target information from the first terminal, the target information including: ciphertext of attribute information and ciphertext of a shared file, the attribute information including a second key, wherein the ciphertext of the attribute information is encrypted based on the first identification information of the second terminal;
[0180] A first decryption module 502, configured to decrypt the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information;
[0181] The second decryption module 503 is configured to decrypt the ciphertext of the shared file based on the second key when it is detected that the state information of the second terminal matches the attribute information.
[0182] Optionally, the target information further includes: a digital signature of a compound file, a first signature verification parameter, and header information of the compound file, the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file; the digital signature of the compound file is related to the header information of the compound file, the ciphertext of the attribute information, and the ciphertext of the shared file; the header information of the compound file includes the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file;
[0183] The first decryption module 502 is specifically used for:
[0184] The digital signature of the compound file is verified, and when the digital signature of the compound file is verified successfully, the ciphertext of the attribute information is decrypted according to the first identification information of the second terminal to obtain the attribute information.
[0185] Optionally, the first verification module includes:
[0186] a second acquisition unit, configured to acquire a second parameter, wherein the second parameter is related to a second secret security parameter of the second terminal, the second parameter is a public parameter that can be acquired by an external device, and the second secret security parameter is a private parameter that cannot be acquired by an external device;
[0187] A second data processing unit is used to perform hash data processing on the header information of the composite file, the ciphertext of the attribute information and the ciphertext of the shared file to obtain a third digital summary;
[0188] a first verification unit, configured to verify the digital signature of the composite file according to fourth information, and generate a second signature verification parameter, wherein the fourth information includes: the third digital summary, the second parameter, and the second identification information;
[0189] A first matching unit, configured to match the second signature verification parameter with the first signature verification parameter;
[0190] The first decryption module 502 is specifically configured to determine that the digital signature verification of the composite file passes when the second signature verification parameter is consistent with the first signature verification parameter.
[0191] Optionally, the first decryption module 502 includes:
[0192] A third acquisition module, configured to acquire a second private key, where the second private key is related to the second secret security parameter;
[0193] The first decryption unit is used to decrypt the ciphertext of the attribute information according to fifth information to obtain the attribute information, wherein the fifth information includes the first identification information and the second private key.
[0194] Optionally, the second private key is related to sixth information, and the sixth information includes: the second parameter, the second master key and the second identification information;
[0195] The second parameter and the second master key are generated by an identity-based cryptography IBC system according to the second secret security parameter.
[0196] Optionally, the second decryption module 503 includes:
[0197] a second generating unit, configured to generate a target key according to the second key and the attribute information when detecting that the state information of the second terminal matches the attribute information;
[0198] The second decryption unit is used to decrypt the ciphertext of the shared file according to the target key to obtain the shared file.
[0199] Optionally, the attribute information further includes at least one of the following:
[0200] The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
[0201] Optionally, the second data transmission device 500 further includes:
[0202] A third generating module, configured to generate a fourth digital summary according to the attribute information and the shared file;
[0203] an application control module, configured to start a target application matching the attribute information and disable a target function of the target application when the fourth digital digest matches the second digital digest, and the shared file is displayed through the target application;
[0204] The target function includes: a function in the target application indicated by the attribute information that is prohibited or not allowed; the fourth digital digest matches the second digital digest, indicating that the attribute information and the shared file are sent by the first terminal and have not been tampered with.
[0205] Optionally, the second data transmission device 500 further includes:
[0206] An input module, configured to receive a first input;
[0207] A response module is used to close the target application and delete the shared file in response to the first input.
[0208] Optionally, the second data transmission device 500 further includes:
[0209] a determination module, configured to determine that the state information of the second terminal matches the attribute information when the state information of the second terminal satisfies a preset condition;
[0210] The state information of the second terminal satisfies a preset condition, which includes at least one of the following:
[0211] The time of the second terminal is included in the shared time;
[0212] The number of times the second terminal accesses the shared file is included in the number of times of sharing;
[0213] The second terminal disables the function prohibited by the read permission;
[0214] The second terminal disables the functions prohibited by the editing authority;
[0215] The identification information of the sender of the shared file matches the identification information of the data sender;
[0216] The identification information of the recipient of the shared file matches the identification information of the data recipient;
[0217] The fourth digital digest generated by the second terminal matches the second digital digest.
[0218] The second data transmission module 500 in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0219] The second data transmission module 500 in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0220] The second data transmission module 500 provided in the embodiment of the present application can realize Figure 3 To avoid repetition, the various processes implemented in the illustrated method embodiment will not be described again here.
[0221] Alternatively, if Figure 6 As shown, the embodiment of the present application further provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores a program or instruction that can be run on the processor 601, and when the program or instruction is executed by the processor 601, the above Figure 1 or Figure 3 The various steps of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0222] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0223] picture 7A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0224] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.
[0225] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0226] In an optional implementation, if the electronic device 700 is a first terminal:
[0227] Processor 710, configured to generate a first key according to first identification information of a second terminal;
[0228] The processor 710 is further configured to encrypt the shared file based on the second key, and encrypt the attribute information of the shared file based on the first key, wherein the attribute information includes the second key;
[0229] The radio frequency unit 701 is used to send target information to the second terminal, where the target information includes: the ciphertext of the attribute information and the ciphertext of the shared file.
[0230] Optionally, before the radio frequency unit 701 executes the sending of the target information to the second terminal, the processor 710 is further configured to:
[0231] generating header information of a composite file according to the second identification information of the first terminal, the first identification information, and the third identification information of the shared file, wherein the composite file includes the ciphertext of the attribute information and the ciphertext of the shared file;
[0232] Performing hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a first digital summary;
[0233] The first digital summary is digitally signed to generate a digital signature of the compound file and a first signature verification parameter, wherein the target information also includes: the digital signature of the compound file, the first signature verification parameter and header information of the compound file.
[0234] Optionally, the first terminal executed by the processor 710 digitally signs the first digital summary to generate a digital signature of the composite file and a first signature verification parameter, including:
[0235] The processor 710 is used to control the radio frequency unit 701, the network module 702 or the input unit 704 to obtain a first private key and a first parameter, wherein the first private key and the first parameter are related to a first secret security parameter of the first terminal, the first parameter is a public parameter that can be obtained by an external device, and the first secret security parameter is a private parameter that cannot be obtained by an external device;
[0236] The processor 710 is further configured to digitally sign the first digital summary according to the first information to generate a digital signature of the composite file and the first signature verification parameter, wherein the first information includes: the first private key and the first parameter.
[0237] Optionally, the first private key is related to second information, and the second information includes: the first parameter, the first master key and the second identification information;
[0238] The first parameter and the first master key are generated by an identity-based cryptography IBC system according to the first secret security parameter.
[0239] Optionally, the encrypting the attribute information of the shared file based on the first key performed by the processor 710 includes:
[0240] The processor 710 is configured to perform hash data processing on the attribute information and the shared file to obtain a second digital summary, and update the attribute information, wherein the updated attribute information includes the second digital summary;
[0241] The processor 710 is further configured to encrypt the updated attribute information according to third information to obtain a ciphertext of the attribute information, wherein the third information includes: the first identification information and the first parameter.
[0242] Optionally, the attribute information further includes at least one of the following:
[0243] The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
[0244] Optionally, the encrypting the shared file based on the second key performed by the processor 710 includes:
[0245] The processor 710 is configured to generate a target key according to the second key and the attribute information;
[0246] The processor 710 is further configured to encrypt the shared file according to the target key to obtain a ciphertext of the shared file.
[0247] In this embodiment, the electronic device 700 can perform the following Figure 4 The various processes performed by the first data transmission device shown can achieve the same beneficial effects, and will not be described again here to avoid repetition.
[0248] In another optional implementation, if the electronic device 700 is a second terminal:
[0249] The radio frequency unit 701 is configured to receive target information from the first terminal, the target information including: ciphertext of attribute information and ciphertext of a shared file, the attribute information including a second key, wherein the ciphertext of the attribute information is encrypted based on the first identification information of the second terminal;
[0250] The processor 710 is configured to decrypt the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information;
[0251] The processor 710 is further configured to decrypt the ciphertext of the shared file based on the second key when it is detected that the state information of the second terminal matches the attribute information.
[0252] Optionally, the target information further includes: a digital signature of a compound file, a first signature verification parameter, and header information of the compound file, the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file; the digital signature of the compound file is related to the header information of the compound file, the ciphertext of the attribute information, and the ciphertext of the shared file; the header information of the compound file includes the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file;
[0253] The decrypting, according to the first identification information of the second terminal, the ciphertext of the attribute information to obtain the attribute information, performed by the processor 710, includes:
[0254] The digital signature of the compound file is verified, and if the digital signature of the compound file is verified successfully, the ciphertext of the attribute information is decrypted according to the first identification information of the second terminal to obtain the attribute information.
[0255] Optionally, the verification of the digital signature of the composite file performed by the processor 710 includes:
[0256] The processor 710 is used to control the radio frequency unit 701, the network module 702 or the input unit 704 to obtain a second parameter, wherein the second parameter is related to a second secret security parameter of the second terminal, the second parameter is a public parameter that can be obtained by an external device, and the second secret security parameter is a private parameter that cannot be obtained by an external device;
[0257] The processor 710 is further configured to perform hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a third digital summary;
[0258] The processor 710 is further configured to verify the digital signature of the composite file according to fourth information, and generate a second signature verification parameter, wherein the fourth information includes: the third digital summary, the second parameter, and the second identification information;
[0259] The processor 710 is further configured to match the second signature verification parameter with the first signature verification parameter;
[0260] The processor 710 is further configured to determine that the digital signature verification of the composite file passes when the second signature verification parameter is consistent with the first signature verification parameter.
[0261] Optionally, the second terminal executed by the processor 710 decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information, including:
[0262] The processor 710 is configured to control the radio frequency unit 701, the network module 702 or the input unit 704 to obtain a second private key, where the second private key is related to the second secret security parameter;
[0263] The processor 710 is further configured to decrypt the ciphertext of the attribute information according to fifth information to obtain the attribute information, wherein the fifth information includes the first identification information and the second private key.
[0264] Optionally, the second private key is related to sixth information, and the sixth information includes: the second parameter, the second master key and the second identification information;
[0265] The second parameter and the second master key are generated by an identity-based cryptography IBC system according to the second secret security parameter.
[0266] Optionally, the decrypting the shared file based on the second key when detecting that the state information of the second terminal matches the attribute information, performed by the processor 710, includes:
[0267] Processor 710, configured to generate a target key according to the second key and the attribute information when detecting that the state information of the second terminal matches the attribute information;
[0268] The processor 710 is further configured to decrypt the ciphertext of the shared file according to the target key to obtain the shared file.
[0269] Optionally, the attribute information further includes at least one of the following:
[0270] The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
[0271] Optionally, the processor 710 is further configured to:
[0272] generating a fourth digital summary according to the attribute information and the shared file;
[0273] In the case where the fourth digital digest matches the second digital digest, starting a target application matching the attribute information and disabling a target function of the target application, wherein the shared file is displayed through the target application;
[0274] The target function includes: a function in the target application indicated by the attribute information that is prohibited or not allowed; the fourth digital digest matches the second digital digest, indicating that the attribute information and the shared file are sent by the first terminal and have not been tampered with.
[0275] Optionally, after the processor 710 executes the step of starting a target application matching the attribute information and disabling a target function of the target application when the fourth digital digest matches the second digital digest;
[0276] A user input unit 707, configured to receive a first input;
[0277] The processor 710 is further configured to, in response to the first input, close the target application and delete the shared file.
[0278] Before executing the decrypting the ciphertext of the shared file based on the second key when detecting that the status information of the second terminal matches the attribute information, the processor 710 is further configured to:
[0279] If the state information of the second terminal meets a preset condition, determining that the state information of the second terminal matches the attribute information;
[0280] The state information of the second terminal satisfies a preset condition, which includes at least one of the following:
[0281] The time of the second terminal is included in the shared time;
[0282] The number of times the second terminal accesses the shared file is included in the number of times of sharing;
[0283] The second terminal disables the function prohibited by the read permission;
[0284] The second terminal disables the functions prohibited by the editing authority;
[0285] The identification information of the sender of the shared file matches the identification information of the data sender;
[0286] The identification information of the recipient of the shared file matches the identification information of the data recipient;
[0287] The fourth digital digest generated by the second terminal matches the second digital digest.
[0288] In this embodiment, the electronic device 700 can perform the following Figure 5 The various processes performed by the second data transmission device shown can achieve the same beneficial effects, and will not be described again here to avoid repetition.
[0289] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0290] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0291] The processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 710.
[0292] The embodiment of the present application also provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the above Figure 1 or Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0293] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0294] The present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the above Figure 1 or Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0295] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0296] The present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the above Figure 1 or Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0297] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0298] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0299] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A data transmission method, characterized in that: Applied to a first terminal, the method includes: The first terminal generates a first key according to the first identification information of the second terminal; The first terminal encrypts the shared file based on the second key, and encrypts the attribute information of the shared file based on the first key, wherein the attribute information includes the second key; The first terminal sends target information to the second terminal, the target information including: a ciphertext of the attribute information and a ciphertext of the shared file; Before the first terminal sends the target information to the second terminal, the method further includes: The first terminal generates header information of a compound file according to the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file, wherein the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file; The first terminal performs hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a first digital summary; The first terminal digitally signs the first digital summary to generate a digital signature of the compound file and a first signature verification parameter, wherein the target information also includes: the digital signature of the compound file, the first signature verification parameter and header information of the compound file.
2. The method according to claim 1, characterized in that The first terminal digitally signs the first digital summary to generate a digital signature of the composite file and a first signature verification parameter, including: The first terminal obtains a first private key and a first parameter, wherein the first private key and the first parameter are related to a first secret security parameter of the first terminal, the first parameter is a public parameter that can be obtained by an external device, and the first secret security parameter is a private parameter that cannot be obtained by an external device; The first terminal digitally signs the first digital summary according to the first information to generate the digital signature of the compound file and the first signature verification parameter, wherein the first information includes: the first private key and the first parameter.
3. The method according to claim 2, characterized in that The first private key is related to second information, and the second information includes: the first parameter, the first master key and the second identification information; The first parameter and the first master key are generated by an identity-based cryptography IBC system according to the first secret security parameter.
4. The method according to claim 2, characterized in that: The first terminal encrypts the attribute information of the shared file based on the first key, including: The first terminal performs hash data processing on the attribute information and the shared file to obtain a second digital summary, and updates the attribute information, wherein the updated attribute information includes the second digital summary; The first terminal encrypts the updated attribute information according to third information to obtain a ciphertext of the attribute information, wherein the third information includes: the first identification information and the first parameter.
5. The method according to any one of claims 1 to 4, characterized in that The attribute information also includes at least one of the following: The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
6. The method according to any one of claims 1 to 4, characterized in that The first terminal encrypts the shared file based on the second key, including: The first terminal generates a target key according to the second key and the attribute information; The first terminal encrypts the shared file according to the target key to obtain a ciphertext of the shared file.
7. A data transmission method, characterized in that: Applied to the second terminal, the method includes: The second terminal receives target information from the first terminal, the target information including: ciphertext of attribute information and ciphertext of a shared file, the attribute information including a second key, wherein the ciphertext of the attribute information is encrypted based on the first identification information of the second terminal; The second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information; When detecting that the state information of the second terminal matches the attribute information, the second terminal decrypts the ciphertext of the shared file based on the second key; The target information further includes: a digital signature of the compound file, a first signature verification parameter, and header information of the compound file, the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file; the digital signature of the compound file is related to the header information of the compound file, the ciphertext of the attribute information, and the ciphertext of the shared file; the header information of the compound file includes the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file; The second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information, including: The second terminal verifies the digital signature of the compound file; When the digital signature of the compound file is verified successfully, the second terminal decrypts the ciphertext of the attribute information according to the first identification information to obtain the attribute information.
8. The method according to claim 7, characterized in that The verification of the digital signature of the compound file by the second terminal includes: The second terminal obtains a second parameter, wherein the second parameter is related to a second secret security parameter of the second terminal, the second parameter is a public parameter that can be obtained by an external device, and the second secret security parameter is a private parameter that cannot be obtained by an external device; The second terminal performs hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a third digital summary; The second terminal verifies the digital signature of the compound file according to the fourth information and generates a second signature verification parameter, wherein the fourth information includes: the third digital summary, the second parameter, and the second identification information; When the second signature verification parameter is consistent with the first signature verification parameter, it is determined that the digital signature verification of the compound file passes.
9. The method according to claim 8, characterized in that The second terminal decrypts the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information, including: The second terminal obtains a second private key, where the second private key is related to the second secret security parameter; The second terminal decrypts the ciphertext of the attribute information according to fifth information to obtain the attribute information, wherein the fifth information includes the first identification information and the second private key.
10. The method according to claim 9, characterized in that The second private key is related to sixth information, and the sixth information includes: the second parameter, the second master key and the second identification information; The second parameter and the second master key are generated by an identity-based cryptography IBC system according to the second secret security parameter.
11. The method according to claim 7, characterized in that When detecting that the state information of the second terminal matches the attribute information, the second terminal decrypts the ciphertext of the shared file based on the second key, including: The second terminal generates a target key according to the second key and the attribute information when detecting that the state information of the second terminal matches the attribute information; The second terminal decrypts the ciphertext of the shared file according to the target key to obtain the shared file.
12. The method according to any one of claims 7 to 11, characterized in that The attribute information also includes at least one of the following: The sharing time of the shared file, the number of times the shared file is shared, the read permission of the shared file, the editing permission of the shared file, the second digital summary of the shared file, the third identification information of the shared file, the file type of the shared file, the identification information of the data sender of the shared file, and the identification information of the data recipient of the shared file.
13. The method according to claim 12, characterized in that The method further comprises: The second terminal generates a fourth digital summary according to the attribute information and the shared file; the second terminal starts a target application matching the attribute information and disables a target function of the target application when the fourth digital digest matches the second digital digest, wherein the shared file is displayed by the target application; The target function includes: a function in the target application indicated by the attribute information that is prohibited or not allowed; the fourth digital digest matches the second digital digest, indicating that the attribute information and the shared file are sent by the first terminal and have not been tampered with.
14. The method according to claim 13, characterized in that After the second terminal starts a target application matching the attribute information and disables a target function of the target application when the fourth digital digest matches the second digital digest, the method further includes: The second terminal receives a first input; In response to the first input, the second terminal closes the target application and deletes the shared file.
15. The method according to claim 12, characterized in that When the second terminal detects that the state information of the second terminal matches the attribute information, before decrypting the ciphertext of the shared file based on the second key, the method further includes: If the state information of the second terminal meets a preset condition, determining that the state information of the second terminal matches the attribute information; The state information of the second terminal satisfies a preset condition, which includes at least one of the following: The time of the second terminal is included in the shared time; The number of times the second terminal accesses the shared file is included in the number of times of sharing; The second terminal disables the function prohibited by the read permission; The second terminal disables the functions prohibited by the editing authority; The identification information of the sender of the shared file matches the identification information of the data sender; The identification information of the recipient of the shared file matches the identification information of the data recipient; The fourth digital digest generated by the second terminal matches the second digital digest.
16. A data transmission device, characterized in that: Applied to a first terminal, the device includes: A first generating module, used to generate a first key according to the first identification information of the second terminal; an encryption module, configured to encrypt the shared file based on the second key, and encrypt the attribute information of the shared file based on the first key, wherein the attribute information includes the second key; A sending module, configured to send target information to the second terminal, wherein the target information includes: a ciphertext of the attribute information and a ciphertext of the shared file; Wherein, the data transmission device further includes: A second generating module, configured to generate header information of a compound file according to the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file, wherein the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file; A first data processing module, configured to perform hash data processing on the header information of the composite file, the ciphertext of the attribute information, and the ciphertext of the shared file to obtain a first digital summary; The digital signature module is used to digitally sign the first digital summary to generate a digital signature of the composite file and a first signature verification parameter, wherein the target information also includes: the digital signature of the composite file, the first signature verification parameter and header information of the composite file.
17. A data transmission device, characterized in that: Applied to a second terminal, the device includes: A receiving module, configured to receive target information from a first terminal, the target information comprising: ciphertext of attribute information and ciphertext of a shared file, the attribute information comprising a second key, wherein the ciphertext of the attribute information is encrypted based on the first identification information of the second terminal; A first decryption module, configured to decrypt the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information; A second decryption module, configured to decrypt the ciphertext of the shared file based on the second key when detecting that the state information of the second terminal matches the attribute information; The target information further includes: a digital signature of the compound file, a first signature verification parameter, and header information of the compound file, the compound file includes the ciphertext of the attribute information and the ciphertext of the shared file; the digital signature of the compound file is related to the header information of the compound file, the ciphertext of the attribute information, and the ciphertext of the shared file; the header information of the compound file includes the first identification information of the second terminal, the second identification information of the first terminal, and the third identification information of the shared file; The first decryption module is specifically used to: verify the digital signature of the compound file, and if the digital signature of the compound file is verified, decrypt the ciphertext of the attribute information according to the first identification information of the second terminal to obtain the attribute information.
18. An electronic device, characterized in that: It includes a processor and a memory, the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, it implements the steps of the data transmission method as described in any one of claims 1 to 6, or implements the steps of the data transmission method as described in any one of claims 7 to 15.
19. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the data transmission method according to any one of claims 1 to 6 are implemented, or the steps of the data transmission method according to any one of claims 7 to 15 are implemented.
Citation Information
Patent Citations
File encryption and decryption method and device
CN111131216A
Method and system for realizing secure sharing of encrypted files
CN112883399A