Nothing Special   »   [go: up one dir, main page]

CN103942500A - Hash ciphertext re-encryption method based on noise and decryption method after re-encryption - Google Patents

Hash ciphertext re-encryption method based on noise and decryption method after re-encryption Download PDF

Info

Publication number
CN103942500A
CN103942500A CN201410196257.9A CN201410196257A CN103942500A CN 103942500 A CN103942500 A CN 103942500A CN 201410196257 A CN201410196257 A CN 201410196257A CN 103942500 A CN103942500 A CN 103942500A
Authority
CN
China
Prior art keywords
noise
ciphertext
hash ciphertext
insertion position
static policies
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410196257.9A
Other languages
Chinese (zh)
Other versions
CN103942500B (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.)
Xian University of Science and Technology
Original Assignee
Xian University of Science and Technology
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 Xian University of Science and Technology filed Critical Xian University of Science and Technology
Priority to CN201410196257.9A priority Critical patent/CN103942500B/en
Publication of CN103942500A publication Critical patent/CN103942500A/en
Application granted granted Critical
Publication of CN103942500B publication Critical patent/CN103942500B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3242Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Power Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a Hash ciphertext re-encryption method based on noise and a decryption method after re-encryption. The re-encryption method comprises the steps of 1 setting a static strategy; 2 setting a dynamic strategy and selecting the static strategy; 3 dividing original Hash ciphertext into first front half Hash ciphertext and first rear half Hash ciphertext; 4 forming second front half Hash ciphertext or second rear half Hash ciphertext; 5 randomly generating a noise character string; 6 forming first rear half Hash ciphertext with noise or second rear half Hash ciphertext with noise; 7 generating first re-encrypted noise ciphertext or second re-encrypted noise ciphertext. The decryption method comprises the steps of 1 obtaining a first noise inserting position; 2 obtaining a second noise inserting position and the length of the noise character string; 3 forming the first rear half Hash ciphertext with noise; 4 forming first rear half Hash ciphertext; 5 generating decrypted original Hash ciphertext. The safety of the original Hash ciphertext can be improved, and the expenditure is low.

Description

Hash ciphertext based on noise again encryption method and again encrypt after decryption method
Technical field
The invention belongs to encryption technology field, be specifically related to a kind of Hash ciphertext based on noise again encryption method and again encrypt after decryption method.
Background technology
The technology that existing user name is encrypted has the cryptographic means such as MD5, SHA.The major way of md5 encryption is user's plaintext to be carried out to Hash encrypt formation ciphertext, then ciphertext is stored in to database the inside, when later user logins, compare with the ciphertext of database storage after converting the password of its input to MD5 code, judge whether unanimously.Although password cannot be deciphered by mathematical way at the large integer of the 128bit after md5 encryption, in other words, even if you see source program and arthmetic statement, also the value transform of a MD5 cannot be returned to original character string, say from mathematical principle, that this is a little as there not being contrafunctional mathematical function because original character string has infinite multiplely.But such cipher mode does not also mean that absolutely safety.Reason is, the resource of now a lot of networks can be by enumerate the ciphertext of MD5 code with dictionary mode, thereby cracks the ciphertext after md5 encryption, the plaintext of acquisition user login code by the mode of this correspondence.Although MD5 code encryption does not exist inverse process, for comparatively complicated user cipher, after MD5 code encryption, be difficult to decode by the means of enumerating.But the user cipher of One's name is legion is also not all complicated password, this is just for user's information security has been brought a large amount of problems.For example: the login password that has a user is " mynewpassword ", after the process md5 encryption of http://tool.chinaz.com/Tools/MD5.aspx website, its ciphertext is " 8E70383C69F7A3B7EA3F71B02F3E9731 ", system stores this ciphertext in database into, while login, compare in the future, judge that whether login user identity is legal.But, once this ciphertext is revealed, although cannot use, mathematical way is counter to be separated, but we still can obtain by other means the plaintext of its correspondence, for example, in this website of http://www.md5.com.cn/md5, ciphertext " 8E70383C69F7A3B7EA3F71B02F3E9731 " can be input in dialog box, click after MD5Crack button, the plaintext " mynewpassword " corresponding with it will be revealed.Through overtesting, for the MD5 ciphertext that is not very complicated user cipher, this website can be decrypted it.Just can illustrate from this point, present widely used md5 encryption means are not very reliable.SHA encrypts similar to md5 encryption, and encrypt and derive by MD4, be the national standard FIPS PUB180 that American National Standard technical institute issues, up-to-date standard has been updated to FIPS PUB180-3 in 2008.Wherein specify SHA-1, SHA-224, SHA-256, SHA-384, and these several one-way hash algorithm of SHA-512.SHA-1, SHA-224 and SHA-256 are applicable to length and are no more than the message of 2^64 binary digit, and SHA-384 and SHA-512 are applicable to length and are no more than the message of 2^128 binary digit; The thought that SHA encrypts is to receive one section of plaintext, then convert it to one section of (conventionally less) ciphertext in the irreversible mode of one, also can simply be interpreted as and get a string input code (being called preliminary mapping or information), and they are converted into the output sequence that length is shorter, figure place is fixing is the process of hashed value (also referred to as informative abstract or message authentication codes).The intensity that SHA encrypts is also very similar to md5 encryption, and existing is not very reliable defect yet.In order to overcome the above problems, in prior art, sometimes ciphertext is carried out the coding transcoding of other form, for example, Hash ciphertext is carried out to ASCII, GB2312 or UTF8 coding, or convert Base64 character string to, but coding transcoding mode is simple, is very easy to be cracked.Therefore, the ciphertext after need to having a kind of new cryptographic means to md5 encryption is encrypted again, even if after the leakage of password in database, is also difficult to use this mode of enumerating to decode.In addition, prior art is expressly encrypted user, obtains ciphertext, if again ciphertext is encrypted, although can improve the Cipher Strength of ciphertext, the encrypting and decrypting expense of bringing can increase greatly.
Summary of the invention
Technical matters to be solved by this invention is for above-mentioned deficiency of the prior art, provide a kind of efficient, fast, can further strengthen little, the practical Hash ciphertext encryption method again based on noise of security, encryption overhead of original Hash ciphertext.
For solving the problems of the technologies described above, the technical solution used in the present invention is: a kind of Hash ciphertext encryption method again based on noise, is characterized in that the method comprises the following steps:
Step 1, set n kind for obtaining the static policies of the first noise insertion position N1, and to n kind static policies with 0 and positive integer encode successively; Wherein, n is natural number and 2≤n≤10; N1 is natural number and N1<L3, and L3 is the length of original Hash ciphertext and is natural number;
Step 2, set a kind of dynamic strategy of selecting static policies, from n kind static policies, select a kind of static policies as the strategy of obtaining the first noise insertion position N1, and record the corresponding coding of the static policies of selecting;
Step 3, from described the first noise insertion position N1, original Hash ciphertext is divided into the first first half Hash ciphertext and the first later half Hash ciphertext;
Step 4, corresponding the static policies of selecting coding is inserted into first of the first first half Hash ciphertext, forms the second first half Hash ciphertext; Or, by corresponding the static policies of selecting coding be inserted into the first later half Hash ciphertext last position, form the second later half Hash ciphertext;
Step 5, generate a noise character string at random, the span of the length L 1 of described noise character string is 0<L1<10, and L1 is natural number;
Step 6, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, in described the first later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the first band noise, wherein, the span of N2 is 0<N2<10, N2 is natural number and N2<L2, L2 is the length of described the first later half Hash ciphertext and is natural number, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, in described the second later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the second band noise, wherein, the span of N2 is 0<N2<10, and N2 is natural number and N2<L3, and L3 is the length of described the second later half Hash ciphertext and is natural number,
Step 7, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, the length L 1 of described the second first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the first band noise are merged successively, generate the first noise ciphertext of having encrypted again; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, the length L 1 of described the first first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the second band noise are merged successively, generate the second noise ciphertext of having encrypted again.
The above-mentioned Hash ciphertext encryption method again based on noise, it is characterized in that: the value of n described in step 1 is 3,3 kinds are respectively for the static policies that obtains the first noise insertion position N1: the 1st kind: the length that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext divides exactly 2 business, is encoded to 0; The 2nd kind: the remainder that the ASCII character of first character that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext and the ASCII character sum of last character divide exactly the length of the corresponding user cipher character string of original Hash ciphertext, is encoded to 1; The 3rd kind: the remainder that the ASCII character sum of the ASCII character of the tenth character that described the first noise insertion position N1 is original Hash ciphertext and the second cross symbol divides exactly the length of the corresponding user cipher character string of original Hash ciphertext, is encoded to 2.
The above-mentioned Hash ciphertext encryption method again based on noise, is characterized in that: described in step 2, select the dynamic strategy of static policies to be: the ASCII character of last character that is encoded to original Hash ciphertext of a kind of static policies of selecting divides exactly the remainder of the species number n of static policies.
The above-mentioned Hash ciphertext encryption method again based on noise, is characterized in that: described in step 2, select the dynamic strategy of static policies to be: the remainder of the species number n ASCII character of the first character that is encoded to original Hash ciphertext of a kind of static policies of selecting and the ASCII character of last character and that divide exactly static policies.
The above-mentioned Hash ciphertext encryption method again based on noise, is characterized in that: in the character string of noise described in step 5, the span of each character is 0~9 and a~f.
The above-mentioned Hash ciphertext encryption method again based on noise, is characterized in that: in the character string of noise described in step 5, the span of each character is 0~9 and A~F.
The present invention also provide a kind of efficient, fast, the decryption method of little, the practical Hash ciphertext based on noise of expense after encrypting again, it is characterized in that the method comprises the following steps:
Step 1, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, first, take out the described first noise ciphertext of having encrypted again first, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1; Then, remove the described first noise ciphertext of having encrypted again first, form the first noise ciphertext of having encrypted; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, take out last position of the described second noise ciphertext of having encrypted again, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1;
Step 2, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, according to described the first noise insertion position N1, from the described first noise ciphertext of having encrypted, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, according to described the first noise insertion position N1, from the noise ciphertext that described second has encrypted again, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string;
Step 3, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, from described the first noise insertion position N1, the described first noise ciphertext of having encrypted is divided into the first first half Hash ciphertext and the 3rd later half Hash ciphertext, and remove front two in described the 3rd later half Hash ciphertext, form the later half Hash ciphertext of the first band noise; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, from described the first noise insertion position N1, the described second noise ciphertext of having encrypted is again divided into the first first half Hash ciphertext and the 4th later half Hash ciphertext, then, in described the 4th later half Hash ciphertext, remove front two and last position, form the later half Hash ciphertext of the first band noise;
Step 4, in described the first band noise later half Hash ciphertext, according to the length L 1 of described the second noise insertion position N2 and described noise character string, remove described noise character string, form the first later half Hash ciphertext;
Step 5, described the first first half Hash ciphertext and the first later half Hash ciphertext are merged successively, generate the original Hash ciphertext after deciphering.
The present invention compared with prior art has the following advantages:
1, encrypt and decrypt method of the present invention is simple, and it is convenient to realize.
2, the method that encryption method of the present invention has adopted static policies and dynamic strategy to combine arranges the first noise insertion position, and adopt and in the first later half Hash ciphertext, look at random the method for position that the second noise insertion position is set, by inserting noise character in the first noise insertion position and the second noise insertion position, can carry out Hash sealing efficient, encrypt again fast, in Hash ciphertext, add useless interference character, just as add noise in music, make cracker cannot isolate original Hash ciphertext, further strengthen the Cipher Strength of Hash ciphertext, make Hash ciphertext to crack difficulty higher, and, when deciphering, can not increase too much expense yet, this expense is substantially negligible, thereby high efficiency and the security of encrypting and decrypting are ensured.
3, the expense of encrypting and decrypting operation of the present invention is in microsecond rank, and the encrypting and decrypting expense of bringing is very little.
4, of the present invention practical, be convenient to promote the use of.
In sum, method of the present invention is simple, and it is convenient to realize, deciphering after can encrypting Hash ciphertext efficiently, fast again and encrypting, can further strengthen the security of original Hash ciphertext, and encrypting and decrypting expense is little, practical, be convenient to promote the use of.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Brief description of the drawings
Fig. 1 is the method flow block diagram of encryption method again of the Hash ciphertext based on noise that the present invention is based on noise.
Fig. 2 is the method flow block diagram of the decryption method after the Hash ciphertext that the present invention is based on noise is encrypted again.
Embodiment
Embodiment 1
As shown in Figure 1, the present invention is based on the Hash ciphertext encryption method again of noise, comprise the following steps:
Step 1, set n kind for obtaining the static policies of the first noise insertion position N1, and to n kind static policies with 0 and positive integer encode successively; Wherein, n is natural number and 2≤n≤10; N1 is natural number and N1<L3, and L3 is the length of original Hash ciphertext and is natural number;
In the present embodiment, described original Hash ciphertext is: af1460a7f2732e78165c5bcfce66769c, the length L 3 of described original Hash ciphertext is 32, and the corresponding user cipher character string of described original Hash ciphertext is: myNewPassword, and the length of described user cipher character string is 13;
In the present embodiment, the value of n described in step 1 is 3,3 kinds are respectively for the static policies that obtains the first noise insertion position N1: the 1st kind: the length that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext divides exactly 2 business, be described the first noise insertion position N1=6, be encoded to 0; The 2nd kind: the remainder that the ASCII character of first character that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext and the ASCII character sum of last character divide exactly the length of the corresponding user cipher character string of original Hash ciphertext, be described the first noise insertion position N1=1, be encoded to 1; The 3rd kind: the remainder that the ASCII character sum of the ASCII character of the tenth character that described the first noise insertion position N1 is original Hash ciphertext and the second cross symbol divides exactly the length of the corresponding user cipher character string of original Hash ciphertext, the first noise insertion position N1=6, is encoded to 2.Original Hash ciphertext is that the sexadecimal number of 32 or length are that the binary number of 128 forms by length.
Step 2, set a kind of dynamic strategy of selecting static policies, from n kind static policies, select a kind of static policies as the strategy of obtaining the first noise insertion position N1, and record the corresponding coding of the static policies of selecting;
In the present embodiment, described in step 2, select the dynamic strategy of static policies to be: the ASCII character of last character that is encoded to original Hash ciphertext of a kind of static policies of selecting divides exactly the remainder of the species number n of static policies.A kind of static policies of selecting be encoded to 0, i.e. described the first noise insertion position N1=6;
Step 3, from described the first noise insertion position N1, original Hash ciphertext is divided into the first first half Hash ciphertext and the first later half Hash ciphertext;
In the present embodiment, described the first first half Hash ciphertext is af1460, and described the first later half Hash ciphertext is a7f2732e78165c5bcfce66769c;
Step 4, corresponding the static policies of selecting coding is inserted into first of the first first half Hash ciphertext, forms the second first half Hash ciphertext;
In the present embodiment, be inserted into first of af1460 by 0, the second first half Hash ciphertext of formation is 0af1460;
Step 5, generate a noise character string at random, the span of the length L 1 of described noise character string is 0<L1<10, and L1 is natural number;
In the present embodiment, in the character string of noise described in step 5, the span of each character is 0~9 and a~f, can make the similarity of noise character string and original Hash ciphertext higher, has further improved the security of encrypting; When concrete enforcement, adopted random noise generating function Random () to generate a noise character string, the described noise character string of generation is 0a7ef4e3b, and the value of the length L 1 of described noise character string is 9;
Step 6, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, in described the first later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the first band noise; Wherein, the span of N2 is 0<N2<10, and N2 is natural number and N2<L2, and L2 is the length of described the first later half Hash ciphertext and is natural number;
In the present embodiment, the value of the length L 2 of described the first later half Hash ciphertext is 26, and the value of described the second noise insertion position N2 is 7, and the later half Hash ciphertext of the first band noise of formation is: a7f27320a7ef4e3be78165c5bcfce66769c;
Step 7, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, the length L 1 of described the second first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the first band noise are merged successively, generate the first noise ciphertext of having encrypted again.
In the present embodiment, the noise ciphertext that first of generation has been encrypted is again:
0af146079a7f27320a7ef4e3be78165c5bcfce66769c。
As shown in Figure 2, the decryption method after Hash ciphertext of the present invention is encrypted again, comprises the following steps:
Step 1, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, first, take out the described first noise ciphertext of having encrypted again first, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1; Then, remove the described first noise ciphertext of having encrypted again first, form the first noise ciphertext of having encrypted;
In the present embodiment, the static policies of selecting of acquisition is corresponding is encoded to 0, and the value of the first noise insertion position N1 of acquisition is 6, and the described first noise ciphertext of having encrypted is again:
0af146079a7f27320a7ef4e3be78165c5bcfce66769c,
The the first noise ciphertext of having encrypted forming is:
af146079a7f27320a7ef4e3be78165c5bcfce66769c;
Step 2, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, according to described the first noise insertion position N1, from the described first noise ciphertext of having encrypted, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string;
In the present embodiment, the value of described the second noise insertion position N2 obtaining is 7, and the value of the length L 1 of described noise character string is 9;
Step 3, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, from described the first noise insertion position N1, the described first noise ciphertext of having encrypted is divided into the first first half Hash ciphertext and the 3rd later half Hash ciphertext, and remove front two in described the 3rd later half Hash ciphertext, remove the value of described the second value of noise insertion position N2 and the length L 1 of described noise character string, formed the later half Hash ciphertext of the first band noise;
In the present embodiment, described the first first half Hash ciphertext is: af1460,
Described the 3rd later half Hash ciphertext is:
79a7f27320a7ef4e3be78165c5bcfce66769c,
The later half Hash ciphertext of the first band noise forming remove front two in described the 3rd later half Hash ciphertext after is: a7f27320a7ef4e3be78165c5bcfce66769c;
Step 4, in described the first band noise later half Hash ciphertext, according to the length L 1 of described the second noise insertion position N2 and described noise character string, remove described noise character string, form the first later half Hash ciphertext;
In the present embodiment, the described first later half Hash ciphertext of formation is: a7f2732e78165c5bcfce66769c;
Step 5, described the first first half Hash ciphertext and the first later half Hash ciphertext are merged successively, generate the original Hash ciphertext after deciphering.
In the present embodiment, the original Hash ciphertext after the deciphering of generation is: af1460a7f2732e78165c5bcfce66769c, the corresponding original Hash ciphertext of the original Hash ciphertext after deciphering and user cipher character string meets completely.
Embodiment 2
As shown in Figure 1, the present invention is based on the Hash ciphertext encryption method again of noise, comprise the following steps:
Step 1, set n kind for obtaining the static policies of the first noise insertion position N1, and to n kind static policies with 0 and positive integer encode successively; Wherein, n is natural number and 2≤n≤10; N1 is natural number and N1<L3, and L3 is the length of original Hash ciphertext and is natural number;
In the present embodiment, described original Hash ciphertext is: 26fa61d8e9a212eb79b87fa22983d18d, the length L 3 of described original Hash ciphertext is 32, and the corresponding user cipher character string of described original Hash ciphertext is: MYnEwPassword, and the length of described user cipher character string is 13;
In the present embodiment, the value of n described in step 1 is 3,3 kinds are respectively for the static policies that obtains the first noise insertion position N1: the 1st kind: the length that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext divides exactly 2 business, be described the first noise insertion position N1=6, be encoded to 0; The 2nd kind: the remainder that the ASCII character of first character that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext and the ASCII character sum of last character divide exactly the length of the corresponding user cipher character string of original Hash ciphertext, be described the first noise insertion position N1=8, be encoded to 1; The 3rd kind: the remainder that the ASCII character sum of the ASCII character of the tenth character that described the first noise insertion position N1 is original Hash ciphertext and the second cross symbol divides exactly the length of the corresponding user cipher character string of original Hash ciphertext, the first noise insertion position N1=9, is encoded to 2.Original Hash ciphertext is that the sexadecimal number of 32 or length are that the binary number of 128 forms by length.
Step 2, set a kind of dynamic strategy of selecting static policies, from n kind static policies, select a kind of static policies as the strategy of obtaining the first noise insertion position N1, and record the corresponding coding of the static policies of selecting;
In the present embodiment, described in step 2, select the dynamic strategy of static policies to be: the ASCII character of last character that is encoded to original Hash ciphertext of a kind of static policies of selecting divides exactly the remainder of the species number n of static policies.A kind of static policies of selecting be encoded to 1, i.e. described the first noise insertion position N1=8;
Step 3, from described the first noise insertion position N1, original Hash ciphertext is divided into the first first half Hash ciphertext and the first later half Hash ciphertext;
In the present embodiment, described the first first half Hash ciphertext is 26fa61d8, and described the first later half Hash ciphertext is e9a212eb79b87fa22983d18d;
Step 4, corresponding the static policies of selecting coding is inserted into first of the first first half Hash ciphertext, forms the second first half Hash ciphertext;
In the present embodiment, be inserted into first of 26fa61d8 by 1, the second first half Hash ciphertext of formation is 126fa61d8;
Step 5, generate a noise character string at random, the span of the length L 1 of described noise character string is 0<L1<10, and L1 is natural number;
In the present embodiment, in the character string of noise described in step 5, the span of each character is 0~9 and a~f, can make the similarity of noise character string and original Hash ciphertext higher, has further improved the security of encrypting; When concrete enforcement, adopted random noise generating function Random () to generate a noise character string, the described noise character string of generation is 8ab738a2, and the value of the length L 1 of described noise character string is 8;
Step 6, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, in described the first later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the first band noise; Wherein, the span of N2 is 0<N2<10, and N2 is natural number and N2<L2, and L2 is the length of described the first later half Hash ciphertext and is natural number;
In the present embodiment, the value of the length L 2 of described the first later half Hash ciphertext is 24, and the value of described the second noise insertion position N2 is 8, and the later half Hash ciphertext of the first band noise of formation is: e9a212eb8ab738a279b87fa22983d18d;
Step 7, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, the length L 1 of described the second first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the first band noise are merged successively, generate the first noise ciphertext of having encrypted again.
In the present embodiment, the noise ciphertext that first of generation has been encrypted is again:
126fa61d888e9a212eb8ab738a279b87fa22983d18d。
As shown in Figure 2, the decryption method after Hash ciphertext of the present invention is encrypted again, comprises the following steps:
Step 1, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, first, take out the described first noise ciphertext of having encrypted again first, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1; Then, remove the described first noise ciphertext of having encrypted again first, form the first noise ciphertext of having encrypted;
In the present embodiment, the static policies of selecting of acquisition is corresponding is encoded to 1, and the value of the first noise insertion position N1 of acquisition is 6, and the described first noise ciphertext of having encrypted is again:
126fa61d888e9a212eb8ab738a279b87fa22983d18d,
The the first noise ciphertext of having encrypted forming is:
26fa61d888e9a212eb8ab738a279b87fa22983d18d;
Step 2, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, according to described the first noise insertion position N1, from the described first noise ciphertext of having encrypted, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string;
In the present embodiment, the value of described the second noise insertion position N2 obtaining is 8, and the value of the length L 1 of described noise character string is 8;
Step 3, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, from described the first noise insertion position N1, the described first noise ciphertext of having encrypted is divided into the first first half Hash ciphertext and the 3rd later half Hash ciphertext, and remove front two in described the 3rd later half Hash ciphertext, remove the value of described the second value of noise insertion position N2 and the length L 1 of described noise character string, formed the later half Hash ciphertext of the first band noise;
In the present embodiment, described the first first half Hash ciphertext is: 26fa61d8,
Described the 3rd later half Hash ciphertext is:
88e9a212eb8ab738a279b87fa22983d18d,
The later half Hash ciphertext of the first band noise forming remove front two in described the 3rd later half Hash ciphertext after is: e9a212eb8ab738a279b87fa22983d18d;
Step 4, in described the first band noise later half Hash ciphertext, according to the length L 1 of described the second noise insertion position N2 and described noise character string, remove described noise character string, form the first later half Hash ciphertext;
In the present embodiment, the described first later half Hash ciphertext of formation is: e9a212eb79b87fa22983d18d;
Step 5, described the first first half Hash ciphertext and the first later half Hash ciphertext are merged successively, generate the original Hash ciphertext after deciphering.
In the present embodiment, the original Hash ciphertext after the deciphering of generation is: 26fa61d8e9a212eb79b87fa22983d18d, the corresponding original Hash ciphertext of the original Hash ciphertext after deciphering and user cipher character string meets completely.
Embodiment 3
As shown in Figure 1, the present invention is based on the Hash ciphertext encryption method again of noise, comprise the following steps:
Step 1, set n kind for obtaining the static policies of the first noise insertion position N1, and to n kind static policies with 0 and positive integer encode successively; Wherein, n is natural number and 2≤n≤10; N1 is natural number and N1<L3, and L3 is the length of original Hash ciphertext and is natural number;
In the present embodiment, described original Hash ciphertext is: 13DD9A82F226513CA7A50DCDCAB36BD2, the length L 3 of described original Hash ciphertext is 32, and the corresponding user cipher character string of described original Hash ciphertext is: MYNewPassword, and the length of described user cipher character string is 13;
In the present embodiment, the value of n described in step 1 is 3,3 kinds are respectively for the static policies that obtains the first noise insertion position N1: the 1st kind: the length that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext divides exactly 2 business, be described the first noise insertion position N1=6, be encoded to 0; The 2nd kind: the remainder that the ASCII character of first character that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext and the ASCII character sum of last character divide exactly the length of the corresponding user cipher character string of original Hash ciphertext, be described the first noise insertion position N1=8, be encoded to 1; The 3rd kind: the remainder that the ASCII character sum of the ASCII character of the tenth character that described the first noise insertion position N1 is original Hash ciphertext and the second cross symbol divides exactly the length of the corresponding user cipher character string of original Hash ciphertext, the first noise insertion position N1=12, is encoded to 2.Original Hash ciphertext is that the sexadecimal number of 32 or length are that the binary number of 128 forms by length.
Step 2, set a kind of dynamic strategy of selecting static policies, from n kind static policies, select a kind of static policies as the strategy of obtaining the first noise insertion position N1, and record the corresponding coding of the static policies of selecting;
In the present embodiment, described in step 2, select the dynamic strategy of static policies to be: the ASCII character of last character that is encoded to original Hash ciphertext of a kind of static policies of selecting divides exactly the remainder of the species number n of static policies.A kind of static policies of selecting be encoded to 2, i.e. described the first noise insertion position N1=12;
Step 3, from described the first noise insertion position N1, original Hash ciphertext is divided into the first first half Hash ciphertext and the first later half Hash ciphertext;
In the present embodiment, described the first first half Hash ciphertext is 13DD9A82F226, and described the first later half Hash ciphertext is 513CA7A50DCDCAB36BD2;
Step 4, by corresponding the static policies of selecting coding be inserted into the first later half Hash ciphertext last position, form the second later half Hash ciphertext;
In the present embodiment, by 2 be inserted into 513CA7A50DCDCAB36BD2 last position, the second later half Hash ciphertext of formation is 513CA7A50DCDCAB36BD22;
Step 5, generate a noise character string at random, the span of the length L 1 of described noise character string is 0<L1<10, and L1 is natural number;
In the present embodiment, in the character string of noise described in step 5, the span of each character is 0~9 and A~F, can make the similarity of noise character string and original Hash ciphertext higher, has further improved the security of encrypting; When concrete enforcement, adopted random noise generating function Random () to generate a noise character string, the described noise character string of generation is 8C173EA2, and the value of the length L 1 of described noise character string is 8;
Step 6, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, in described the second later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the second band noise; Wherein, the span of N2 is 0<N2<10, and N2 is natural number and N2<L3, and L3 is the length of described the second later half Hash ciphertext and is natural number;
In the present embodiment, the value of the length L 3 of described the second later half Hash ciphertext is 21, and the value of described the second noise insertion position N2 is 7, and the later half Hash ciphertext of the second band noise of formation is: 513CA7A8C173EA250DCDCAB36BD22;
Step 7, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, the length L 1 of described the first first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the second band noise are merged successively, generate the second noise ciphertext of having encrypted again.
In the present embodiment, the noise ciphertext that second of generation has been encrypted is again:
13DD9A82F22678513CA7A8C173EA250DCDCAB36BD22。
As shown in Figure 2, the decryption method after Hash ciphertext of the present invention is encrypted again, comprises the following steps:
Step 1, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, take out last position of the described second noise ciphertext of having encrypted again, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1;
In the present embodiment, the static policies of selecting of acquisition is corresponding is encoded to 2, and the value of the first noise insertion position N1 of acquisition is 12;
Step 2, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, according to described the first noise insertion position N1, from the noise ciphertext that described second has encrypted again, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string;
In the present embodiment, the value of described the second noise insertion position N2 obtaining is 7, and the value of the length L 1 of described noise character string is 8;
Step 3, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, from described the first noise insertion position N1, the described second noise ciphertext of having encrypted is again divided into the first first half Hash ciphertext and the 4th later half Hash ciphertext, then, in described the 4th later half Hash ciphertext, remove front two and last position, remove the value that front two has removed described the second value of noise insertion position N2 and the length L 1 of described noise character string, remove last and removed the corresponding coding of the static policies of selecting, form the later half Hash ciphertext of the first band noise,
In the present embodiment, the described second noise ciphertext of having encrypted is again:
13DD9A82F22678513CA7A8C173EA250DCDCAB36BD22,
Described the first first half Hash ciphertext is: 13DD9A82F226,
Described the 4th later half Hash ciphertext is:
78513CA7A8C173EA250DCDCAB36BD22,
In described the 4th later half Hash ciphertext, removing front two with the later half Hash ciphertext of the first band noise that last forms is afterwards: 513CA7A8C173EA250DCDCAB36BD2;
Step 4, in described the first band noise later half Hash ciphertext, according to the length L 1 of described the second noise insertion position N2 and described noise character string, remove described noise character string, form the first later half Hash ciphertext;
In the present embodiment, the described first later half Hash ciphertext of formation is: 513CA7A50DCDCAB36BD2;
Step 5, described the first first half Hash ciphertext and the first later half Hash ciphertext are merged successively, generate the original Hash ciphertext after deciphering.
In the present embodiment, the original Hash ciphertext after the deciphering of generation is: 13DD9A82F226513CA7A50DCDCAB36BD2, the corresponding original Hash ciphertext of the original Hash ciphertext after deciphering and user cipher character string meets completely.
Embodiment 4
As shown in Figure 1, the present invention is based on the Hash ciphertext encryption method again of noise, comprise the following steps:
Step 1, set n kind for obtaining the static policies of the first noise insertion position N1, and to n kind static policies with 0 and positive integer encode successively; Wherein, n is natural number and 2≤n≤10; N1 is natural number and N1<L3, and L3 is the length of original Hash ciphertext and is natural number;
In the present embodiment, described original Hash ciphertext is: af1460a7f2732e78165c5bcfce66769c, the length L 3 of described original Hash ciphertext is 32, and the corresponding user cipher character string of described original Hash ciphertext is: myNewPassword, and the length of described user cipher character string is 13;
In the present embodiment, the value of n described in step 1 is 3,3 kinds are respectively for the static policies that obtains the first noise insertion position N1: the 1st kind: the length that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext divides exactly 2 business, be described the first noise insertion position N1=6, be encoded to 0; The 2nd kind: the remainder that the ASCII character of first character that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext and the ASCII character sum of last character divide exactly the length of the corresponding user cipher character string of original Hash ciphertext, be described the first noise insertion position N1=1, be encoded to 1; The 3rd kind: the remainder that the ASCII character sum of the ASCII character of the tenth character that described the first noise insertion position N1 is original Hash ciphertext and the second cross symbol divides exactly the length of the corresponding user cipher character string of original Hash ciphertext, the first noise insertion position N1=6, is encoded to 2.Original Hash ciphertext is that the sexadecimal number of 32 or length are that the binary number of 128 forms by length.
Step 2, set a kind of dynamic strategy of selecting static policies, from n kind static policies, select a kind of static policies as the strategy of obtaining the first noise insertion position N1, and record the corresponding coding of the static policies of selecting;
In the present embodiment, described in step 2, select the dynamic strategy of static policies to be: the remainder of the species number n ASCII character of the first character that is encoded to original Hash ciphertext of a kind of static policies of selecting and the ASCII character of last character and that divide exactly static policies.A kind of static policies of selecting be encoded to 1, i.e. described the first noise insertion position N1=1;
Step 3, from described the first noise insertion position N1, original Hash ciphertext is divided into the first first half Hash ciphertext and the first later half Hash ciphertext;
In the present embodiment, described the first first half Hash ciphertext is a, and described the first later half Hash ciphertext is f1460a7f2732e78165c5bcfce66769c;
Step 4, by corresponding the static policies of selecting coding be inserted into the first later half Hash ciphertext last position, form the second later half Hash ciphertext;
In the present embodiment, by 1 be inserted into f1460a7f2732e78165c5bcfce66769c last position, the second later half Hash ciphertext of formation is f1460a7f2732e78165c5bcfce66769c1;
Step 5, generate a noise character string at random, the span of the length L 1 of described noise character string is 0<L1<10, and L1 is natural number;
In the present embodiment, in the character string of noise described in step 5, the span of each character is 0~9 and a~f, can make the similarity of noise character string and original Hash ciphertext higher, has further improved the security of encrypting; When concrete enforcement, adopted random noise generating function Random () to generate a noise character string, the described noise character string of generation is af164e9, and the value of the length L 1 of described noise character string is 7;
Step 6, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, in described the second later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the second band noise; Wherein, the span of N2 is 0<N2<10, and N2 is natural number and N2<L3, and L3 is the length of described the second later half Hash ciphertext and is natural number;
In the present embodiment, the value of the length L 3 of described the second later half Hash ciphertext is 32, and the value of described the second noise insertion position N2 is 9, and the later half Hash ciphertext of the second band noise of formation is:
f1460a7f2af164e9732e78165c5bcfce66769c1;
Step 7, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, the length L 1 of described the first first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the second band noise are merged successively, generate the second noise ciphertext of having encrypted again.
In the present embodiment, the noise ciphertext that second of generation has been encrypted is again:
a97f1460a7f2af164e9732e78165c5bcfce66769c1。
As shown in Figure 2, the decryption method after Hash ciphertext of the present invention is encrypted again, comprises the following steps:
Step 1, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, take out last position of the described second noise ciphertext of having encrypted again, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1;
In the present embodiment, the static policies of selecting of acquisition is corresponding is encoded to 1, and the value of the first noise insertion position N1 of acquisition is 1;
Step 2, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, according to described the first noise insertion position N1, from the noise ciphertext that described second has encrypted again, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string;
In the present embodiment, the value of described the second noise insertion position N2 obtaining is 9, and the value of the length L 1 of described noise character string is 7;
Step 3, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, from described the first noise insertion position N1, the described second noise ciphertext of having encrypted is again divided into the first first half Hash ciphertext and the 4th later half Hash ciphertext, then, in described the 4th later half Hash ciphertext, remove front two and last position, remove the value that front two has removed described the second value of noise insertion position N2 and the length L 1 of described noise character string, remove last and removed the corresponding coding of the static policies of selecting, form the later half Hash ciphertext of the first band noise,
In the present embodiment, the described second noise ciphertext of having encrypted is again:
a97f1460a7f2af164e9732e78165c5bcfce66769c1,
Described the first first half Hash ciphertext is: a,
Described the 4th later half Hash ciphertext is:
97f1460a7f2af164e9732e78165c5bcfce66769c1,
In described the 4th later half Hash ciphertext, removing front two with the later half Hash ciphertext of the first band noise that last forms is afterwards:
f1460a7f2af164e9732e78165c5bcfce66769c;
Step 4, in described the first band noise later half Hash ciphertext, according to the length L 1 of described the second noise insertion position N2 and described noise character string, remove described noise character string, form the first later half Hash ciphertext;
In the present embodiment, the described first later half Hash ciphertext of formation is: f1460a7f2732e78165c5bcfce66769c;
Step 5, described the first first half Hash ciphertext and the first later half Hash ciphertext are merged successively, generate the original Hash ciphertext after deciphering.
In the present embodiment, the original Hash ciphertext after the deciphering of generation is: af1460a7f2732e78165c5bcfce66769c, the corresponding original Hash ciphertext of the original Hash ciphertext after deciphering and user cipher character string meets completely.
Embodiment 5
As shown in Figure 1, the present invention is based on the Hash ciphertext encryption method again of noise, comprise the following steps:
Step 1, set n kind for obtaining the static policies of the first noise insertion position N1, and to n kind static policies with 0 and positive integer encode successively; Wherein, n is natural number and 2≤n≤10; N1 is natural number and N1<L3, and L3 is the length of original Hash ciphertext and is natural number;
In the present embodiment, described original Hash ciphertext is: 13dd9a82f226513ca7a50dcdcab36bd2, the length L 3 of described original Hash ciphertext is 32, and the corresponding user cipher character string of described original Hash ciphertext is: MYNewPassword, and the length of described user cipher character string is 13;
In the present embodiment, the value of n described in step 1 is 3,3 kinds are respectively for the static policies that obtains the first noise insertion position N1: the 1st kind: the length that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext divides exactly 2 business, be described the first noise insertion position N1=6, be encoded to 0; The 2nd kind: the remainder that the ASCII character of first character that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext and the ASCII character sum of last character divide exactly the length of the corresponding user cipher character string of original Hash ciphertext, be described the first noise insertion position N1=8, be encoded to 1; The 3rd kind: the remainder that the ASCII character sum of the ASCII character of the tenth character that described the first noise insertion position N1 is original Hash ciphertext and the second cross symbol divides exactly the length of the corresponding user cipher character string of original Hash ciphertext, the first noise insertion position N1=12, is encoded to 2.Original Hash ciphertext is that the sexadecimal number of 32 or length are that the binary number of 128 forms by length.
Step 2, set a kind of dynamic strategy of selecting static policies, from n kind static policies, select a kind of static policies as the strategy of obtaining the first noise insertion position N1, and record the corresponding coding of the static policies of selecting;
In the present embodiment, described in step 2, select the dynamic strategy of static policies to be: the remainder of the species number n ASCII character of the first character that is encoded to original Hash ciphertext of a kind of static policies of selecting and the ASCII character of last character and that divide exactly static policies.A kind of static policies of selecting be encoded to 0, i.e. described the first noise insertion position N1=6;
Step 3, from described the first noise insertion position N1, original Hash ciphertext is divided into the first first half Hash ciphertext and the first later half Hash ciphertext;
In the present embodiment, described the first first half Hash ciphertext is 13dd9a, and described the first later half Hash ciphertext is 82f226513ca7a50dcdcab36bd2;
Step 4, corresponding the static policies of selecting coding is inserted into first of the first first half Hash ciphertext, forms the second first half Hash ciphertext;
In the present embodiment, be inserted into first of 13dd9a by 0, the second first half Hash ciphertext of formation is 013dd9a;
Step 5, generate a noise character string at random, the span of the length L 1 of described noise character string is 0<L1<10, and L1 is natural number;
In the present embodiment, in the character string of noise described in step 5, the span of each character is 0~9 and a~f, can make the similarity of noise character string and original Hash ciphertext higher, has further improved the security of encrypting; When concrete enforcement, adopted random noise generating function Random () to generate a noise character string, the described noise character string of generation is 3fe64d9, and the value of the length L 1 of described noise character string is 7;
Step 6, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, in described the first later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the first band noise; Wherein, the span of N2 is 0<N2<10, and N2 is natural number and N2<L2, and L2 is the length of described the first later half Hash ciphertext and is natural number;
In the present embodiment, the value of the length L 2 of described the first later half Hash ciphertext is 26, and the value of described the second noise insertion position N2 is 8, and the later half Hash ciphertext of the first band noise of formation is: 82f226513fe64d93ca7a50dcdcab36bd2;
Step 7, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, the length L 1 of described the second first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the first band noise are merged successively, generate the first noise ciphertext of having encrypted again.
In the present embodiment, the noise ciphertext that first of generation has been encrypted is again:
013dd9a8782f226513fe64d93ca7a50dcdcab36bd2。
As shown in Figure 2, the decryption method after Hash ciphertext of the present invention is encrypted again, comprises the following steps:
Step 1, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, first, take out the described first noise ciphertext of having encrypted again first, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1; Then, remove the described first noise ciphertext of having encrypted again first, form the first noise ciphertext of having encrypted;
In the present embodiment, the static policies of selecting of acquisition is corresponding is encoded to 0, and the value of the first noise insertion position N1 of acquisition is 6, and the described first noise ciphertext of having encrypted is again:
013dd9a8782f226513fe64d93ca7a50dcdcab36bd2,
The the first noise ciphertext of having encrypted forming is:
13dd9a8782f226513fe64d93ca7a50dcdcab36bd2;
Step 2, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, according to described the first noise insertion position N1, from the described first noise ciphertext of having encrypted, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string;
In the present embodiment, the value of described the second noise insertion position N2 obtaining is 8, and the value of the length L 1 of described noise character string is 7;
Step 3, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, from described the first noise insertion position N1, the described first noise ciphertext of having encrypted is divided into the first first half Hash ciphertext and the 3rd later half Hash ciphertext, and remove front two in described the 3rd later half Hash ciphertext, remove the value of described the second value of noise insertion position N2 and the length L 1 of described noise character string, formed the later half Hash ciphertext of the first band noise;
In the present embodiment, described the first first half Hash ciphertext is: 13dd9a,
Described the 3rd later half Hash ciphertext is:
8782f226513fe64d93ca7a50dcdcab36bd2,
The later half Hash ciphertext of the first band noise forming remove front two in described the 3rd later half Hash ciphertext after is: 82f226513fe64d93ca7a50dcdcab36bd2;
Step 4, in described the first band noise later half Hash ciphertext, according to the length L 1 of described the second noise insertion position N2 and described noise character string, remove described noise character string, form the first later half Hash ciphertext;
In the present embodiment, the described first later half Hash ciphertext of formation is: 82f226513ca7a50dcdcab36bd2;
Step 5, described the first first half Hash ciphertext and the first later half Hash ciphertext are merged successively, generate the original Hash ciphertext after deciphering.
In the present embodiment, the original Hash ciphertext after the deciphering of generation is: 13dd9a82f226513ca7a50dcdcab36bd2, the corresponding original Hash ciphertext of the original Hash ciphertext after deciphering and user cipher character string meets completely.
The above; it is only preferred embodiment of the present invention; not the present invention is imposed any restrictions, every any simple modification of above embodiment being done according to the technology of the present invention essence, change and equivalent structure change, and all still belong in the protection domain of technical solution of the present invention.

Claims (7)

1. the Hash ciphertext encryption method again based on noise, is characterized in that the method comprises the following steps:
Step 1, set n kind for obtaining the static policies of the first noise insertion position N1, and to n kind static policies with 0 and positive integer encode successively; Wherein, n is natural number and 2≤n≤10; N1 is natural number and N1<L3, and L3 is the length of original Hash ciphertext and is natural number;
Step 2, set a kind of dynamic strategy of selecting static policies, from n kind static policies, select a kind of static policies as the strategy of obtaining the first noise insertion position N1, and record the corresponding coding of the static policies of selecting;
Step 3, from described the first noise insertion position N1, original Hash ciphertext is divided into the first first half Hash ciphertext and the first later half Hash ciphertext;
Step 4, corresponding the static policies of selecting coding is inserted into first of the first first half Hash ciphertext, forms the second first half Hash ciphertext; Or, by corresponding the static policies of selecting coding be inserted into the first later half Hash ciphertext last position, form the second later half Hash ciphertext;
Step 5, generate a noise character string at random, the span of the length L 1 of described noise character string is 0<L1<10, and L1 is natural number;
Step 6, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, in described the first later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the first band noise, wherein, the span of N2 is 0<N2<10, N2 is natural number and N2<L2, L2 is the length of described the first later half Hash ciphertext and is natural number, in the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, in described the second later half Hash ciphertext, look at random a second noise insertion position N2 who inserts described noise character string, and insert described noise character string at described the second N2 place, noise insertion position, form the later half Hash ciphertext of the second band noise, wherein, the span of N2 is 0<N2<10, and N2 is natural number and N2<L3, and L3 is the length of described the second later half Hash ciphertext and is natural number,
Step 7, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, the length L 1 of described the second first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the first band noise are merged successively, generate the first noise ciphertext of having encrypted again; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, the length L 1 of described the first first half Hash ciphertext, the second noise insertion position N2, noise character string and the later half Hash ciphertext of the second band noise are merged successively, generate the second noise ciphertext of having encrypted again.
2. according to the Hash ciphertext encryption method again based on noise claimed in claim 1, it is characterized in that: the value of n described in step 1 is 3,3 kinds are respectively for the static policies that obtains the first noise insertion position N1: the 1st kind: the length that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext divides exactly 2 business, is encoded to 0; The 2nd kind: the remainder that the ASCII character of first character that described the first noise insertion position N1 is the corresponding user cipher character string of original Hash ciphertext and the ASCII character sum of last character divide exactly the length of the corresponding user cipher character string of original Hash ciphertext, is encoded to 1; The 3rd kind: the remainder that the ASCII character sum of the ASCII character of the tenth character that described the first noise insertion position N1 is original Hash ciphertext and the second cross symbol divides exactly the length of the corresponding user cipher character string of original Hash ciphertext, is encoded to 2.
3. according to the Hash ciphertext encryption method again based on noise claimed in claim 1, it is characterized in that: described in step 2, select the dynamic strategy of static policies to be: the ASCII character of last character that is encoded to original Hash ciphertext of a kind of static policies of selecting divides exactly the remainder of the species number n of static policies.
4. according to the Hash ciphertext encryption method again based on noise claimed in claim 1, it is characterized in that: described in step 2, select the dynamic strategy of static policies to be: the remainder of the species number n ASCII character of the first character that is encoded to original Hash ciphertext of a kind of static policies of selecting and the ASCII character of last character and that divide exactly static policies.
5. according to the Hash ciphertext encryption method again based on noise claimed in claim 1, it is characterized in that: in the character string of noise described in step 5, the span of each character is 0~9 and a~f.
6. according to the Hash ciphertext encryption method again based on noise claimed in claim 1, it is characterized in that: in the character string of noise described in step 5, the span of each character is 0~9 and A~F.
7. the method Hash ciphertext adopting as claimed in claim 1 again after encryption method is encrypted being again decrypted, is characterized in that the method comprises the following steps:
Step 1, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, first, take out the described first noise ciphertext of having encrypted again first, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1; Then, remove the described first noise ciphertext of having encrypted again first, form the first noise ciphertext of having encrypted; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, take out last position of the described second noise ciphertext of having encrypted again, the corresponding coding of static policies that acquisition is selected, then, according to the corresponding coding of the static policies of selecting, obtain the static policies of selecting, and obtain the value of the first noise insertion position N1;
Step 2, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, according to described the first noise insertion position N1, from the described first noise ciphertext of having encrypted, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, according to described the first noise insertion position N1, from the noise ciphertext that described second has encrypted again, obtain the value of described the second value of noise insertion position N2 and the length L 1 of noise character string;
Step 3, in the time corresponding the static policies of selecting coding being inserted into first of the first first half Hash ciphertext, from described the first noise insertion position N1, the described first noise ciphertext of having encrypted is divided into the first first half Hash ciphertext and the 3rd later half Hash ciphertext, and remove front two in described the 3rd later half Hash ciphertext, form the later half Hash ciphertext of the first band noise; In the time corresponding the static policies of selecting coding being inserted into last of the first later half Hash ciphertext, first, from described the first noise insertion position N1, the described second noise ciphertext of having encrypted is again divided into the first first half Hash ciphertext and the 4th later half Hash ciphertext, then, in described the 4th later half Hash ciphertext, remove front two and last position, form the later half Hash ciphertext of the first band noise;
Step 4, in described the first band noise later half Hash ciphertext, according to the length L 1 of described the second noise insertion position N2 and described noise character string, remove described noise character string, form the first later half Hash ciphertext;
Step 5, described the first first half Hash ciphertext and the first later half Hash ciphertext are merged successively, generate the original Hash ciphertext after deciphering.
CN201410196257.9A 2014-05-11 2014-05-11 Hash ciphertext re-encryption method based on noise and decryption method after re-encryption Expired - Fee Related CN103942500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410196257.9A CN103942500B (en) 2014-05-11 2014-05-11 Hash ciphertext re-encryption method based on noise and decryption method after re-encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410196257.9A CN103942500B (en) 2014-05-11 2014-05-11 Hash ciphertext re-encryption method based on noise and decryption method after re-encryption

Publications (2)

Publication Number Publication Date
CN103942500A true CN103942500A (en) 2014-07-23
CN103942500B CN103942500B (en) 2017-02-22

Family

ID=51190166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410196257.9A Expired - Fee Related CN103942500B (en) 2014-05-11 2014-05-11 Hash ciphertext re-encryption method based on noise and decryption method after re-encryption

Country Status (1)

Country Link
CN (1) CN103942500B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222453A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 A kind of document transmission method and device
CN107463816A (en) * 2016-06-02 2017-12-12 比亚迪股份有限公司 Encryption method, device and the terminal device of finger print data
CN108155985A (en) * 2017-06-29 2018-06-12 广东网金云计算有限公司 A kind of encipher-decipher method, device and user terminal
CN108173640A (en) * 2017-12-11 2018-06-15 上海高顿教育培训有限公司 The character string symmetric cryptography and decryption method of a kind of high security
CN109664000A (en) * 2019-01-24 2019-04-23 深圳市新杰斯锐电子科技有限公司 A kind of solder system
CN110474930A (en) * 2019-09-29 2019-11-19 国家计算机网络与信息安全管理中心 A kind of safety interacting method and device based on information transmission
CN118646533A (en) * 2024-08-14 2024-09-13 江西神舟信息安全评估中心有限公司 Password management method and system applied to industrial Internet security

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030133566A1 (en) * 2002-01-09 2003-07-17 David Soldera Public key encryption system
CN1560823A (en) * 2004-02-19 2005-01-05 李春林 Data encipher and decipher system based on dynamic variable-length code
CN1777040A (en) * 2005-12-14 2006-05-24 北京北大方正电子有限公司 Variable length structural information coding and decoding method
CN101291325A (en) * 2007-04-17 2008-10-22 三星电子株式会社 Method for encryption for information and decryption method for information
CN101710380A (en) * 2009-12-22 2010-05-19 中国软件与技术服务股份有限公司 Electronic document safety protection method
CN102045718A (en) * 2009-10-23 2011-05-04 中国移动通信集团福建有限公司 Authentication method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030133566A1 (en) * 2002-01-09 2003-07-17 David Soldera Public key encryption system
CN1560823A (en) * 2004-02-19 2005-01-05 李春林 Data encipher and decipher system based on dynamic variable-length code
CN1777040A (en) * 2005-12-14 2006-05-24 北京北大方正电子有限公司 Variable length structural information coding and decoding method
CN101291325A (en) * 2007-04-17 2008-10-22 三星电子株式会社 Method for encryption for information and decryption method for information
CN102045718A (en) * 2009-10-23 2011-05-04 中国移动通信集团福建有限公司 Authentication method and system
CN101710380A (en) * 2009-12-22 2010-05-19 中国软件与技术服务股份有限公司 Electronic document safety protection method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222453A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 A kind of document transmission method and device
CN107222453B (en) * 2016-03-22 2020-01-31 阿里巴巴集团控股有限公司 file transmission method and device
CN107463816A (en) * 2016-06-02 2017-12-12 比亚迪股份有限公司 Encryption method, device and the terminal device of finger print data
CN107463816B (en) * 2016-06-02 2019-12-20 比亚迪股份有限公司 Fingerprint data encryption method and device and terminal equipment
CN108155985A (en) * 2017-06-29 2018-06-12 广东网金云计算有限公司 A kind of encipher-decipher method, device and user terminal
CN108173640A (en) * 2017-12-11 2018-06-15 上海高顿教育培训有限公司 The character string symmetric cryptography and decryption method of a kind of high security
CN108173640B (en) * 2017-12-11 2020-12-15 上海高顿教育科技有限公司 High-security symmetric encryption and decryption method for character strings
CN109664000A (en) * 2019-01-24 2019-04-23 深圳市新杰斯锐电子科技有限公司 A kind of solder system
CN109664000B (en) * 2019-01-24 2020-10-16 深圳市新杰斯锐电子科技有限公司 Tin soldering system
CN110474930A (en) * 2019-09-29 2019-11-19 国家计算机网络与信息安全管理中心 A kind of safety interacting method and device based on information transmission
CN110474930B (en) * 2019-09-29 2022-03-11 国家计算机网络与信息安全管理中心 Information transmission-based secure interaction method and device
CN118646533A (en) * 2024-08-14 2024-09-13 江西神舟信息安全评估中心有限公司 Password management method and system applied to industrial Internet security

Also Published As

Publication number Publication date
CN103942500B (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN103942500B (en) Hash ciphertext re-encryption method based on noise and decryption method after re-encryption
US9537657B1 (en) Multipart authenticated encryption
US9608822B2 (en) Method for generating an HTML document that contains encrypted files and the code necessary for decrypting them when a valid passphrase is provided
US20120134490A1 (en) Selective Data Encryption and Decryption Method and Apparatus
US20150244518A1 (en) Variable-length block cipher apparatus and method capable of format preserving encryption
CN103684794A (en) Communication data encryption and decryption method based on DES (Data Encryption Standard), RSA and SHA-1 (Secure Hash Algorithm) encryption algorithms
CN102664740B (en) Remote-authorization-based bidding document encryption and decryption method
CN102904712A (en) Information encrypting method
Purnama An analysis of encryption and decryption application by using one time pad algorithm
CN105812146A (en) MD5-based two-way encryption data protection method
CN102255725A (en) Random hybrid key encryption/decryption method
CN105282090A (en) Public URL encryption coding method for preventing illegal access on internet
CN103731423A (en) Safe method for repeated data deleting
CN104038336A (en) Data encryption method based on 3DES
Prasanna et al. Performance analysis of md5 and sha-256 algorithms to maintain data integrity
CN106789053A (en) Random ciphertext generation method and system, decryption method and system
CN104486756B (en) A kind of encryption and decryption method and system of close writing paper short message
Sharma et al. Analysis of AES Encryption with ECC
CN102236767B (en) In conjunction with the file encrypting method of cryptographic hash
JP5411034B2 (en) Database encryption system and method
CN102882675A (en) Password encryption method for social network sites
CN103457721B (en) A kind of method and device of Mass production password
CN103942501B (en) Hash ciphertext re-encrypting method and decryption method after re-encryption
CN111314052B (en) Data encryption and decryption method
CN112528309A (en) Data storage encryption and decryption method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Li Na

Inventor before: Gong Xingyu

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170222

Termination date: 20170511

CF01 Termination of patent right due to non-payment of annual fee