CN106022147A - Method and device for file encryption and decryption - Google Patents

Method and device for file encryption and decryption Download PDF

Info

Publication number
CN106022147A
CN106022147A CN201610362992.1A CN201610362992A CN106022147A CN 106022147 A CN106022147 A CN 106022147A CN 201610362992 A CN201610362992 A CN 201610362992A CN 106022147 A CN106022147 A CN 106022147A
Authority
CN
China
Prior art keywords
file destination
content
word
file
encryption key
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.)
Pending
Application number
CN201610362992.1A
Other languages
Chinese (zh)
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.)
Meizu Technology Co Ltd
Original Assignee
Meizu 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 Meizu Technology Co Ltd filed Critical Meizu Technology Co Ltd
Priority to CN201610362992.1A priority Critical patent/CN106022147A/en
Publication of CN106022147A publication Critical patent/CN106022147A/en
Pending legal-status Critical Current

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
    • 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
    • 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)
  • 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 relates to a method and device for file encryption and decryption. The method for file decryption comprises following steps: receiving inputted decryption data; determining whether decryption data is included in the content of target files; and decrypting target files if so. The method for file encryption comprises following steps: obtaining target files needed to be encrypted; receiving an encryption instruction of target files; generating an encryption key of content of target files; and using the encryption key to encrypt target files according to the encryption instruction of target files. By using the above method, encryption operation is carried out more easily and quickly and decryption is carried out more flexibly. Besides, the invention provides the device.

Description

The method and apparatus of file encryption deciphering
Technical field
The present invention relates to encryption technology field, the method and apparatus particularly relating to the deciphering of a kind of file encryption.
Background technology
Along with the development of information technology, information security issue also day is aobvious prominent.One ensured information security Individual important step is exactly for be encrypted information.
In conventional art, cipher mode is generally treated according to the confidential information combining encryption algorithm that adds of user's typing Adding confidential information to be encrypted, wherein user's typing adds the mode of confidential information and includes keyboard typing, fingerprint record Enter, gesture typing, vocal print typing etc., Input Process is the most loaded down with trivial details.In addition, if user forgets record Enter information or the information such as fingerprint, vocal print changes, then may need to carry out breaking a code etc. the most numerous Trivial work, even causes information resources to lose.
Summary of the invention
Based on this, it is necessary to for the problem that file encryption and decrypting process are loaded down with trivial details, it is provided that a kind of file encryption The method and apparatus of deciphering.
A kind of file decryption method, described method includes:
Receive the solution ciphertext data of input;
Judge whether the content of file destination comprises described solution ciphertext data;
The most described file destination is decrypted.
In one embodiment,
Described decrypted data packet includes word or speech data;
Judge whether the content of file destination comprises described solution ciphertext data, including:
If described decrypted data packet includes word, then judge whether the content of text of described file destination comprises institute State word;
If described decrypted data packet includes speech data, then described speech data is converted to word, it is judged that described Whether the content of text of file destination comprises the word after conversion, or when described file destination is voice, Judge whether described voice comprises described speech data.
In one embodiment,
Judge whether the content of file destination comprises described solution ciphertext data, including:
Judge whether the given content in described file destination content comprises described solution ciphertext data.
A kind of method of file encryption, including:
Obtain the file destination needing encryption;
Receive the encrypted instruction to described file destination;
Content according to described file destination generates encryption key;
According to described encrypted instruction, use described encryption key that described file destination is encrypted.
In one embodiment,
Content according to described file destination generates encryption key, including:
Given content in content according to described file destination generates encryption key.
The device of file decryption, described device includes:
Deciphering data acquisition module, for receiving the solution ciphertext data of input;
Whether deciphering module, comprise described solution ciphertext data in the content judging file destination;
The most described file destination is decrypted.
In one embodiment,
Described decrypted data packet includes word or speech data;
Described deciphering module, if being additionally operable to described decrypted data packet to include word, then judges described file destination Whether content of text comprises described word;If described decrypted data packet includes speech data, then by described voice Data are converted to word, it is judged that whether comprise the word after conversion in the content of text of described file destination, or Person is when described file destination is voice, it is judged that whether comprise described speech data in described voice.
In one embodiment, described deciphering module, it is additionally operable to judge the appointment in described file destination content Whether content comprises described solution ciphertext data.
A kind of device of file encryption, including:
File acquisition module, for obtaining the file destination needing encryption;
Encrypted instruction acquisition module, for receiving the encrypted instruction to described file destination;
Encryption key generation module, generates encryption key for the content according to described file destination;
Encrypting module, for according to encrypted instruction, uses described encryption key to add described file destination Close.
In one embodiment, encryption key generation module, it is additionally operable in the content according to described file destination Given content generate encryption key.
The method and apparatus of above-mentioned file encryption deciphering, during encryption, generates according to the content of described file destination Encryption key;Use described encryption key that described file destination is encrypted.Generate according to the content of file Encryption key, user is without implementing the operation of input encryption key, and ciphering process is simpler fast.Deciphering Time, receive the solution ciphertext data of input;Judge whether the content of file destination comprises described solution ciphertext data;If It is then described file destination to be decrypted.As long as solving ciphertext data to be included in the content of file destination Deciphering file, solves ciphertext data not unique, and therefore, user, without deliberately remembeing decruption key, reduces because forgetting The probability that note key or key intrinsic information change and cannot decipher, deciphers more flexible.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for file decryption in an embodiment;
Fig. 2 is to judge whether comprise the flow chart solving ciphertext data in file in an embodiment;
Fig. 3 is the flow chart of the method for file encryption in an embodiment;
Fig. 4 is the structured flowchart of the device of file decryption in an embodiment;
Fig. 5 is the structured flowchart of the device of file encryption in an embodiment.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and reality Execute example, the present invention is further elaborated.Only should be appreciated that specific embodiment described herein Only in order to explain the present invention, it is not intended to limit the present invention.
Fig. 1 is the file decryption method in an embodiment, and described method includes:
Step S110: receive the solution ciphertext data of input.
User opens the instruction of file in the click file operation in GUI layer face by sending, raw according to this instruction Become the window of a key input, for ciphertext data can be solved in the input of this window.
Step S120: judge whether comprise described solution ciphertext data in the content of file destination;
The most described file destination is decrypted.
File destination can be word, txt, PDF or voice document, but is also not limited to this, it is also possible to It is that other carry substantial file.
In the present embodiment, as long as solution ciphertext data is included in the content of file destination can decipher file destination, Solving ciphertext data not unique, user, without deliberately remembeing decruption key, reduces because forgetting key or key solid The probability having information to change and cannot decipher, deciphers more flexible.
In one embodiment, it is judged that whether the content of file destination comprises solution ciphertext data and may is that
The ciphertext data that solves received is mated with the content in file destination, if matching degree is not less than default Threshold value, then be decrypted file destination.If matching degree is less than predetermined threshold value, the then content of file destination Comprise this solution ciphertext data, then display is deciphered and is unsuccessfully reminded by terminal page.
In one embodiment, if file destination is deciphered unsuccessfully, the solution ciphertext data of input will be eliminated, and use Family can input solution ciphertext data again, if it exceeds set point number successful decryption not yet, within the setting time eventually Hold the authority decrypted by cancelling this encryption file.
In one embodiment, in the content in file destination can being divided into some height according to separator Hold, the solution ciphertext data that user inputs is mated with above-mentioned sub-content, one by one if matching degree is not less than pre- If threshold value, then file destination is decrypted, if it does not match, mate next sub-content, until solving Close success, or until the complete all sub-contents of described sub-content matching, decipher unsuccessfully.Wherein separator can be Pause character in punctuation mark, segmentation symbol or voice.
In one embodiment, before solution ciphertext data user inputted mates with sub-content, also wrap Include and sub-content to be matched is screened, reject byte number less than the sub-content setting byte.By rejecting The sub-content of little byte, it is to avoid the simple conventional conjunction of input can be deciphered.Such as, file is interior Appearance is likely to have the simple conjunction such as " such as ", " therefore ", " such as figure ", during deciphering coupling, rejects These contain only the sub-content of these conjunctions, add the Cipher Strength of file, prevent from encrypting file by gently Easily deciphering.
As in figure 2 it is shown, in one embodiment, described decrypted data packet includes word or speech data.
Step S120: judge whether comprise described solution ciphertext data in the content of file destination, including:
Step S121: if described decrypted data packet includes word, it is judged that in the content of text of described file destination be No comprise described word.
Step S122: if described decrypted data packet includes speech data, then described speech data is converted to word, Judge the word after whether comprising conversion in the content of text of described file destination, or when described file destination During for voice, it is judged that whether described voice comprises described speech data.
Concrete, selection manner of decryption in the deciphering entrance that user can be provided by terminal, can be word solution Close, it is also possible to decipher for voice.
When terminal detects the word decruption key that user inputs, first obtain the type of file destination, as Really file destination is text, then judge whether to include in the content of file destination this word, if target File is voice document, then generate corresponding text data according to speech data, then judge the literary composition after conversion Whether notebook data includes this word.
Same, when terminal detects the voice decruption key that user inputs, first obtain file destination Type, if file destination is text, is then converted into word by voice decruption key, then judges institute State the word after whether comprising conversion in the content of text of file destination, if file destination is voice document, Then judge whether the content of file destination includes this voice decruption key.
In the present embodiment, owing to speech data is convertible into word, user can select by voice or literary composition Text objects file is decrypted by the mode of word, and manner of decryption is more flexible.
In one embodiment, step S120: judge whether comprise described deciphering number in the content of file destination According to, including:
Judge whether the given content in described file destination content comprises described solution ciphertext data.
Terminal can determine the appointment in file destination content by obtaining the operation of the given content of user's input Content, and the content this specified is as deciphering reference.During deciphering, solution ciphertext data is entered with this given content Row coupling, it is judged that whether comprise the solution ciphertext data of user's input in given content, if it is, deciphering target File.
The content specified can be a paragragh in file destination content, can also be a word or several Individual word.
Partial content during user specifies the content of file destination in the present embodiment is as in the coupling solving ciphertext data Holding, deciphering has more specific aim.By user-specific content can effectively solve when in file destination with simply The problem easily decoded during field.
As it is shown on figure 3, a kind of method providing file encryption in one embodiment, including:
Step S210: obtain the file destination needing encryption.
File destination can be word, txt, PDF or voice document, but is also not limited to this, it is also possible to It is that other carry substantial file.
Step S220: receive the encrypted instruction to described file destination.
The encrypted instruction of file destination can be sent by mouse or keyboard, obtains and clicks on terminal by user Touch screen send, or by voice send file encryption instruct.
Step S230: generate encryption key according to the content of described file destination.
According to the encryption file obtained, obtain encrypting the content-data of file, according to the AES pair set The content of encryption file carries out coding and generates encryption key.
Step S240: according to encrypted instruction, uses described encryption key to be encrypted described file destination.
When receiving the encrypted instruction to file destination, automatically obtain in file destination according to encrypted instruction Holding, relative to traditional user by inputting the cipher mode of encryption key, the present embodiment is according to file destination Content directly generate encryption key, ciphering process is simpler fast.
In one embodiment, generating encryption key according to the content of file destination is according in file destination Holding and generate some encryption keys, file destination is encrypted by encryption key in a parallel fashion.Concrete, During deciphering, the decruption key of input mates can be decrypted with arbitrary encryption key, solves ciphertext data not unique, Therefore, user, without deliberately remembeing decruption key, reduces because forgetting that key or key intrinsic information occur The probability changed and cannot decipher, deciphers more flexible.
In one embodiment, step S230 generates encryption key according to the content of described file destination, including:
Given content in content according to described file destination generates encryption key.
Can be by mode input content designated orders such as mouse, keyboard or touch terminal screens, according to this Content specifies corresponding content.The content specified can be a natural paragraph in text or Audio frequency in certain time period in voice document.
In one embodiment, as shown in Figure 4, it is provided that the device of a kind of file decryption, this device includes:
Deciphering data acquisition module 310, for receiving the solution ciphertext data of input.
Whether deciphering module 320, comprise described solution ciphertext data in the content judging file destination;
The most described file destination is decrypted.
In one embodiment, described decrypted data packet includes word or speech data.
Described deciphering module 320, if including word for described decrypted data packet, then judges described file destination Whether content of text comprises described word;If described decrypted data packet includes speech data, then by described voice Data are converted to word, it is judged that whether comprise the word after conversion in the content of text of described file destination, or Person is when described file destination is voice, it is judged that whether comprise described speech data in described voice.
In one embodiment, in described deciphering module is additionally operable to judge the appointment in described file destination content Whether appearance comprises described solution ciphertext data.
In one embodiment, as shown in Figure 5, it is provided that can the device of a kind of file encryption, this device includes:
File acquisition module 410, for obtaining the file destination needing encryption.
Encrypted instruction acquisition module 420, for receiving the encrypted instruction to described file destination.
Encryption key generation module 430, generates encryption key for the content according to described file destination.
Encrypting module 440, for according to the described encrypted instruction to described file destination, uses described encryption close Described file destination is encrypted by key.
In one embodiment, encryption key generation module is additionally operable in the content according to described file destination Given content generates encryption key.
Each technical characteristic of embodiment described above can combine arbitrarily, for making description succinct, the most right The all possible combination of each technical characteristic in above-described embodiment is all described, but, if these skills There is not contradiction in the combination of art feature, is all considered to be the scope that this specification is recorded.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed, But can not therefore be construed as limiting the scope of the patent.It should be pointed out that, for this area For those of ordinary skill, without departing from the inventive concept of the premise, it is also possible to make some deformation and change Entering, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appended power Profit requires to be as the criterion.

Claims (10)

1. a method for file decryption, described method includes:
Receive the solution ciphertext data of input;
Judge whether the content of file destination comprises described solution ciphertext data;
The most described file destination is decrypted.
Method the most according to claim 1, it is characterised in that
Described decrypted data packet includes word or speech data;
Judge whether the content of file destination comprises described solution ciphertext data, including:
If described decrypted data packet includes word, then judge whether the content of text of described file destination comprises institute State word;
If described decrypted data packet includes speech data, then described speech data is converted to word, it is judged that described Whether the content of text of file destination comprises the word after conversion, or when described file destination is voice, Judge whether described voice comprises described speech data.
Method the most according to claim 1, it is characterised in that
Judge whether the content of file destination comprises described solution ciphertext data, including:
Judge whether the given content in described file destination content comprises described solution ciphertext data.
4. a method for file encryption, including:
Obtain the file destination needing encryption;
Receive the encrypted instruction to described file destination;
Content according to described file destination generates encryption key;
According to described encrypted instruction, use described encryption key that described file destination is encrypted.
Method the most according to claim 4, it is characterised in that:
Content according to described file destination generates encryption key, including:
Given content in content according to described file destination generates encryption key.
6. the device of a file decryption, it is characterised in that described device includes:
Deciphering data acquisition module, for receiving the solution ciphertext data of input;
Whether deciphering module, comprise described solution ciphertext data in the content judging file destination;
The most described file destination is decrypted.
Device the most according to claim 6, it is characterised in that
Described decrypted data packet includes word or speech data;
Described deciphering module, if including word for described decrypted data packet, then judges the literary composition of described file destination Whether this content comprises described word;If described decrypted data packet includes speech data, then by described voice number According to being converted to word, it is judged that whether the content of text of described file destination comprises the word after conversion, or When described file destination is voice, it is judged that whether described voice comprises described speech data.
Device the most according to claim 6, it is characterised in that
Described deciphering module is for judging whether comprise described solution in the given content in described file destination content Ciphertext data.
9. a device for file encryption, including:
File acquisition module, for obtaining the file destination needing encryption;
Encrypted instruction acquisition module, for receiving the encrypted instruction to described file destination;
Encryption key generation module, generates encryption key for the content according to described file destination;
Encrypting module, for according to described encrypted instruction, uses described encryption key to enter described file destination Row encryption.
Device the most according to claim 9, it is characterised in that: encryption key generation module is additionally operable to Given content in content according to described file destination generates encryption key.
CN201610362992.1A 2016-05-26 2016-05-26 Method and device for file encryption and decryption Pending CN106022147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610362992.1A CN106022147A (en) 2016-05-26 2016-05-26 Method and device for file encryption and decryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610362992.1A CN106022147A (en) 2016-05-26 2016-05-26 Method and device for file encryption and decryption

Publications (1)

Publication Number Publication Date
CN106022147A true CN106022147A (en) 2016-10-12

Family

ID=57094828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610362992.1A Pending CN106022147A (en) 2016-05-26 2016-05-26 Method and device for file encryption and decryption

Country Status (1)

Country Link
CN (1) CN106022147A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106788995A (en) * 2016-12-07 2017-05-31 武汉斗鱼网络科技有限公司 File encrypting method and device
CN111767529A (en) * 2020-05-18 2020-10-13 广州视源电子科技股份有限公司 File encryption method, file decryption method, storage medium and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013053079A1 (en) * 2011-10-10 2013-04-18 厦门简帛信息科技有限公司 Digital file encryption method
CN103500294A (en) * 2013-09-23 2014-01-08 北京荣之联科技股份有限公司 Document encrypting and decrypting method and device
CN104794408A (en) * 2015-04-27 2015-07-22 上海青橙实业有限公司 File encryption method and terminal system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013053079A1 (en) * 2011-10-10 2013-04-18 厦门简帛信息科技有限公司 Digital file encryption method
CN103500294A (en) * 2013-09-23 2014-01-08 北京荣之联科技股份有限公司 Document encrypting and decrypting method and device
CN104794408A (en) * 2015-04-27 2015-07-22 上海青橙实业有限公司 File encryption method and terminal system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106788995A (en) * 2016-12-07 2017-05-31 武汉斗鱼网络科技有限公司 File encrypting method and device
CN111767529A (en) * 2020-05-18 2020-10-13 广州视源电子科技股份有限公司 File encryption method, file decryption method, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US11070530B2 (en) System and method for authenticating users
US11706033B2 (en) Secure distributed information system
CN106788995B (en) File encryption method and device
US8578473B2 (en) Systems and methods for information security using one-time pad
CN108769027B (en) Secure communication method, device, mobile terminal and storage medium
WO2016045469A1 (en) Information encryption method and mobile terminal
US20060294391A1 (en) Data encryption and decryption method
KR20170009933A (en) Fingerprint decryption method and device
CN101685425A (en) Mobile storage device and method of encrypting same
CN1973269A (en) Information acquisition device, information acquisition method, and information acquisition program
US20160314720A1 (en) Information encryption system and information encryption method using optical character recognition
CN106685897B (en) Safe input method, device and system
WO2020181818A1 (en) Encryption and decryption method for electronic file and device
CN106022147A (en) Method and device for file encryption and decryption
JP2012043242A (en) Encryption document forming apparatus and encryption document forming program
US8473516B2 (en) Computer storage apparatus for multi-tiered data security
CN114338156A (en) Data processing method, device and storage medium
CN113672886A (en) Prompting method and device
US8213601B2 (en) Font level encryption method and apparatus
CN110830252A (en) Data encryption method, device, equipment and storage medium
CN104580255A (en) Terminal equipment authentication method and terminal equipment authentication system based on identification equipment capable of identifying code streams
Alatawi et al. Exploring Encrypted Keyboards to Defeat Client-Side Scanning in End-to-End Encryption Systems
CN103632077A (en) Mobile terminal protection method and system and mobile terminal
KR101289969B1 (en) Apparatus and method for processing authentication
CN101834721A (en) Data encryption and decryption method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161012

RJ01 Rejection of invention patent application after publication