Method and device for processing encrypted files

By encrypting processing on removable devices and uploading and downloading confidential documents on the government extranet, the problems of cumbersome operations and low security during the file transfer process of government agencies are solved, and the security and controllability of files in an untrusted environment are realized.

CN118101351BActive Publication Date: 2024-10-29BEIJING ZHONGYU WANTONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410520281.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2024-10-29
Estimated Expiration
2044-04-28

AI Technical Summary

Technical Problem

In the process of transferring confidential work documents between government agencies and units, the existing methods are cumbersome and complex and have low security, and are prone to risks of loss of control.

Method used

By connecting the removable device to the secret-related system, the file is obtained and encrypted, the encrypted file and encryption key are generated, and then uploaded and downloaded on the government extranet through the encrypted file transfer system to ensure that the file is protected in an untrusted environment. security.

Benefits of technology

It improves the security of files and the controllability of the circulation process, ensures the security of files in untrusted network environments, avoids leakage and loss of control, and realizes the security and controllability of files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118101351B_ABST
    Figure CN118101351B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method and device for processing encrypted files, the method comprising: when a removable device is connected to a confidential system, obtaining a first file of the confidential system; obtaining a first key, and encrypting the first file and the first key to obtain an encrypted file and a first encryption key; sending the encrypted file and the first encryption key to an encrypted file circulation system through the confidential system; when the removable device is connected to a file receiving platform, obtaining the encrypted file and the first encryption key in the encrypted file circulation system through the file receiving platform; when receiving a first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file through the first key to obtain the first file; converting the format of the first file to obtain a second file, and displaying the second file through the file receiving platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data security, and in particular to a method and device for processing encrypted files. Background Art

[0002] At present, the circulation of work secret documents in government agencies can only be done through certain specific methods, such as paper documents, USB flash drives, CDs and other media. As the number of work secret documents increases, the above circulation methods have complicated and cumbersome operation procedures, low security, and are prone to the risk of loss of control. Summary of the invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a method and device for processing encrypted files that overcome the above problems or at least partially solve the above problems.

[0004] In a first aspect, an embodiment of the present invention provides a method for processing an encrypted file, which is applied to a removable device, and the method includes:

[0005] When the movable device is connected to a confidential system, obtaining a first file of the confidential system, wherein the confidential system is connected to a confidential network;

[0006] Obtaining a first key, and encrypting the first file and the first key to obtain an encrypted file and a first encryption key;

[0007] Sending the encrypted file and the first encryption key to an encrypted file circulation system through the confidential system, wherein the encrypted file circulation system is deployed on an extranet of the government affairs, and the confidential system is connected to the encrypted file circulation system;

[0008] In the case where the removable device is connected to a file receiving platform, the encrypted file and the first encryption key in the encrypted file circulation system are obtained through the file receiving platform, and the file receiving platform is connected to the encrypted file circulation system;

[0009] In the case of receiving the first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file by using the first key to obtain the first file;

[0010] The first file is format-converted to obtain a second file, and the second file is displayed through the file receiving platform.

[0011] In a second aspect, an embodiment of the present invention further provides a method for processing an encrypted file, which is applied to a confidential system, and the method includes:

[0012] When the removable device is connected to the confidential system, the first file is sent to the removable device, the removable device is used to obtain a first key, and encrypt the first file and the first key to obtain an encrypted file and a first encryption key;

[0013] Receive the encrypted file and the first encryption key sent by the removable device, and send the encrypted file and the first encryption key to an encrypted file circulation system, wherein the encrypted file circulation system is deployed in an extranet of the government affairs, and the confidential system is connected to the encrypted file circulation system.

[0014] In a third aspect, an embodiment of the present invention further provides a method for processing an encrypted file, which is applied to a file receiving platform, and the method includes:

[0015] When the mobile device is connected to the file receiving platform, the encrypted file and the first encryption key are obtained from the encrypted file circulation system, the encrypted file circulation system is deployed in the government extranet, and the file receiving platform is connected to the encrypted file circulation system;

[0016] sending the encrypted file and the first encryption key to the removable device;

[0017] Sending a first instruction to the removable device, the removable device is used to decrypt the first encryption key according to the first instruction to obtain a first key, decrypt the encrypted file using the first key to obtain a first file, and convert the format of the first file to obtain a second file;

[0018] The second file sent by the removable device is received and displayed.

[0019] In a fourth aspect, an embodiment of the present invention further provides an encrypted file processing device, which is applied to a removable device, and the device includes:

[0020] A first acquisition module is used to acquire a first file of a confidential system when the movable device is connected to the confidential system, and the confidential system is connected to a confidential network;

[0021] A first encryption module, used to obtain a first key, and encrypt the first file and the first key to obtain an encrypted file and a first encryption key;

[0022] A first sending module, used for sending the encrypted file and the first encryption key to an encrypted file circulation system through the confidential system, wherein the encrypted file circulation system is deployed in an extranet of the government affairs, and the confidential system is connected to the encrypted file circulation system;

[0023] a second acquisition module, configured to acquire the encrypted file and the first encryption key in the encrypted file circulation system through the file receiving platform when the removable device is connected to the file receiving platform, the file receiving platform being connected to the encrypted file circulation system;

[0024] A first decryption module is used for, upon receiving a first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file by using the first key to obtain the first file;

[0025] The first conversion module is used to convert the format of the first file to obtain a second file, and display the second file through the file receiving platform.

[0026] In a fifth aspect, an embodiment of the present invention further provides an encrypted file processing device, which is applied to a confidential system, and the device includes:

[0027] A second sending module is used to send the first file to the mobile device when the mobile device is connected to the confidential system, and the mobile device is used to obtain the first key, and encrypt the first file and the first key to obtain the encrypted file and the first encryption key;

[0028] The first transceiver module is used to receive the encrypted file and the first encryption key sent by the removable device, and send the encrypted file and the first encryption key to an encrypted file circulation system. The encrypted file circulation system is deployed in the government extranet, and the confidential system is connected to the encrypted file circulation system.

[0029] In a sixth aspect, an embodiment of the present invention further provides an encrypted file processing device, which is applied to a file receiving platform, and the device includes:

[0030] A third acquisition module is used to obtain the encrypted file and the first encryption key from the encrypted file circulation system when the mobile device is connected to the file receiving platform, the encrypted file circulation system is deployed in the government extranet, and the file receiving platform is connected to the encrypted file circulation system;

[0031] A third sending module, used for sending the encrypted file and the first encryption key to the removable device;

[0032] a fourth sending module, configured to send a first instruction to the removable device, wherein the removable device is configured to decrypt the first encryption key according to the first instruction to obtain a first key, decrypt the encrypted file using the first key to obtain a first file, and convert the format of the first file to obtain a second file;

[0033] The first processing module is used to receive and display the second file sent by the removable device.

[0034] In a seventh aspect, an embodiment of the present invention further provides an encrypted file processing system, including a memory, a transceiver, and a processor:

[0035] The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer program in the memory and execute the encrypted file processing method as described above.

[0036] In an eighth aspect, an embodiment of the present invention further provides a processor-readable storage medium, the processor-readable storage medium storing a computer program, and the computer program is used to enable the processor to execute the above-mentioned method for processing encrypted files.

[0037] In the above embodiment of the present invention, the mobile device is connected to the confidential system, and the mobile device can obtain the first file in the confidential system and randomly obtain the first key. The mobile device encrypts the first key and the first file to obtain the encrypted file and the first encryption key respectively, thereby improving the security of the first key and the first file. In addition, the mobile device uploads the encrypted file and the first encryption key to the encrypted file circulation system through the confidential system. Since the encrypted file circulation system is deployed in the government extranet, a connection can be established between the confidential network and the government extranet, which facilitates the circulation of files while ensuring the security of the first file. Furthermore, if the mobile device is connected to the file receiving platform, the file receiving platform obtains the encrypted file and the first encryption key from the encrypted file circulation system, and then sends the encrypted file and the first encryption key to the mobile device. The mobile device first decrypts the first encryption key to obtain the first key, and then decrypts the encrypted file by the first key to obtain the first file. Thus, the mobile device obtains the first file in a non-trusted environment, and converts the format of the first file into a displayable second file, which is displayed on the file receiving platform. Thus, the transfer of the first file from the confidential system to the file receiving platform is completed, and the entire process is encrypted, thereby improving the security of the first file in the non-trusted network environment and achieving the security and controllability of the first file. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 A flowchart of a method for processing encrypted files applied to a removable device provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of the connection between the confidential system, the encrypted file circulation system, and the file receiving platform provided in the embodiment of the present invention;

[0041] Figure 3 A schematic diagram of the structure of a mobile device provided by an embodiment of the present invention;

[0042] Figure 4 A flowchart of a method for processing encrypted files in a confidential system provided by an embodiment of the present invention;

[0043] Figure 5 A flowchart of the steps of a method for processing encrypted files applied to a file receiving platform provided by an embodiment of the present invention;

[0044] Figure 6 A structural block diagram of an encrypted file processing device applied to a removable device provided by an embodiment of the present invention;

[0045] Figure 7 A structural block diagram of a device for processing encrypted files applied to a confidential system provided by an embodiment of the present invention;

[0046] Figure 8 A structural block diagram of an encrypted file processing device applied to a file receiving platform provided by an embodiment of the present invention;

[0047] Fig. 9 A structural block diagram of a system for processing encrypted files provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0049] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] Specifically, Figure 1 As shown, an embodiment of the present invention provides a method for processing an encrypted file, which is applied to a removable device. The method for processing an encrypted file specifically includes the following steps:

[0052] Step 101, when the movable device is connected to a confidential system, a first file of the confidential system is obtained, and the confidential system is connected to a confidential network.

[0053] Specifically, the first document refers to internal sensitive matters generated or obtained by agencies, units, universities, etc. in the course of performing their functions, which are not state secrets, but which, if leaked, will hinder the normal performance of functions of agencies, units, universities, etc. or have an adverse impact on national security and public interests.

[0054] The confidential system is connected to the confidential network. After the confidential system generates the first file, the first file and the audit information need to be sent to the corresponding government agencies, colleges and universities, etc. After the mobile device is connected to the confidential system, the mobile device establishes a connection with the confidential system, so that the mobile device can copy the first file in the confidential system, obtain the audit information of the first file, and save the first file and the audit information to the mobile device.

[0055] Step 102: Obtain a first key, and encrypt the first file and the first key to obtain an encrypted file and a first encryption key.

[0056] Specifically, the removable device obtains a random number through a random number generator, and the random number is used as a first key. The first file is encrypted to obtain an encrypted file, and the first key is encrypted to obtain a first encryption key, and the removable device updates the audit information. By encrypting the first file and the first key through the removable device, the circulation security of the first file can be improved.

[0057] Step 103, sending the encrypted file and the first encryption key to an encrypted file circulation system through the confidential system. The encrypted file circulation system is deployed in the government extranet, and the confidential system is connected to the encrypted file circulation system.

[0058] Specifically, Figure 2As shown, the mobile device uploads the encrypted file and the first encryption key to the confidential system 21, and sends them to the encrypted file circulation system 24 through the confidential system 21. In addition, the mobile device sends the updated audit information to the encrypted file circulation system 24 through the confidential system 21. Since the encrypted file circulation system 24 is deployed in the government extranet, and the confidential system 21 is connected to the encrypted file circulation system 24, a connection between the confidential network and the government extranet can be established, which facilitates the circulation of files while ensuring the security of the first file.

[0059] Step 104, when the removable device is connected to a file receiving platform, the encrypted file and the first encryption key in the encrypted file circulation system are obtained through the file receiving platform, and the file receiving platform is connected to the encrypted file circulation system.

[0060] Specifically, after the removable device is connected to the file receiving platform, the file receiving platform obtains the encrypted file and the first encryption key from the encrypted file circulation system, and saves the encrypted file and the first encryption key in its own storage module, and the file receiving platform sends the encrypted file and the first encryption key to the removable device, thereby the removable device obtains the encrypted file and the first encryption key.

[0061] In addition, the file receiving platform obtains audit information from the encrypted file circulation system and saves the audit information in its own storage module, and the file receiving platform sends the audit information to the removable device, so that the removable device obtains the latest audit information.

[0062] Step 105, upon receiving the first instruction from the file receiving platform, decrypt the first encryption key according to the first instruction to obtain the first key, and decrypt the encrypted file using the first key to obtain the first file.

[0063] Specifically, if the file receiving platform obtains the first instruction, the first instruction is sent to the removable device. The removable device first decrypts the first encryption key according to the first instruction to obtain the first key, and then decrypts the encrypted file by the first key to obtain the decrypted first file, thereby completing the transfer of the first file from the confidential system to the file receiving platform, and the entire process is encrypted, thereby improving the security of the first file in a non-trusted network environment and achieving the security and controllability of the first file.

[0064] Step 106: convert the format of the first file to obtain a second file, and display the second file through the file receiving platform.

[0065] Specifically, after obtaining the first file, the mobile device converts the format of the first file to obtain a displayable second file, and sends the second file to the file receiving platform, which displays the second file through the file receiving platform, so that the file receiving platform can view the second file.

[0066] In the above embodiment of the present invention, the mobile device is connected to the confidential system, and the mobile device can obtain the first file in the confidential system and randomly obtain the first key. The mobile device encrypts the first key and the first file to obtain the encrypted file and the first encryption key respectively, thereby improving the security of the first key and the first file. In addition, the mobile device uploads the encrypted file and the first encryption key to the encrypted file circulation system through the confidential system. Since the encrypted file circulation system is deployed in the government extranet, a connection can be established between the confidential network and the government extranet, which facilitates the circulation of files while ensuring the security of the first file. Furthermore, if the mobile device is connected to the file receiving platform, the file receiving platform obtains the encrypted file and the first encryption key from the encrypted file circulation system, and then sends the encrypted file and the first encryption key to the mobile device. The mobile device first decrypts the first encryption key to obtain the first key, and then decrypts the encrypted file by the first key to obtain the first file. Thus, the mobile device obtains the first file in a non-trusted environment, and converts the format of the first file into a displayable second file, which is displayed on the file receiving platform. Thus, the transfer of the first file from the confidential system to the file receiving platform is completed, and the entire process is encrypted, thereby improving the security of the first file in the non-trusted network environment and achieving the security and controllability of the first file.

[0067] As an optional specific embodiment, the confidential system includes: a first device and a second device, wherein the second device is connected to the encrypted file circulation system;

[0068] Wherein, the step 101, when the mobile device is connected to the confidential system, obtains the first file of the confidential system, specifically including:

[0069] When the removable device is connected to the first device, a first file of the first device is acquired.

[0070] Specifically, Figure 2As shown, the confidential system 21 includes a first device 211 and a second device 212. The first device 211 and the second device 212 are both connected to the confidential network. The first device 211 is a dedicated device for generating a first file. After the first device 211 generates the first file, the first device 211 needs to send the first file and the audit information to the corresponding government agencies, colleges and universities, etc. After the removable device is connected to the first device 211, the removable device establishes a connection with the first device 211, so that the removable device can copy the first file in the first device 211, obtain the audit information of the first file, and save the first file and the audit information to the removable device.

[0071] As an optional specific embodiment, the step 102 of obtaining the first key and encrypting the first file and the first key to obtain the encrypted file and the first encryption key specifically includes:

[0072] Obtaining a first key, and encrypting the first file using the first key to obtain an encrypted file;

[0073] Encrypting the first key to obtain a second encryption key;

[0074] When the movable device is connected to the second device, obtaining a second instruction of the second device;

[0075] According to the second instruction, the second encryption key is decrypted and re-encrypted to obtain the first encryption key.

[0076] Specifically, the removable device obtains a random number through a random number generator, uses the random number as a first key, encrypts the first file through encryption algorithm SM4 and the first key to obtain an encrypted file, and the removable device encrypts the first key to obtain an encrypted second encryption key.

[0077] If the removable device is connected to a second device, and the second device obtains a selection instruction (i.e., a second instruction) from a recipient (such as an institution, university, etc.), the second device sends the second instruction to the removable device, and the removable device decrypts the encrypted file and the first encryption key of the recipient corresponding to the second instruction, and re-encrypts the file after decryption to obtain the re-encrypted first encryption key.

[0078] The encryption process of the first key is described in detail below:

[0079] The first target key (i.e., the first key) is encrypted to obtain the first target encryption key (i.e., the second encryption key), specifically including:

[0080] Based on the proxy re-encryption algorithm of the national secret curve point, the first target key (ie, the first key) is encrypted to obtain the first target encryption key (ie, the second encryption key).

[0081] Specifically, Figure 3 As shown, the removable device 23 includes a trusted module 231 and a storage module 235, and the trusted module 231 includes an encryption and decryption unit 232, an editing unit 233, and a transmission unit 234. The storage module 235 obtains the first file and the audit information in the first device, and sends the first file to the encryption and decryption unit 232. The encryption and decryption unit 232 obtains the first key, and encrypts the first file based on the proxy re-encryption algorithm of the national secret curve point to obtain an encrypted file, and the encryption and decryption unit 232 encrypts the first key to obtain a second encryption key. In addition, the removable device 23 updates the audit information, and encrypts the first file through the removable device to improve the circulation security of the first file.

[0082] The editing unit 233 is used to convert the format of the first file to obtain a second file that can be used for display, such as: the format of the second file is a picture format. The transmission unit 234 is used to transmit the second file to the file receiving platform through the Universal Serial Bus (USB) protocol for display. The storage module 235 is used to store encrypted files.

[0083] It should be noted that after the removable device obtains the encrypted file, the removable device may be disconnected from the first device, and at this time the removable device is in a removable state.

[0084] The above-mentioned proxy re-encryption algorithm based on the national secret curve point encrypts the first target key (i.e., the first key) to obtain the first target encryption key (i.e., the second encryption key), specifically including:

[0085] Obtaining a first bit length, a first public key (ie, a public key of the mobile device), and a random number (ie, a first random number) of the first file;

[0086] In a case where a first bit string corresponding to a first elliptic curve point in the elliptic curve exists in the removable device, multiplying the random number by the first public key to obtain a second coordinate of a second elliptic curve point in the elliptic curve;

[0087] deriving a second key from the second coordinate and the first bit length based on a key derivation function;

[0088] Performing an XOR calculation on the first target key and the second key to obtain a second bit string of the second elliptic curve point;

[0089] Performing a hash calculation on a concatenated bit string of the second coordinate and the first target key to obtain a third bit string of a third elliptic curve point in the elliptic curve;

[0090] The first bit string, the second bit string and the third bit string are concatenated to obtain a second encryption key.

[0091] Specifically, the encryption / decryption unit determines whether there is a first bit string corresponding to a first elliptic curve point in the elliptic curve in the removable device. , if it exists, obtain the bit string M of the first file and the first public key of the removable device , the bit length of M is the first bit length , and generate the first random number through the random number generator , is a value greater than or equal to 1 and less than or equal to n-1, where n is a prime number. With the first public key Multiply them to get the second coordinates of the second elliptic curve point in the elliptic curve :

[0092]

[0093] Then, based on the Key Derivation Function (KDF), from the second coordinate And the first bit length The second key is derived from , the specific formula is as follows:

[0094]

[0095] If the second key If it is a string of all 0 bits, the first random number generated by the random number generator is returned. Steps: If the second key If it is not a string of all 0 bits, the first key and the second key Perform XOR calculation to obtain the second bit string of the second elliptic curve point :

[0096]

[0097] Then, for the second coordinate and the first key The concatenated bit string is hashed to obtain the third bit string of the third elliptic curve point in the elliptic curve :

[0098]

[0099] Then for the first bit string The second bit string And the third bit string Perform connection processing to obtain the second encryption key :

[0100]

[0101] As an optional specific embodiment, after obtaining the first bit length, the first public key and the random number of the first file, the method further includes:

[0102] When the first bit string does not exist in the removable device, calculating the first coordinates of the first elliptic curve point according to the base point of the elliptic curve and the random number;

[0103] The first coordinate is converted into the first bit string.

[0104] Specifically, the encryption and decryption unit determines whether there is a first bit string corresponding to the first elliptic curve point in the elliptic curve in the removable device. If not, it is necessary to calculate the first bit string, that is, to obtain the base point of the elliptic curve. , and the base point With the first random number Multiply them to get the first coordinate of the first elliptic curve :

[0105]

[0106] Convert the data type of the first coordinate to a bit string, that is, get the first bit string .

[0107] In the above embodiment, after obtaining the first bit string, the first bit string is saved. When the first file needs to be circulated later, only the second bit string of the second elliptic curve point and the third bit string of the third elliptic curve point need to be calculated, and there is no need to calculate the first bit string again, which can reduce the calculation process and improve calculation efficiency.

[0108] The decryption process of the second encryption key is described in detail below:

[0109] The second target encryption key (i.e., the second encryption key) is decrypted to obtain the second target key (the key after the second encryption key is decrypted), specifically including:

[0110] Obtaining a second bit length of a fourth bit string corresponding to a second elliptic curve point in a second target encryption key, a first private key, and a first bit string corresponding to a first elliptic curve point, wherein the fourth bit string represents a bit string obtained after a second coordinate transformation of the second elliptic curve point;

[0111] converting the first bit string into a first coordinate;

[0112] Multiplying the first private key by the first coordinate to obtain a third coordinate of the second elliptic curve point;

[0113] deriving a third key from the third coordinate and the second bit length based on a key derivation function;

[0114] Obtaining a second bit string and a third bit string in the second target encryption key;

[0115] Performing an XOR calculation on the second bit string and the third key to obtain a decryption key;

[0116] Performing a hash calculation on the concatenated bit string of the third coordinate and the decryption key to obtain a fifth bit string;

[0117] In a case where the fifth bit string is equal to the third bit string, the decryption key is determined to be the second target key.

[0118] Specifically, the encryption and decryption unit obtains the first private key of the removable device , and obtain the second encryption key The second coordinates of the second elliptic curve point in , and convert the second coordinate into a fourth bit string, and obtain the second bit length of the fourth bit string and from the second encryption key Take the first bit string from , and the first bit string The data type is converted to the first coordinate on the elliptic curve .

[0119] Then transfer the first private key of the removable device With the first coordinate Multiply them to get the third coordinate of the second elliptic curve point . Specifically due to the following formula:

[0120]

[0121]

[0122]

[0123] You can get:

[0124]

[0125] because

[0126]

[0127] but That is .

[0128] in, represents the first public key of the removable device, represents the first random number, Represents the base point of an elliptic curve.

[0129] Then based on the key derivation function KDF, from the third coordinate and the second bit length The third key is derived from :

[0130]

[0131] If the third key If the third key is a string of all 0 bits, an error message is given and the system exits. is not a string of all 0 bits, then the second encryption key Take the second bit string from And the third bit string , and the second bit string and the third key Perform XOR calculation to obtain the decryption key :

[0132]

[0133] Then, for the third coordinate and the decryption key The concatenated bit string is hashed to obtain the fifth bit string :

[0134]

[0135] The fifth bit string With the third bit string Compare, if the fifth bit string With the third bit string If the fifth bit string is consistent, it means that the decryption key is the key decrypted by the second encryption key, and the key decrypted by the second encryption key is output through the transmission unit. With the third bit string If they are inconsistent, an error message will be reported and the system will exit.

[0136] The following is a detailed description of the re-encryption process after the second encryption key is decrypted:

[0137] The first target key (i.e., the key after decryption of the second encryption key) is encrypted to obtain the first target encryption key (i.e., the first encryption key), specifically including:

[0138] Based on the proxy re-encryption algorithm of the national secret curve point, the first target key (i.e., the key after decryption of the second encryption key) is encrypted to obtain the first target encryption key (i.e., the first encryption key).

[0139] Specifically, the encryption and decryption unit obtains the key after decrypting the second encryption key, and encrypts the key after decrypting the second encryption key based on the proxy re-encryption algorithm of the national secret curve point to obtain the first encryption key.

[0140] The above-mentioned proxy re-encryption algorithm based on the national secret curve point encrypts the first target key (i.e., the key after decryption of the second encryption key) to obtain the first target encryption key (i.e., the first encryption key), specifically including:

[0141] Obtaining a first bit length, a first public key (i.e., a public key of a file receiving platform or a third device), and a random number (i.e., a second random number) of the first file;

[0142] In a case where a first bit string corresponding to a first elliptic curve point in the elliptic curve exists in the removable device, multiplying the random number by the first public key to obtain second coordinates of a second elliptic curve point in the elliptic curve;

[0143] deriving a second key from the second coordinate and the first bit length based on a key derivation function;

[0144] Performing an XOR calculation on the first target key and the second key to obtain a second bit string of the second elliptic curve point;

[0145] Performing a hash calculation on a concatenated bit string of the second coordinate and the first target key to obtain a third bit string of a third elliptic curve point in the elliptic curve;

[0146] The first bit string, the second bit string and the third bit string are concatenated to obtain a second encryption key.

[0147] Specifically, the encryption / decryption unit determines whether there is a first bit string corresponding to a first elliptic curve point in the elliptic curve in the removable device. , if it exists, obtain the bit string M of the first file and the first public key of the file receiving platform (or the third device) , the bit length of M is the first bit length , and generate a second random number through a random number generator , is a value greater than or equal to 1 and less than or equal to n-1, where n is a prime number. With the first public key Multiply them to get the second coordinates of the second elliptic curve point in the elliptic curve :

[0148]

[0149] Then, based on the key derivation function KDF, from the second coordinate And the second key is derived from the first bit length klen1 :

[0150]

[0151] If the second key If it is a string of all 0 bits, the second random number generated by the random number generator is returned. Steps: If the second key is not a string of all 0 bits, then the key after decryption of the second encryption key is and the second key Perform XOR calculation to obtain the second bit string of the second elliptic curve point :

[0152]

[0153] Then, for the second coordinate and the key after decryption of the second encryption key The concatenated bit string is hashed to obtain the third bit string of the third elliptic curve point in the elliptic curve :

[0154]

[0155] Then for the first bit string The second bit string And the third bit string Perform connection processing to obtain the first encryption key :

[0156]

[0157] As an optional specific embodiment, the step 103 sends the encrypted file and the first encryption key to the encrypted file circulation system through the confidential system, specifically including:

[0158] When the removable device is connected to the second device, the encrypted file and the first encryption key are sent to the encrypted file circulation system through the second device.

[0159] Specifically, Figure 2 and Figure 3 As shown, if the removable device 23 is connected to the second device 212, the removable device 23 uploads the encrypted file and the first encryption key to the second device 212 through the trusted module 231, and the second device 212 saves the encrypted file and the first encryption key to the storage module 235 and sends them to the encrypted file circulation system 24, so as to realize the unified management and protection of the first file. Since the encrypted file circulation system 24 is deployed in the government extranet, the connection between the confidential network and the government extranet can be established, so as to facilitate the circulation of files while ensuring the security of the first file.

[0160] As an optional specific embodiment, the file receiving platform includes: a third device and a fourth device, the third device is connected to the encrypted file circulation system, and the fourth device is an offline device;

[0161] Wherein, in step 104, when the mobile device is connected to the file receiving platform, obtaining the encrypted file and the first encryption key in the encrypted file circulation system through the file receiving platform specifically includes:

[0162] When the removable device is connected to the third device, the encrypted file and the first encryption key in the encrypted file circulation system are obtained through the third device.

[0163] Specifically, Figure 2 As shown, if the file receiving platform 22 is the file receiving platform of the government unit 221, the third device 222 of the government unit 221 is a device in the government unit 221 that is connected to the government extranet, and the fourth device 224 is an offline device in the office area 223 of the government unit 221. When the removable device is connected to the third device 222, the third device 222 downloads the encrypted file, the first encryption key and the corresponding audit information of the government unit to the encrypted file circulation system 24, and the third device 222 updates the audit information, and saves the encrypted file, the first encryption key and the updated audit information and sends them to the removable device.

[0164] It should be noted that after the removable device obtains the encrypted file, the first encryption key and the latest audit information, the removable device can be disconnected from the third device, and the removable device is in a removable state.

[0165] As an optional specific embodiment, in step 105, when receiving the first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file by using the first key to obtain the first file specifically includes:

[0166] When the movable device is connected to the fourth device, obtaining a first instruction of the fourth device;

[0167] According to the first instruction, decrypt the first encryption key to obtain the first key;

[0168] The encrypted file is decrypted using the first key to obtain the first file.

[0169] Specifically, if the fourth device 224 is an offline device in the agency 221, then Figure 2 and Figure 3 As shown, when the removable device is connected to the fourth device 224. If the fourth device 224 generates a first instruction and sends the first instruction to the removable device, the removable device decrypts the first encryption key in the storage module 235 through the encryption and decryption unit 232 according to the first instruction to obtain the first key, and decrypts the encrypted file through the first key to obtain the decrypted original file, that is, the first file, and updates the audit information through the fourth device 224.

[0170] The decryption process of the first encryption key is described in detail below:

[0171] The second target encryption key (i.e., the first encryption key) is decrypted to obtain the second target key (i.e., the first key), specifically including:

[0172] Obtaining a second bit length of a fourth bit string corresponding to a second elliptic curve point in a second target encryption key, a first private key, and a first bit string corresponding to a first elliptic curve point, wherein the fourth bit string represents a bit string obtained after a second coordinate transformation of the second elliptic curve point;

[0173] converting the first bit string into a first coordinate;

[0174] Multiplying the first private key by the first coordinate to obtain a third coordinate of the second elliptic curve point;

[0175] deriving a third key from the third coordinate and the second bit length based on a key derivation function;

[0176] Obtaining a second bit string and a third bit string in the second target encryption key;

[0177] Performing an XOR calculation on the second bit string and the third key to obtain a decryption key;

[0178] Performing a hash calculation on the concatenated bit string of the third coordinate and the decryption key to obtain a fifth bit string;

[0179] In a case where the fifth bit string is equal to the third bit string, the decryption key is determined to be the second target key.

[0180] Specifically, the encryption and decryption unit obtains the first private key of the file receiving platform (or the third device) and the first encryption key The second coordinates of the second elliptic curve point in , and convert the second coordinate into a fourth bit string, and obtain the second bit length of the fourth bit string and from the first encryption key Take the first bit string from , and the first bit string The data type is converted to the first coordinate on the elliptic curve .

[0181] Then the file receiving platform (or third device)'s first private key With the first coordinate Multiply them to get the third coordinate of the second elliptic curve point . Specifically due to the following formula:

[0182]

[0183]

[0184]

[0185] You can get:

[0186]

[0187] because

[0188]

[0189] but That is .

[0190] in, represents the first public key of the file receiving platform (or third device), represents the first random number, Represents the base point of an elliptic curve.

[0191] Then based on the key derivation function KDF, from the third coordinate and the second bit length The third key is derived from :

[0192]

[0193] If the third key If the third key is a string of all 0 bits, an error message is given and the system exits. is not a string of all 0 bits, then the first encryption key Take the second bit string from And the third bit string , and the second bit string and the third key Perform XOR calculation to obtain the decryption key :

[0194]

[0195] Then, for the third coordinate and the decryption key The concatenated bit string is hashed to obtain the fifth bit string :

[0196]

[0197] The fifth bit string With the third bit string Compare, if the fifth bit string With the third bit string If the fifth bit string is consistent, it means that the decryption key is the first key, and the first key is output through the transmission unit. With the third bit string If they are inconsistent, an error message will be reported and the system will exit.

[0198] As an optional specific embodiment, the step 106 displays the second file through the file receiving platform, specifically including:

[0199] Displaying the second file through the fourth device;

[0200] Wherein, after the step of displaying the second file through the fourth device, the method further includes:

[0201] When receiving the editing instruction from the fourth device, the second file is edited to obtain a third file, and the third file is displayed through the fourth device.

[0202] Specifically, if the removable device converts the format of the first file to obtain a second file in a displayable image format, and sends the second file to a fourth device and displays it on the desktop of the fourth device, the fourth device can view the second file and update the audit information.

[0203] If the mobile device receives an editing instruction sent by the fourth device, the second file is edited according to the editing instruction, and the edited third file is sent to the fourth device and displayed on the desktop of the fourth device, thereby enabling the fourth device to edit the working file.

[0204] In summary, in the above-mentioned embodiment of the present invention, the mobile device is connected to a first device connected to a confidential network, and the mobile device can obtain a first file in the first device and obtain a first key, encrypt the first file by using the first key to obtain an encrypted file, and encrypt the first key to obtain a first encryption key, thereby improving the security of the first file. If the mobile device is connected to a second device connected to the confidential network, the encrypted file and the first encryption key are sent to an encrypted file circulation system through the second device, and the encrypted file circulation system is deployed in the government extranet, thereby establishing a connection between the confidential network and the government extranet, facilitating file circulation while ensuring the security of the first file. Furthermore, if the mobile device is connected to a third device connected to the government external network, the third device obtains the encrypted file and the first encryption key from the encrypted file circulation system and sends them to the mobile device, thereby the mobile device obtains the encrypted file and the first encryption key in a non-trusted environment; if the fourth device sends a first instruction to the mobile device, the mobile device decrypts the first encryption key according to the first instruction to obtain the first key, and decrypts the encrypted file by the first key to obtain the first file, thereby completing the circulation of the first file from the confidential system to the file receiving platform, and the entire process is encrypted, thereby improving the security of the first file in the non-trusted network environment and achieving the security and controllability of the first file.

[0205] Moreover, operations such as storage and editing are all performed in removable devices, which builds a trusted environment for encrypted files, ensures the security of encrypted files in untrusted networks (such as public computers), avoids leaks, loss of control, and other behaviors, and conducts full-chain audit management of the encrypted file life cycle (publishing, receiving, and using). In addition, encryption and decryption processing can be performed through a proxy re-encryption algorithm based on national secret curve points, which can reduce the amount of calculation, and by establishing a connection between removable devices and computer devices, encrypted files can be decrypted in removable devices and viewed in the form of pictures, realizing the application of encrypted files in untrusted environments.

[0206] like Figure 4As shown, an embodiment of the present invention provides a method for processing an encrypted file, which is applied to a confidential system. The method for processing an encrypted file specifically includes the following steps:

[0207] Step 401, when the removable device is connected to the confidential system, a first file is sent to the removable device, the removable device is used to obtain a first key, and the first file and the first key are encrypted to obtain an encrypted file and a first encryption key.

[0208] Specifically, the first document refers to internal sensitive matters generated or obtained by agencies, units, universities, etc. in the course of performing their functions, which are not state secrets, but which, if leaked, will hinder the normal performance of functions of agencies, units, universities, etc. or have an adverse impact on national security and public interests.

[0209] The confidential system is connected to the confidential network. After the confidential system generates the first file, the first file and the audit information need to be sent to the corresponding government agencies, colleges and universities, etc. After the mobile device is connected to the confidential system, the mobile device establishes a connection with the confidential system, so that the mobile device can copy the first file in the confidential system and obtain the audit information of the first file.

[0210] The removable device obtains the first key, encrypts the first file to obtain an encrypted file, encrypts the first key to obtain a first encryption key, and the removable device updates the audit information. The removable device encrypts the first file and the first key to improve the security of the first file.

[0211] Step 402, receiving the encrypted file and the first encryption key sent by the removable device, and sending the encrypted file and the first encryption key to an encrypted file circulation system, wherein the encrypted file circulation system is deployed in the government extranet, and the confidential system is connected to the encrypted file circulation system.

[0212] Specifically, Figure 2 As shown, the confidential system 21 receives the encrypted file and the first encryption key sent by the mobile device, and sends the encrypted file and the first encryption key to the encrypted file circulation system 24. Since the encrypted file circulation system 24 is deployed in the government extranet, a connection between the confidential network and the government extranet can be established, which facilitates the circulation of files while ensuring the security of the files.

[0213] In the above embodiment of the present invention, the mobile device is connected to the confidential system, and the mobile device can obtain the first file in the confidential system and randomly obtain the first key. The mobile device encrypts the first key and the first file to obtain the encrypted file and the first encryption key respectively, thereby improving the security of the first key and the first file. In addition, the mobile device uploads the encrypted file and the first encryption key to the encrypted file circulation system through the confidential system. Since the encrypted file circulation system is deployed in the government extranet, a connection can be established between the confidential network and the government extranet, which facilitates the circulation of files while ensuring the security of the first file.

[0214] As an optional specific embodiment, the confidential system includes: a first device and a second device, wherein the second device is connected to the encrypted file circulation system;

[0215] Wherein, the step 401 sends the first file to the removable device when the removable device is connected to the confidential system, and specifically includes:

[0216] When the removable device is connected to the first device, the first file in the first device is sent to the removable device.

[0217] Specifically, Figure 2 As shown, the confidential system 21 includes a first device 211 and a second device 212. The first device 211 and the second device 212 are both connected to the confidential network. The first device 211 is a dedicated device for generating a first file. After the first device 211 generates the first file, the first device 211 needs to send the first file and the audit information to the corresponding government agencies, colleges and universities, etc. After the removable device is connected to the first device 211, the removable device establishes a connection with the first device 211, so that the first device 211 sends the first file and the audit information to the removable device.

[0218] As an optional specific embodiment, the step 402 of receiving the encrypted file and the first encryption key sent by the removable device specifically includes:

[0219] Sending a second instruction to the movable device through the second device;

[0220] The encrypted file and the first encryption key sent by the removable device according to the second instruction are received by the second device.

[0221] Specifically, if the removable device is connected to the second device, and the second device obtains the selection instruction (i.e., the second instruction) of the recipient (such as an institution, a university, etc.), the second device sends the second instruction to the removable device, and the removable device decrypts the encrypted file and the first encryption key of the recipient corresponding to the second instruction, and re-encrypts after decryption to obtain the re-encrypted first encryption key. The removable device sends the encrypted file and the first encryption key to the second device.

[0222] In summary, in the above-mentioned embodiment of the present invention, the mobile device is connected to a first device connected to a confidential network, and the mobile device can obtain a first file in the first device and obtain a first key, encrypt the first file by using the first key to obtain an encrypted file, and encrypt the first key to obtain a first encryption key, thereby improving the security of the first file. If the mobile device is connected to a second device connected to the confidential network, the encrypted file and the first encryption key are sent to an encrypted file circulation system through the second device, and the encrypted file circulation system is deployed in the government extranet, thereby establishing a connection between the confidential network and the government extranet, facilitating file circulation while ensuring the security of the first file.

[0223] like Figure 5 As shown, an embodiment of the present invention provides a method for processing an encrypted file, which is applied to a file receiving platform. The method for processing an encrypted file specifically includes the following steps:

[0224] Step 501, when the removable device is connected to the file receiving platform, the encrypted file and the first encryption key are obtained from the encrypted file circulation system, the encrypted file circulation system is deployed in the government extranet, and the file receiving platform is connected to the encrypted file circulation system.

[0225] Specifically, after the removable device is connected to the file receiving platform, the file receiving platform obtains the encrypted file and the first encryption key from the encrypted file circulation system, and saves the encrypted file and the first encryption key to its own storage module.

[0226] In addition, the file receiving platform obtains audit information from the encrypted file circulation system and saves the audit information into its own storage module.

[0227] Step 502: Send the encrypted file and the first encryption key to the removable device.

[0228] Specifically, the file receiving platform sends the encrypted file and the first encryption key to the removable device, so that the removable device obtains the encrypted file and the first encryption key. The file receiving platform also sends the audit information to the removable device, so that the removable device obtains the latest audit information.

[0229] Step 503, sending a first instruction to the removable device, the removable device is used to decrypt the first encryption key according to the first instruction to obtain a first key, decrypt the encrypted file using the first key to obtain a first file, and convert the format of the first file to obtain a second file.

[0230] Specifically, if the file receiving platform obtains the first instruction, the first instruction is sent to the removable device. The removable device first decrypts the first encryption key according to the first instruction to obtain the first key, and then decrypts the encrypted file by the first key to obtain the decrypted first file, thereby completing the transfer of the first file from the confidential system to the file receiving platform, and the entire process is encrypted, thereby improving the security of the first file in a non-trusted network environment and achieving the security and controllability of the first file.

[0231] Step 504: Receive and display the second file sent by the removable device.

[0232] Specifically, after obtaining the first file, the mobile device converts the format of the first file to obtain a displayable second file, and sends the second file to the file receiving platform. The file receiving platform receives and displays the second file, so that the file receiving platform can view the second file.

[0233] In the above-mentioned embodiment of the present invention, a removable device is connected to a file receiving platform. The file receiving platform obtains an encrypted file and a first encryption key from an encrypted file circulation system, and then sends the encrypted file and the first encryption key to the removable device. The removable device first decrypts the first encryption key to obtain a first key, and then decrypts the encrypted file using the first key to obtain a first file. Thus, the removable device obtains the first file in a non-trusted environment, and performs format conversion on the first file, converting it into a displayable second file, which is then displayed on the file receiving platform. Thus, the circulation of the first file from the confidential system to the file receiving platform is completed, and the entire process is encrypted, thereby improving the security of the first file in a non-trusted network environment and achieving the security and controllability of the first file.

[0234] As an optional specific embodiment, the file receiving platform includes: a third device and a fourth device, the third device is connected to the encrypted file circulation system, and the fourth device is an offline device;

[0235] The step 501, when the mobile device is connected to the file receiving platform, obtains the encrypted file and the first encryption key from the encrypted file circulation system, specifically includes:

[0236] When the removable device is connected to the third device, the encrypted file and the first encryption key are obtained from the encrypted file circulation system through the third device.

[0237] Specifically, Figure 2 As shown, if the file receiving platform 22 is a file receiving platform of an agency 221, the third device 222 of the agency 221 is a device in the agency 221 that is connected to the government extranet, and the fourth device 224 is an offline device in the office area 223 of the agency 221. When the removable device is connected to the third device 222, the third device 222 downloads the encrypted file, the first encryption key and the corresponding audit information of the agency to the encrypted file circulation system 24, and the third device 222 updates the audit information, and saves and sends the encrypted file, the first encryption key and the updated audit information to the removable device.

[0238] It should be noted that after the removable device obtains the encrypted file, the first encryption key and the latest audit information, the removable device can be disconnected from the third device, and the removable device is in a removable state.

[0239] As an optional specific embodiment, the step 503 sends the first instruction to the removable device, specifically including:

[0240] A first instruction is sent to the movable device through the fourth device.

[0241] Specifically, if the fourth device 224 is an offline device in the agency 221, then Figure 2 and Figure 3 As shown, when the removable device is connected to the fourth device 224. If the fourth device 224 generates a first instruction and sends the first instruction to the removable device, the removable device decrypts the first encryption key in the storage module 235 through the encryption and decryption unit 232 according to the first instruction to obtain the first key, and decrypts the encrypted file through the first key to obtain the decrypted original file, that is, the first file, and updates the audit information through the fourth device 224.

[0242] As an optional specific embodiment, the step 504 of receiving and displaying the second file sent by the removable device specifically includes:

[0243] The second file sent by the removable device is received and displayed by the fourth device.

[0244] Specifically, if the removable device converts the format of the first file to obtain a second file in a displayable image format, and sends the second file to a fourth device, the second file is displayed through the desktop of the fourth device, thereby the fourth device can view the second file and update the audit information.

[0245] As an optional specific embodiment, after the step of receiving and displaying the second file sent by the removable device through the fourth device, the method further includes:

[0246] Sending an editing instruction to the removable device through the fourth device, and the removable device is used to edit the second file according to the editing instruction to obtain a third file;

[0247] The third file is received and displayed by the fourth device.

[0248] Specifically, if the fourth device obtains the editing instruction, the fourth device sends the editing instruction to the removable device, the removable device edits the second file according to the editing instruction, the edited third file is sent to the fourth device, the fourth device receives and displays the third file, thereby realizing the editing of the second file by the fourth device.

[0249] To sum up, in the above-mentioned embodiment of the present invention, the mobile device is connected to a third device connected to the government external network. The third device obtains the encrypted file and the first encryption key from the encrypted file circulation system and sends them to the mobile device, thereby the mobile device obtains the encrypted file and the first encryption key in a non-trusted environment; if the fourth device sends a first instruction to the mobile device, the mobile device decrypts the first encryption key according to the first instruction to obtain the first key, and decrypts the encrypted file by the first key to obtain the first file, thereby completing the circulation of the first file from the confidential system to the file receiving platform, and the whole process is encrypted, thereby improving the security of the first file in the non-trusted network environment and realizing the security and controllability of the first file.

[0250] The above describes the method for processing an encrypted file provided by an embodiment of the present invention. The following describes an apparatus for processing an encrypted file provided by an embodiment of the present invention in conjunction with the accompanying drawings.

[0251] like Figure 6 As shown, the embodiment of the present invention further provides an encrypted file processing device 600, which is applied to a removable device, and the device includes:

[0252] A first acquisition module 601 is used to acquire a first file of a confidential system when the movable device is connected to the confidential system, and the confidential system is connected to a confidential network;

[0253] A first encryption module 602 is used to obtain a first key and encrypt the first file and the first key to obtain an encrypted file and a first encryption key;

[0254] A first sending module 603 is used to send the encrypted file and the first encryption key to an encrypted file circulation system through the confidential system, the encrypted file circulation system is deployed in the government extranet, and the confidential system is connected to the encrypted file circulation system;

[0255] A second acquisition module 604 is used to acquire the encrypted file and the first encryption key in the encrypted file circulation system through the file receiving platform when the removable device is connected to the file receiving platform, and the file receiving platform is connected to the encrypted file circulation system;

[0256] A first decryption module 605 is used for, upon receiving a first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file using the first key to obtain the first file;

[0257] The first conversion module 606 is used to convert the format of the first file to obtain a second file, and display the second file through the file receiving platform.

[0258] Optionally, the confidential system includes: a first device and a second device, wherein the second device is connected to the encrypted file circulation system;

[0259] The first acquisition module 601 is specifically used for:

[0260] When the removable device is connected to the first device, obtaining a first file of the first device;

[0261] The first sending module 603 is specifically used for:

[0262] When the removable device is connected to the second device, the encrypted file and the first encryption key are sent to the encrypted file circulation system through the second device.

[0263] Optionally, the first encryption module 602 is specifically configured to:

[0264] Obtaining a first key, and encrypting the first file using the first key to obtain an encrypted file;

[0265] Encrypting the first key to obtain a second encryption key;

[0266] When the movable device is connected to the second device, obtaining a second instruction of the second device;

[0267] According to the second instruction, the second encryption key is decrypted and re-encrypted to obtain the first encryption key.

[0268] Optionally, the file receiving platform includes: a third device and a fourth device, the third device is connected to the encrypted file circulation system, and the fourth device is an offline device;

[0269] The second acquisition module 604 is specifically used for:

[0270] When the removable device is connected to the third device, obtaining the encrypted file and the first encryption key in the encrypted file circulation system through the third device;

[0271] The first decryption module 605 is specifically used for:

[0272] When the movable device is connected to the fourth device, obtaining a first instruction of the fourth device;

[0273] According to the first instruction, decrypt the first encryption key to obtain the first key;

[0274] The encrypted file is decrypted using the first key to obtain the first file.

[0275] Optionally, when displaying the second file through the file receiving platform, the first conversion module 606 is specifically configured to:

[0276] Displaying the second file through the fourth device;

[0277] Wherein, the device further comprises:

[0278] The editing and displaying module is used to edit the second file to obtain a third file upon receiving an editing instruction from the fourth device, and display the third file through the fourth device.

[0279] Optionally, the device further comprises: a key encryption module, the key encryption module being used to encrypt the first target key to obtain a first target encryption key;

[0280] The key encryption module is specifically used for:

[0281] Based on the proxy re-encryption algorithm of the national secret curve point, the first target key is encrypted to obtain the first target encryption key;

[0282] Among them, when the first target key is the first key, the first target encryption key is the second encryption key; when the first target key is the key decrypted from the second encryption key, the first target encryption key is the first encryption key.

[0283] Optionally, the key encryption module, when encrypting the first target key using a proxy re-encryption algorithm based on national secret curve points to obtain the first target encryption key, is specifically used to:

[0284] Obtaining a first bit length, a first public key, and a random number of the first file;

[0285] In a case where a first bit string corresponding to a first elliptic curve point in the elliptic curve exists in the removable device, multiplying the random number by the first public key to obtain a second coordinate of a second elliptic curve point in the elliptic curve;

[0286] deriving a second key from the second coordinate and the first bit length based on a key derivation function;

[0287] Performing an XOR calculation on the first target key and the second key to obtain a second bit string of the second elliptic curve point;

[0288] Performing a hash calculation on a concatenated bit string of the second coordinate and the first target key to obtain a third bit string of a third elliptic curve point in the elliptic curve;

[0289] Concatenate the first bit string, the second bit string, and the third bit string to obtain a first target encryption key;

[0290] Among them, when the first target key is the first key, the first public key is the public key of the removable device, and the random number is a first random number; when the first target key is the key decrypted from the second encryption key, the first public key is the public key of the file receiving platform, and the random number is a second random number.

[0291] Optionally, after obtaining the first bit length, the first public key and the random number of the first file, the key encryption module is further used to:

[0292] When the first bit string does not exist in the removable device, calculating the first coordinates of the first elliptic curve point according to the base point of the elliptic curve and the random number;

[0293] The first coordinate is converted into the first bit string.

[0294] Optionally, the device further comprises: a key decryption module, the key decryption module being used to decrypt the second target encryption key to obtain a second target key;

[0295] The key decryption module is specifically used for:

[0296] Obtaining a second bit length of a fourth bit string corresponding to a second elliptic curve point in a second target encryption key, a first private key, and a first bit string corresponding to a first elliptic curve point, wherein the fourth bit string represents a bit string obtained after a second coordinate transformation of the second elliptic curve point;

[0297] converting the first bit string into a first coordinate;

[0298] Multiplying the first private key by the first coordinate to obtain a third coordinate of the second elliptic curve point;

[0299] deriving a third key from the third coordinate and the second bit length based on a key derivation function;

[0300] Obtaining a second bit string and a third bit string in the second target encryption key;

[0301] Performing an XOR calculation on the second bit string and the third key to obtain a decryption key;

[0302] Performing a hash calculation on the concatenated bit string of the third coordinate and the decryption key to obtain a fifth bit string;

[0303] In a case where the fifth bit string is equal to the third bit string, determining the decryption key to be the second target key;

[0304] Among them, when the second target encryption key is the second encryption key, the second target key is the key decrypted by the second encryption key, and the first private key is the private key of the removable device; when the second target encryption key is the first encryption key, the second target key is the first key, and the first private key is the private key of the file receiving platform.

[0305] It should be noted here that the above-mentioned processing device for encrypted files applied to removable devices provided in an embodiment of the present invention can implement all the method steps implemented in the above-mentioned processing method embodiment for encrypted files applied to removable devices, and can achieve the same technical effects. The parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.

[0306] like Figure 7 As shown, the embodiment of the present invention further provides an encrypted file processing device 700, which is applied to a confidential system, and the device includes:

[0307] The second sending module 701 is used to send the first file to the mobile device when the mobile device is connected to the confidential system, and the mobile device is used to obtain the first key, and encrypt the first file and the first key to obtain the encrypted file and the first encryption key;

[0308] The first transceiver module 702 is used to receive the encrypted file and the first encryption key sent by the removable device, and send the encrypted file and the first encryption key to an encrypted file circulation system. The encrypted file circulation system is deployed in the government extranet, and the confidential system is connected to the encrypted file circulation system.

[0309] Optionally, the confidential system includes: a first device and a second device, wherein the second device is connected to the encrypted file circulation system;

[0310] The second sending module 701 is specifically used for:

[0311] When the removable device is connected to the first device, sending the first file in the first device to the removable device;

[0312] When receiving the encrypted file and the first encryption key sent by the removable device, the first transceiver module 702 is specifically used to:

[0313] Sending a second instruction to the movable device through the second device;

[0314] The encrypted file and the first encryption key sent by the removable device according to the second instruction are received through the second device.

[0315] It should be noted here that the above-mentioned processing device for encrypted files applied to confidential systems provided in an embodiment of the present invention can implement all the method steps implemented in the above-mentioned embodiment of the processing method for encrypted files applied to confidential systems, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as those of the method embodiment will not be described in detail here.

[0316] like Figure 8 As shown, the embodiment of the present invention further provides an encrypted file processing device 800, which is applied to a file receiving platform, and the device includes:

[0317] The third acquisition module 801 is used to obtain the encrypted file and the first encryption key from the encrypted file circulation system when the mobile device is connected to the file receiving platform, the encrypted file circulation system is deployed in the government extranet, and the file receiving platform is connected to the encrypted file circulation system;

[0318] A third sending module 802, configured to send the encrypted file and the first encryption key to the removable device;

[0319] The fourth sending module 803 is used to send a first instruction to the removable device, and the removable device is used to decrypt the first encryption key according to the first instruction to obtain a first key, decrypt the encrypted file by using the first key to obtain a first file, and convert the format of the first file to obtain a second file;

[0320] The first processing module 804 is configured to receive and display the second file sent by the removable device.

[0321] Optionally, the file receiving platform includes: a third device and a fourth device, the third device is connected to the encrypted file circulation system, and the fourth device is an offline device;

[0322] The third acquisition module 801 is specifically used for:

[0323] When the removable device is connected to the third device, obtaining the encrypted file and the first encryption key from the encrypted file circulation system through the third device;

[0324] Wherein, the fourth sending module 803 is specifically used for:

[0325] Sending a first instruction to the movable device through the fourth device;

[0326] The first processing module 804 is specifically used for:

[0327] The second file sent by the removable device is received and displayed by the fourth device.

[0328] Optionally, the device further comprises:

[0329] A second processing module, configured to send an editing instruction to the removable device through the fourth device, and the removable device is configured to edit the second file according to the editing instruction to obtain a third file;

[0330] The third processing module is used to receive and display the third file through the fourth device.

[0331] It should be noted here that the above-mentioned encrypted file processing device applied to the file receiving platform provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned encrypted file processing method embodiment applied to the file receiving platform, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those of the method embodiment will not be described in detail here.

[0332] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0333] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0334] like Fig. 9 As shown, an embodiment of the present invention further provides an encrypted file processing system, including a memory 920, a transceiver 910, and a processor 900:

[0335] Memory 920, used for storing computer programs;

[0336] A transceiver 910, configured to transmit and receive data under the control of the processor;

[0337] The processor 900 is configured to read the computer program in the memory and execute the steps of the method for processing an encrypted file as described in any of the above embodiments.

[0338] Among them, Fig. 9In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 900 and memory represented by memory 920. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 910 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 900 is responsible for managing the bus architecture and general processing, and the memory 920 may store data used by the processor 900 when performing operations.

[0339] The processor 900 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.

[0340] The processor calls the computer program stored in the memory to execute any encrypted file processing method provided in the embodiment of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.

[0341] It should be noted here that the above-mentioned encrypted file processing system provided by the embodiment of the present invention can implement all the method steps implemented by the above-mentioned encrypted file processing method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment will not be specifically described here.

[0342] An embodiment of the present invention further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the above-mentioned encrypted file processing method.

[0343] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0344] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.

[0345] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0346] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0347] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0348] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for processing encrypted files, applied to removable devices, It is characterized in that The method comprises: When the movable device is connected to a confidential system, obtaining a first file of the confidential system, wherein the confidential system is connected to a confidential network; Obtaining a first key, and encrypting the first file and the first key to obtain an encrypted file and a first encryption key; Sending the encrypted file and the first encryption key to an encrypted file circulation system through the confidential system, wherein the encrypted file circulation system is deployed on an extranet of the government affairs, and the confidential system is connected to the encrypted file circulation system; When the removable device is connected to a file receiving platform, the encrypted file and the first encryption key in the encrypted file circulation system are obtained through the file receiving platform, and the file receiving platform is connected to the encrypted file circulation system; When receiving the first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file by using the first key to obtain the first file; Converting the first file into a second file, and displaying the second file through the file receiving platform; The confidential system includes: a first device and a second device, wherein the second device is connected to the encrypted file circulation system; Wherein, when the movable device is connected to the confidential system, obtaining the first file of the confidential system includes: When the removable device is connected to the first device, obtaining a first file of the first device; The step of sending the encrypted file and the first encryption key to the encrypted file circulation system through the confidential system includes: When the removable device is connected to the second device, the encrypted file and the first encryption key are sent to the encrypted file circulation system through the second device; The obtaining of the first key and encrypting the first file and the first key to obtain the encrypted file and the first encryption key includes: Obtaining a first key, and encrypting the first file using the first key to obtain an encrypted file; Encrypting the first key to obtain a second encryption key; When the movable device is connected to the second device, obtaining a second instruction of the second device; According to the second instruction, the second encryption key is decrypted and re-encrypted to obtain a first encryption key; The file receiving platform includes: a third device and a fourth device, the third device is connected to the encrypted file circulation system, and the fourth device is an offline device; Wherein, when the removable device is connected to the file receiving platform, obtaining the encrypted file and the first encryption key in the encrypted file circulation system through the file receiving platform includes: When the removable device is connected to the third device, obtaining the encrypted file and the first encryption key in the encrypted file circulation system through the third device; Wherein, in the case of receiving the first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file by using the first key to obtain the first file, including: When the movable device is connected to the fourth device, obtaining a first instruction of the fourth device; According to the first instruction, decrypt the first encryption key to obtain the first key; Decrypting the encrypted file using the first key to obtain the first file; The displaying the second file through the file receiving platform includes: Displaying the second file through the fourth device; After displaying the second file through the fourth device, the method further includes: When receiving an editing instruction from the fourth device, editing the second file to obtain a third file, and displaying the third file through the fourth device; Encrypting the first target key to obtain the first target encryption key includes: Based on the proxy re-encryption algorithm of the national secret curve point, the first target key is encrypted to obtain the first target encryption key; Among them, when the first target key is the first key, the first target encryption key is the second encryption key; when the first target key is the key decrypted from the second encryption key, the first target encryption key is the first encryption key.

2. The method for processing encrypted files according to claim 1, It is characterized in that The proxy re-encryption algorithm based on the national secret curve point encrypts the first target key to obtain the first target encryption key, including: Obtaining a first bit length, a first public key, and a random number of the first file; In a case where a first bit string corresponding to a first elliptic curve point in the elliptic curve exists in the removable device, multiplying the random number by the first public key to obtain a second coordinate of a second elliptic curve point in the elliptic curve; deriving a second key from the second coordinate and the first bit length based on a key derivation function; Performing an XOR calculation on the first target key and the second key to obtain a second bit string of the second elliptic curve point; Performing a hash calculation on a concatenated bit string of the second coordinate and the first target key to obtain a third bit string of a third elliptic curve point in the elliptic curve; Concatenate the first bit string, the second bit string, and the third bit string to obtain a first target encryption key; Among them, when the first target key is the first key, the first public key is the public key of the removable device, and the random number is a first random number; when the first target key is the key decrypted from the second encryption key, the first public key is the public key of the file receiving platform, and the random number is a second random number.

3. The method for processing encrypted files according to claim 2, It is characterized in that After obtaining the first bit length, the first public key, and the random number of the first file, the method further includes: When the first bit string does not exist in the removable device, calculating the first coordinates of the first elliptic curve point according to the base point of the elliptic curve and the random number; The first coordinate is converted into the first bit string.

4. The method for processing encrypted files according to claim 3, It is characterized in that Decrypting the second target encryption key to obtain the second target key includes: Obtaining a second bit length of a fourth bit string corresponding to a second elliptic curve point in a second target encryption key, a first private key, and a first bit string corresponding to a first elliptic curve point, wherein the fourth bit string represents a bit string obtained after a second coordinate transformation of the second elliptic curve point; converting the first bit string into a first coordinate; Multiplying the first private key by the first coordinate to obtain a third coordinate of the second elliptic curve point; deriving a third key from the third coordinate and the second bit length based on a key derivation function; Obtaining a second bit string and a third bit string in the second target encryption key; Performing an XOR calculation on the second bit string and the third key to obtain a decryption key; Performing a hash calculation on the concatenated bit string of the third coordinate and the decryption key to obtain a fifth bit string; In a case where the fifth bit string is equal to the third bit string, determining the decryption key to be the second target key; Among them, when the second target encryption key is the second encryption key, the second target key is the key decrypted by the second encryption key, and the first private key is the private key of the removable device; when the second target encryption key is the first encryption key, the second target key is the first key, and the first private key is the private key of the file receiving platform.

5. A device for processing encrypted files, applied to a removable device, It is characterized in that The device comprises: A first acquisition module is used to acquire a first file of a confidential system when the movable device is connected to the confidential system, and the confidential system is connected to a confidential network; A first encryption module, used to obtain a first key, and encrypt the first file and the first key to obtain an encrypted file and a first encryption key; A first sending module, used for sending the encrypted file and the first encryption key to an encrypted file circulation system through the confidential system, wherein the encrypted file circulation system is deployed in an extranet of the government affairs, and the confidential system is connected to the encrypted file circulation system; a second acquisition module, configured to acquire the encrypted file and the first encryption key in the encrypted file circulation system through the file receiving platform when the removable device is connected to the file receiving platform, the file receiving platform being connected to the encrypted file circulation system; A first decryption module is used for, upon receiving a first instruction from the file receiving platform, decrypting the first encryption key according to the first instruction to obtain the first key, and decrypting the encrypted file by using the first key to obtain the first file; A first conversion module, used for converting the format of the first file to obtain a second file, and displaying the second file through the file receiving platform; The confidential system includes: a first device and a second device, wherein the second device is connected to the encrypted file circulation system; Wherein, the first acquisition module is specifically used for: When the removable device is connected to the first device, obtaining a first file of the first device; Wherein, the first sending module is specifically used for: When the removable device is connected to the second device, the encrypted file and the first encryption key are sent to the encrypted file circulation system through the second device; The first encryption module is specifically used for: Obtaining a first key, and encrypting the first file using the first key to obtain an encrypted file; Encrypting the first key to obtain a second encryption key; When the movable device is connected to the second device, obtaining a second instruction of the second device; According to the second instruction, the second encryption key is decrypted and re-encrypted to obtain a first encryption key; The file receiving platform includes: a third device and a fourth device, the third device is connected to the encrypted file circulation system, and the fourth device is an offline device; Wherein, the second acquisition module is specifically used for: When the removable device is connected to the third device, obtaining the encrypted file and the first encryption key in the encrypted file circulation system through the third device; Wherein, the first decryption module is specifically used for: When the movable device is connected to the fourth device, obtaining a first instruction of the fourth device; According to the first instruction, decrypt the first encryption key to obtain the first key; Decrypting the encrypted file using the first key to obtain the first file; When the first conversion module displays the second file through the file receiving platform, it is specifically used to: Displaying the second file through the fourth device; Wherein, the device further comprises: an editing and displaying module, configured to, upon receiving an editing instruction from the fourth device, edit the second file to obtain a third file, and display the third file through the fourth device; The device further comprises: a key encryption module, the key encryption module being used to encrypt the first target key to obtain a first target encryption key; The key encryption module is specifically used for: Based on the proxy re-encryption algorithm of the national secret curve point, the first target key is encrypted to obtain the first target encryption key; Among them, when the first target key is the first key, the first target encryption key is the second encryption key; when the first target key is the key decrypted from the second encryption key, the first target encryption key is the first encryption key.

6. A system for processing encrypted files, It is characterized in that Including memory, transceiver, processor: Memory for storing computer programs; a transceiver, for transmitting and receiving data under the control of the processor; A processor, configured to read the computer program in the memory and execute the method for processing an encrypted file as claimed in any one of claims 1 to 4.

7. A processor-readable storage medium, It is characterized in that The processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the encrypted file processing method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Encrypted file sending method and device and storage medium

    CN111614670A

  • Ciphertext communication method and device, computer equipment and storage medium

    CN116455625A