CN107992757A - A kind of file encryption, decryption method and device - Google Patents

A kind of file encryption, decryption method and device Download PDF

Info

Publication number
CN107992757A
CN107992757A CN201610975289.8A CN201610975289A CN107992757A CN 107992757 A CN107992757 A CN 107992757A CN 201610975289 A CN201610975289 A CN 201610975289A CN 107992757 A CN107992757 A CN 107992757A
Authority
CN
China
Prior art keywords
file
data
password
file data
crypted password
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
Application number
CN201610975289.8A
Other languages
Chinese (zh)
Other versions
CN107992757B (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 Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Guangzhou Jinshan Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Jinshan Mobile 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 Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Jinshan Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201610975289.8A priority Critical patent/CN107992757B/en
Publication of CN107992757A publication Critical patent/CN107992757A/en
Application granted granted Critical
Publication of CN107992757B publication Critical patent/CN107992757B/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/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 discloses a kind of file encryption, decryption method and device, the described method includes:First triggering command is received, the first triggering command is used for the cryptographic operation for triggering file;The first Crypted password is obtained, and the first file data is encrypted using first Crypted password, the password that first Crypted password is an externally input, first file data is the initial data of file;The second file data is chosen from the database prestored, and second file data is encrypted using default second Crypted password;Encrypted first file data and encrypted second file data are stored in identical file.

Description

A kind of file encryption, decryption method and device
Technical field
The present invention relates to file ciphering technology, espespecially a kind of file encryption, decryption method and device.
Background technology
The security and confidentiality of file are always one of most basic demand of office realm.At present, it is most popular Cryptographic means are to set corresponding password for file, after file content is encrypted using the mode of symmetric cryptography, then are preserved For specific file stream format.Require first to input password when opening file, judge whether password is correct, correctly then shows in file Hold, otherwise prompt " password bad " and require to input password again.This scheme is highly dependent upon Cipher Strength and Encryption Algorithm Selection, it is very high by the possibility of Brute Force for the weak password of security and the weak Encryption Algorithm of security, file Security cannot be guaranteed.
The content of the invention
In order to solve the above technical problem, the present invention provides a kind of file encryption, decryption method and device, it is possible to increase The security of file.
In order to reach the object of the invention, the present invention provides a kind of file encrypting method, this method includes:
First triggering command is received, the first triggering command is used for the first cryptographic operation for triggering file;
Obtain the first Crypted password, and the first file data is encrypted using first Crypted password, described the The password that one Crypted password is an externally input, first file data are the initial data of file;
The second file data is chosen from the data prestored, and using default second Crypted password to described second File data is encrypted;
Encrypted first file data and encrypted second file data are stored in identical file.
Optionally, it is described to choose the second file data from the data prestored, including:
The second file data is randomly selected from the data prestored.
Optionally, it is described to choose the second file data from the data prestored, including:
Type information according to first file data chooses the second file data from the data prestored.
Optionally, this method further includes:
During first cryptographic operation, the content of the first file data is only shown in display interface.
Optionally, this method further includes:
The second triggering command is received, second triggering command is used for the second cryptographic operation for triggering file;
Obtain the first Crypted password, and the first file data is encrypted using first Crypted password, described the The password that one Crypted password is an externally input, first file data are the initial data of file;
Encrypted first file data is stored in file.
Present invention also offers a kind of file decryption method, this method includes:
The 3rd triggering command is received, the 3rd triggering command is used to trigger the operation for opening file;
Interface for password input is shown in display interface;
Obtain and judge whether externally input password is the first Crypted password, if it is, showing in display interface The content of one file data;First file data is the initial data of file, and first Crypted password is described first The Crypted password of file data;
If not, and the number of external input password exceed preset value, then show the second file data in display interface Content;Second file data is the data being stored in first file data in identical file.
Optionally, the content that the second file data is shown in display interface, including:
Encrypted second file data in file is decrypted using the second Crypted password, and by the institute after decryption State the second file data and be shown in display interface;Second Crypted password is default password.
Optionally, the content for the second file data that the display interface is shown is a reading mode or editable pattern.
Present invention also offers a kind of document encrypting apparatus, which includes:
First receiving module, for receiving first triggering command, the first triggering command is used to trigger the first of file Cryptographic operation;
Encryption processing module, for obtaining the first Crypted password, and using first Crypted password to the first number of files According to being encrypted, the password that first Crypted password is an externally input, first file data is the initial data of file; The second file data is chosen from the data prestored, and using default second Crypted password to second file data It is encrypted;
Memory module, for encrypted first file data and encrypted second file data to be stored In identical file.
Optionally, the encryption processing module includes:
First encrypting module, for obtaining the first Crypted password, and using first Crypted password to the first number of files According to being encrypted, the password that first Crypted password is an externally input, first file data is the initial data of file;
Second encrypting module, for randomly selecting the second file data from the data prestored, and using default Second file data is encrypted in second Crypted password;Or according to first file data type information from pre- The second file data is chosen in the data first stored, and second file data is carried out using default second Crypted password Encryption.
Optionally, which further includes:
First display module, for during first cryptographic operation, the first file only to be shown in display interface The content of data.
Optionally, first receiving module, is additionally operable to receive the second triggering command, second triggering command is used to touch Second cryptographic operation of fat file;
The memory module, is additionally operable to encrypted first file data being stored in file.
Present invention also offers a kind of file deciphering device, which includes:
Second receiving module, for receiving the 3rd triggering command, the 3rd triggering command, which is used to trigger, opens file Operation;
Decryption processing module, for obtaining and judging whether externally input password is the first Crypted password, if it is, The second display module is notified to show the content of the first file data in display interface;If not, and external input password number More than preset value, then the second display module is notified to show the content of the second file data in display interface;
Second display module, for showing interface for password input in display interface;After the notice for receiving decryption processing module The content of the first file data or the content of the second file data are shown in display interface;
Wherein, first file data is the initial data of file, and first Crypted password is first file The Crypted password of data;Second file data is the data being stored in first file data in identical file.
Optionally, the content for the second file data that second display module is shown in display interface for a reading mode, Or editable pattern.
Compared with prior art, the present invention includes:First triggering command is received, the first triggering command is used to trigger text The cryptographic operation of part;The first Crypted password is obtained, and the first file data is encrypted using first Crypted password, institute The password that the first Crypted password is an externally input is stated, first file data is the initial data of file;From what is prestored The second file data is chosen in database, and second file data is encrypted using default second Crypted password; Encrypted first file data and encrypted second file data are stored in identical file.It is of the invention real Example is applied, password input by user is judged when opening file, if user have input the password of mistake, and input error The number of password exceedes default number, then equally opens file, the content simply shown hereof is not the original of file Data (the first file data), but be replaced with other data (the second file data), allow malicious operation person to take for close Code cracks success, so as to ensure that the security of original.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights Specifically noted structure is realized and obtained in claim and attached drawing.
Brief description of the drawings
Attached drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is file encrypting method flow diagram one described in the embodiment of the present invention;
Fig. 2 is file encrypting method flow diagram two described in the embodiment of the present invention;
Fig. 3 is file decryption method flow schematic diagram described in the embodiment of the present invention;
Fig. 4 is document encrypting apparatus schematic diagram one described in the embodiment of the present invention;
Fig. 5 is document encrypting apparatus schematic diagram two described in the embodiment of the present invention;
Fig. 6 is document encrypting apparatus schematic diagram three described in the embodiment of the present invention;
Fig. 7 is file deciphering device schematic diagram described in the embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the case where there is no conflict, in the embodiment and embodiment in the application Feature can mutually be combined.
Step shown in the flowchart of the accompanying drawings can be in the computer system of such as a group of computer-executable instructions Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein Sequence performs shown or described step.
Embodiment one
An embodiment of the present invention provides a kind of file encrypting method, as shown in Figure 1, this method includes:
Step 101:First triggering command is received, the first triggering command is used for the first cryptographic operation for triggering file;
Step 102:The first Crypted password is obtained, and the first file data is added using first Crypted password Password close, that first Crypted password is an externally input, first file data are the initial data of file;
Step 103:The second file data is chosen from the data prestored, and uses default second Crypted password pair Second file data is encrypted;
Step 104:Encrypted first file data and encrypted second file data are stored in together In one file.
Here, it is necessary to explanation, the step 102 and 103 execution sequencing are without limiting, successively interchangeable Also can be carried out at the same time.The initial data of first file data, that is, file, that is, the data that file user editor preserves.Institute It can be the corresponding button option in user's triggering menu to state first triggering command, such as:Menu " file "->" file encryption " Choose and (choose) in option " camouflage encryption function (can be other names certainly) ".
The embodiment of the present invention, judges password input by user when opening file, if user have input mistake Password, and the number of input error password exceedes default number, then equally opens file, what is simply shown hereof is interior Appearance is not the initial data of file, but is replaced with other data (the second file data), allows malicious operation person to take for Password cracking success, so as to ensure that the security of original.
Optionally, it is described to choose the second file data from the data prestored, including:From the data prestored Randomly select the second file data.
During practical application, a database can be set, such as the database of big data, wherein prestoring substantial amounts of in systems Different types of data, the data can be stored according to type, such as:Poem, office documents, statistical form etc., can be according to Divided according to practical application;During above-mentioned first cryptographic operation, a data conduct can be randomly selected from database Above-mentioned second file data.
Optionally, it is described to choose the second file data from the data prestored, including:According to first number of files According to type information the second file data is chosen from the data prestored.
Such as:The type of first file data is poem, then can in database described above according to type from A data are chosen in the poem data of storage as above-mentioned second file data.
Optionally, this method further includes:During first cryptographic operation, the first text is only shown in display interface The content of number of packages evidence.
Here, when carrying out the first cryptographic operation to file, the content of the first file data is only shown in display interface, i.e., The content that user edits, until cryptographic operation terminates, closes and preserves document.That is, the first above-mentioned cryptographic operation mistake The content shown in journey display interface is identical with content shown in display interface during existing file encryption.
Embodiment two
An embodiment of the present invention provides a kind of file encrypting method, as shown in Figure 1, this method includes:
Step 101:First triggering command is received, the first triggering command is used for the first cryptographic operation for triggering file;
Step 102:The first Crypted password is obtained, and the first file data is added using first Crypted password Password close, that first Crypted password is an externally input, first file data are the initial data of file;
Step 103:The second file data is chosen from the data prestored, and uses default second Crypted password pair Second file data is encrypted;
Step 104:Encrypted first file data and encrypted second file data are stored in together In one file.
Here, it is necessary to explanation, the step 102 and 103 execution sequencing are without limiting, successively interchangeable Also can be carried out at the same time.The initial data of first file data, that is, file, that is, the data that file user editor preserves.Institute It can be the corresponding button option in user's triggering menu to state first triggering command, such as:Menu " file "->" file encryption " Choose and (choose) in option " camouflage encryption function (can be other names certainly) ".
The embodiment of the present invention, judges password input by user when opening file, if user have input mistake Password, and the number of input error password exceedes default number, then equally opens file, what is simply shown hereof is interior Appearance is not the initial data of file, but is replaced with other data (the second file data), allows malicious operation person to take for Password cracking success, so as to ensure that the security of original.
Optionally, as shown in Fig. 2, this method further includes:
Step 201:The second triggering command is received, second triggering command is used for the second cryptographic operation for triggering file;
Step 202:The first Crypted password is obtained, and the first file data is added using first Crypted password Password close, that first Crypted password is an externally input, first file data are the initial data of file;
Step 203:Encrypted first file data is stored in file.
Here, second triggering command can be the corresponding button option in user's triggering menu, such as:In menu " text Part "->Choose and (choose) in " file encryption " option " common encryption function (i.e. existing file encryption function) ".
Wherein, shown step 202 is identical with step 102, that is, obtains user's input (such as:Inputted by dialog box etc.) plus Password, and using the Crypted password user edit after file data (the first file data) be encrypted, accordingly add Decryption method can be associated encryption method, no longer be described in detail herein.
As it can be seen that user may be selected to carry out in file data encryption or selection example one using general encryption method Security higher encryption method.
Optionally, it is described to choose the second file data from the data prestored, including:From the data prestored Randomly select the second file data.
During practical application, a database can be set, such as the database of big data, wherein prestoring substantial amounts of in systems Different types of data, the data can be stored according to type, such as:Poem, office documents, statistical form etc., can be according to Divided according to practical application;During above-mentioned first cryptographic operation, a data conduct can be randomly selected from database Above-mentioned second file data.
Optionally, it is described to choose the second file data from the data prestored, including:According to first number of files According to type information the second file data is chosen from the data prestored.
Such as:The type of first file data is poem, then can in database described above according to type from A data are chosen in the poem data of storage as above-mentioned second file data.
Optionally, this method further includes:During first cryptographic operation, the first text is only shown in display interface The content of number of packages evidence.
Here, when carrying out the first cryptographic operation to file, the content of the first file data is only shown in display interface, i.e., The content that user edits, until cryptographic operation terminates, closes and preserves document.That is, the first above-mentioned cryptographic operation mistake The content shown in journey display interface is identical with content shown in display interface during existing file encryption.
Embodiment three
The embodiment of the present invention additionally provides a kind of file decryption method, as shown in figure 3, this method includes:
Step 301:The 3rd triggering command is received, the 3rd triggering command is used to trigger the operation for opening file;
Step 302:Interface for password input is shown in display interface;
Step 303:Obtain and judge whether externally input password is the first Crypted password, if it is, on display circle Face shows the content of the first file data;First file data is the initial data of file, and first Crypted password is The Crypted password of first file data;If not, and the number of external input password exceed preset value, then in display interface Show the content of the second file data;Second file data is to be stored in first file data in identical file Data.
The embodiment of the present invention, judges password input by user when opening file, if user have input mistake Password, and the number of input error password exceedes default number, then equally opens file, what is simply shown hereof is interior Appearance is not the initial data of file, but is replaced with other data (the second file data), allows malicious operation person to take for Password cracking success, so as to ensure that the security of original.
Wherein, the content that the second file data is shown in display interface, including:
Encrypted second file data in file is decrypted using the second Crypted password, and by the institute after decryption State the second file data and be shown in display interface;Second Crypted password is default password.
In the present embodiment, the 3rd triggering command can be the operation such as user's clicking trigger file icon, receive this and refer to After order, interface for password input can be ejected in display interface, password is inputted for user.If the user is the validated user of file (file founder), then user can input correct password (i.e.:First Crypted password), File Open, what display stored before First file data;If user is disabled user, which will attempt to input password, if the password mistake of input And exceed, such as:Three times, then system carries out encrypted second file data in file using default second Crypted password Decryption, and second file data after decryption is shown in display interface;Second Crypted password is default password.
It is identical with embodiment one, a database can be set in systems, such as the database of big data, wherein prestoring big The different types of data of amount, the data can be stored according to type, such as:Poem, office documents, statistical form etc., It can be divided according to practical application;Second file data is the data in the database.
Optionally, the content for the second file data that the display interface is shown is a reading mode or editable pattern.
Here, if the validated user (file founder) of file have forgotten first Crypted password, in input three After secondary bad password, file can be also opened, then can be by second number of files in order to which the file data for reminding user current is wrong According to being shown as a reading mode, such user can not editing files data, then it is to be realized that file is problematic.Therefore, it can reach and carry The purpose of awake user file error in data.
Also, it is contemplated that if the file data opened is editable pattern, for disabled user, with for this Data in file are initial data (the first file data), therefore play the role of misleading to disabled user, have ensured original Security.
Example IV
An embodiment of the present invention provides a kind of document encrypting apparatus, as shown in figure 4, the device includes:
First receiving module 401, for receiving first triggering command, the first triggering command is used to triggering the of file One cryptographic operation;
Encryption processing module 402, for obtaining the first Crypted password, and using first Crypted password to the first file Data are encrypted, the password that first Crypted password is an externally input, and first file data is the original number of file According to;The second file data is chosen from the data prestored, and using default second Crypted password to second file Data are encrypted;
Memory module 403, for by encrypted first file data and encrypted second file data It is stored in identical file.
Here, the initial data of first file data, that is, file, that is, the data that file user editor preserves.Institute It can be the corresponding button option in user's triggering menu to state first triggering command, such as:Menu " file "->" file encryption " Choose and (choose) in option " camouflage encryption function (can be other names certainly) ".
The embodiment of the present invention, judges password input by user when opening file, if user have input mistake Password, and the number of input error password exceedes default number, then equally opens file, what is simply shown hereof is interior Appearance is not the initial data of file, but is replaced with other data (the second file data), allows malicious operation person to take for Password cracking success, so as to ensure that the security of original.
Optionally, as shown in figure 5, the encryption processing module 402 includes:
First encrypting module 4021, for obtaining the first Crypted password, and using first Crypted password to the first text For number of packages according to being encrypted, the password that first Crypted password is an externally input, first file data is the original of file Data;
Second encrypting module 4022, for randomly selecting the second file data from the data prestored, and using pre- If the second Crypted password second file data is encrypted;Or the type information according to first file data The second file data is chosen from the data prestored, and using default second Crypted password to second file data It is encrypted.
During practical application, a database can be set, such as the database of big data, wherein prestoring substantial amounts of in systems Different types of data, the data can be stored according to type, such as:Poem, office documents, statistical form etc., can be according to Divided according to practical application;During above-mentioned first cryptographic operation, a data conduct can be randomly selected from database Above-mentioned second file data.
Such as:The type of first file data is poem, then can in database described above according to type from A data are chosen in the poem data of storage as above-mentioned second file data.
Optionally, as shown in fig. 6, the device further includes:
First display module 404, for during first cryptographic operation, only showing the first text in display interface The content of number of packages evidence.
Here, when carrying out the first cryptographic operation to file, the first display module 404 only shows first in display interface The content that the content of file data, i.e. user are edited, until cryptographic operation terminates, closes and preserves document.It is that is, above-mentioned The first cryptographic operation process display interface in the content that shows with it is shown in display interface during existing file encryption Content it is identical.
Optionally, first receiving module 401, is additionally operable to receive the second triggering command, second triggering command is used In the second cryptographic operation of triggering file;
The memory module 403, is additionally operable to encrypted first file data being stored in file.
Here, second triggering command can be the corresponding button option in user's triggering menu, such as:In menu " text Part "->Choose and (choose) in " file encryption " option " common encryption function (i.e. existing file encryption function) ".
As it can be seen that user may be selected to carry out in file data encryption or selection example one using general encryption method Security higher encryption method.
Embodiment five
The embodiment of the present invention additionally provides a kind of file deciphering device, as shown in fig. 7, the device includes:
Second receiving module 701, for receiving the 3rd triggering command, the 3rd triggering command, which is used to trigger, opens file Operation;
Decryption processing module 702, for obtaining and judging whether externally input password is the first Crypted password, if It is then to notify the second display module to show the content of the first file data in display interface;If not, and external input password Number exceedes preset value, then notifies the second display module to show the content of the second file data in display interface;
Second display module 703, for showing interface for password input in display interface;Receive the notice of decryption processing module The content of the first file data or the content of the second file data are shown in display interface afterwards;
Wherein, first file data is the initial data of file, and first Crypted password is first file The Crypted password of data;Second file data is the data being stored in first file data in identical file.
The embodiment of the present invention, decryption processing module 702 judge password input by user when opening file, if User have input the password of mistake, and the number of input error password exceedes default number, then equally opens file, be the The content that two display modules 703 are shown hereof is not the initial data of file, but with other data (the second number of files According to) be replaced, allow malicious operation person to take for password cracking success, so as to ensure that the security of original.
Wherein, second display module 703 shows the content of the second file data in display interface, including:
The decryption processing module 702 carries out encrypted second file data in file using the second Crypted password Decryption, and notify second display module 703 that second file data after decryption is shown in display interface;Described Two Crypted passwords are default password.
In the present embodiment, the 3rd triggering command can be the operation such as user's clicking trigger file icon, receive this and refer to After order, interface for password input can be ejected in display interface, password is inputted for user.If the user is the validated user of file (file founder), then user can input correct password (i.e.:First Crypted password), File Open, what display stored before First file data;If user is disabled user, which will attempt to input password, if the password mistake of input And exceed, such as:Three times, then system carries out encrypted second file data in file using default second Crypted password Decryption, and second file data after decryption is shown in display interface;Second Crypted password is default password.
It is identical with embodiment one, a database can be set in systems, such as the database of big data, wherein prestoring big The different types of data of amount, the data can be stored according to type, such as:Poem, office documents, statistical form etc., It can be divided according to practical application;Second file data is the data in the database.
Optionally, the content for the second file data that second display module 703 is shown in display interface is read-only mould Formula or editable pattern.
Here, if the validated user (file founder) of file have forgotten first Crypted password, in input three After secondary bad password, file can be also opened, then can be by second number of files in order to which the file data for reminding user current is wrong According to being shown as a reading mode, such user can not editing files data, then it is to be realized that file is problematic.Therefore, it can reach and carry The purpose of awake user file error in data.
Also, it is contemplated that if the file data opened is editable pattern, for disabled user, with for this Data in file are initial data (the first file data), therefore play the role of misleading to disabled user, have ensured original Security.
In practical applications, each module in file encryption, decryption device described in the embodiment of the present invention can pass through institute The processor stated in file encryption, decryption device is realized, can also be realized by specific logic circuit;For example actually should , can be by positioned at the file encryption, the central processing unit (CPU) for decrypting device, microprocessor (MPU), digital signal in Device (DSP) or field programmable gate array (FPGA) etc. is managed to realize.
It need to be noted that be:Apparatus above implements the description of item, is similar with above method description, has same The identical beneficial effect of embodiment of the method, therefore do not repeat.For the ins and outs not disclosed in apparatus of the present invention embodiment, Those skilled in the art refer to the description of the method for the present invention embodiment and understand, to save length, which is not described herein again.
Although disclosed herein embodiment as above, the content be only readily appreciate the present invention and use Embodiment, is not limited to the present invention.Technical staff in any fields of the present invention, is taken off not departing from the present invention On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (14)

1. a kind of file encrypting method, it is characterised in that this method includes:
First triggering command is received, the first triggering command is used for the first cryptographic operation for triggering file;
The first Crypted password is obtained, and the first file data is encrypted using first Crypted password, described first adds The password that password is an externally input, first file data are the initial data of file;
The second file data is chosen from the data prestored, and using default second Crypted password to second file Data are encrypted;
Encrypted first file data and encrypted second file data are stored in identical file.
2. file encrypting method according to claim 1, it is characterised in that described that is chosen from the data prestored Two file datas, including:
The second file data is randomly selected from the data prestored.
3. file encrypting method according to claim 1, it is characterised in that described that is chosen from the data prestored Two file datas, including:
Type information according to first file data chooses the second file data from the data prestored.
4. file encrypting method according to claim 1, it is characterised in that this method further includes:
During first cryptographic operation, the content of the first file data is only shown in display interface.
5. according to the file encrypting method any one of claim 1-4, it is characterised in that this method further includes:
The second triggering command is received, second triggering command is used for the second cryptographic operation for triggering file;
The first Crypted password is obtained, and the first file data is encrypted using first Crypted password, described first adds The password that password is an externally input, first file data are the initial data of file;
Encrypted first file data is stored in file.
A kind of 6. file decryption method, it is characterised in that this method includes:
The 3rd triggering command is received, the 3rd triggering command is used to trigger the operation for opening file;
Interface for password input is shown in display interface;
Obtain and judge whether externally input password is the first Crypted password, if it is, showing the first text in display interface The content of number of packages evidence;First file data is the initial data of file, and first Crypted password is first file The Crypted password of data;
If not, and the number of external input password exceed preset value, then the content of the second file data is shown in display interface; Second file data is the data being stored in first file data in identical file.
7. file decryption method according to claim 6, it is characterised in that described to show the second number of files in display interface According to content, including:
Encrypted second file data in file is decrypted using the second Crypted password, and by described after decryption Two file datas are shown in display interface;Second Crypted password is default password.
8. file decryption method according to claim 6, it is characterised in that the second number of files that the display interface is shown According to content be a reading mode or editable pattern.
9. a kind of document encrypting apparatus, it is characterised in that the device includes:
First receiving module, for receiving first triggering command, the first triggering command is used for the first encryption for triggering file Operation;
Encryption processing module, for obtaining the first Crypted password, and using first Crypted password to the first file data into Row encryption, the password that first Crypted password is an externally input, first file data are the initial data of file;From pre- The second file data is chosen in the data first stored, and second file data is carried out using default second Crypted password Encryption;
Memory module, for encrypted first file data and encrypted second file data to be stored in together In one file.
10. document encrypting apparatus according to claim 9, it is characterised in that the encryption processing module includes:
First encrypting module, for obtaining the first Crypted password, and using first Crypted password to the first file data into Row encryption, the password that first Crypted password is an externally input, first file data are the initial data of file;
Second encrypting module, for randomly selecting the second file data from the data prestored, and uses default second Second file data is encrypted in Crypted password;Or deposited according to the type information of first file data from advance The second file data is chosen in the data of storage, and second file data is added using default second Crypted password It is close.
11. document encrypting apparatus according to claim 9, it is characterised in that the device further includes:
First display module, for during first cryptographic operation, the first file data only to be shown in display interface Content.
12. according to the document encrypting apparatus any one of claim 9-11, it is characterised in that
First receiving module, is additionally operable to receive the second triggering command, second triggering command is used to trigger the of file Two cryptographic operations;
The memory module, is additionally operable to encrypted first file data being stored in file.
13. a kind of file deciphering device, it is characterised in that the device includes:
Second receiving module, for receiving the 3rd triggering command, the 3rd triggering command is used to trigger the operation for opening file;
Decryption processing module, for obtaining and judging whether externally input password is the first Crypted password, if it is, notice Second display module shows the content of the first file data in display interface;If not, and the number of external input password exceed Preset value, then notify the second display module to show the content of the second file data in display interface;
Second display module, for showing interface for password input in display interface;Shown after receiving the notice of decryption processing module Show the content of the first file data of interface display or the content of the second file data;
Wherein, first file data is the initial data of file, and first Crypted password is first file data Crypted password;Second file data is the data being stored in first file data in identical file.
14. file deciphering device according to claim 13, it is characterised in that second display module is in display interface The content of second file data of display is a reading mode or editable pattern.
CN201610975289.8A 2016-10-27 2016-10-27 File encryption and decryption method and device Active CN107992757B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610975289.8A CN107992757B (en) 2016-10-27 2016-10-27 File encryption and decryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610975289.8A CN107992757B (en) 2016-10-27 2016-10-27 File encryption and decryption method and device

Publications (2)

Publication Number Publication Date
CN107992757A true CN107992757A (en) 2018-05-04
CN107992757B CN107992757B (en) 2021-11-16

Family

ID=62029566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610975289.8A Active CN107992757B (en) 2016-10-27 2016-10-27 File encryption and decryption method and device

Country Status (1)

Country Link
CN (1) CN107992757B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872970A (en) * 2021-09-28 2021-12-31 北京天融信网络安全技术有限公司 Data access method, device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026822A (en) * 2006-02-24 2007-08-29 江苏高通科技实业有限公司 Method for protecting mobile phone private data
CN102750497A (en) * 2012-07-20 2012-10-24 腾讯科技(深圳)有限公司 Method and device for deciphering private information
CN103455761A (en) * 2012-05-28 2013-12-18 联想(北京)有限公司 File encryption and decryption method and device and electronic device
CN103559451A (en) * 2013-10-21 2014-02-05 宇龙计算机通信科技(深圳)有限公司 Method and device for protecting and displaying privacy information
CN103729583A (en) * 2012-10-16 2014-04-16 纬创资通股份有限公司 Data protecting method and electronic device
CN105260668A (en) * 2015-10-10 2016-01-20 北京搜狗科技发展有限公司 File encryption method and electronic device
CN105760765A (en) * 2016-02-04 2016-07-13 北京致远协创软件有限公司 Data encrypting method and device and data decrypting method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026822A (en) * 2006-02-24 2007-08-29 江苏高通科技实业有限公司 Method for protecting mobile phone private data
CN103455761A (en) * 2012-05-28 2013-12-18 联想(北京)有限公司 File encryption and decryption method and device and electronic device
CN102750497A (en) * 2012-07-20 2012-10-24 腾讯科技(深圳)有限公司 Method and device for deciphering private information
CN103729583A (en) * 2012-10-16 2014-04-16 纬创资通股份有限公司 Data protecting method and electronic device
CN103559451A (en) * 2013-10-21 2014-02-05 宇龙计算机通信科技(深圳)有限公司 Method and device for protecting and displaying privacy information
CN105260668A (en) * 2015-10-10 2016-01-20 北京搜狗科技发展有限公司 File encryption method and electronic device
CN105760765A (en) * 2016-02-04 2016-07-13 北京致远协创软件有限公司 Data encrypting method and device and data decrypting method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872970A (en) * 2021-09-28 2021-12-31 北京天融信网络安全技术有限公司 Data access method, device and storage medium

Also Published As

Publication number Publication date
CN107992757B (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US10275364B2 (en) Secure island computing system and method
JP4755189B2 (en) Content encryption method, network content providing system and method using the same
US10110380B2 (en) Secure dynamic on chip key programming
CN106778205A (en) Verified with the no data storehouse of physics unclonable function
CN102347834A (en) Trusted mobile platform architecture
CN104270517A (en) Information encryption method and mobile terminal
CN105184181B (en) File encryption method, file decryption method and file encryption device
CN104866784B (en) A kind of safe hard disk, data encryption and decryption method based on BIOS encryptions
US8667025B2 (en) Variable substitution data processing method
EP1811424A1 (en) Confidential information processing method, confidential information processing device, and content data reproducing device
CN106101150A (en) The method and system of AES
CN103929312A (en) Mobile terminal and method and system for protecting individual information of mobile terminal
CN104038828B (en) RSA hash signature content protection optimizing method based on AES encryption
CN106100851A (en) Password management system, intelligent wristwatch and cipher management method thereof
CN101539979B (en) Method for controlling and protecting electronic document and device thereof
CN105279447A (en) Method and device for data encryption, and method and device for data decryption
JP2007181011A (en) Data sharing device
CN107992757A (en) A kind of file encryption, decryption method and device
US20080104396A1 (en) Authentication Method
US9438429B2 (en) Method for authentication and electronic device for performing the authentication
CN109255225A (en) Hard disc data security control apparatus based on dual-identity authentication
CN107994998A (en) A kind of authentication information encryption method and system
CN106022147A (en) Method and device for file encryption and decryption
CN100421090C (en) Storing component data protecting method and system
US11698993B2 (en) Integrated circuit configured to perform symmetric encryption operations with secret key protection

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