CN115292747A - File protection method and device, electronic equipment and storage medium - Google Patents
File protection method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115292747A CN115292747A CN202210915479.6A CN202210915479A CN115292747A CN 115292747 A CN115292747 A CN 115292747A CN 202210915479 A CN202210915479 A CN 202210915479A CN 115292747 A CN115292747 A CN 115292747A
- Authority
- CN
- China
- Prior art keywords
- file
- ciphertext
- protection method
- opened
- acquiring
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000004590 computer program Methods 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6209—Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a file protection method, a device, electronic equipment and a storage medium, wherein the file protection method comprises the steps of firstly obtaining a first file and encrypting the first file to obtain a ciphertext file; then acquiring a disguised file and disguising the ciphertext file by using the disguised file to obtain a second file; the invention uses the disguise file to carry out secondary processing on the encrypted file so as to disguise the file, thereby realizing the hiding and protection of the file.
Description
Technical Field
The present invention relates to the field of file encryption technologies, and in particular, to a file protection method and apparatus, an electronic device, and a storage medium.
Background
If some important files are simply stored in a computer hard disk, the important files are easy to find and violently cracked, and important information of a company is leaked.
At present, format conversion can be carried out on important files through a format file technology to generate format files, so that the contents of the files are guaranteed not to be editable, and the files can be used in a cross-platform and cross-system mode; meanwhile, the format file is encrypted by adopting a cryptographic technology, so that the safety of the file is guaranteed, and the content of the file cannot be easily acquired.
However, the file encrypted by the method can still be cracked violently by a password technology, and although the technical difficulty is increased, the file still has the risks of being discovered and cracked.
Disclosure of Invention
The invention provides a file protection method, a file protection device, electronic equipment and a storage medium; the encrypted file is subjected to secondary processing by utilizing the disguised file, so that the file is disguised, and the hiding and the protection of the file can be realized.
In a first aspect, an embodiment of the present invention provides a file protection method, where the file protection method includes:
acquiring a first file and encrypting the first file to obtain a ciphertext file;
acquiring a disguised file and disguising the ciphertext file by using the disguised file to obtain a second file;
the camouflage file comprises one or more of the following items: a PDF file, a picture, or a world file.
Optionally, the obtaining a first file and encrypting the first file to obtain a ciphertext file includes:
performing format conversion on the first file to obtain a format file;
and acquiring a key and encrypting the layout file by using the key to obtain the ciphertext file.
Optionally, the second file includes a ciphertext file and a masquerading file, and the ciphertext file is connected to the tail of the masquerading file.
Optionally, the file protection method further includes:
and if the second file is opened by using a special format reader, presenting the content of the first file after the second file is opened.
Optionally, the file protection method further includes:
and if the second file is opened in a mode other than a special format reader, displaying the content of the disguised file after the second file is opened.
Optionally, if the second file is opened by using a dedicated layout reader, presenting the content of the first file after the second file is opened includes:
continuing to read backwards when the special format reader reads the tail part of the camouflage file;
and after the head of the ciphertext file is read, decrypting the ciphertext file to obtain the first file.
In a second aspect, an embodiment of the present invention provides a file protection device, where the file protection device includes:
the encryption module is used for acquiring a first file and encrypting the first file to obtain a ciphertext file;
the disguise module is used for acquiring a disguise file and carrying out disguise processing on the ciphertext file by utilizing the disguise file to obtain a second file;
the camouflage file comprises one or more of the following items: a PDF file, a picture, or a world file.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program thereon, and the processor implements the method according to any one of the first aspect when executing the program.
In a fourth aspect, an embodiment of the invention provides a computer-readable storage medium on which is stored a computer program which, when executed by a processor, implements the method of any one of the first aspects.
Advantageous effects
The invention provides a file protection method, a device, electronic equipment and a storage medium, wherein the file protection method comprises the steps of firstly obtaining a first file and encrypting the first file to obtain a ciphertext file; then acquiring a disguised file and disguising the ciphertext file by using the disguised file to obtain a second file; the invention uses the disguise file to carry out secondary processing on the encrypted file so as to disguise the file, thereby realizing the hiding and protection of the file.
It should be understood that the statements made in this summary are not intended to limit the key or critical features of the embodiments of the present invention, or to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present invention will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements.
FIG. 1 shows a flow diagram of a file protection method of an embodiment of the invention;
FIG. 2 illustrates a flow diagram of file encryption according to an embodiment of the present invention;
FIG. 3 illustrates a flow diagram of document masquerading, according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a file protection apparatus according to an embodiment of the present invention;
fig. 5 shows a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from one or more of the embodiments described herein without making any inventive step shall fall within the scope of protection of this document.
It should be noted that, the description of the embodiment of the present invention is only for clearly illustrating the technical solutions of the embodiment of the present invention, and does not limit the technical solutions provided by the embodiment of the present invention.
FIG. 1 illustrates a flow chart of a file protection method of an embodiment of the present invention; as shown in fig. 1, the file protection method includes:
s20, obtaining a first file and encrypting the first file to obtain a ciphertext file.
Specifically, as shown in fig. 2:
carrying out format conversion on the first file to obtain a format file; the converted format is not limited in this embodiment, and may be a custom format.
Acquiring a secret key and encrypting the format file by using the secret key to obtain the ciphertext file;
the key may be a symmetric key or an asymmetric key;
wherein, the symmetric key is used for encryption, namely, a sender and a receiver of the information use a key to encrypt and decrypt data; the speed is high when the symmetric key is used for encrypting and decrypting the file.
When the asymmetric keys are used for encryption and decryption, a specific formula is used for creating two mathematically related keys, but the two keys cannot deduce each other, one key is used for encrypting information to generate a ciphertext, and the other key is used for decrypting the information to generate a plaintext; compared with a symmetric key, the asymmetric key is more complex to use and has better encryption effect.
The present embodiment is not limited to the encryption of a file using a key.
S40, acquiring a disguised file and disguising the ciphertext file by using the disguised file to obtain a second file;
the camouflage file comprises one or more of the following items: a PDF file, a picture, or a world file.
Specifically, as shown in fig. 3:
acquiring a required camouflage file, and connecting the head of the ciphertext file to the tail of the camouflage file;
and when the second file is opened, if a special format reader is used for opening the second file, the content of the first file is presented after the second file is opened.
When the tail part of the camouflage file is read by the special format reader, the special format reader continues to read backwards to check whether file data exist, if the file data exist, the head part of the file is analyzed to analyze a specific ciphertext identifier, then whether the file is a ciphertext file is determined according to the specific ciphertext identifier, and if the file is the ciphertext file, the file is decrypted to obtain a first file.
And if the second file is opened in a mode other than a special format reader, displaying the content of the disguised file after the second file is opened.
The invention provides a file protection method, which comprises the steps of firstly obtaining a first file and encrypting the first file to obtain a ciphertext file; then acquiring a disguised file and disguising the ciphertext file by using the disguised file to obtain a second file; the invention uses the disguise file to carry out secondary processing on the encrypted file so as to disguise the file, thereby realizing the hiding and protection of the file.
Based on the same inventive concept, an embodiment of the present invention further provides a file protection device, which can be used to implement the file protection method described in the foregoing embodiment, as described in the following embodiment: because the principle of solving the problems of the file protection device is similar to that of the file protection method, the implementation of the file protection device can refer to the implementation of the file protection method, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
FIG. 4 is a schematic structural diagram of a file protection apparatus according to an embodiment of the present invention; as shown in fig. 4, the file protection apparatus includes:
the encryption module 20 is used for acquiring a first file and encrypting the first file to obtain a ciphertext file;
specifically, as shown in fig. 2:
performing format conversion on the first file to obtain a format file; the converted format is not limited in this embodiment, and may be a custom format.
Acquiring a secret key and encrypting the format file by using the secret key to obtain the ciphertext file;
the key may be a symmetric key or an asymmetric key;
wherein, the symmetric key is used for encryption, namely, a sender and a receiver of the information use a key to encrypt and decrypt data; the speed is high when the symmetric key is used for encrypting and decrypting the file.
When the asymmetric keys are used for encryption and decryption, a specific formula is used for creating two mathematically related keys, but the two keys cannot deduce each other, one key is used for encrypting information to generate a ciphertext, and the other key is used for decrypting the information to generate a plaintext; compared with a symmetric key, the asymmetric key is more complex to use and has better encryption effect.
The present embodiment is not limited to the encryption of a file using a key.
The disguising module 40 is used for acquiring a disguised file and disguising the ciphertext file by using the disguised file to obtain a second file;
the camouflage file comprises one or more of the following items: a PDF file, a picture, or a world file.
Specifically, as shown in fig. 3:
acquiring a required disguised file, and connecting the head of the ciphertext file to the tail of the disguised file;
and when the second file is opened, if a special format reader is used for opening the second file, the content of the first file is presented after the second file is opened.
When the tail part of the disguised file is read, the special format reader continues to read backwards to check whether file data exist, if the file data exist, the head part of the file is analyzed to analyze a specific ciphertext identifier, then whether the file is a ciphertext file is determined according to the specific ciphertext identifier, and if the file is the ciphertext file, the file is decrypted to obtain a first file.
And if the second file is opened in a mode other than a special format reader, displaying the content of the camouflage file after the second file is opened.
The embodiment of the invention provides a file protection device, which firstly obtains a first file through an encryption module 20 and encrypts the first file to obtain a ciphertext file; then, acquiring a disguised file through a disguising module 40 and disguising the ciphertext file by using the disguised file to obtain a second file; the camouflage file comprises one or more of the following items: a PDF file, a picture, or a world file. In the embodiment, the encrypted file is subjected to secondary processing by using the disguised file, so that the file is disguised, and the hiding and the protection of the file can be realized.
Fig. 5 is a schematic structural diagram of an electronic device to which an embodiment of the present invention can be applied, and as shown in fig. 5, the electronic device includes a central processing module (CPU) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for system operation are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or modules described in the embodiments of the present invention may be implemented by software or hardware. The modules or modules described may also be provided in a processor, and may be described as: a processor includes an encryption module 20 and a disguise module 40, where the names of these modules do not in some cases constitute a limitation on the module itself, for example, the encryption module 20 may also be described as "the encryption module 20 that obtains a first file and encrypts the first file to obtain a ciphertext file".
As another aspect, the present invention further provides a computer-readable storage medium, which may be the computer-readable storage medium included in the file protection apparatus described in the above embodiments; or it may be a computer-readable storage medium that exists separately and is not built into the electronic device. The computer readable storage medium stores one or more programs for use by one or more processors in performing a file protection method described in the present invention.
The foregoing description is only exemplary of the preferred embodiments of the invention and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features and (but not limited to) features having similar functions disclosed in the present invention are mutually replaced to form the technical solution.
Claims (9)
1. A file protection method, characterized in that the file protection method comprises:
acquiring a first file and encrypting the first file to obtain a ciphertext file;
acquiring a camouflage file and performing camouflage processing on the ciphertext file by using the camouflage file to obtain a second file;
the camouflage file comprises one or more of the following items: a PDF file, a picture, or a world file.
2. The file protection method according to claim 1, wherein the obtaining a first file and encrypting the first file to obtain a ciphertext file comprises:
performing format conversion on the first file to obtain a format file;
and acquiring a key and encrypting the layout file by using the key to obtain the ciphertext file.
3. The file protection method according to claim 1 or 2, wherein the second file includes a ciphertext file and a masquerading file, and the ciphertext file is connected to an end of the masquerading file.
4. The file protection method according to claim 1, further comprising:
and if the second file is opened by using a special format reader, presenting the content of the first file after the second file is opened.
5. The file protection method according to claim 4, further comprising:
and if the second file is opened in a mode other than a special format reader, displaying the content of the disguised file after the second file is opened.
6. The file protection method of claim 4, wherein if the second file is opened by using a dedicated layout reader, then presenting the contents of the first file after the second file is opened comprises:
continuing to read backwards when the special format reader reads the tail part of the camouflage file;
and after the head of the ciphertext file is read, decrypting the ciphertext file to obtain the first file.
7. A file protection device, comprising:
the encryption module is used for acquiring a first file and encrypting the first file to obtain a ciphertext file;
the disguise module is used for acquiring a disguise file and disguising the ciphertext file by using the disguise file to obtain a second file;
the camouflage file comprises one or more of the following items: PDF files, pictures, or world files.
8. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the computer program, implements the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210915479.6A CN115292747B (en) | 2022-08-01 | 2022-08-01 | File protection method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210915479.6A CN115292747B (en) | 2022-08-01 | 2022-08-01 | File protection method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115292747A true CN115292747A (en) | 2022-11-04 |
CN115292747B CN115292747B (en) | 2024-01-30 |
Family
ID=83825992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210915479.6A Active CN115292747B (en) | 2022-08-01 | 2022-08-01 | File protection method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115292747B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104615917A (en) * | 2015-01-20 | 2015-05-13 | 中兴通讯股份有限公司 | Picture camouflaging method, picture viewing method, system and terminal |
US20150288515A1 (en) * | 2014-04-04 | 2015-10-08 | Sizhe Tan | Payload in picture encoding |
CN108133144A (en) * | 2017-12-22 | 2018-06-08 | 浪潮(北京)电子信息产业有限公司 | A kind of virtual disk files guard method, device, equipment and readable storage medium storing program for executing |
CN110929291A (en) * | 2019-12-04 | 2020-03-27 | 楚天龙股份有限公司 | Method and device for accessing text file and computer readable storage medium |
CN113238762A (en) * | 2021-05-10 | 2021-08-10 | 深圳前海微众银行股份有限公司 | Java application remote deployment method, device and equipment |
-
2022
- 2022-08-01 CN CN202210915479.6A patent/CN115292747B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150288515A1 (en) * | 2014-04-04 | 2015-10-08 | Sizhe Tan | Payload in picture encoding |
CN104615917A (en) * | 2015-01-20 | 2015-05-13 | 中兴通讯股份有限公司 | Picture camouflaging method, picture viewing method, system and terminal |
CN108133144A (en) * | 2017-12-22 | 2018-06-08 | 浪潮(北京)电子信息产业有限公司 | A kind of virtual disk files guard method, device, equipment and readable storage medium storing program for executing |
CN110929291A (en) * | 2019-12-04 | 2020-03-27 | 楚天龙股份有限公司 | Method and device for accessing text file and computer readable storage medium |
CN113238762A (en) * | 2021-05-10 | 2021-08-10 | 深圳前海微众银行股份有限公司 | Java application remote deployment method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN115292747B (en) | 2024-01-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3229397B1 (en) | Method for fulfilling a cryptographic request requiring a value of a private key | |
CN109886417A (en) | Model parameter training method, device, equipment and medium based on federation's study | |
US11626976B2 (en) | Information processing system, information processing device, information processing method and information processing program | |
WO2014007296A1 (en) | Order-preserving encryption system, encryption device, decryption device, encryption method, decryption method, and programs thereof | |
KR20080025121A (en) | Generating a secret key from an asymmetric private key | |
CN114124364B (en) | Key security processing method, device, equipment and computer readable storage medium | |
US11288381B2 (en) | Calculation device, calculation method, calculation program and calculation system | |
Fauziah et al. | Design and implementation of AES and SHA-256 cryptography for securing multimedia file over android chat application | |
US11431489B2 (en) | Encryption processing system and encryption processing method | |
CN109711178B (en) | Key value pair storage method, device, equipment and storage medium | |
CN111949999A (en) | Apparatus and method for managing data | |
CN117714613A (en) | Image encryption method and device, electronic equipment and storage medium | |
CN111131270B (en) | Data encryption and decryption method and device, electronic equipment and storage medium | |
CN108055271B (en) | Encryption and decryption method for electronic mail, storage medium and electronic equipment | |
CN114615087B (en) | Data sharing method, device, equipment and medium | |
CN116204903A (en) | Financial data security management method and device, electronic equipment and storage medium | |
CN115292747A (en) | File protection method and device, electronic equipment and storage medium | |
CN113761570B (en) | Data interaction method for privacy intersection | |
CN115442046A (en) | Signature method, signature device, electronic equipment and storage medium | |
CN111212068B (en) | Method for encrypting and decrypting characters by input method | |
CN110474967B (en) | Block chain experiment system and method | |
CN113672954A (en) | Feature extraction method and device and electronic equipment | |
Mahdi et al. | EFTS: An encryption file transfer system applying advanced encryption standard (AES) algorithm | |
CN109635574A (en) | File encryption-decryption method, system and storage medium in a kind of cloud storage system | |
CN114091075B (en) | Password input method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |