CN106874776B - Decryption method of encrypted file - Google Patents

Decryption method of encrypted file Download PDF

Info

Publication number
CN106874776B
CN106874776B CN201611262378.4A CN201611262378A CN106874776B CN 106874776 B CN106874776 B CN 106874776B CN 201611262378 A CN201611262378 A CN 201611262378A CN 106874776 B CN106874776 B CN 106874776B
Authority
CN
China
Prior art keywords
decryption
encrypted file
database
file
scanning
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
CN201611262378.4A
Other languages
Chinese (zh)
Other versions
CN106874776A (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.)
XIAMEN TIPRAY TECHNOLOGY CO LTD
Original Assignee
XIAMEN TIPRAY 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 XIAMEN TIPRAY TECHNOLOGY CO LTD filed Critical XIAMEN TIPRAY TECHNOLOGY CO LTD
Priority to CN201611262378.4A priority Critical patent/CN106874776B/en
Publication of CN106874776A publication Critical patent/CN106874776A/en
Application granted granted Critical
Publication of CN106874776B publication Critical patent/CN106874776B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a decryption method of an encrypted file, which comprises the following steps: scanning out the encrypted file in a recursive mode according to the header information of the encrypted file, storing the full path information of the encrypted file in a database, and backing up the encrypted file to a backup directory at the same time, wherein the position of the encrypted file in the backup directory is consistent with the path of an original storage folder of the encrypted file; when the scanning process is started, a mutex is also created, whether the decryption process runs or not is detected, and if the decryption process does not run, the decryption process is started; reading whether encrypted file data exist in a database or not, if so, taking out the full path of the file to perform decryption operation, storing a decryption result into the database, and if not, waiting; when the decryption process is operated to decrypt the file, the nursing dog thread nursing scanning process is started, when the scanning process is completed and the decryption process is finished, whether the process exits or not is judged, and if the process exists, the process is forcibly killed. The decryption method does not need manual operation, and the decryption efficiency is improved.

Description

Decryption method of encrypted file
Technical Field
The invention belongs to the technical field of encryption and decryption, and particularly relates to an automatic decryption method for an encrypted file.
Background
With the rapid development of the network, people can quickly obtain the desired information through the internet, which greatly facilitates daily life and improves the working efficiency. However, while convenience is provided, a large amount of information is in the bare network space, with the risk of being constantly leaked. Most of the existing security software adopts an active security defense mode to encrypt files so as to prevent the files from leaking.
When the encrypted file needs to be read, the encrypted file needs to be decrypted firstly, and at present, a commonly adopted mode is that a user finds out the encrypted file in person and then uses a professional tool or sends a decryption request to an upper stage. When a user needs to perform full-disk decryption, a universal mode is adopted for decryption, the workload cannot be estimated, and the existing decryption mode has the problems of low decryption efficiency and incomplete decryption when processing a large number of files and needs to be improved.
Disclosure of Invention
The object of the present invention is to provide a decryption method for an encrypted file, which does not require manual operation, improves decryption efficiency,
in order to achieve the above purpose, the solution of the invention is:
a decryption method of an encrypted file comprises the following steps:
step 1, scanning out an encrypted file according to header information of the encrypted file, and storing full path information of the encrypted file into a database;
and 2, reading the full path information of the encrypted file from the database, decrypting the file and storing the decryption result into the database.
In the step 1, when the scanning process is started, a mutex is also created, whether the decryption process is operated or not is detected, and if not, the decryption process is started.
In step 1 above, each drive letter of the database has a separate db file.
In the step 1, a recursive method is adopted during scanning.
In the step 1, the scanned encrypted file is stored in the database along with the full path information, and the encrypted file is backed up to the backup directory.
The position of the encrypted file under the backup directory is consistent with the path of the original storage folder of the encrypted file.
In the step 2, whether the encrypted file data exists in the database is read, if yes, the file is taken out from the full path to perform decryption operation, and if not, the file is waited.
In the step 2, when the decryption process is operated to decrypt the file, the nursing dog thread nursing scanning process is started, when the scanning process is completed and the decryption process is finished, whether the process exits is judged, and if the process exists, the process is forcibly killed.
By adopting the scheme, all encrypted files are scanned according to the header information of the encrypted files, and the decryption process is automatically started for decryption, so that the problems of low decryption efficiency and incomplete file decryption of a large number of files are solved. When a user issues an automatic decryption command, the whole encrypted file decryption process does not need manual operation, so that the efficiency is improved, the program judges the encrypted file through the file header, and the problem that the encrypted file is not decrypted can be avoided.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The technical scheme of the invention is explained in detail in the following with the accompanying drawings.
As shown in fig. 1, the present invention provides a method for decrypting an encrypted file, comprising the following steps:
step 1, scanning process
Encrypting file header information according to the configuration file, recursively scanning a specified path, scanning out an encrypted file, and storing state information such as a full path of the file in a database;
during specific implementation, a user issues a command to start a scanning process, the scanning process starts to create a single mutex guarantee process instance, and a watchdog thread is started to detect whether a decryption process is running or not, and if not, the decryption process is started; the scanning process starts to scan according to a given path, the scanning file adopts a recursion mode, when the scanning file is scanned, a file header is taken out and compared with a configured encrypted file header to judge whether the file is an encrypted file, if so, the file is stored into a database, the encrypted file is backed up to a specified backup directory, the backup is mainly performed to prevent the file damage caused by decryption failure, the backup is mainly used for retrieving the file, and the position of the file under the backup directory is consistent with the folder path stored by an original file; the database is used for storing encrypted file information, each drive letter has an independent db file, and the efficiency is improved in a library dividing mode;
step 2, decryption process
When a decryption process is operated, whether encrypted file data exist in a database or not is read, if the encrypted file data exist in the database, the whole path of the file is taken out for decryption operation, a decryption result is stored in the database, the decryption process starts a decryption thread to inquire whether the data exist in the database or not, and if the data do not exist, waiting is carried out; when the decryption thread queries the database, the number of the files to be decrypted is 0, and the decryption is judged to be finished when the scanning of the scanning path is finished, the process is automatically exited;
when the decryption process runs, a watch dog thread is started at the same time, a watch scanning process is carried out, and when the decryption process is completed, a completion state value is written in the configuration file parameter: 5, and automatically quitting, wherein when the scanning process reads the parameter value of the configuration file to be 5, the scanning process automatically quits.
In summary, the decryption method of the encrypted file of the present invention has the following characteristics:
(1) when a large number of files are decrypted, the path is directly appointed to start automatic decryption without manually clicking one by one;
(2) the existing scheme needs to search for the encrypted file manually, but the invention can automatically scan the file, judge whether the file is the encrypted file according to the header of the encrypted file and store the encrypted file in the database;
(3) the encrypted file is automatically decrypted, and the efficiency is improved.
The above embodiments are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modifications made on the basis of the technical scheme according to the technical idea of the present invention fall within the protection scope of the present invention.

Claims (4)

1. A decryption method of an encrypted file is characterized by comprising the following steps:
step 1, scanning out an encrypted file according to header information of the encrypted file, and storing full path information of the encrypted file into a database;
in the step 1, the scanned encrypted file is stored in the database along with the full path information, and the encrypted file is backed up to a backup directory; the position of the encrypted file under the backup directory is consistent with the path of the original storage folder of the encrypted file;
in step 1, when the scanning process is started, a mutex is also created, whether the decryption process is operated or not is detected, and if the decryption process is not operated, the decryption process is started
Step 2, reading the full path information of the encrypted file from the database, decrypting the file and storing the decryption result into the database; when a decryption process is operated, whether encrypted file data exist in a database or not is read, if the encrypted file data exist in the database, the whole path of the file is taken out for decryption operation, a decryption result is stored in the database, the decryption process starts a decryption thread to inquire whether the data exist in the database or not, and if the data do not exist, waiting is carried out; and when the decryption thread queries the database, the number of the files to be decrypted is 0, and the decryption is finished after the scanned path is scanned, the process is automatically exited.
2. The method for decrypting the encrypted file according to claim 1, wherein: in step 1, each drive letter of the database has an independent db file.
3. The method for decrypting the encrypted file according to claim 1, wherein: in the step 1, a recursive mode is adopted during scanning.
4. The method for decrypting the encrypted file according to claim 1, wherein: in the step 2, when the decryption process is operated to decrypt the file, the nursing dog thread nursing scanning process is started, when the scanning process is completed and the decryption process is finished, whether the process exits is judged, and if the process exists, the process is forcibly killed.
CN201611262378.4A 2016-12-30 2016-12-30 Decryption method of encrypted file Active CN106874776B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611262378.4A CN106874776B (en) 2016-12-30 2016-12-30 Decryption method of encrypted file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611262378.4A CN106874776B (en) 2016-12-30 2016-12-30 Decryption method of encrypted file

Publications (2)

Publication Number Publication Date
CN106874776A CN106874776A (en) 2017-06-20
CN106874776B true CN106874776B (en) 2020-06-09

Family

ID=59164209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611262378.4A Active CN106874776B (en) 2016-12-30 2016-12-30 Decryption method of encrypted file

Country Status (1)

Country Link
CN (1) CN106874776B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143291A (en) * 2019-11-19 2020-05-12 厦门天锐科技股份有限公司 Encrypted file searching method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763394A (en) * 2009-12-31 2010-06-30 傅如毅 Method for searching secret-related files in computer system
CN105656889A (en) * 2015-12-30 2016-06-08 东软集团股份有限公司 WebApp issuing method, server and client
CN106055363A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method for identifying file and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763394A (en) * 2009-12-31 2010-06-30 傅如毅 Method for searching secret-related files in computer system
CN105656889A (en) * 2015-12-30 2016-06-08 东软集团股份有限公司 WebApp issuing method, server and client
CN106055363A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method for identifying file and mobile terminal

Also Published As

Publication number Publication date
CN106874776A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
US9286307B2 (en) Document management apparatus improved in efficiency of deletion of files, method of controlling the same, and storage medium
US9311326B2 (en) Virtual file system for automated data replication and review
EP2788876B1 (en) System and method for restoring application data
US8204907B1 (en) Systems and methods for collecting file access history information
CN1524224A (en) Systems and methods of information backup
CN105573859A (en) Data recovery method and device of database
CN109063011B (en) Log processing method, electronic device and computer readable storage medium
CN100447765C (en) Mapping method for mobile memory device
JP2007213405A (en) Method and apparatus for managing tally information
CN103389925B (en) A kind of real time backup method based on process name identification
US20110145296A1 (en) File system active symbolic link
Hauger et al. The role of triggers in database forensics
US8271755B1 (en) Discovering data storage for backup
CN106874776B (en) Decryption method of encrypted file
KR101181980B1 (en) Method for deleting data permanently with enhanced security
US8990589B1 (en) System and method for robust full-drive encryption
CN109784103B (en) Method and device for acquiring use record of USB (universal serial bus) equipment and storage medium
CN111708576A (en) Cross-operating-system equipment network card adapting and managing method, device and system
CN103488549B (en) Roll-back processing system and roll-back processing method for multi-mirror-image data
CN109240804B (en) Method and device for managing disk resources of virtual machine
Pieterse et al. Playing hide-and-seek: Detecting the manipulation of Android timestamps
KR20190087720A (en) Data backup management apparatus that can prevent hacking of storage for data backup and operating method thereof
WO2019056545A1 (en) Test machine automation management method and apparatus, device, and storage medium
JP2002175210A (en) Method of transferring and copying, and enciphering and deciphering data
JP5466277B1 (en) Portable storage device

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