CN106549756B - A kind of method and device of encryption - Google Patents

A kind of method and device of encryption Download PDF

Info

Publication number
CN106549756B
CN106549756B CN201510603328.7A CN201510603328A CN106549756B CN 106549756 B CN106549756 B CN 106549756B CN 201510603328 A CN201510603328 A CN 201510603328A CN 106549756 B CN106549756 B CN 106549756B
Authority
CN
China
Prior art keywords
character
string
encrypted
ciphertext
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510603328.7A
Other languages
Chinese (zh)
Other versions
CN106549756A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510603328.7A priority Critical patent/CN106549756B/en
Publication of CN106549756A publication Critical patent/CN106549756A/en
Application granted granted Critical
Publication of CN106549756B publication Critical patent/CN106549756B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The embodiment of the present application provides a kind of method and device of encryption, to solve the problems, such as that cipher mode in the prior art can reduce the safety of the standard cipher of preservation.This method encrypts the plaintext string of acquisition using at least two Encryption Algorithm, obtain corresponding at least two ciphertexts character string, character is intercepted in every kind of obtained ciphertext character string respectively, and according to the character being truncated to, obtains the encrypted result encrypted to the plaintext string.It include the ciphertext character string that different Encryption Algorithm are encrypted by encrypted result obtained by the above method, and the ciphertext character string for being included not is complete ciphertext character string, but the incomplete character string that interception obtains, for the complete ciphertext character string obtained after being encrypted by single Encryption Algorithm, encrypted result can be effectively prevent to compare attack by collision attack, brute force attack or rainbow table to be cracked, to improve the safety of encrypted result.

Description

A kind of method and device of encryption
Technical field
This application involves field of computer technology more particularly to a kind of method and devices of encryption.
Background technique
With the fast development of information age, such as personal computer (Personal Computer, PC), smart phone, The terminals such as tablet computer can provide more and more conveniences for user, and information security also gradually has become in order to which people are more closed The emphasis of note.
Verification is a kind of conventional means to ensure information security, major way are as follows: presets standard cipher, and by end End or server save standard cipher, and when verification, user inputs password to be certified, terminal or server then compare standard cipher and Password to be certified, if the two is consistent, verification passes through, and otherwise, verification does not pass through.
In order to guarantee the safety of the standard cipher saved in terminal or server, in the prior art, password is saved Mode is to save ciphertext password via saving clear-text passwords and evolving, and method is: presetting standard cipher (standard cipher For clear-text passwords), terminal or server encrypt the standard cipher using certain preset irreversible encryption algorithm, obtain Standard ciphertext password saves the standard ciphertext password, and in verification, user inputs password (password to be certified to be certified It is clear-text passwords), terminal or server encrypt the password to be certified using the same irreversible encryption algorithm, obtain Ciphertext password to be certified, then the standard ciphertext password and ciphertext password to be certified of preservation are compared, if the two is consistent, verification is logical It crosses, otherwise verifies and do not pass through.
Due to the ciphertext password saved in terminal or server be by irreversible encryption algorithm for encryption, pass through Ciphertext password can not restore clear-text passwords, can effectively improve the safety for saving standard cipher.But in the prior art eventually End when being encrypted to obtain ciphertext password to preset standard cipher (clear-text passwords), often only with a kind of Encryption Algorithm into Row encryption, and encryption is only carried out by a kind of ciphertext password and is easy to compare attack by collision attack, brute force attack or rainbow table It cracks, therefore, cipher mode in the prior art can reduce the safety of the standard cipher of preservation.
Summary of the invention
The embodiment of the present application provides a kind of method and device of encryption, can drop to solve cipher mode in the prior art The problem of safety for the standard cipher that minimum living is deposited.
A kind of method of encryption provided by the embodiments of the present application, comprising:
Obtain plaintext string;
The plaintext string is encrypted using at least two Encryption Algorithm, obtains corresponding at least two ciphertexts word Symbol string;
Character is intercepted in every kind of obtained ciphertext character string respectively;
According to the character being truncated to, the encrypted result encrypted to the plaintext string is obtained.
A kind of device of encryption provided by the embodiments of the present application, comprising:
Module is obtained, for obtaining plaintext string;
Encrypting module is obtained corresponding for being encrypted using at least two Encryption Algorithm to the plaintext string At least two ciphertext character strings;
Interception module, for intercepting character in every kind of obtained ciphertext character string respectively;
Encrypted result obtains module, for what is encrypted according to the character being truncated to, acquisition to the plaintext string Encrypted result.
The embodiment of the present application provides a kind of method and device of encryption, and this method is to the plaintext string of acquisition using at least Two kinds of Encryption Algorithm are encrypted, and corresponding at least two ciphertexts character string is obtained, respectively in every kind of obtained ciphertext character string Upper interception character, and according to the character being truncated to, obtain the encrypted result encrypted to the plaintext string.By above-mentioned The ciphertext character string that the encrypted result that method obtains is encrypted comprising different Encryption Algorithm, and the ciphertext word for being included Symbol string is not complete ciphertext character string, but the incomplete character string that interception obtains, relative to passing through single Encryption Algorithm For the complete ciphertext character string obtained after being encrypted, encrypted result can be effectively prevent by collision attack, brute force attack or coloured silk Rainbow table compares attack and is cracked, to improve the safety of encrypted result.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the process of encryption provided by the embodiments of the present application;
Fig. 2 is that encryption device provided by the embodiments of the present application intercepts character in every kind of obtained ciphertext character string respectively Schematic diagram;
Fig. 3 is the structural schematic diagram of encryption device provided by the embodiments of the present application;
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Fig. 1 is the process of encryption provided by the embodiments of the present application, specifically includes the following steps:
S101: plaintext string is obtained.
In the embodiment of the present application, encryption device obtains the plaintext string to be encrypted first.Specifically, encryption device can The character string for determining user's input, as the plaintext string to be encrypted got.Wherein, user can be defeated when password is arranged Enter plaintext string, then the plaintext string can be described as standard plaintext string, and user can also input plaintext character in verification String, then the plaintext string can be described as plaintext string to be certified.The encryption device can be terminal, can also service Device.
S102: the plaintext string is encrypted using at least two Encryption Algorithm, obtains corresponding at least two Ciphertext character string.
After encryption device gets plaintext string, at least two can be selected from the multiple encryption algorithms pre-saved Kind Encryption Algorithm, and the plaintext string is encrypted using at least two Encryption Algorithm selected, it obtains accordingly extremely Few two kinds of ciphertext character strings.
Wherein, used at least two Encryption Algorithm can be randomly chooses in the multiple encryption algorithms pre-saved Out.The multiple encryption algorithms pre-saved may include such as the 5th edition (Mes sage-Digest of message digest algorithm Algorithm 5, MD5), Secure Hash Algorithm 1 (Secure Hash Algorithm 1, SHA1) and safe gibberish mark Encryption Algorithm such as quasi- (Secure Hash Standard, SHS).For example, it is assumed that the plaintext string that encryption device obtains is " drami890 " randomly selects the two different Encryption Algorithm of MD5 and SHA1, then in the multiple encryption algorithms pre-saved Plaintext string " drami890 " can be encrypted by the md5 encryption algorithm of selection, obtain ciphertext character string " woeijoc123s oijesoiej333gienpmxde ", by the SHA1 Encryption Algorithm of selection to plaintext string " drami890 " is encrypted, and is obtained ciphertext character string " xxifmeng3255die5234fecj7hntu9dqafh ", is being obtained After different ciphertext character strings, encryption device will be handled different ciphertext character strings.
S103: character is intercepted in every kind of obtained ciphertext character string respectively.
After obtaining different ciphertext character strings, encryption device will intercept character in each ciphertext character string, for passing through For every kind of ciphertext character string that different Encryption Algorithm obtains, the character of interception is not complete ciphertext character string, that is, When being intercepted for a kind of ciphertext character string, the partial character in the ciphertext character string is only intercepted.
Specifically, when intercepting character in each ciphertext character string, it is random greater than 0 can first to generate several for encryption device Number, further according to each random number of generation, intercepts character in every kind of obtained ciphertext character string respectively.Further, in basis When random number intercepts character, it can be directed to each random number, select one kind at least two obtained ciphertext character strings, then from choosing Character is intercepted in the ciphertext character string selected at random, the quantity of the character of interception is exactly the random number.
In order to guarantee only to intercept each of a part of character, encryption device generation in a ciphertext character string in interception Random number is smaller than the minimum value in the digit of at least two ciphertexts character string.
Continue to use the example above, the plaintext string " drami890 " that will acquire obtains after being encrypted by Encryption Algorithm MD5 Digit to ciphertext character string is 32, and the digit that ciphertext character string is obtained after being encrypted by SHA1 is 34, close at the two In text character string, the smallest digit is 32, then when generating random number, in addition to guaranteeing to be greater than 0, is also less than 32.That is, generate The maximum value that random number can be got is 31, since the random number of generation can not be got identical as ciphertext character string digit or be greater than close The numerical value of text character string digit, so, according to each random number is generated, intercepted respectively in every kind of obtained ciphertext character string When, it can not be truncated to a complete ciphertext character string, a part of character can only be intercepted in every kind of ciphertext character string.
It is also unsuitable too long since the digit for the encrypted result finally to be obtained is unsuitable too short in practical application scene, because This, encryption device can be before intercepting character, the digit of the determination encrypted result to be obtained.
Specifically, encryption device can according at least two obtained ciphertext character strings, the determination encrypted result to be obtained Digit, also, in order to guarantee a part of character for containing only each ciphertext character string in finally obtained encrypted result, encryption dress The digit for setting the determining encrypted result to be obtained is smaller than the sum of the digit of at least two ciphertexts character string.In addition, encryption Device is after the digit that the encrypted result to be obtained has been determined, when intercepting character, the sum of each random number of generation also will with it is true The digit of the fixed encrypted result to be obtained is equal.
Continue to use the example above, the plaintext string " drami890 " that will acquire passes through two kinds of Encryption Algorithm of MD5 and SHA1 point Two kinds of ciphertext character strings are obtained after not encrypted, the sum of digit of both ciphertext character strings is 66, then encryption device is true When the digit for the encrypted result to be obtained surely, identified digit is less than the sum of two kinds of ciphertext character strings 66.Assuming that determining The digit for the encrypted result to be obtained is 46, then the sum of each random number generated is also equal to 46.Assuming that generating 3 altogether at random Number, respectively 8,22,16 are that 3 random numbers are added and be 46, and this 3 random numbers are all larger than 0, and less than two ciphertexts Minimum value 32 in the digit of character string.
After generating each random number, encryption device can then be directed to each random number, at least two obtained ciphertext characters One kind is selected in string, character is arbitrarily intercepted from the ciphertext character string of selection, and the quantity of the character of interception is the number of the random number Value, as shown in Figure 2.
Fig. 2 is that encryption device provided by the embodiments of the present application intercepts character in every kind of obtained ciphertext character string respectively Schematic diagram.
In Fig. 2, the plaintext string " drami890 " that will acquire is added respectively by two kinds of Encryption Algorithm of MD5 and SHA1 Two kinds of ciphertext character strings as shown in Figure 2 are obtained after close, after obtaining two kinds of ciphertext character strings, encryption device is determined to obtain The digit of encrypted result be 46, and when carrying out interception character, generate 3 random numbers respectively: 8,22,16.
As shown in Fig. 2, being directed to random number 8, it is assumed that after the ciphertext character string selected is is encrypted by md5 encryption algorithm " woeijoc1 " obtained ciphertext character string then intercepts preceding 8 characters, i.e., in the ciphertext character string.
Similar, for random number 22, it is assumed that after the ciphertext character string selected is is encrypted by SHA1 Encryption Algorithm Obtained ciphertext character string then intercepts preceding 22 characters, i.e. " xxi in the ciphertext character string fmeng3255die5234fec";For random number 16, it is assumed that the ciphertext character string selected is is added by md5 encryption algorithm The ciphertext character string obtained after close, then 16 characters, i.e. " oiej333gienpmxde " after being intercepted in the ciphertext character string.
In above-mentioned interception way, the character of interception is not required for being one section of continuous character in ciphertext character string, The character of identical quantity can also be intercepted at random in corresponding ciphertext character string according to the numerical value of random number.
S104: according to the character being truncated to, the encrypted result encrypted to the plaintext string is obtained.
Encryption device is after S103 is truncated to character from each ciphertext character string through the above steps, the character that can will be truncated to It is combined, combined result is as the encrypted result encrypted to the plaintext string obtained.
Continue to use the example above, the 3 sections of characters intercepted in each ciphertext character string respectively are combined, combined result is obtained " woeijoc1xxifmeng3255die5234fecoiej333gienpmxde ", and using the combined result as to the bright of acquisition The encrypted result that text character string " drami890 " obtains after being encrypted.
It should be noted that the mode that the character being truncated to is combined is not unique, when being combined, can will cut Each character taken carries out random combine, to obtain the encrypted result for encrypting plaintext string.
Pass through the ciphertext word in encrypted result obtained by the above method comprising being encrypted by different Encryption Algorithm Symbol string, and the ciphertext character string for being included not is complete ciphertext character string, but the incomplete character string that interception obtains, For the complete ciphertext character string obtained after being encrypted by single Encryption Algorithm, encrypted result quilt can be effectively prevent Collision attack, brute force attack or rainbow table compare attack and are cracked, to improve the safety of encrypted result.
Lower mask body carries out specifically so that plaintext string is standard plaintext string and plaintext string to be certified as an example It is bright.
In the scene of setting password, the plaintext string of user's input can be described as standard plaintext string, then encrypts dress It sets after being encrypted to the standard plaintext string by method as shown in Figure 1 and obtain encrypted result, which can be tied Fruit saves as standard ciphertext result, and saves at least two encryptions used when encrypting to the standard plaintext string and calculate Method saves the used interception way when intercepting character in every kind of ciphertext character string respectively, in case subsequent authentication uses.
In the scene of cipher authentication, the plaintext string of user's input can be described as plaintext string to be certified, then logical When crossing method as shown in Figure 1 and being encrypted to the plaintext string to be certified, in step s 102, encryption device can be used with Corresponding at least two Encryption Algorithm of standard ciphertext result pre-saved, encrypts the plaintext string to be certified, In In step S103, interception way corresponding with the standard ciphertext result pre-saved can be used in encryption device, is obtaining respectively Character is intercepted in every kind of ciphertext character string.Subsequent, encryption device is obtained according to the character being truncated to the plaintext word to be certified It, can be using the encrypted result of acquisition as ciphertext to be certified as a result, and judging to be somebody's turn to do wait recognize after the encrypted result that symbol string is encrypted Whether card ciphertext result and the standard ciphertext result pre-saved are identical, if so, verification passes through, otherwise, verification does not pass through.
For example, user when login password is arranged, inputs one section of plaintext string " ljq123bbb ", encryption device then will The plaintext string is as standard plaintext string.Encryption device will carry out it after receiving the standard plaintext string Encryption, wherein encryption device randomly selects two kinds of Encryption Algorithm of MD5 and SHS to this from the multiple encryption algorithms pre-saved Standard plaintext string is encrypted, and respectively obtains corresponding two kinds of ciphertext character strings, and generates 3 random numbers: 12,7,14, For random number 12, selection intercepts preceding 12 characters in the ciphertext character string encrypted by SHS Encryption Algorithm;Needle To random number 7, selection intercepts preceding 7 characters in the ciphertext character string encrypted by md5 encryption algorithm;For with Machine number 14,14 characters after selection intercepts in the ciphertext character string encrypted by md5 encryption algorithm, will intercept To character be combined according to the sequence (that is, 12,7,14) of above-mentioned 3 random numbers, obtained ciphertext character string be standard it is close Text as a result, and the standard ciphertext result is stored in encryption device, meanwhile, encryption device will also be saved to the standard plaintext word Symbol string carries out encrypting used Encryption Algorithm, i.e. two kinds of Encryption Algorithm of MD5 and SHS;Save above-mentioned 3 random numbers 12,7,14 And according to this 3 random numbers, used interception way when character is intercepted in above two ciphertext character string respectively;It protects Deposit the mode for being combined the character that interception obtains.
And when user is when logging in, then it needs through certification, i.e. user inputs one section of plaintext string, encryption device Then using the plaintext string as plaintext string to be certified, encryption device, will when receiving the plaintext string to be certified The plaintext string to be certified is encrypted, wherein encryption device is added using corresponding with the above-mentioned standard ciphertext result of preservation Close algorithm encrypts the plaintext string to be certified, i.e., is encrypted using two kinds of Encryption Algorithm of MD5 and SHS, respectively To two kinds of ciphertext character strings;Encryption device using 3 random numbers corresponding with the above-mentioned standard ciphertext result of preservation (i.e. 12,7, 14) character, is intercepted in above two ciphertext character string respectively, when interception, what is encrypted by SHS Encryption Algorithm Preceding 12 characters are intercepted in ciphertext character string, and preceding 7 are intercepted in the ciphertext character string encrypted by md5 encryption algorithm Position character, 14 characters after being intercepted in the ciphertext character string encrypted by md5 encryption algorithm;Encryption device uses Combination corresponding with the above-mentioned standard ciphertext result of preservation, the character intercepted is combined, that is, presses random number 12, the character being accordingly truncated to is combined by 7,14 collating sequence, and obtained ciphertext character string is ciphertext knot to be certified Fruit.
It is carried out due to being all made of identical encryption method for above-mentioned standard plaintext string and plaintext string to be certified Encryption, therefore, if standard plaintext string is identical with plaintext string to be certified, obtained standard ciphertext result and to Certification ciphertext result must be identical, whereas if standard plaintext string and plaintext character difference to be certified, then obtain Standard ciphertext result is different with ciphertext result to be certified, that is to say, that if standard plaintext string and plaintext character to be certified Go here and there identical, then certification passes through, if standard plaintext string and plaintext character to be certified are different, authenticate and does not pass through.
The above are encryption methods provided by the embodiments of the present application, are based on same thinking, and the embodiment of the present application also provides one The device of kind encryption, as shown in Figure 3.
Fig. 3 is the structural schematic diagram of encryption device provided by the embodiments of the present application, is specifically included:
Module 301 is obtained, for obtaining plaintext string;
Encrypting module 302 is obtained corresponding for being encrypted using at least two Encryption Algorithm to the plaintext string At least two ciphertext character strings;
Interception module 303, for intercepting character in every kind of obtained ciphertext character string respectively;
Encrypted result obtains module 304, according to the character being truncated to, obtains and adds to what the plaintext string was encrypted Close result.
The encrypting module 302 is also used to, and is cut in every kind of obtained ciphertext character string respectively in the interception module 303 Before taking character, according to the obtained at least two ciphertexts character string, the digit of the determination encrypted result to be obtained, wherein The digit of the encrypted result to be obtained is less than the sum of the digit of at least two ciphertexts character string.
The interception module 303 is specifically used for, and generates several random numbers for being greater than 0, according to each random number of generation, divides Character is not intercepted in every kind of obtained ciphertext character string;Wherein, what the sum of each random number of generation to be obtained equal to described in adds The digit of close result, each random number are respectively less than the minimum value in the digit of at least two ciphertexts character string.
The interception module 303 is specifically used for, for each random number, in the obtained at least two ciphertexts character string In select one kind, intercept character at random from the ciphertext character string of selection, the quantity of the character of interception is the random number.
The encrypted result obtains module 304 and is specifically used for, and the character that interception obtains is combined, pair as acquisition The encrypted result that the plaintext string is encrypted.
The plaintext string is standard plaintext string.
Described device further include:
Preserving module 305 for saving the encrypted result as standard ciphertext result, and saves bright to the standard At least two Encryption Algorithm used when text character string is encrypted save respectively when intercepting character in every kind of ciphertext character string Used interception way.
The plaintext string is plaintext string to be certified.
The encrypting module 302 is specifically used for, and adds using with the standard ciphertext result corresponding at least two pre-saved Close algorithm encrypts the plaintext string to be certified.
The interception module 303 is specifically used for, and using interception way corresponding with the standard ciphertext result pre-saved, divides Character is not intercepted in every kind of obtained ciphertext character string.
Described device further include:
Correction verification module 306, the encrypted result for that will obtain is as ciphertext result to be certified;Judge described to be certified Whether ciphertext result and the standard ciphertext result pre-saved are identical;If so, verification passes through;Otherwise, verification does not pass through.
The embodiment of the present application provides a kind of method and device of encryption, and this method is to the plaintext string of acquisition using at least Two kinds of Encryption Algorithm are encrypted, and corresponding at least two ciphertexts character string is obtained, respectively in every kind of obtained ciphertext character string Upper interception character, and according to the character being truncated to, obtain the encrypted result encrypted to the plaintext string.By above-mentioned The ciphertext character string that the encrypted result that method obtains is encrypted comprising different Encryption Algorithm, and the ciphertext word for being included Symbol string is not complete ciphertext character string, but the incomplete character string that interception obtains, relative to passing through single Encryption Algorithm For the complete ciphertext character string obtained after being encrypted, encrypted result can be effectively prevent by collision attack, brute force attack or coloured silk Rainbow table compares attack and is cracked, to improve the safety of encrypted result.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM).Memory is showing for computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (14)

1. a kind of method of encryption characterized by comprising
Obtain plaintext string;
The plaintext string is encrypted using at least two Encryption Algorithm, obtains corresponding at least two ciphertexts character String;
Character is intercepted in every kind of obtained ciphertext character string respectively;
According to the character being truncated to, the encrypted result encrypted to the plaintext string is obtained.
2. the method as described in claim 1, which is characterized in that respectively in every kind of obtained ciphertext character string intercept character it Before, the method also includes:
According to the obtained at least two ciphertexts character string, the digit of the determination encrypted result to be obtained;
Wherein, the digit of the encrypted result to be obtained is less than the sum of the digit of at least two ciphertexts character string.
3. method according to claim 2, which is characterized in that character is intercepted in every kind of obtained ciphertext character string respectively, It specifically includes:
Generate several random numbers for being greater than 0;Wherein, the sum of each random number of generation is equal to the encrypted result to be obtained Digit, each random number are respectively less than the minimum value in the digit of at least two ciphertexts character string;
According to each random number of generation, character is intercepted in every kind of obtained ciphertext character string respectively.
4. method as claimed in claim 3, which is characterized in that close in every kind obtained respectively according to each random number of generation Character is intercepted in text character string, is specifically included:
For each random number, one kind is selected in the obtained at least two ciphertexts character string, from the ciphertext character of selection Character is intercepted in string at random, the quantity of the character of interception is the random number.
5. the method as described in claim 1, which is characterized in that obtain the encryption knot encrypted to the plaintext string Fruit specifically includes:
The character that interception obtains is combined, the encrypted result that the plaintext string is encrypted as acquisition.
6. the method as described in claim 1, which is characterized in that the plaintext string is standard plaintext string;
The method also includes:
It is saved the encrypted result as standard ciphertext result, and saves and adopted when being encrypted to the standard plaintext string At least two Encryption Algorithm save the used interception way when intercepting character in every kind of ciphertext character string respectively.
7. the method as described in claim 1, which is characterized in that the plaintext string is plaintext string to be certified;
The plaintext string is encrypted using at least two Encryption Algorithm, is specifically included:
Using at least two Encryption Algorithm corresponding with the standard ciphertext result pre-saved, to the plaintext string to be certified It is encrypted;
Character is intercepted in every kind of obtained ciphertext character string respectively, is specifically included:
Using interception way corresponding with the standard ciphertext result pre-saved, cut in every kind of obtained ciphertext character string respectively Take character;
According to the character being truncated to, the encrypted result encrypted to the plaintext string is obtained, is specifically included:
According to the character being truncated to, using combination corresponding with the standard ciphertext result pre-saved, obtain to it is described to The encrypted result that certification plaintext string is encrypted;
The method also includes:
Using the encrypted result of acquisition as ciphertext result to be certified;
Judge whether the ciphertext result to be certified and the standard ciphertext result pre-saved are identical;
If so, verification passes through;
Otherwise, verification does not pass through.
8. a kind of device of encryption characterized by comprising
Module is obtained, for obtaining plaintext string;
Encrypting module is obtained accordingly at least for being encrypted using at least two Encryption Algorithm to the plaintext string Two kinds of ciphertext character strings;
Interception module, for intercepting character in every kind of obtained ciphertext character string respectively;
Encrypted result obtains module, for obtaining the encryption encrypted to the plaintext string according to the character being truncated to As a result.
9. device as claimed in claim 8, which is characterized in that the encrypting module is also used to, and is distinguished in the interception module Before intercepting character in every kind of obtained ciphertext character string, according to the obtained at least two ciphertexts character string, determination is wanted The digit of the encrypted result of acquisition, wherein the digit of the encrypted result to be obtained is less than at least two ciphertexts character The sum of digit of string.
10. device as claimed in claim 9, which is characterized in that the interception module is specifically used for, and generates several greater than 0 Random number character is intercepted in every kind of obtained ciphertext character string respectively according to each random number of generation;Wherein, generation The sum of each random number is equal to the digit of the encrypted result to be obtained, and each random number is respectively less than at least two ciphertexts word Accord with the minimum value in the digit of string.
11. device as claimed in claim 10, which is characterized in that the interception module is specifically used for, for each random number, One kind is selected in the obtained at least two ciphertexts character string, intercepts character at random from the ciphertext character string of selection, is cut The quantity of the character taken is the random number.
12. device as claimed in claim 8, which is characterized in that the encrypted result obtains module and is specifically used for, and will intercept To character be combined, the encrypted result that the plaintext string is encrypted as acquisition.
13. device as claimed in claim 8, which is characterized in that the plaintext string is standard plaintext string;
Described device further include:
Preserving module for saving the encrypted result as standard ciphertext result, and is saved to the standard plaintext character At least two Encryption Algorithm that string uses when being encrypted are saved and are used respectively when intercepting character in every kind of ciphertext character string Interception way.
14. device as claimed in claim 8, which is characterized in that the plaintext string is plaintext string to be certified;
The encrypting module is specifically used for, using at least two Encryption Algorithm corresponding with the standard ciphertext result pre-saved, The plaintext string to be certified is encrypted;
The interception module is specifically used for, and using interception way corresponding with the standard ciphertext result pre-saved, is obtaining respectively To every kind of ciphertext character string on intercept character;
The encrypted result obtains module, for according to the character being truncated to, using with the standard ciphertext result pair that pre-saves The combination answered obtains the encrypted result encrypted to the plaintext string to be certified;
Described device further include:
Correction verification module, the encrypted result for that will obtain is as ciphertext result to be certified;Judge the ciphertext knot to be certified Whether fruit and the standard ciphertext result pre-saved are identical;If so, verification passes through;Otherwise, verification does not pass through.
CN201510603328.7A 2015-09-21 2015-09-21 A kind of method and device of encryption Active CN106549756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510603328.7A CN106549756B (en) 2015-09-21 2015-09-21 A kind of method and device of encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510603328.7A CN106549756B (en) 2015-09-21 2015-09-21 A kind of method and device of encryption

Publications (2)

Publication Number Publication Date
CN106549756A CN106549756A (en) 2017-03-29
CN106549756B true CN106549756B (en) 2019-11-08

Family

ID=58364315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510603328.7A Active CN106549756B (en) 2015-09-21 2015-09-21 A kind of method and device of encryption

Country Status (1)

Country Link
CN (1) CN106549756B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107819569B (en) * 2017-12-14 2018-09-11 平安科技(深圳)有限公司 The encryption method and terminal device of log-on message
CN108683706B (en) * 2018-04-12 2021-02-09 广东汇泰龙科技股份有限公司 Encryption algorithm based on NB-IOT cloud lock communication and verification method thereof
CN110740032A (en) * 2019-04-11 2020-01-31 河北瑞通公路配套设施有限公司 Data encryption algorithm for random ciphertexts
CN111309987B (en) * 2019-10-31 2022-05-31 苏州浪潮智能科技有限公司 Encryption algorithm identification method and device in actual attack scene
CN117221877B (en) * 2023-09-03 2024-03-29 广东高芯国际物联网科技有限公司 Safety verification and transmission method applied to frequency radio field data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201545A (en) * 1995-09-18 1998-12-09 艾利森电话股份有限公司 Method and apparatus for user authentication
CN1623328A (en) * 2002-01-02 2005-06-01 索尼电子有限公司 Critical packet partial encryption
WO2007036011A1 (en) * 2005-09-30 2007-04-05 Nortel Networks Limited Double phase encoding quantum key distribution
CN102404111A (en) * 2011-12-28 2012-04-04 王勇 Method for encrypting in sections by using uncertain encryption algorithm
CN103023635A (en) * 2012-12-03 2013-04-03 广东欧珀移动通信有限公司 Method and device for message backup
CN103731272A (en) * 2014-01-06 2014-04-16 飞天诚信科技股份有限公司 Identity authentication method, system and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201545A (en) * 1995-09-18 1998-12-09 艾利森电话股份有限公司 Method and apparatus for user authentication
CN1623328A (en) * 2002-01-02 2005-06-01 索尼电子有限公司 Critical packet partial encryption
WO2007036011A1 (en) * 2005-09-30 2007-04-05 Nortel Networks Limited Double phase encoding quantum key distribution
CN102404111A (en) * 2011-12-28 2012-04-04 王勇 Method for encrypting in sections by using uncertain encryption algorithm
CN103023635A (en) * 2012-12-03 2013-04-03 广东欧珀移动通信有限公司 Method and device for message backup
CN103731272A (en) * 2014-01-06 2014-04-16 飞天诚信科技股份有限公司 Identity authentication method, system and equipment

Also Published As

Publication number Publication date
CN106549756A (en) 2017-03-29

Similar Documents

Publication Publication Date Title
CN105760764B (en) Encryption and decryption method and device for embedded storage device file and terminal
CN106549756B (en) A kind of method and device of encryption
CN107689869B (en) User password management method and server
US7694147B2 (en) Hashing method and system
US11388013B2 (en) Securing distributed elements connected to a network with addressable physically unclonable functions
CN105812332A (en) Data protection method
CN105577379A (en) Information processing method and apparatus thereof
CN105827582B (en) A kind of communication encrypting method, device and system
CN106529308A (en) Data encryption method and apparatus, and mobile terminal
CN109687966A (en) Encryption method and its system
US20130290731A1 (en) Systems and methods for storing and verifying security information
CN105117635A (en) Local data security protection system and method
CN110138754B (en) Multi-cloud-end information processing system and resource sharing method thereof
US11128455B2 (en) Data encryption method and system using device authentication key
CN103116730A (en) Deciphering method and system of data protection application programming interface (DPAPI) enciphered data
CN104901810A (en) Data encryption storage method based on domestic cryptographic algorithm
CN111859435B (en) Data security processing method and device
CN105337722A (en) Data encryption method and apparatus
CN106446697A (en) Method and device for saving private data
CN104601820A (en) Mobile terminal information protection method based on TF password card
CN115982761A (en) Sensitive information processing method and device, electronic equipment and storage medium
US10785193B2 (en) Security key hopping
CN108416224A (en) A kind of data encryption/decryption method and device
US20130290732A1 (en) Systems and methods for storing and verifying security information
CN113079002A (en) Data encryption method, data decryption method, key management method, medium, and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.