File encryption methods and devices, file decryption methods

By encrypting files, inserting tags, and randomly recombining them to generate verification files, this method solves the problem that traditional technologies cannot meet the security needs of rapid information technology development, achieves file security and integrity verification, and reduces dependence on the environment.

CN114329546BActive Publication Date: 2025-11-14CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111621108.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-11-14
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Traditional information security technologies cannot meet the security needs of rapid information technology development and cannot effectively protect the security and integrity of files.

Method used

By encrypting the original file, inserting markers, and randomly recombining them, a verification file is generated, achieving multiple encryption and verification.

Benefits of technology

It achieves security and integrity verification of file content, reduces dependence on the usage environment, and ensures that files are not tampered with in an information environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329546B_ABST
    Figure CN114329546B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for encrypting a file, and a method for decrypting a file. The encryption method includes: encrypting the original file to obtain an encrypted file; inserting a marker into the encrypted file to obtain a marked file, wherein the marker includes characters; randomly recombining the marked file to obtain a recombined file; and storing the recombined file and a verification file corresponding to each other, wherein the verification file includes a verification code calculated using a verification program on the recombined file. This application solves the technical problem that traditional technologies cannot meet users' information security needs due to the rapid development of information technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data encryption, specifically to a method and apparatus for encrypting files and a method for decrypting files. Background Technology

[0002] With the rapid development of information technology, protecting document security has become crucial. The traditional three pillars of information security (firewalls, intrusion detection, and antivirus) are no longer sufficient to meet users' security needs as the basic infrastructure of organizational networks.

[0003] There is currently no effective solution to the problem that traditional technologies cannot meet users' information security needs due to the rapid development of information technology. Summary of the Invention

[0004] This application provides a file encryption method and apparatus, and a file decryption method, to at least solve the technical problem that traditional technologies cannot meet users' information security needs due to the rapid development of information technology.

[0005] According to one aspect of the embodiments of this application, a method for encrypting a file is provided, comprising: encrypting an original file to obtain an encrypted file; inserting a marker into the encrypted file to obtain a marked file, wherein the marker includes characters; randomly recombining the marked file to obtain a recombined file; and storing the recombined file in correspondence with a verification file, wherein the verification file includes a verification code calculated by a verification program on the recombined file.

[0006] Optionally, the original file is encrypted to obtain an encrypted file, including: converting the contents of the original file into a byte array; and encrypting the byte array using a pseudo-random number algorithm according to an advanced encryption standard to obtain an encrypted file.

[0007] Optionally, inserting the token into the encrypted file to obtain the tagged file includes: obtaining the token; splitting the token to obtain multiple characters; and randomly inserting the multiple characters into the encrypted file to obtain the tagged file.

[0008] Optionally, randomly recombining the marked file to obtain a recombined file includes: dividing the content of the marked file into multiple segments based on multiple characters to obtain multiple segments of file content; and randomly recombining the multiple segments of file content to obtain a recombined file.

[0009] Optionally, after randomly recombining the marked files to obtain the recombined files, the method further includes: storing the recombined files in the form of a mapping file, and storing the verification information of the recombined files in the mapping file, wherein the verification information includes: the marks, the positions of multiple characters inserted into the encrypted files respectively, the order of the multiple segmented file contents before recombining, and the order after recombining.

[0010] Optionally, storing the reconstructed file and the verification file in correspondence includes storing the mapping file and the verification file in correspondence.

[0011] According to another aspect of the embodiments of this application, a file decryption method is also provided, comprising: obtaining a file to be decrypted and a verification file, wherein the verification file includes a verification code calculated by a verification program on the reconstructed file, and the reconstructed file is a file obtained by reconstructing a file encrypted with the original file; verifying whether the file to be decrypted is a mapping file using the verification file, wherein the mapping file includes the reconstructed file and verification information; if the file to be decrypted is a mapping file, obtaining the file before reconstruction using the verification information stored in the mapping file; and decrypting the file before reconstruction using a pseudo-random number algorithm according to an advanced encryption standard to obtain the original file.

[0012] According to another aspect of the embodiments of this application, a file encryption device is also provided, comprising: an encryption module for encrypting an original file to obtain an encrypted file; an insertion module for inserting a marker into the encrypted file to obtain a marked file, wherein the marker includes characters; a recombination module for randomly recombinating the marked file to obtain a recombined file; and a storage module for storing the recombined file and a verification file corresponding to each other, wherein the verification file includes a verification code calculated by a verification program on the recombined file.

[0013] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided. The non-volatile storage medium includes a stored program, wherein, when the program is running, it controls the device where the non-volatile storage medium is located to execute the above-mentioned file encryption method or file decryption method.

[0014] According to another aspect of the embodiments of this application, a processor is also provided, which is used to run a program stored in a memory, wherein the program executes the above-mentioned file encryption method or file decryption method when it runs.

[0015] In this embodiment, the original file is encrypted to obtain an encrypted file; a marker is inserted into the encrypted file to obtain a marked file, wherein the marker includes characters; the marked file is randomly recombined to obtain a recombined file; the recombined file is stored in correspondence with a verification file, wherein the verification file includes a verification code calculated using a verification program on the recombined file. By encrypting the file, marking it, and recombining it to generate a corresponding verification file, the purpose of multiple encryption and verification of the file is achieved. This achieves the technical effects of ensuring the security of the file content, verifying the integrity of the file content, and having low dependence on the usage environment. In turn, it solves the technical problem that traditional technologies cannot meet users' information security needs due to the rapid development of information technology. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a file encryption method according to an embodiment of this application;

[0018] Figure 2 This is a flowchart of a file encryption method according to an embodiment of this application;

[0019] Figure 3 This is a flowchart of a file decryption method according to an embodiment of this application;

[0020] Figure 4 This is a schematic diagram of an optional file decryption method according to an embodiment of this application;

[0021] Figure 5 This is a structural block diagram of a document encryption device according to an embodiment of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a file encryption method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0025] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0026] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the file encryption method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-mentioned application vulnerability detection method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0028] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0029] According to an embodiment of this application, an embodiment of a file encryption method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0030] Figure 2 This is a flowchart of a file encryption method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0031] Step S202: Encrypt the original file to obtain the encrypted file;

[0032] Step S204: Insert the token into the encrypted file to obtain the tokenized file, wherein the token includes characters;

[0033] Step S206: Randomly reassemble the marked files to obtain the reassembled files;

[0034] Step S208: Store the reconstructed file and the verification file accordingly, wherein the verification file includes a verification code calculated by the verification program on the reconstructed file.

[0035] Through the above steps, by encrypting the file, marking and recombining it to generate a corresponding verification file, the purpose of multiple encryption and verification of the file is achieved. This ensures the security of the file content, verifies the integrity of the file content, and has low dependence on the usage environment.

[0036] According to an optional embodiment of this application, step S202 encrypts the original file to obtain an encrypted file, including: converting the content of the original file into a byte array; and encrypting the byte array using a pseudo-random number algorithm according to the Advanced Encryption Standard to obtain an encrypted file.

[0037] A byte array is a sequence of consecutive variables whose data type is bytes.

[0038] Optionally, the pseudo-random number algorithm uses the SHA-1PRNG algorithm. SHA-1 is a data encryption algorithm that takes a piece of plaintext and then irreversibly transforms it into a piece of ciphertext (usually smaller). It can also be simply understood as taking a string of input codes (called pre-mapped or message) and transforming them into a shorter, fixed-length output sequence, i.e., hash values ​​(also called message digests or message authentication codes).

[0039] Advanced Encryption Standard (AES) is a standard for encrypting electronic data. AES encryption is a symmetric-key algorithm, and its speed is very fast compared to other symmetric encryption algorithms. AES encryption uses a 128, 192, or 256-bit key and 128 blocks to encrypt and decrypt data. Different key sizes are named AES-x, where x is the key size. The longer the key, the more difficult it is to crack the encryption.

[0040] By reading the file content, converting the file content into a byte array, and then encrypting it according to the AES standard using the SHA1PRNG algorithm, that is, using the SHA1PRNG algorithm to generate an AES key to encrypt the byte array, generating new encrypted content.

[0041] According to another optional embodiment of this application, step S204, inserting the tag into the encrypted file to obtain the tagged file, includes: obtaining the tag; splitting the tag to obtain multiple characters; and randomly inserting the multiple characters into the encrypted file to obtain the tagged file.

[0042] A tag can be a key object. A key, like a password, is typically a verification code used by software to authenticate access to the software. Keys can be registry files or key files, and can generally be opened with Notepad.

[0043] Input a custom tag key, such as 0x3022xba2a. The program will split the tag key and randomly insert each character into the encrypted content to obtain the tagged file.

[0044] According to another optional embodiment of this application, step S206, which involves randomly recombining the marked file to obtain a recombined file, includes: dividing the content of the marked file according to multiple characters to obtain multiple divided file contents; and randomly recombining the multiple divided file contents to obtain a recombined file.

[0045] The file content is split based on the inserted characters, and the split content is randomly recombined to obtain the recombined file.

[0046] In some optional embodiments of this application, after performing step S206 to randomly reassemble the marked file and obtain the reassembled file, the method further includes: storing the reassembled file in the form of a mapping file, and storing the verification information of the reassembled file in the mapping file, wherein the verification information includes: the mark, the position of multiple characters inserted into the encrypted file respectively, the order of multiple segmented file contents before reassembly, and the order after reassembly.

[0047] Alternatively, the mapping file can be a map file. A map file is a mapping file that combines the program, data, and I / O space after compilation by a compiler. Through the map file, the size and location of the program can be determined.

[0048] The reconstructed file is stored as a map file, which contains the verification information of the reconstructed file, and a new file is generated. The encapsulated verification information includes the key, the insertion position of each string, the order of the segments before reconstructing, and the order of the segments after reconstructing.

[0049] In some other optional embodiments of this application, the execution step S208 of storing the reconstructed file and the verification file in correspondence includes: storing the mapping file and the verification file in correspondence.

[0050] Optionally, the verification file can be a Message-Digest Algorithm (MD5) file. MD5 is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value to ensure the integrity and consistency of transmitted information; it is also known as a hash algorithm or hash function. It uses a fixed function to convert data of arbitrary length into a fixed-length string (typically 16 bytes).

[0051] MD5 is a file signature used to ensure file authenticity and prevent unauthorized use, such as adding malware or altering copyright information. Each file can be assigned a unique MD5 hash using an MD5 verification program. After downloading the program, the MD5 hash is calculated and compared to the original MD5 hash. If they match, the original file has been downloaded; otherwise, the downloaded file is incomplete or has been tampered with.

[0052] By storing the map file and the MD5 file in correspondence, the reconstructed file can be stored in correspondence with the MD5 file.

[0053] This application provides a file encryption and verification tool based on random token marking for encrypting and verifying files. This application aims to provide a mature set of rules for constructing complete file encryption and verification rules. This application performs secondary encryption by marking and recombining the first-level encrypted content; simultaneously, it verifies whether the file has been tampered with by marking the key. This application encrypts data without changing the user's original usage habits. By encrypting the data itself, the user data remains secure regardless of whether it is removed from the operating system or illegally removed from a secure environment, exhibiting low dependence on the environment. It also provides corresponding verification rules for verifying whether the file content has been tampered with and its integrity.

[0054] Figure 3 This is a flowchart of a file decryption method according to an embodiment of this application, such as... Figure 3 As shown, the method includes the following steps:

[0055] Step S302: Obtain the file to be decrypted and the verification file. The verification file includes a verification code calculated by the verification program on the reconstructed file. The reconstructed file is obtained by reconstructing the encrypted original file.

[0056] Step S304: Use a verification file to verify whether the file to be decrypted is a mapping file, wherein the mapping file includes the reconstructed file and verification information;

[0057] Step S306: If the file to be decrypted is a mapping file, the file before reconstruction is obtained by using the verification information stored in the mapping file;

[0058] Step S308: Decrypt the file before reconstruction using a pseudo-random number algorithm according to the Advanced Encryption Standard to obtain the original file.

[0059] Optionally, in this decryption method, the MD5 checksum of the file to be decrypted is first obtained, and the map file of this file is retrieved from the repository; then, based on the information in the map file, the file before reconstruction is restored, and each character marker is verified; after verification, the encrypted data is decrypted according to the SHA1PRNG algorithm and the AES standard, restoring the encrypted data to the original file. The specific process is as follows: Figure 4 As shown.

[0060] Figure 5 This is a structural block diagram of a file encryption device according to an embodiment of this application, such as... Figure 5 As shown, the device includes:

[0061] Encryption module 50 is used to encrypt the original file to obtain the encrypted file;

[0062] Insertion module 52 is used to insert a tag into the encrypted file to obtain a tagged file, wherein the tag includes characters;

[0063] Recombination module 54 is used to randomly recombine the marked files to obtain the recombined files;

[0064] Storage module 56 is used to store the reconstructed file and the verification file accordingly. The verification file includes a verification code calculated by the verification program on the reconstructed file.

[0065] It should be noted that Figure 5 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 2 The relevant descriptions of the embodiments shown will not be repeated here.

[0066] The encryption and decryption methods provided in this application have been applied to anti-fraud platform systems for encrypted transmission and verification of data files. Practical testing has proven the reliability and accuracy of this encryption method. This application ensures file content security by encrypting and reconstructing the file content; it accurately verifies whether the file is the original file using a self-defined tag key; and it does not change the user's existing usage habits, exhibiting minimal dependence on the environment.

[0067] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided. The non-volatile storage medium includes a stored program, wherein, when the program is running, it controls the device where the non-volatile storage medium is located to execute the above-mentioned file encryption method or file decryption method.

[0068] The aforementioned non-volatile storage medium is used to store a program that performs the following functions: encrypting the original file to obtain an encrypted file; inserting a marker into the encrypted file to obtain a marked file, wherein the marker includes characters; randomly recombining the marked file to obtain a recombined file; and storing the recombined file in correspondence with a verification file, wherein the verification file includes a checksum calculated using a verification program on the recombined file.

[0069] The process involves obtaining the file to be decrypted and a verification file. The verification file contains a checksum calculated using a verification program on the reconstructed file, which is obtained by reconstructing the encrypted original file. The verification file is then used to verify whether the file to be decrypted is a mapping file. The mapping file includes the reconstructed file and verification information. If the file to be decrypted is a mapping file, the unreconstructed file is obtained using the verification information stored in the mapping file. Finally, a pseudo-random number algorithm is used to decrypt the unreconstructed file according to the Advanced Encryption Standard (AES) to obtain the original file.

[0070] This application also provides a processor for running a program stored in a memory, wherein the program executes the above-mentioned file encryption method or file decryption method during runtime.

[0071] The processor described above is used to run a program that performs the following functions: encrypting the original file to obtain an encrypted file; inserting a marker into the encrypted file to obtain a marked file, wherein the marker includes characters; randomly recombining the marked file to obtain a recombined file; and storing the recombined file and a verification file corresponding to each other, wherein the verification file includes a checksum calculated using a verification program on the recombined file.

[0072] The process involves obtaining the file to be decrypted and a verification file. The verification file contains a checksum calculated using a verification program on the reconstructed file, which is obtained by reconstructing the encrypted original file. The verification file is then used to verify whether the file to be decrypted is a mapping file. The mapping file includes the reconstructed file and verification information. If the file to be decrypted is a mapping file, the unreconstructed file is obtained using the verification information stored in the mapping file. Finally, a pseudo-random number algorithm is used to decrypt the unreconstructed file according to the Advanced Encryption Standard (AES) to obtain the original file.

[0073] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0074] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0075] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0076] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0077] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0078] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0079] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for encrypting a file, characterized in that, include: The original file is encrypted to obtain the encrypted file; A tag is inserted into the encrypted file to obtain a tagged file, wherein the tag includes characters and is used to verify whether the file has been tampered with; The process of randomly recombining the marked file to obtain a recombined file includes: segmenting the content of the marked file based on multiple randomly inserted characters to obtain multiple segmented file contents; randomly recombining the multiple segmented file contents to obtain the recombined file; storing the recombined file in the form of a mapping file, and storing the verification information of the recombined file in the mapping file, wherein the verification information includes: the mark, the positions of the multiple characters inserted into the encrypted file, the order of the multiple segmented file contents before recombining, and the order after recombining; The reconstructed file is stored in correspondence with a verification file, wherein the verification file includes a verification code calculated by a verification program on the reconstructed file.

2. The method according to claim 1, characterized in that, The original file is encrypted to obtain the encrypted file, which includes: Convert the contents of the original file into a byte array; The byte array is encrypted using a pseudo-random number algorithm according to the Advanced Encryption Standard (AES) to obtain the encrypted file.

3. The method according to claim 1, characterized in that, Inserting a token into the encrypted file yields a tokenized file, including: Obtain the marker; The marker is split to obtain multiple characters; The various characters are randomly inserted into the encrypted file to obtain the marked file.

4. The method according to claim 1, characterized in that, The reconstructed file is stored in correspondence with the verification file, including: The mapping file and the verification file are stored accordingly.

5. A method for decrypting a file, characterized in that, include: Obtain the file to be decrypted and a verification file. The verification file includes a verification code calculated using a verification program on the reconstructed file. The reconstructed file is obtained by reconstructing the encrypted file. Reconstructing the encrypted file includes: dividing the content of the marked encrypted file into multiple segments based on randomly inserted characters to obtain multiple segments; randomly reconstructing the multiple segments to obtain the reconstructed file; storing the reconstructed file in the form of a mapping file, and storing the verification information of the reconstructed file in the mapping file. The verification information includes: the marker, the positions of the multiple characters inserted into the encrypted file, the order of the multiple segments before reconstruction, and the order after reconstruction. The verification file is used to verify whether the file to be decrypted is a mapping file, wherein the mapping file includes the reconstructed file and verification information; If the file to be decrypted is the mapping file, the file before reconstruction is obtained by using the verification information stored in the mapping file, and the file is verified to have been tampered with by using a marker. The original file is obtained by decrypting the file before reconstruction using a pseudo-random number algorithm according to the Advanced Encryption Standard.

6. A file encryption device, characterized in that, include: The encryption module is used to encrypt the original file to obtain the encrypted file; An insertion module is used to insert a tag into the encrypted file to obtain a tagged file, wherein the tag includes characters and is used to verify whether the file has been tampered with; A recombination module is used to randomly recombine the marked file to obtain a recombined file, comprising: dividing the content of the marked file into multiple segments based on multiple randomly inserted characters to obtain multiple segments of file content; randomly recombinating the multiple segments of file content to obtain the recombined file; storing the recombined file in the form of a mapping file, and storing the verification information of the recombined file in the mapping file, the verification information including: the mark, the positions of the multiple characters inserted into the encrypted file, the order of the multiple segments of file content before recombination, and the order after recombination; The storage module is used to store the reconstructed file and the corresponding verification file, wherein the verification file includes a verification code calculated by a verification program on the reconstructed file.

7. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein, when the program is executed, it controls the device where the non-volatile storage medium is located to execute the file encryption method of any one of claims 1 to 4 or the file decryption method of claim 5.

8. A processor, characterized in that, The processor is used to run a program stored in the memory, wherein the program executes the file encryption method according to any one of claims 1 to 4 or the file decryption method according to claim 5.

Citation Information

Patent Citations

  • File encryption method

    CN103279693A

  • Information processing method and device, storage medium and electronic equipment

    CN110414249A