OFD electronic file ciphertext protection and restoration method and device
By double processing of cryptographic text in OFD electronic files, and creating encrypted ciphertext configuration files, the problem of incomplete and inability to restore ciphertext protection in the existing technology is solved, and the OFD electronic files are realized Effective protection and restoration of Chinese ciphertexts improves security and application scenarios.
Patent Information
- Application Number
- CN202411445616.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-14
AI Technical Summary
When protecting ciphertexts in OFD electronic files in prior art, it is necessary to choose to cover or delete ciphertexts directly, resulting in ciphertexts that cannot be effectively protected or cannot be restored later.
By analyzing OFD electronic files, establishing a text data model, searching and positioning the ciphertext content, using the dual processing method of zipping and occlusion to protect the ciphertext, and creating an encrypted ciphertext configuration file to achieve effective protection of ciphertext and Later restoration.
It realizes dual protection of the visual and data levels of ciphertext in OFD electronic files, and can effectively restore the ciphertext content when needed, improving the security of ciphertext protection and the widespread application scenarios.
Smart Images

Figure CN119442266A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a ciphertext processing method for an OFD file, and in particular to a method and device for protecting and restoring ciphertext of an OFD electronic file. Background Art
[0002] Generally, when protecting the ciphertext of OFD electronic files, the ciphertext content is directly covered or directly deleted. Both methods can make the ciphertext content to be processed invisible to the eye. The basic process is as follows:
[0003] (1) Open and parse the OFD electronic file using professional OFD processing software;
[0004] (2) Full text search of ciphertext in OFD electronic files;
[0005] (3) Add a mask to the searched ciphertext location or directly delete the ciphertext content;
[0006] (4) Save the OFD electronic file. When you use the OFD reading software to open the processed OFD electronic file, you will not be able to see the processed ciphertext visually.
[0007] However, both methods have huge flaws: if the covering method is adopted, the original content of the ciphertext to be protected actually still exists in the OFD electronic file, and any OFD software or professionals who are familiar with the OFD electronic file format can easily obtain the covered ciphertext content, which basically loses the meaning of ciphertext protection; if the ciphertext is deleted, it can indeed be achieved that the ciphertext content cannot be obtained in any way, but if the deleted ciphertext needs to be restored later, it cannot be done, and the application scenarios are greatly limited.
[0008] Therefore, when protecting the ciphertext of OFD electronic files, a processing method is needed that can not only provide double-layer protection for the ciphertext content at the visual and data levels, but also restore the ciphertext when necessary. Summary of the invention
[0009] The present invention provides a method and device for protecting and restoring ciphertext of OFD electronic files, which solves the problem that when protecting ciphertext in OFD electronic files, the ciphertext must be covered or directly deleted, resulting in the ciphertext being unable to be effectively protected or unable to be restored later. The technical solution is as follows:
[0010] A method for ciphertext protection and restoration of OFD electronic files, including a ciphertext protection process, wherein the ciphertext protection process includes the following steps:
[0011] S1: Select the OFD electronic file to be protected by ciphertext;
[0012] S2: Parse the OFD electronic file through the OFD electronic document parsing module to establish a text data model of the OFD electronic file; the text data model is the ID, circumscribed rectangular area, text string and Delta value of each character in the text object of all text objects on the OFD document page;
[0013] S3: receiving the ciphertext content to be protected input by the user;
[0014] S4: calling the search module, based on the text data model of OFD, performing a full-text search on the ciphertext content to be protected with full-word matching and case-sensitive search rules, and establishing a ciphertext data model of all ciphertexts to be protected in the OFD electronic file; the ciphertext data model is the ID of the page where the ciphertext character is located, the ID of the text object where it is located, and the start and end positions of the ciphertext character in the text string of the text object;
[0015] S5: calling the ciphertext module, performing ciphertext protection processing based on all ciphertext data models, cyclically performing ciphertext protection processing on each ciphertext data model and creating an encrypted ciphertext configuration file;
[0016] S6: calling the saving module to save the OFD electronic file after the ciphertext protection processing.
[0017] Furthermore, a ciphertext restoration process is also included, and the ciphertext restoration process includes the following steps:
[0018] S11: Select the OFD electronic file to be processed for ciphertext restoration;
[0019] S12: Calling the OFD electronic document parsing module to parse the OFD electronic file to obtain the text data model and path data model of the OFD electronic file, wherein the path data model includes the ID, circumscribed rectangular area, fill or stroke mode, fill or stroke color, and AbbreviatedData of all Path objects on the OFD document page;
[0020] S13: calling the ciphertext module, performing ciphertext restoration processing based on the ciphertext configuration file, decrypting the ciphertext configuration file, and performing ciphertext restoration processing on the OFD electronic file based on the decrypted text object data of each ciphertext;
[0021] S14: calling a saving module to save the OFD electronic document after the ciphertext restoration process.
[0022] Furthermore, in step S5 of the ciphertext protection process, the ciphertext configuration file saves the following data in XML format:
[0023] 2) The encryption password used to encrypt the ciphertext during ciphertext protection. The encryption password is encrypted by the SM4 symmetric encryption algorithm inside the ciphertext module and then processed by Base64;
[0024] The original data of the text object where the ciphertext characters are located is a piece of XML data in the OFD document. The original data of the text object is encrypted by the SM4 symmetric encryption algorithm inside the ciphertext module and then obtained by Base64 processing.
[0025] Furthermore, in step S5 of the ciphertext protection process, the ciphertext module performs three-part processing based on all ciphertext data models:
[0026] 3) Locate the page text object where each ciphertext to be protected is located through the data model of each ciphertext, and perform character deduction processing on the ciphertext content in the text object, that is, delete the ciphertext text but retain the character width occupied by its content;
[0027] 4) The document area where the original ciphertext content is located after the ciphertext is deducted is calculated through the data model of each ciphertext to be protected, and a page path object is created based on the area to cover the corresponding area. The path object is in fill mode and the color is black;
[0028] 3) Create a ciphertext configuration file in the OFD electronic file, and store the encrypted data of the text object where each ciphertext is located based on the data model of each ciphertext to be protected.
[0029] A device for protecting and restoring ciphertext of OFD electronic files, comprising the following modules:
[0030] OFD electronic file parsing module: parses the opened OFD electronic file, parses the text data and path data in the OFD electronic file, obtains all the text information of the OFD electronic file, and establishes the text data model of OFD;
[0031] Search module: Based on the text data model of OFD, the ciphertext content to be protected is searched in full text with full word matching and case-sensitive search rules to achieve search positioning of specific content, and establish a data model of all ciphertexts to be protected in the OFD electronic file. The data model contains the page ID where the ciphertext is located, the area occupied by the content, the text object ID where it is located, and the text object data information;
[0032] Ciphertext module: performs ciphertext protection processing on all ciphertext data models obtained from the search to achieve ciphertext protection and restoration operations;
[0033] Document saving module: real-time saving of document data after ciphertext processing.
[0034] The ciphertext module performs three-part processing based on all ciphertext data models:
[0035] 1) Locate the page text object where each ciphertext to be protected is located through the data model of each ciphertext, and perform character deduction processing on the ciphertext content in the text object, that is, delete the ciphertext text but retain the character width occupied by its content;
[0036] 2) The document area where the original ciphertext content is located after the ciphertext is deducted is calculated through the data model of each ciphertext to be protected, and a page path object is created based on the area to cover the corresponding area. The path object is in fill mode and the color is black;
[0037] 3) Create a ciphertext configuration file in the OFD electronic file, and store the encrypted data of the text object where each ciphertext is located based on the data model of each ciphertext to be protected.
[0038] When reading the OFD electronic file after the ciphertext protection processing of this device, all OFD reading software will display a black masking square at the original ciphertext position.
[0039] When restoring the ciphertext, use this device to open the corresponding OFD electronic file. This device first calls the OFD electronic file parsing module to parse the OFD electronic file, obtains all the text information and path object information of the OFD electronic file, and establishes the text data model and path data model of OFD; the ciphertext module will read and parse the ciphertext configuration file in the OFD electronic file, and decrypt the text object data of each stored ciphertext. The decryption key used in the decryption process corresponds to the encryption key used when protecting the ciphertext.
[0040] When restoring ciphertext, for each text object data, the ciphertext module will parse the text object data, obtain the page ID and the original text object ID, and then locate the corresponding page in the OFD electronic file and the corresponding text object on the page, and then parse the text object data and calculate the area where the characters are deleted. Based on the path data model of the area and the page, the covered black filled path object is found and deleted, and finally the decrypted text object data in the ciphertext configuration file is used to replace and update the text object data located in the OFD electronic file, thereby achieving the purpose of ciphertext restoration.
[0041] The encryption and decryption algorithms used for ciphertext protection and restoration can adopt symmetric encryption, asymmetric encryption and other encryption algorithms.
[0042] The method and device for ciphertext protection and restoration of OFD electronic files only need to simply select the OFD electronic file to be ciphertext protected, and then input the protected ciphertext content, so as to achieve the real data-level protection processing of the ciphertext in the OFD electronic file, and restore the ciphertext that has been protected when necessary, and restore the document content to the original state before ciphertext protection, which greatly improves the security of ciphertext protection and the breadth of application scenarios. During the entire processing process of the present invention, it is possible to achieve the real protection of the ciphertext content and restore the ciphertext when necessary, with simple user operation, good security, and a wide range of application scenarios.
[0043] The present invention integrates OFD electronic file parsing, searching, ciphertext protection restoration and preservation in the process of OFD electronic file ciphertext protection by providing a device with OFD electronic file parsing, searching, ciphertext protection restoration and preservation. After the OFD electronic file is ciphertext protected by the device of the present invention, the original ciphertext content cannot be obtained visually or by professional OFD reading software; if the ciphertext content is to be restored, the corresponding OFD electronic file is opened with the device and the ciphertext restoration operation is performed, so that the document content can be directly restored to the original state before ciphertext protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a ciphertext protection flow chart of the method for ciphertext protection and restoration of OFD electronic files;
[0045] Figure 2 It is a ciphertext restoration flow chart of the OFD electronic file ciphertext protection and restoration method. DETAILED DESCRIPTION
[0046] The method for ciphertext protection and restoration of OFD electronic files includes a ciphertext protection process and a ciphertext restoration process.
[0047] like Figure 1 As shown, the ciphertext protection process includes the following steps:
[0048] S1: Select the OFD electronic file to be protected by ciphertext;
[0049] S2: Parse the OFD electronic file through the OFD electronic document parsing module to establish a text data model of the OFD electronic file;
[0050] The text data model is the ID, circumscribed rectangular area, text string and Delta (variable) value of each character in the text object of all text objects on the OFD document page.
[0051] S3: receiving the ciphertext content to be protected input by the user;
[0052] S4: calling the search module, based on the text data model of OFD, performing a full-text search on the ciphertext content to be protected with full-word matching and case-sensitive search rules, and establishing a ciphertext data model of all ciphertexts to be protected in the OFD electronic file;
[0053] The ciphertext data model includes the ID of the page where the ciphertext character is located, the ID of the text object where the ciphertext character is located, the start and end positions of the ciphertext character in the text string of the text object, and the like.
[0054] S5: Call the ciphertext module to perform ciphertext protection processing based on all ciphertext data models. The main operation is to perform ciphertext protection processing on each ciphertext data model in a loop and create an encrypted ciphertext configuration file.
[0055] The ciphertext configuration file saves the following data in XML format:
[0056] 1) The encryption password used to encrypt the ciphertext during ciphertext protection is encrypted by the SM4 symmetric encryption algorithm inside the ciphertext module and then processed by Base64.
[0057] 2) The original data of the text object where the ciphertext characters are located is a piece of XML data in the OFD document. The original data of the text object is encrypted by the SM4 symmetric encryption algorithm inside the ciphertext module and then obtained by Base64 processing.
[0058] S6: calling the saving module to save the OFD electronic file after the ciphertext protection processing.
[0059] like Figure 2 As shown, the ciphertext restoration process includes the following steps:
[0060] S11: Select the OFD electronic file to be processed for ciphertext restoration;
[0061] S12: calling the OFD electronic document parsing module to parse the OFD electronic file to obtain a text data model and a path data model of the OFD electronic file;
[0062] The path data model includes the ID, bounding rectangle area, fill or stroke mode, fill or stroke color and AbbreviatedData (path element description sequence) of all Path objects on the OFD document page.
[0063] S13: calling the ciphertext module to perform ciphertext restoration processing based on the ciphertext configuration file. The main operation is to decrypt the ciphertext configuration file and perform ciphertext restoration processing on the OFD electronic file based on the decrypted text object data of each ciphertext;
[0064] S14: calling a saving module to save the OFD electronic document after the ciphertext restoration process.
[0065] In the present invention, the requester of the operation is the client user, the object of the operation is the OFD electronic document, the response of the operation is real-time, and the main actions of the operation are OFD electronic file parsing, inputting ciphertext to be protected, ciphertext search, ciphertext protection and restoration, and document preservation.
[0066] The device for protecting and restoring the ciphertext of an OFD electronic file comprises the following modules:
[0067] OFD electronic file parsing module: parse the opened OFD electronic file, obtain all the text information of the OFD electronic file, and establish the text data model of OFD;
[0068] Search module: Based on the text data model of OFD, the ciphertext content to be protected is searched in full text with full word matching and case-sensitive search rules, and the ciphertext data model of all ciphertexts to be protected in the OFD electronic file is established. The ciphertext data model contains information such as the page ID where the ciphertext is located, the area occupied by the content, the text object ID where it is located, and the text object data where it is located;
[0069] The text object ID refers to a unique ID that identifies a text object in the OFD document; the text object data refers to a data stream that describes text information in XML format in the OFD document, for example:<ofd:TextObject ID="10"Boundary="47.96 35.65 13.79 4.233"Font="4"Size="4.233">
[0070] <ofd:FillColor Value="0 0 0"ColorSpace="5" / >
[0071] <ofd:StrokeColor Value="0 0 0"Alpha="0" / >
[0072] <ofd:TextCode X="0.635"Y="3.634"DeltaX="g 2 4.233"> Reader
[0073] .
[0074] Ciphertext module: performs ciphertext protection on all ciphertext data models obtained through search.
[0075] Document saving module: saves the document data after ciphertext processing.
[0076] The present invention can implement the parsing of text data and path data in OFD electronic files and the establishment of data models through the OFD electronic file parsing module; can implement the search and positioning of specific content in the full text of OFD electronic files under the search rules of full-word matching and case-sensitive search through the OFD electronic file search module; can implement the protection and restoration operations of ciphertext through the ciphertext module; and can implement the real-time preservation of OFD electronic files through the OFD electronic file preservation module.
[0077] When the device provided by the present invention is used to perform ciphertext protection on an OFD electronic file, it is necessary to first use the device to select the OFD electronic file to be processed. The device will call the built-in OFD electronic file parsing module to parse the OFD electronic file, obtain all the text information of the OFD electronic file, and establish a text data model of the OFD.
[0078] Then the device will ask the user to input the ciphertext content to be protected, and then the device will call the OFD electronic file search module based on the OFD text data model to perform a full-text search on the ciphertext content to be protected with full-word matching and case-sensitive search rules, and establish a data model of all ciphertexts to be protected in the OFD electronic file, which contains information such as the page ID where the ciphertext is located, the area occupied by the content, the text object ID where it is located, and the text object data where it is located;
[0079] Then the device will call the ciphertext module to perform ciphertext protection processing on all the ciphertext data models obtained by the search. During this process, the ciphertext module will perform three parts of processing based on all the ciphertext data models:
[0080] 1) Through the ciphertext data model of each ciphertext to be protected, locate the page text object where it is located, and perform word-reduction processing on the ciphertext content in the text object, that is, delete the ciphertext text but retain the character width occupied by its content. This processing can ensure that the display effect of other texts is not affected after the word-reduction processing on the ciphertext content. 2) Through the data model of each ciphertext to be protected, calculate the document area (document coordinates) where the original ciphertext content is located after the word-reduction processing on the ciphertext, and create a page path object based on the area to cover the corresponding area. The path object is in fill mode and the color is black. This processing can ensure that the original ciphertext position is displayed as a black masked square in all OFD reading software. 3) Create a ciphertext configuration file in the OFD electronic file, based on the ciphertext data model of each ciphertext to be protected, store the encrypted data of the text object where each ciphertext is located. The encryption key used in this process is obtained through a series of complex calculations, which is extremely complex and difficult to crack;
[0081] Finally, the device saves the OFD electronic file.
[0082] When reading the OFD electronic file after ciphertext protection by this device, all OFD reading software will display a black masking square at the original ciphertext position. Since the ciphertext has been processed at the data level, any OFD software or professionals who are familiar with the OFD electronic file format cannot obtain the original ciphertext content that has been masked.
[0083] When the ciphertext needs to be restored, the corresponding OFD electronic file needs to be opened using this device. This device will first call the OFD electronic file parsing module to parse the OFD electronic file, obtain all the text information and path object information of the OFD electronic file, and establish the text data model and path data model of OFD;
[0084] Then the device will call the ciphertext module, which will read and parse the ciphertext configuration file in the OFD electronic file and decrypt the text object data of each stored ciphertext. The decryption key used in the decryption process corresponds to the encryption key used for ciphertext protection.
[0085] For each text object data, the ciphertext module will parse the text object data, obtain the page ID and the original text object ID, and then locate the corresponding page in the OFD electronic file and the corresponding text object on the page. It will then parse the text object data and calculate the area where the characters are deleted. Based on the path data model of the area and the page, it will find the covered black-filled path object and delete it. Finally, it will use the decrypted text object data in the ciphertext configuration file to replace and update the text object data located in the OFD electronic file, thereby achieving the purpose of ciphertext restoration.
[0086] The page ID is a unique ID that identifies a page in the OFD document, and the text object ID is a unique ID that identifies a text object in the OFD document. The page of the OFD document can be located through the page ID, and the text object on the page can be located through the text object ID.
[0087] Considering the complexity of encryption and decryption, the encryption and decryption algorithms used for ciphertext protection and restoration can adopt symmetric encryption, asymmetric encryption and other encryption algorithms, and multiple strategies can be adopted for key storage and management.
[0088] The present invention has the following characteristics:
[0089] (1) Built-in integrated OFD electronic file parsing, OFD electronic file search module, OFD electronic file ciphertext module and OFD electronic file protection module;
[0090] (2) The OFD electronic document parsing module is responsible for parsing the content of OFD electronic documents and establishing the text data model and path data model of OFD;
[0091] (3) The OFD electronic file search module is responsible for performing a full-text search on the OFD electronic file based on the ciphertext content and establishing a data model of all ciphertexts to be protected in the OFD electronic file;
[0092] (4) The OFD electronic document ciphertext module is responsible for performing ciphertext protection processing (reducing characters and masking) and creating encrypted ciphertext configuration files based on the data models of all ciphertexts to be protected; or performing ciphertext restoration processing based on the ciphertext configuration files;
[0093] (5) The OFD electronic file storage module is responsible for the storage of OFD electronic file data.
[0094] In the process of ciphertext protection and restoration of OFD electronic files, the present invention realizes effective protection of ciphertext content in OFD electronic files by performing dual processing of deleting and covering ciphertext in OFD electronic files, and realizes original restoration of ciphertext content through encrypted ciphertext configuration files and safe and efficient ciphertext restoration processing. The user operation is simple, the experience is good, the security is also good, and the application scenarios are wide.
Claims
1. A method for protecting and restoring ciphertext of OFD electronic files, characterized by: The ciphertext protection process includes the following steps: S1: Select the OFD electronic file to be protected by ciphertext; S2: Parse the OFD electronic file through the OFD electronic document parsing module to establish a text data model of the OFD electronic file; the text data model is the ID, circumscribed rectangular area, text string and Delta value of each character in the text object of all text objects on the OFD document page; S3: receiving the ciphertext content to be protected input by the user; S4: calling the search module, based on the text data model of OFD, performing a full-text search on the ciphertext content to be protected with full-word matching and case-sensitive search rules, and establishing a ciphertext data model of all ciphertexts to be protected in the OFD electronic file; the ciphertext data model is the ID of the page where the ciphertext character is located, the ID of the text object where it is located, and the start and end positions of the ciphertext character in the text string of the text object; S5: calling the ciphertext module, performing ciphertext protection processing based on all ciphertext data models, cyclically performing ciphertext protection processing on each ciphertext data model and creating an encrypted ciphertext configuration file; S6: calling the saving module to save the OFD electronic file after the ciphertext protection processing.
2. The method for protecting and restoring the ciphertext of an OFD electronic file according to claim 1, characterized in that: It also includes a ciphertext restoration process, which includes the following steps: S11: Select the OFD electronic file to be processed for ciphertext restoration; S12: Calling the OFD electronic document parsing module to parse the OFD electronic file to obtain the text data model and path data model of the OFD electronic file, wherein the path data model includes the ID, circumscribed rectangular area, fill or stroke mode, fill or stroke color, and AbbreviatedData of all Path objects on the OFD document page; S13: calling the ciphertext module, performing ciphertext restoration processing based on the ciphertext configuration file, decrypting the ciphertext configuration file, and performing ciphertext restoration processing on the OFD electronic file based on the decrypted text object data of each ciphertext; S14: calling a saving module to save the OFD electronic document after the ciphertext restoration process.
3. The method for protecting and restoring the ciphertext of an OFD electronic file according to claim 1, characterized in that: In step S5, the ciphertext configuration file saves the following data in XML format: 1) The encryption password used to encrypt the ciphertext during ciphertext protection. The encryption password is encrypted by the SM4 symmetric encryption algorithm inside the ciphertext module and then processed by Base64; The original data of the text object where the ciphertext characters are located is a piece of XML data in the OFD document. The original data of the text object is encrypted by the SM4 symmetric encryption algorithm inside the ciphertext module and then obtained by Base64 processing.
4. The method for protecting and restoring the ciphertext of an OFD electronic file according to claim 1, characterized in that: In step S5, the ciphertext module performs three-part processing based on all ciphertext data models: 1) Locate the page text object where each ciphertext to be protected is located through the data model of each ciphertext, and perform character deduction processing on the ciphertext content in the text object, that is, delete the ciphertext text but retain the character width occupied by its content; 2) The document area where the original ciphertext content is located after the ciphertext is deducted is calculated through the data model of each ciphertext to be protected, and a page path object is created based on the area to cover the corresponding area. The path object is in fill mode and the color is black; 3) Create a ciphertext configuration file in the OFD electronic file, and store the encrypted data of the text object where each ciphertext is located based on the data model of each ciphertext to be protected.
5. A device for protecting and restoring the ciphertext of an OFD electronic file, characterized by: Includes the following modules: OFD electronic file parsing module: parses the opened OFD electronic file, parses the text data and path data in the OFD electronic file, obtains all the text information of the OFD electronic file, and establishes the text data model of OFD; Search module: Based on the text data model of OFD, the ciphertext content to be protected is searched in full text with full word matching and case-sensitive search rules to achieve search positioning of specific content, and establish a data model of all ciphertexts to be protected in the OFD electronic file. The data model contains the page ID where the ciphertext is located, the area occupied by the content, the text object ID where it is located, and the text object data information; Ciphertext module: performs ciphertext protection processing on all ciphertext data models obtained from the search to achieve ciphertext protection and restoration operations; Document saving module: real-time saving of document data after ciphertext processing.
6. The device for protecting and restoring the ciphertext of an OFD electronic file according to claim 5, characterized in that: The ciphertext module performs three-part processing based on all ciphertext data models: 1) Locate the page text object where each ciphertext to be protected is located through the data model of each ciphertext, and perform character deduction processing on the ciphertext content in the text object, that is, delete the ciphertext text but retain the character width occupied by its content; 2) The document area where the original ciphertext content is located after the ciphertext is deducted is calculated through the data model of each ciphertext to be protected, and a page path object is created based on the area to cover the corresponding area. The path object is in fill mode and the color is black; 3) Create a ciphertext configuration file in the OFD electronic file, and store the encrypted data of the text object where each ciphertext is located based on the data model of each ciphertext to be protected.
7. The device for protecting and restoring the ciphertext of an OFD electronic file according to claim 6, characterized in that: When reading the OFD electronic file after the ciphertext protection processing of this device, all OFD reading software will display a black masking square at the original ciphertext position.
8. The device for protecting and restoring the ciphertext of an OFD electronic file according to claim 5, characterized in that: When restoring the ciphertext, use this device to open the corresponding OFD electronic file. This device first calls the OFD electronic file parsing module to parse the OFD electronic file, obtains all the text information and path object information of the OFD electronic file, and establishes the text data model and path data model of OFD; the ciphertext module will read and parse the ciphertext configuration file in the OFD electronic file, and decrypt the text object data of each stored ciphertext. The decryption key used in the decryption process corresponds to the encryption key used when protecting the ciphertext.
9. The device for protecting and restoring the ciphertext of an OFD electronic file according to claim 8, characterized in that: When restoring the ciphertext, for each text object data, the ciphertext module will parse the text object data, obtain the page ID and the original text object ID, and then locate the corresponding page in the OFD electronic file and the corresponding text object on the page, and then parse the text object data, and calculate the area where the characters are deleted, and find the covered black filled path object based on the path data model of the area and the page to delete it, and finally replace the text object data located in the OFD electronic file with the decrypted text object data in the ciphertext configuration file to update, thereby achieving the purpose of ciphertext restoration.
10. The device for protecting and restoring the ciphertext of an OFD electronic file according to claim 5, characterized in that: The encryption and decryption algorithms used for ciphertext protection and restoration can adopt symmetric encryption, asymmetric encryption and other encryption algorithms.