CN115292747B - File protection method and device, electronic equipment and storage medium - Google Patents

File protection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115292747B
CN115292747B CN202210915479.6A CN202210915479A CN115292747B CN 115292747 B CN115292747 B CN 115292747B CN 202210915479 A CN202210915479 A CN 202210915479A CN 115292747 B CN115292747 B CN 115292747B
Authority
CN
China
Prior art keywords
file
ciphertext
disguised
opened
files
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.)
Active
Application number
CN202210915479.6A
Other languages
Chinese (zh)
Other versions
CN115292747A (en
Inventor
奚望
蒋蕊
丁文波
李小伟
李欢
刘辉
邢健坤
郑娇娇
陆猛
赵云
沙伏生
李超
李梦亭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dianju Information Technology Co ltd
Sdic Intelligent Technology Co ltd
Original Assignee
Beijing Dianju Information Technology Co ltd
Sdic Intelligent Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Dianju Information Technology Co ltd, Sdic Intelligent Technology Co ltd filed Critical Beijing Dianju Information Technology Co ltd
Priority to CN202210915479.6A priority Critical patent/CN115292747B/en
Publication of CN115292747A publication Critical patent/CN115292747A/en
Application granted granted Critical
Publication of CN115292747B publication Critical patent/CN115292747B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing 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 firstly obtains a first file and encrypts the first file to obtain a ciphertext file; then obtaining a disguised file and utilizing the disguised file to disguise the ciphertext file to obtain a second file; the invention can hide and protect the file by using the disguised file to carry out secondary processing on the encrypted file so as to disguise the file.

Description

File protection method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of file encryption technologies, and in particular, to a method and apparatus for protecting a file, an electronic device, and a storage medium.
Background
If the important files are simply stored in a computer hard disk, the important files are easy to find and violently crack, so that the important information of the company is leaked.
At present, aiming at important files, format conversion can be performed through format file technology to generate format files, so that the document content is ensured to be non-editable, and the method can be used across platforms and systems; meanwhile, the format file is encrypted by adopting a password technology, so that the file security is ensured, and the content of the file cannot be easily acquired.
However, the files encrypted by the method can still be cracked by violence through the password technology, and the technical difficulty is increased, but the risks of being found and cracked are still increased.
Disclosure of Invention
The invention provides a file protection method, a device, electronic equipment and a storage medium; the files are disguised by performing secondary processing on the encrypted files by utilizing disguised files, so that the files can be hidden and protected.
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;
obtaining a disguised file and utilizing the disguised file to disguise the ciphertext file to obtain a second file;
the camouflage file includes one or more of the following: PDF files, pictures, or world files.
Optionally, the obtaining the first file and encrypting the first file to obtain the ciphertext file includes:
performing format conversion on the first file to obtain a format file;
and obtaining 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 disguised file, and the ciphertext file is connected to the tail of the disguised 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 by a mode other than the special format reader, the content of the disguised file is presented after the second file is opened.
Optionally, if the second file is opened by using a special format reader, presenting the content of the first file after opening the second file includes:
continuing to read backwards when the special format reader reads the tail of the camouflage file;
and after reading the head of the ciphertext file, decrypting the ciphertext file to obtain the first file.
In a second aspect, an embodiment of the present invention provides a file protection device, including:
the encryption module is used for obtaining a first file and encrypting the first file to obtain a ciphertext file;
the disguising module is used for obtaining disguised files and disguising the ciphertext files by using the disguised files to obtain second files;
the camouflage file includes one or more of the following: PDF files, pictures, or world files.
In a third aspect, an embodiment of the invention provides an electronic device comprising a memory and a processor, the memory having stored thereon a computer program, the processor implementing the method according to any of the first aspects when executing the program.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method according to any 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 firstly obtains a first file and encrypts the first file to obtain a ciphertext file; then obtaining a disguised file and utilizing the disguised file to disguise the ciphertext file to obtain a second file; the invention can hide and protect the file by using the disguised file to carry out secondary processing on the encrypted file so as to disguise the file.
It should be understood that the description in this summary is not intended to limit the critical or essential features of the embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
The above and other features, advantages and aspects of embodiments of the present invention will become more apparent by reference 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 is a flow chart of a method of protecting files according to an embodiment of the present invention;
FIG. 2 shows a flow chart of file encryption according to an embodiment of the invention;
FIG. 3 is a flow chart illustrating a file masquerading in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of a file protection device 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 enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one or more embodiments of the present disclosure without inventive faculty, are intended to be within the scope of the present disclosure.
It should be noted that, the description of the embodiment of the present invention is only for the purpose of more clearly describing the technical solution of the embodiment of the present invention, and does not constitute a limitation on the technical solution provided by the embodiment of the present invention.
FIG. 1 is a flow chart of a method of protecting files according to an embodiment of the present invention; as shown in fig. 1, the file protection method includes:
s20, 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.
Obtaining a key and encrypting the layout file by using the key to obtain the ciphertext file;
the key may be a symmetric key or an asymmetric key;
wherein symmetric key encryption is used, i.e. the sender and receiver of the information use one key to encrypt and decrypt data; the encryption and decryption of ciphertext using symmetric keys is fast.
When using asymmetric keys for encryption and decryption, a specific formula is used to create two mathematically related keys, but no other can be derived between the two keys, one key is used to encrypt information, generate ciphertext, and the other key is used to decrypt information, generate plaintext; the use of asymmetric keys is more complex than symmetric keys and the encryption effect is better.
The present embodiment is not limited to the encryption of the file using the key.
S40, obtaining a disguised file and utilizing the disguised file to disguise the ciphertext file to obtain a second file;
the camouflage file includes one or more of the following: PDF files, pictures, or world files.
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 the second file is opened by using a special format reader, the content of the first file is presented after the second file is opened.
And when the special format reader reads the tail part of the disguised file, continuing to read backwards to check whether the file data exists, if so, analyzing the head part of the file to obtain a specific ciphertext mark, and then determining whether the file is a ciphertext file according to the specific ciphertext mark, if so, decrypting the file to obtain a first file.
And if the second file is opened by a mode other than the special format reader, the content of the disguised file is presented 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 obtaining a disguised file and utilizing the disguised file to disguise the ciphertext file to obtain a second file; the invention can hide and protect the file by using the disguised file to carry out secondary processing on the encrypted file so as to disguise the file.
Based on the same inventive concept, the embodiments of the present invention further provide a file protection device, which may be used to implement a file protection method described in the foregoing embodiments, as described in the following embodiments: since the principle of the document protection device for solving the problem is similar to that of a document protection method, the implementation of the document protection device can refer to the implementation of a document protection method, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
FIG. 4 is a schematic diagram of a file protection device according to an embodiment of the present invention; as shown in fig. 4, the file protection device includes:
the encryption module 20 obtains a first file and encrypts 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.
Obtaining a key and encrypting the layout file by using the key to obtain the ciphertext file;
the key may be a symmetric key or an asymmetric key;
wherein symmetric key encryption is used, i.e. the sender and receiver of the information use one key to encrypt and decrypt data; the encryption and decryption of ciphertext using symmetric keys is fast.
When using asymmetric keys for encryption and decryption, a specific formula is used to create two mathematically related keys, but no other can be derived between the two keys, one key is used to encrypt information, generate ciphertext, and the other key is used to decrypt information, generate plaintext; the use of asymmetric keys is more complex than symmetric keys and the encryption effect is better.
The present embodiment is not limited to the encryption of the file using the key.
A masquerading module 40, which obtains a masquerading file and performs masquerading processing on the ciphertext file by using the masquerading file to obtain a second file;
the camouflage file includes one or more of the following: PDF files, pictures, or world files.
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 the second file is opened by using a special format reader, the content of the first file is presented after the second file is opened.
And when the special format reader reads the tail part of the disguised file, continuing to read backwards to check whether the file data exists, if so, analyzing the head part of the file to obtain a specific ciphertext mark, and then determining whether the file is a ciphertext file according to the specific ciphertext mark, if so, decrypting the file to obtain a first file.
And if the second file is opened by a mode other than the special format reader, the content of the disguised file is presented 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, a camouflage module 40 is used for obtaining a camouflage file and performing camouflage processing on the ciphertext file by using the camouflage file to obtain a second file; the camouflage file includes one or more of the following: PDF files, pictures, or world files. In the embodiment, the encrypted file is subjected to secondary processing by using the disguised file, so that the file is disguised, and the file can be hidden and protected.
The embodiment of the present invention also provides a computer electronic device, fig. 5 shows a schematic diagram of a structure of an electronic device to which the 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 required for the system operation are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through 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 section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; 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 drive 510 is also connected to the I/O interface 505 as needed. 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 needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
The flowcharts 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 involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules or modules may also be provided in a processor, for example, as: a processor includes an encryption module 20 and a disguising module 40, wherein the names of these modules do not in some way limit the module itself, e.g., the encryption module 20 may also be described as "an encryption module 20 that obtains a first file and encrypts the first file to obtain a ciphertext file".
As another aspect, the present invention also provides a computer-readable storage medium, which may be a computer-readable storage medium contained in a file protection device as described in the above embodiment; or may be a computer-readable storage medium, alone, that is not incorporated into an 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 above description is only illustrative of the preferred embodiments of the present invention and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the invention referred to in the present invention is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the inventive concept. Such as the above-mentioned features and the technical features disclosed in the present invention (but not limited to) having similar functions are replaced with each other.

Claims (4)

1. A method of protecting a file, the method comprising:
acquiring a first file and encrypting the first file to obtain a ciphertext file;
obtaining a disguised file and utilizing the disguised file to disguise the ciphertext file to obtain a second file;
the second file comprises a ciphertext file and a disguised file, and the ciphertext file is connected to the tail of the disguised file;
the camouflage file includes one or more of the following: PDF files, pictures, or word files;
the obtaining the first file and encrypting the first file to obtain the ciphertext file includes:
performing format conversion on the first file to obtain a format file;
obtaining a key and encrypting the layout file by using the key to obtain the ciphertext file;
the key includes: symmetric keys and asymmetric keys;
if the second file is opened by using a special format reader, the content of the first file is presented after the second file is opened;
if the second file is opened in a mode other than the special format reader, the content of the disguised file is presented after the second file is opened;
if the second file is opened by using a special format reader, presenting the content of the first file after opening the second file, including:
continuing to read backwards when the special format reader reads the tail of the camouflage file;
and after reading the head of the ciphertext file, decrypting the ciphertext file to obtain the first file.
2. A document protection device, the document protection device comprising:
the encryption module is used for obtaining a first file and encrypting the first file to obtain a ciphertext file;
the disguising module is used for obtaining disguised files and disguising the ciphertext files by using the disguised files to obtain second files;
the second file comprises a ciphertext file and a disguised file, and the ciphertext file is connected to the tail of the disguised file;
the camouflage file includes one or more of the following: PDF files, pictures, or word files;
the obtaining the first file and encrypting the first file to obtain the ciphertext file includes:
performing format conversion on the first file to obtain a format file;
obtaining a key and encrypting the layout file by using the key to obtain the ciphertext file;
the key includes: symmetric keys and asymmetric keys;
if the second file is opened by using a special format reader, the content of the first file is presented after the second file is opened;
if the second file is opened in a mode other than the special format reader, the content of the disguised file is presented after the second file is opened;
if the second file is opened by using a special format reader, presenting the content of the first file after opening the second file, including:
continuing to read backwards when the special format reader reads the tail of the camouflage file;
and after reading the head of the ciphertext file, decrypting the ciphertext file to obtain the first file.
3. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor implements the method of claim 1 when executing the computer program.
4. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to claim 1.
CN202210915479.6A 2022-08-01 2022-08-01 File protection method and device, electronic equipment and storage medium Active CN115292747B (en)

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 CN115292747A (en) 2022-11-04
CN115292747B true 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 (4)

* Cited by examiner, † Cited by third party
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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9558680B2 (en) * 2014-04-04 2017-01-31 Sizhe Tan Payload in picture encoding

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
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
CN115292747A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN106980794B (en) TrustZone-based file encryption and decryption method and device and terminal equipment
JP6545136B2 (en) System and method for encrypted transmission of web pages
CN106997439B (en) TrustZone-based data encryption and decryption method and device and terminal equipment
JP2003218851A (en) Method and apparatus for safeguarding digital asset
US20140006782A1 (en) Document encryption and decryption
US20070014416A1 (en) System and method for protecting against dictionary attacks on password-protected TPM keys
CN1509546A (en) Platform and method for securely transmitting authorization data
TW201112035A (en) Support for secure objects in a computer system
US10686764B2 (en) Executable coded cipher keys
US20090129591A1 (en) Techniques for Securing Document Content in Print and Electronic Form
EP4096146A1 (en) Information processing system, information processing device, information processing method, and information processing program
US11288381B2 (en) Calculation device, calculation method, calculation program and calculation system
CN114124364A (en) Key security processing method, device, equipment and computer readable storage medium
US20130177156A1 (en) Encrypted Data Processing
Khashan et al. An efficient adaptive of transparent spatial digital image encryption
CN115292747B (en) File protection method and device, electronic equipment and storage medium
Oduor et al. Application of cryptography in enhancing privacy of personal data in medical services
Mocanu et al. Improved security based on combined encryption and steganography techniques
Patil et al. Significant Study of Data Encryption and Steganography
CN115688150B (en) File encryption transmission method, decryption display method, storage medium and electronic equipment
CN109564615B (en) Method, device, equipment and storage medium for loading model data
Ganiyu et al. Securing Electronic Health Record System Using Cryptographic Techniques
Parakh Securing passwords storage using image steganography by implementing AES encryption and Argon2 hashing
Ali et al. Comprehensive on Exploring Advanced Ciphering for Enhanced Data Protection
AlMudahi et al. Enhanced Visual Cryptography Using Quadratic Anisotropic Diffusion

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