Summary of the invention
In view of this, the invention provides a kind of encipher-decipher method and device, electronic equipment, it is low that purpose is to solve the fail safe of existing encryption method, thereby cause the problem of password easy crack.
A kind of encryption method comprises:
Receive user's encrypted instruction, comprise the cipher symbol and the operation information of described user preset in the described encrypted instruction;
When the described operation information of identification is grouping information, described cipher symbol is divided into groups by group character;
Cipher symbol after the stores packets is with the password of setting as described user.
A kind of decryption method comprises:
Receive user's decryption instructions, comprise the cipher symbol and the operation information of described user preset in the described decryption instructions;
When the described operation information of identification is grouping information, described cipher symbol is divided into groups by group character;
Judge whether the key that the cipher symbol after the described grouping forms is identical with preset password, if identical, then finishes deciphering.
A kind of encryption device comprises:
Receiving element is used to receive user's encrypted instruction, comprises the cipher symbol and the operation information of described user preset in the described encrypted instruction;
Grouped element is used for by group character described cipher symbol being divided into groups when the described operation information of identification is grouping information;
The password memory cell is used for the cipher symbol after the stores packets, with the password of setting as described user.
A kind of decryption device comprises:
Receiving element is used to receive user's decryption instructions, comprises the cipher symbol and the operation information of described user preset in the described decryption instructions;
Grouped element is used for by group character described cipher symbol being divided into groups when the described operation information of identification is grouping information;
Judging unit is used to judge whether the key that the cipher symbol after the grouping forms is identical with preset password;
Tip element is used for when described key is identical with preset password, and the prompting deciphering is finished.
A kind of electronic equipment comprises:
The command reception device is used to receive user's encrypted instruction, comprises the cipher symbol and the operation information of described user preset in the described encrypted instruction;
Processor is used for by group character described cipher symbol being divided into groups when the described operation information of identification is grouping information, and the cipher symbol after the stores packets, with the password of setting as described user.
A kind of electronic equipment comprises:
The command reception device is used to receive user's decryption instructions, comprises the cipher symbol and the operation information of described user preset in the described decryption instructions;
Processor, be used for when the described operation information of identification is grouping information, described cipher symbol being divided into groups, and judge whether the key of the cipher symbol composition after the grouping is identical with preset password by group character, when described key was identical with preset password, the prompting deciphering was finished.
Encipher-decipher method that the embodiment of the invention provides and device, electronic equipment, operation information by the identification user, when this operation information of identification is grouping information, by group character cipher symbol is divided into groups, to realize with the part of user's operation as password, with traditional only symbol being compared as the encryption method of password, improved the fail safe of password.
Embodiment
Encryption method disclosed by the invention, decryption method and corresponding device and electronic equipment thereof, not only can be with traditional symbol (comprising numeral and/or character) as password, mode of operation is also as password during also with user's output password, promptly from user's operation, extract characteristic of correspondence, described feature and symbol jointly as password or key, are encrypted or deciphering to finish.
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
A kind of encryption method disclosed by the invention as shown in Figure 1, comprises step:
S101: receive user's encrypted instruction, comprise the cipher symbol and the operation information of user preset in the described encrypted instruction;
Wherein, encrypted instruction is meant the content that the user imports in the predetermined operations mode for setting code, comprises the cipher symbol of user preset and user's operation information.Described cipher symbol can be character or numeral, also can be the combination of character and numeral.
Described operation information is meant with the user imports the corresponding information of mode of operation that cipher symbol adopts, and for example imports the time interval of adjacent cipher symbol etc.
S102: when the described operation information of identification is grouping information, described cipher symbol is divided into groups by group character;
Grouping information is to be used for information that cipher symbol is divided into groups, when operation information when being user's time difference of importing two adjacent cipher symbols greater than default time difference, what described operation information embodied is the intention that the user divides into groups cipher symbol, be about to this operation information and be identified as grouping information, for example, the user was input 1234 o'clock, default time difference can be made as 5 seconds, certainly, the embodiment of the invention does not limit default time difference, if the difference of time of importing 2 time and input 3 was greater than 5 seconds, think that then the user is divided into different groups with 2 and 3 intentionally, be that the password that the user will set can be 12 34, rather than be provided with in traditional encryption 1234.At this moment, then with 2 with 3 minutes in different groups.In the present embodiment, can between 12 and 34, separate grouping by group character.In the present embodiment, this group character can be space symbol.
When operation information when being user's time difference of importing two adjacent cipher symbols less than default time difference, what described operation information embodied is the intention that the user divides into groups cipher symbol, be about to this operation information and be identified as grouping information, default time difference can be made as 1 second, certainly, the embodiment of the invention does not limit default time difference, if the user imported for 2 and 3 time less than 1 second, think that then the user has a mind to be divided in same group with 2 and 3, promptly the password that will set of user may be 1234.At this moment, then with 2 and 3 minutes in same group.In the present embodiment, can between 1 and 23, separate grouping by a group character, and between 23 and 4, separate grouping by another group character again.In the present embodiment, these two group characters can be space symbol.
When operation information is that the content except that cipher symbol imported of user is for example during default separation signals such as image, voice, what described operation information embodied is the intention that the user divides into groups cipher symbol, be about to this operation information and be identified as grouping information, again for example, the user is in gesture of drawing colluding of input 1 back input, password in input 2 back inputs one " good ", at image of thumbing up of input 3 back inputs, to show that the user is divided in the different groups 1234, the password of She Dinging is 12 34 so, rather than 1234.In the present embodiment, can between 1 and 2, separate grouping, and between 2 and 3, separate grouping, and between 3 and 4, separate grouping by the 3rd group character by second group character by first group character.In the present embodiment, these three group characters can be space symbol.
Simultaneously, when operation information be the user import with described cipher symbol be starting point slidingly input signal the time, described operation information embodies be with described cipher symbol be starting point slidingly input the grouping intention of signal as the user, be about to this operation information and be identified as grouping information, same what slide out is on the line segment or curved section of starting point with the cipher symbol as long as cipher symbol is positioned at, and represents that then the user is divided into same group with it.For example, the user from the dummy keyboard 1 slide into 3 after, click 4 again, then representative of consumer wishes that the password of setting is 123 4.Here limiting starting point is cipher symbol, is in order to draw with above-mentioned user the input gesture of colluding to be distinguished mutually.In the present embodiment, can between 123 and 4, separate grouping by a group character.In the present embodiment, this group character can be space symbol.
S103: the cipher symbol after the stores packets, with the password of setting as described user.
In the present embodiment, the cipher symbol after the grouping comprises cipher symbol and group character.In the present embodiment, cipher symbol after can will dividing into groups according to the order of cipher symbol input is stored, for example ought receive the user and import cipher symbol 1234, determine with 2 with 3 minutes in different groups the time, can adopt following storage mode: 12 34, wherein 1234 store for cipher symbol, and the stored packet sign is 2 and 3 middle space symbols, promptly the space symbol in the middle of 2 and 3 is stored in storage 12 earlier again, stores 34 again.
Above-mentioned only is easier storage mode, except representing the class interval with the space, also can be with representing for his symbol or mode, but present embodiment is not limited thereto.
The disclosed a kind of encryption method of present embodiment, operation information by the identification user, when this operation information of identification is grouping information, by group character cipher symbol is divided into groups, to realize with the part of user's operation as password, with traditional only symbol being compared as the encryption method of password, improved the fail safe of password.
A kind of decryption method disclosed by the invention as shown in Figure 2, comprises step:
S201: receive user's decryption instructions, comprise the cipher symbol and the operation information of user preset in the described decryption instructions;
Decryption instructions refers to that the user is used to decipher and the input content of carrying out comprises the cipher symbol of user preset and user's operation information etc.
S202: when the described operation information of identification is grouping information, described cipher symbol is divided into groups by group character;
Same as the previously described embodiments, described grouping information is meant the information in order to operation correspondence that cipher symbol is divided into groups of user preset, can also can be other input content except that cipher symbol for importing the time difference of adjacent cipher symbol, for example image, voice etc. repeat no more here.
S203: whether the key of judging the cipher symbol composition after dividing into groups is identical with preset password, if identical, then finishes deciphering, if different, then the prompting deciphering is failed.
Wherein, the method for storing of the cipher symbol after will dividing into groups in the method for forming key of the cipher symbol after the grouping and the foregoing description is identical.
Judge whether identical method can have for key and preset password: first, judge whether the cipher symbol in the key is identical with cipher symbol in the preset password, as inequality, needn't judge then whether the grouping of cipher symbol is identical again, then directly prompting deciphering failure, if identical, continue then to judge whether key is identical with packet mode in the preset password, if identical, then finish deciphering, enter the interface after the deciphering, if different, then same prompting deciphering failure; Second, earlier judge whether key is identical with each grouping in the preset password, whether the figure place of for example judging the cipher symbol in each grouping is identical, if different, then prompting failure, if it is identical, judge again whether the cipher symbol in each grouping is identical,, enter the interface after the deciphering as identical then successful decryption, as difference, then prompting deciphering failure; The 3rd, judge the key of storage and the cipher symbol in the preset password by turn, for example, as previously mentioned, preset password is 1234, and the key of user's input is 1234, both can be compared by turn, and 12 is identical, but next the space in the preset password, and next be 3 in the key, so both differences are prompting deciphering failure.
The disclosed decryption method of the embodiment of the invention, not only accept the cipher symbol of user's input, also the operation information according to the user divides into groups cipher symbol, cipher symbol after the grouping is formed key to be decrypted, use jointly with above-mentioned encryption method, not only improved the complexity of password greatly, also improved the difficulty of deciphering simultaneously, thereby made password safer.
A kind of encryption device disclosed by the invention as shown in Figure 3, comprising:
Receivingelement 301 is used to receive user's encrypted instruction, and described encrypted instruction comprises the cipher symbol and the operation information of described user preset;
Receivingelement 301 can be keyboard or touch display screen, be used for receiving user's the cipher symbol of input or other signal or the operation information of encrypted instruction, can also be voice collecting unit and/or image acquisition units, be used for gathering other signal or the operation information of encrypted instruction except that cipher symbol.
Wherein, touch display screen can show that dummy keyboard supplies the user to import cipher symbol, and the input mode that offers the user can also can for example slide into 2 from 1 for slidingly inputing for clicking input.
Groupedelement 302 is used for by group character described cipher symbol being divided into groups when the described operation information of identification is grouping information;
Wherein grouping information can be the slip gesture of being obtained by touch display screen, also can be the voice signal of being gathered by the voice collecting unit, and perhaps for to obtain picture signal by image acquisition units, it all is used for cipher symbol is divided into groups.
In the present embodiment, as shown in Figure 4, receiving element can for:
Time ofreception record subelement 401 is used to write down the time that described receiving element receives described cipher symbol, promptly receives the concrete time of each cipher symbol;
The grouped element corresponding with receiving element comprises:
Computation subunit 402 is used to calculate the difference of the time of reception of adjacent two cipher symbols;
Recognin unit 403 is used to judge whether described difference is identical with default value, if described difference is greater than or less than default value, then discerning described difference is described grouping information;
Divide subelement 404, be used for when 403 identifications described difference in recognin unit is described grouping information, described cipher symbol being divided into different groups by group character.
The structure of above-mentioned receiving element and grouped element is applicable to that grouping information is the situation that is greater than or less than time difference of adjacent two cipher symbols default time difference, when grouping information is the separation signals of presetting, as shown in Figure 5, described receiving element also can be for comprising following subelement:
Signal obtainssubelement 501, is used for obtaining the signal of described encrypted instruction except that described cipher symbol;
Dui Ying grouped element comprises with it:recognin unit 502, be default separation signals if be used for described signal, and then discerning described separation signals is grouping information;
Divide subelement 503, be used for when 502 identifications described separation signals in recognin unit is grouping information, described cipher symbol being divided into different groups by group character.
Perhaps as shown in Figure 6, receiving element comprises:
Slip signals receivessubelement 601, and being used to detect with described cipher symbol is the signal that slidingly inputs of starting point;
Grouped element comprises:
Detection sub-unit 602 is used to detect whether the slip signals that described receiving element receives is to be the signal that slidingly inputs of starting point with described cipher symbol;
Recognin unit 603, if be used for that described receiving element receives slidingly input signal for being the signal that slidingly inputs of starting point with described cipher symbol, then it is identified as grouping information;
Divide subelement 604, be used for whenrecognin unit 603 is identified as grouping information, described cipher symbol being divided into different groups by group character.
Certainly, can discern above-mentioned three kinds of grouping informations simultaneously in order to satisfy, described receiving element can also comprise above-mentioned time of reception record subelement simultaneously, signal obtains subelement and slip signals receives subelement, grouped element can comprise computation subunit simultaneously, detection sub-unit and recognin unit, if the recognin unit of this moment is used for described difference greater than default value, then discern described difference as grouping information, if and described signal is default separation signals, then discerning described separation signals is grouping information, slidingly input signal if detect, then discerning the described signal that slidingly inputs is grouping information.
Password memory cell 303 is used for the cipher symbol after the stores packets, with the password of setting as described user.
Wherein, as shown in Figure 7, the password memory cell can comprise:
Ordering subelement 701 is used for described cipher symbol is stored according to the sequencing of input;
Subelement 702 is inserted in group character, is used for inserting group character between different groupings.
The described encryption device of present embodiment divides into groups cipher symbol by the operating characteristics according to user preset, has improved the fail safe of password.
The present invention also discloses a kind of decryption device, as shown in Figure 8, comprising:
Receivingelement 801 is used to receive user's decryption instructions, comprises the cipher symbol and the operation information of described user preset in the described decryption instructions;
Groupedelement 802 is used for by group character described cipher symbol being divided into groups when the described operation information of identification is grouping information;
Wherein receiving element and grouped element all with above-mentioned encryption device embodiment in receivingelement 301 identical with groupedelement 302, repeat no more here.
Judgingunit 803 is used to judge whether the key that the cipher symbol after the grouping forms is identical with preset password;
Wherein the method for Pan Duaning is identical with determination methods among the above-mentioned decryption method embodiment, repeats no more here.
Tip element 804, if it is identical with preset password to be used for described key, then the prompting deciphering is finished, if inequality, then prompting deciphering failure.
The described decryption device of present embodiment, the unit that has not only comprised the cipher symbol of accepting user's input, comprised that operation according to the user with the grouped element that cipher symbol divides into groups, makes that user's decrypting process is more complicated, thereby improved the difficulty of deciphering.Be used with above-mentioned encryption device, improved the fail safe of encryption and decryption greatly.
The invention also discloses a kind of electronic equipment, as shown in Figure 9, comprising:
Command reception device 901 is used to receive user's encrypted instruction, comprises the cipher symbol and the operation information of user preset in the described encrypted instruction;
Wherein, the command reception device can comprise: physical keyboard or touch display screen or voice collecting unit or image acquisition units also can comprise wherein two or more combination.Physical keyboard is used for receiving the cipher symbol of encrypted instruction, touch display screen is used for receiving the cipher symbol of encrypted instruction, or hand signal, for example 1234 of user input or on described touch display screen curtain, draw gesture to colluding, the voice collecting unit is used to receive the voice signal of user's input, and image acquisition units user gathers the image of user's input or with image format collection user's gesture.
Processor 902 is used for by group character described cipher symbol being divided into groups when the described operation information of identification is grouping information, and the cipher symbol after the stores packets, with the password of setting as described user.
Need to prove that processor can aim to encrypt separately and be provided with, and also can be the processor that is used for other function in the electronic equipment,, and make it possess above-mentioned functions just in order to realize encryption of the present invention.
The user is when using this electronic equipment to encrypt, can import cipher symbol in default mode, for example, can import 12 back pauses and import 34 again in 5 seconds, also can in the input cipher symbol, import default separation signals, for example say " good " in input 12 backs.
Also disclosed another electronic equipment of the present invention comprises:
The command reception device is used to receive user's decryption instructions, comprises the cipher symbol of described user preset in the described decryption instructions;
Identical with above-mentionedcommand reception device 901.
Processor, be used for when the described operation information of identification is grouping information, by group character described cipher symbol is divided into groups, and whether the key of judging the cipher symbol composition after the grouping is identical with preset password, if it is identical, then the prompting deciphering is finished, if inequality, then prompting deciphering failure.
Equally, processor can be provided with separately for deciphering, also can be so that the original processor of electronic equipment possesses above-mentioned decipher function.
Above-mentioned electronic equipment can also can be independent electronic password lock for computer with encrypting and decrypting function, mobile communication terminal, Pad etc.
The described electronic equipment of the embodiment of the invention, receive the encryption or the decryption instructions of user's input by receiving system, by processor will encrypt or decryption instructions in user's operating characteristics extract, be used for encrypting or deciphering, make encryption and decryption no longer be confined to cipher symbol, the operating characteristics that also comprises the user has improved the difficulty of the fail safe and the deciphering of password.
Each embodiment adopts the mode of going forward one by one to describe in this specification, and what each embodiment stressed all is and the difference of other embodiment that same or similar part is mutually referring to getting final product between each embodiment.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be conspicuous concerning those skilled in the art, and defined herein General Principle can realize under the situation that does not break away from the spirit or scope of the present invention in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet and principle disclosed herein and features of novelty the wideest corresponding to scope.