[go: up one dir, main page]

CN104717058B - Password traversal method and device - Google Patents

Password traversal method and device Download PDF

Info

Publication number
CN104717058B
CN104717058B CN201510069374.3A CN201510069374A CN104717058B CN 104717058 B CN104717058 B CN 104717058B CN 201510069374 A CN201510069374 A CN 201510069374A CN 104717058 B CN104717058 B CN 104717058B
Authority
CN
China
Prior art keywords
character
password
traversal
bit
probability
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
CN201510069374.3A
Other languages
Chinese (zh)
Other versions
CN104717058A (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.)
Xiamen Meiya Pico Information Co Ltd
Original Assignee
Xiamen Meiya Pico Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Meiya Pico Information Co Ltd filed Critical Xiamen Meiya Pico Information Co Ltd
Priority to CN201510069374.3A priority Critical patent/CN104717058B/en
Publication of CN104717058A publication Critical patent/CN104717058A/en
Application granted granted Critical
Publication of CN104717058B publication Critical patent/CN104717058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a kind of password traversal method and device.This method includes:Obtain the default characters for carrying out password traversal;Probability factor collection and association factor collection corresponding to default characters are obtained, wherein, probability factor collection includes the probability factor that preset characters concentrate each character to correspond to every, password, and association factor collection includes the association factor that preset characters concentrate any two character;And traversal password is determined according to probability factor collection and association factor collection.By means of the invention it is possible to conventional password first traversal is arrived.

Description

Password traversal method and device
Technical Field
The present invention relates to the field of encryption and decryption technologies, and in particular, to a method and an apparatus for traversing a password.
Background
The violence traversal method and the dictionary traversal method are two most commonly used traversal modes in the current password traversal method. The violence traversal method refers to traversal of all passwords in a rule set by a user, and the dictionary traversal method refers to traversal of the passwords in a dictionary. The brute force traversal method usually needs more rules to cover the password space as large as possible to improve the success rate of password recovery, but the too large password space will cause the traversal time to be doubled, even hundreds of years of time are needed, and the password recovery is meaningless. The success rate of the dictionary traversal method is limited by the password number in the dictionary, and as the password number of the dictionary is not too large, the traversal of the password can be completed in a short time, but only common passwords can be recovered, and the method is ineffective for some complex passwords.
How to recover the most complicated password in the effective time is the main research direction of current password recovery. Aiming at a violent traversal method, the main research focuses on improving the traversal speed through various hardware acceleration, algorithm optimization and distributed technologies so as to shorten the traversal time. However, the traversal time can only be linearly reduced by increasing the traversal speed, and the geometric progression of the traversal time is increased by increasing the password length and increasing the character set for password traversal.
At present, for brute force traversal methods of common rules, a password is traversed by arranging and combining character sets. That is, given character set "0123456789" traverses the 6-bit password, and the sequence of traversing the password is "000000" - > "000001" - > … - > "899999" - > "99999999", that is, firstly traversing the password "000000", and finally traversing the password "999999". However, the inventor researches and discovers that the probabilities of the traversal passwords as the passwords are not equal, for example, the probability of the traversal password as the password is far higher than that of the traversal password as the password of '999999' and that of '000001', so that many effective passwords can be constructed at the tail of some rules for the existing violent traversal method. Secondly, since some common passwords are uniformly distributed in the rules in the existing brute force traversal method, some common passwords may be traversed at last.
Aiming at the problem that a common password cannot be traversed preferentially when the password is traversed by a permutation and combination mode in the prior art, an effective solution is not provided at present.
Disclosure of Invention
The invention mainly aims to provide a password traversal method and a password traversal device, which are used for solving the problem that a common password cannot be traversed preferentially when the password is traversed in a permutation and combination mode in the prior art.
According to one aspect of the invention, a password traversal method is provided.
The password traversal method comprises the following steps: acquiring a preset character set for password traversal; acquiring a probability factor set and an association factor set corresponding to a preset character set, wherein the probability factor set comprises a probability factor corresponding to each bit of a password of each character in the preset character set, and the association factor set comprises association factors of any two characters in the preset character set; and determining a traversal password according to the probability factor set and the association factor set.
Further, the obtaining of the probability factor set and the association factor set corresponding to the preset character set specifically includes: determining probability factors of each character in a preset character set corresponding to each digit of a password and association factors of any two characters in the preset character set according to research results of social engineering; or counting one or more password dictionaries to obtain a probability factor of each bit of the password corresponding to each character in the preset character set and an association factor of any two characters in the preset character set.
Further, determining the traversal password according to the set of probability factors and the set of association factors includes: calculating the occurrence probability of each character in a preset character set at the first bit of the first traversal password according to the probability factor set and the association factor set; determining the character with the maximum occurrence probability of the first bit of the first traversal password in the preset character set as the first bit character of the first traversal password; after the N-1 bit character of the first traversal password is determined, calculating the occurrence probability of each character in a preset character set at the N bit of the first traversal password according to the N-1 bit character, the probability factor set and the association factor set, wherein N is 2,3,4 … N, and N is the password length for password traversal; determining the character with the maximum occurrence probability of the nth bit of the first traversal password in the preset character set as the nth bit character of the first traversal password; combining each bit character of the first traversal password according to bits to determine the first traversal password; and after the J-1 th traversal password is determined, updating the J-1 th traversal password according to the J-1 th traversal password, the probability factor set and the association factor set to obtain the J-1 th traversal password, wherein J is 2,3,4 … J, and J is the number of passwords for password traversal.
Further, if the first character is any character in the preset character set, calculating the occurrence probability of the first character at the first bit of the first traversal password specifically includes: taking the probability factor of the first character corresponding to the first bit of the password as the occurrence probability of the first character at the first bit of the first traversal password; or the following formula is adopted to calculate the probability of the first character appearing at the first bit of the first traversal code,
P1=α1×a11×b1
wherein, P1for the probability of occurrence of the first character in the first digit of the first traversal code, α1the probability factor, β, for the first digit of the password corresponding to the first character1Is the association factor of the first character with each character in the preset character set, a1And b1Is a preset weight value, and a1+b1=1。
Furthermore, the mth character is the next character of the mth bit character of the j-1 th traversal password, the mth character is the next character adjacent to the mth bit character after the characters in the preset character set are sorted from high to low according to the occurrence probability of the mth bit of the j-1 traversal password, the probability corresponding to the mth character is the occurrence probability of the mth character of the mth bit of the j-1 traversal password, and m is 1,2,3,4 … N; the Xth character is the next character of the Xth bit character of the j-1 th traversal password, and the probability corresponding to the Xth character is the maximum probability in the probabilities corresponding to the next character of the Xth bit character of the j-1 th traversal password.
After the j-1 th traversal password is determined, updating the j-1 th traversal password according to the j-1 th traversal password, the probability factor set and the association factor set to obtain the j th traversal password, wherein the step of updating the j-1 th traversal password comprises the following steps: sequentially taking the first character to the X-1 bit character of the jth-1 traversal password as the first character to the X-1 bit character of the jth traversal password; taking the Xth character as the Xth bit character of the jth traversal password; aiming at the (X + 1) th bit character to the (N) th bit character of the jth traversal password, after the (l-1) th bit character of the jth traversal password is determined, calculating the occurrence probability of each character in a preset character set at the (l) th bit of the jth traversal password according to the (l-1) th bit character, a probability factor set and an association factor set, wherein l is X +1, and X +2 … N, and N is the password length for password traversal; determining the character with the maximum occurrence probability of the ith bit of the jth traversal password in the preset character set as the ith bit character of the jth traversal password; and combining each bit character of the jth traversal password according to bits to determine the jth traversal password.
Further, the second character is any character in a preset character set, and for any ergodic password, when the appearance probability of the second character at the qth bit of the ergodic password is calculated according to the qth-1 bit character, the probability factor set and the association factor set of the ergodic password, the following formula is adopted for calculation:
Pq=αq×aqq×bq
wherein, Pqis the probability of occurrence of the second character at the qth bit of the traversal password, alphaqfor the second character, the probability factor, beta, corresponding to the q-th digit of the codeqIs the correlation factor of the second character and the q-1 th character of the traversal password, aqAnd bqIs a preset weight value, and aq+bqAnd when the traversal code is the jth traversal code, q is X +1, and X +2 … N.
Further, after obtaining the jth traversal password, the method further includes: judging whether the jth traversal password is a valid password; if the jth traversal password is a valid password, ending the traversal; if the jth traversal password is not a valid password, calculating the proportion of the number of traversed passwords in a password space of a preset character set for password traversal, so as to obtain the space coverage rate of the traversed passwords; and when the spatial coverage rate is equal to a preset threshold value, ending the traversal.
According to another aspect of the present invention, a password traversal apparatus is provided.
The password traversal apparatus according to the present invention includes: the first acquisition module is used for acquiring a preset character set for password traversal; the second acquisition module is used for acquiring a probability factor set and an association factor set corresponding to the preset character set, wherein the probability factor set comprises a probability factor of each bit of a password corresponding to each character in the preset character set, and the association factor set comprises association factors of any two characters in the preset character set; and the determining module is used for determining the traversal password according to the probability factor set and the association factor set.
Further, the second obtaining module specifically executes the following steps: determining probability factors of each character in a preset character set corresponding to each digit of a password and association factors of any two characters in the preset character set according to research results of social engineering; or counting one or more password dictionaries to obtain a probability factor of each bit of the password corresponding to each character in the preset character set and an association factor of any two characters in the preset character set.
Further, the determining module includes:
a first traversal password determination module to perform the steps of: calculating the occurrence probability of each character in a preset character set at the first bit of the first traversal password according to the probability factor set and the association factor set; determining the character with the maximum occurrence probability of the first bit of the first traversal password in the preset character set as the first bit character of the first traversal password; after the N-1 bit character of the first traversal password is determined, calculating the occurrence probability of each character in a preset character set at the N bit of the first traversal password according to the N-1 bit character, the probability factor set and the association factor set, wherein N is 2,3,4 … N, and N is the password length for password traversal; determining the character with the maximum occurrence probability of the nth bit of the first traversal password in the preset character set as the nth bit character of the first traversal password; combining each bit character of the first traversal password according to bits to determine the first traversal password; and
a second traversal password determination module for performing the steps of: after the J-1 th traversal password is determined, updating the J-1 th traversal password according to the J-1 th traversal password, the probability factor set and the association factor set to obtain the J th traversal password, wherein J is 2,3,4 … J, and J is the number of passwords for password traversal.
Further, if the first character is any character in the preset character set, the first traversal password determining module specifically executes the following steps when calculating the occurrence probability of the first character at the first bit of the first traversal password: taking the probability factor of the first character corresponding to the first bit of the password as the occurrence probability of the first character at the first bit of the first traversal password; or the following formula is adopted to calculate the probability of the first character appearing at the first bit of the first traversal code,
P1=α1×a11×b1
wherein, P1for the probability of occurrence of the first character in the first digit of the first traversal code, α1the probability factor, β, for the first digit of the password corresponding to the first character1Is the association factor of the first character with each character in the preset character set, a1And b1Is a preset weight value, and a1+b1=1。
Furthermore, the mth character is the next character of the mth bit character of the j-1 th traversal password, the mth character is the next character adjacent to the mth bit character after the characters in the preset character set are sorted from high to low according to the occurrence probability of the mth bit of the j-1 traversal password, the probability corresponding to the mth character is the occurrence probability of the mth character of the mth bit of the j-1 traversal password, and m is 1,2,3,4 … N; the Xth character is the next character of the Xth bit character of the j-1 th traversal password, and the probability corresponding to the Xth character is the maximum probability in the probabilities corresponding to the next character of the Xth bit character of the j-1 th traversal password.
The second traversal password determination module is used for executing the following steps: sequentially taking the first character to the X-1 bit character of the jth-1 traversal password as the first character to the X-1 bit character of the jth traversal password; taking the Xth character as the Xth bit character of the jth traversal password; aiming at the (X + 1) th bit character to the (N) th bit character of the jth traversal password, after the (l-1) th bit character of the jth traversal password is determined, calculating the occurrence probability of each character in a preset character set at the (l) th bit of the jth traversal password according to the (l-1) th bit character, a probability factor set and an association factor set, wherein l is X +1, and X +2 … N, and N is the password length for password traversal; determining the character with the maximum occurrence probability of the ith bit of the jth traversal password in the preset character set as the ith bit character of the jth traversal password; and combining each bit character of the jth traversal password according to bits to determine the jth traversal password.
Further, the second character is any character in the preset character set, and for any ergodic password, the second ergodic password determining module calculates the probability of occurrence of the second character at the q-th bit of the ergodic password by adopting the following formula when calculating the probability of occurrence of the second character at the q-th bit of the ergodic password according to the q-1-th bit character, the probability factor set and the association factor set of the ergodic password:
Pq=αq×aqq×bq
wherein, Pqis the probability of occurrence of the second character at the qth bit of the traversal password, alphaqfor the second character, the probability factor, beta, corresponding to the q-th digit of the codeqIs the correlation factor of the second character and the q-1 th character of the traversal password, aqAnd bqIs a preset weight value, and aq+bq1, wherein q is X +1, X +2 … N.
The second character is any character in a preset character set, and for a first traversal password, the first traversal password determining module calculates the appearance probability of the second character at the qth bit of the traversal password by adopting the following formula when calculating the appearance probability of the second character at the qth bit of the traversal password according to the qth-1 bit character, the probability factor set and the association factor set of the traversal password:
Pq=αq×aqq×bq
wherein, Pqis the probability of occurrence of the second character at the qth bit of the traversal password, alphaqfor the second character, the probability factor, beta, corresponding to the q-th digit of the codeqIs the correlation factor of the second character and the q-1 th character of the traversal password, aqAnd bqIs a preset weight value, and aq+bq1, wherein q is 2,3,4 … N.
Further, the apparatus further comprises an end traversal module for performing the following steps: judging whether the jth traversal password is a valid password; if the jth traversal password is a valid password, ending the traversal; if the jth traversal password is not a valid password, calculating the proportion of the number of traversed passwords in a password space of a preset character set for password traversal, so as to obtain the space coverage rate of the traversed passwords; and when the spatial coverage rate is equal to a preset threshold value, ending the traversal.
According to the invention, when a preset character set is subjected to password traversal to determine a traversal password, a probability factor set and an association factor set corresponding to the preset character set are obtained, wherein the probability factor set comprises a probability factor corresponding to each character in the preset character set to each bit of the password, the association factor set comprises association factors of any two characters in the preset character set, and then the traversal password is determined according to the probability factor set and the association factor set.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a password traversal method according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a password traversal method according to embodiment 2 of the present invention;
FIG. 3 is a flowchart of a password traversal method according to embodiment 3 of the present invention;
FIG. 4 is a flowchart of a password traversal method according to embodiment 4 of the present invention;
fig. 5 is a block diagram of a password traversal apparatus according to embodiment 7 of the present invention.
Detailed Description
The invention is further described with reference to the following figures and detailed description. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
For the sake of facilitating understanding of the present application, first, parameters related to the embodiments of the present application are explained:
(1) the probability factor alpha is that each character in the character set corresponds to one occurrence probability on each digit of the password, the probability is defined as the probability factor, and the larger the probability factor corresponding to a certain digit of the password, the larger the occurrence probability of the character on the digit of the password, and the decimal of 0-1.
(2) the association factor beta refers to the association degree of one character with another character in the character set and also can represent the probability of combining one character with another character, for the password with a certain bit character determined, the larger the association factor of the character with the bit character, the larger the probability of occurrence on the adjacent bit of the character of the password, and the value is a decimal number between 0 and 1.
(3) Spatial coverage γ: refers to the proportion of the number of traversal ciphers. The method specifically comprises the following steps: when aiming at one character set, the character set is used for password passing, the number of all traversed passwords forms a password space of the character set for the password passing, and the space coverage rate is the proportion of the number of the traversed passwords in the password space.
Hereinafter, various embodiments provided by the present application will be described in detail.
Example 1
As shown in fig. 1, this embodiment provides a password traversal method including steps S302 to S306 as follows.
Step S302: and acquiring a preset character set for password traversal.
During the password traversal, each bit of the password needs to be traversed by using the character structure in the character set, so at the beginning of the password traversal, the step S302 is first executed to obtain a preset character set, for example, the obtained preset character set is a character set composed of ten digits from 0 to 9 and 26 small-case letters from a to z.
Step S304: and acquiring a probability factor set and an association factor set corresponding to a preset character set.
the association factor set comprises association factors beta of any two characters in the preset character set, and is specifically defined as above.
In the step, the probability factor of each character in the preset character set corresponding to each digit of the password and the association factor of any two characters in the preset character set can be determined according to the research result of social engineering; or counting one or more password dictionaries to obtain a probability factor of each bit of the password corresponding to each character in the preset character set and an association factor of any two characters in the preset character set.
Step S306: and determining the traversal password according to the probability factor set and the association factor set.
Compared with the prior art that the password is traversed by arranging and combining characters in a character set, when a traversal password is determined according to a probability factor set and an association factor set, because the occurrence probability of the characters on password bits and the association relation among the characters are used as factors influencing the occurrence sequence of the traversal password, the common password can be traversed preferentially.
Example 2
As shown in fig. 2, this embodiment provides a more preferable password traversal method, which includes steps S102 to S112 as follows.
Step S102: and acquiring a preset character set for password traversal.
During the password traversal, each bit of character of the password is constructed and traversed by using characters in the character set, so that at the beginning of the password traversal, a character set is firstly obtained, for example, the obtained preset character set is a character set consisting of ten digits including 0-9 and 26 small letters including a-z.
Step S104: and acquiring a probability factor of each character in the preset character set corresponding to each bit of the password and an association factor of any two characters in the preset character set.
For example, according to the research result of social engineering, the probability factor of each bit of the password corresponding to any one existing character can be determined, and the determined probability factor is used to generate a probability factor table.
Similarly, according to the research result of social engineering, the association factors of any two existing characters can be determined, the determined association factors are generated into an association factor table, in the step, the association factors related to the characters in the non-preset character set in the association factor table are deleted, and the deleted association factor table only comprises the association factors of any two characters in the preset character set.
For another example, one or more commonly used password dictionaries are counted to obtain a probability factor of each bit of the password corresponding to each character in the preset character set and an association factor of any two characters in the preset character set.
Step S106: and aiming at any character in the preset character set, calculating the occurrence probability of the character at the first bit of the password according to the probability factor of the character corresponding to the first bit of the password so as to obtain the occurrence probability of each character in the preset character set at the first bit of the password.
When the first character of the password is determined, the first character of the password does not need to be associated with other characters, so that the probability of occurrence of the character at the first position of the password is irrelevant to the association factor and only relevant to the probability factor of the character corresponding to the first position of the password, and when the probability of occurrence of any one character in a preset character set at the first position of the password is calculated, the probability factor of the character corresponding to the first position of the password can be calculated.
Preferably, the probability factor of the first bit of the password corresponding to the character is directly used as the occurrence probability of the character in the first bit of the password, the processing method is simple, the greater the probability factor of the first bit of the password corresponding to the character is, the greater the occurrence probability of the character in the first bit of the password is, during the password traversal, the character corresponding to the greater probability factor of the first bit of the password is preferentially constructed as the first bit character of the traversal password, and the traversal password with the high occurrence probability can be preferentially traversed.
Step S108: and determining the first character of a traversal password according to the occurrence probability of each character in the preset character set at the first position of the password.
For example, all characters in the preset character set are sorted from large to small according to the occurrence probability of each character at the first bit of the password, the character with the largest occurrence probability is the first character, and the character with the smallest occurrence probability is the last character. When a first traversal password is determined, taking a first character as a first digit character of the first traversal password; when determining the second traversal password, the second character is used as the first character of the second traversal password, and so on.
Step S110: after the n-1 bit character of the traversal password is determined, aiming at any character in a preset character set, calculating the occurrence probability of the character at the n bit of the traversal password according to the probability factor of the character corresponding to the n bit of the password and the association factor of the character and the n-1 bit character of the traversal password, so as to obtain the occurrence probability of each character in the preset character set at the n bit of the traversal password, wherein n is a natural number which is more than 1 and not more than the length of the password.
When the nth character of the traversal password except the first-bit character is determined, because the nth character is related to the determined nth-1-bit character, the probability of occurrence of a character at the nth bit of the password is related to the probability factor of the character corresponding to the nth bit of the password and the association factor of the character with the determined nth-1-bit character, so that when the probability of occurrence of a character in a preset character set at the nth bit of the password is calculated, the probability factor of the character corresponding to the nth bit of the password and the association factor of the character with the determined nth-1-bit character can be calculated.
The probability of occurrence of a character at the nth bit of the traversal password is preferably calculated using the following formula:
P=α×a+β×b
p is the probability of occurrence of the nth bit of the traversal password, α is a probability factor of the nth bit of the password corresponding to the character, β is an association factor of the character and the (n-1) th bit of the password, a and b are preset weight values, and a + b is 1.
The weight values a and b may be adjusted according to actual needs, and preferably, the weight of the probability factor a is set to 0.6, and the weight of the association factor b is set to 0.4.
Step S112: and determining the nth character of the traversal password according to the occurrence probability of each character in the preset character set at the nth position of the traversal password.
For example, for the traversal password with the determined first-order character, the occurrence probability of each character in the preset character set at the second order of the password can be calculated through step S110, and in step S112, the character corresponding to the maximum occurrence probability among the occurrence probabilities of each character at the second order of the password is determined as the second-order character of the traversal password; for the traversal password, after determining the second-bit character, the probability of occurrence of each character in the preset character set at the third bit of the password may be calculated in step S110, and in step S112, the character corresponding to the maximum probability of occurrence of each character at the third bit of the password is determined as the third-bit character of the traversal password. And repeating the steps until all bit characters of the traversal password are determined, and completing the traversal of the password to obtain the traversal password.
Therefore, after the first digit character of the traversal password is determined, each digit character of the traversal password can be determined in sequence according to the process, and therefore the traversal password can be determined.
By adopting the password traversal method provided by the embodiment, when a preset character set is subjected to password traversal to determine a traversal password, the character on each bit of the traversal password is determined according to the occurrence probability of each character in the preset character set on each bit of the traversal password, and because the occurrence probability of each character on the corresponding bit of the traversal password is considered when any bit character of the traversal password is determined, the traversal password with high occurrence probability can be preferentially traversed, namely, a valid password is preferentially found, so that a large number of invalid passwords are prevented from being traversed, and the efficiency of the password traversal method is improved.
Example 3
As shown in fig. 3, this embodiment provides a more preferable password traversal method, which includes steps S202 to S218 as follows.
Step S202: and acquiring a preset character set for password traversal.
Step S204: and acquiring a probability factor of each character in the preset character set corresponding to each bit of the password and an association factor of any two characters in the preset character set.
Step S206: a password traversal is started to get the first password traversed.
Specifically, the step S206 may include the following steps:
a: aiming at any character in a preset character set, calculating the occurrence probability of the character at the first bit of the password according to the probability factor of the character corresponding to the first bit of the password so as to obtain the occurrence probability of each character in the preset character set at the first bit of the password;
b: taking the character with the highest probability of occurrence in the first digit of the password in the preset character set as the first digit character of the first password;
c: aiming at any character in a preset character set, calculating the occurrence probability of the character at the nth bit of the first password according to the probability factor of the nth bit of the password corresponding to the character and the association factor of the character and the nth-1 bit character of the first password to obtain the occurrence probability of each character in the preset character set at the nth bit of the first password, and taking the character with the maximum occurrence probability of the preset character set at the nth bit of the first password as the nth bit character of the first password.
Wherein n is a natural number which is greater than 1 and smaller than the password length. After each digit character of the first password is calculated and obtained by adopting the c, the first traversal password is obtained.
Step S208: and continuously traversing to obtain a traversed j-th password.
Wherein j is a password space for performing a password traversal larger than 1 and not larger than a preset character set. Specifically, the step S208 may include the following steps:
a 1: acquiring a first digit character and a second digit character of a j-1 password;
b 1: determining the next character of the first character of the j-1 password to obtain a first character, wherein the first character is the next character adjacent to the first character of the j-1 password after the characters in a preset character set are sorted from high to low according to the occurrence probability of the first character of the j-1 password, and the occurrence probability of the first character at the first position of the j-1 password is the first probability;
c 1: determining the next character of the second-bit character of the j-1 password to obtain a second character, wherein the second character is the next character adjacent to the second-bit character of the j-1 password after the characters in the preset character set are sorted from large to small according to the occurrence probability of the second bit of the j-1 password, and the occurrence probability of the second character at the second bit of the j-1 password is the second probability;
step d 1: comparing the first probability with the second probability;
step e 1: and if the first probability is larger than the second probability, taking the first character as the first bit character of the jth password, and further determining other bit characters of the jth password to obtain the jth password.
Specifically, after determining the first digit character of the jth password, the step S110 may calculate the occurrence probability of each character in the preset character set at the second digit of the jth password, and the step S112 determines the character corresponding to the maximum occurrence probability among the occurrence probabilities of each character at the second digit of the jth password as the second digit character of the jth password; for the jth password, after the second-bit character is determined, the occurrence probability of each character in the preset character set at the third bit of the jth password can be calculated through step S110, and the character corresponding to the maximum occurrence probability in the occurrence probabilities of each character at the third bit of the jth password is determined as the third-bit character of the jth password through step S112. And repeating the steps until all bit characters of the jth password are determined, and completing the traversal of the password to obtain a traversed password, namely the jth password.
f 1: if the first probability is smaller than the second probability, the first digit character of the j-1 th password is used as the first digit character of the j password, the second character is used as the second digit character of the j password, and other digit characters of the j password are further determined to obtain the j password.
Specifically, after determining the first digit character and the second digit character of the jth password, the occurrence probability of each character in the preset character set at the third digit of the jth password can be calculated through step S110, and the character corresponding to the maximum occurrence probability in the occurrence probabilities of each character at the third digit of the jth password is determined as the third digit character of the jth password through step S112; for the jth password, after determining the third bit of character, the occurrence probability of each character in the preset character set at the fourth bit of the jth password can be calculated through step S110, and the character corresponding to the maximum occurrence probability among the occurrence probabilities of each character at the fourth bit of the jth password is determined as the fourth bit of the jth password through step S112. And repeating the steps until all bit characters of the jth password are determined, and completing the traversal of the password to obtain a traversed password, namely the jth password.
Step S210: and judging whether the jth password is a valid password.
Step S212: and if the jth password is a valid password, ending the traversal.
Step S214: and if the traversal password is not the effective password, calculating the proportion of the number of the traversed passwords in the password space of the preset character set for password traversal so as to obtain the space coverage rate of the password traversal.
Step S216: when the spatial coverage is smaller than the preset threshold, j ═ j +1, the process returns to step S208.
Step S218: and when the space coverage rate is equal to a preset threshold value, ending the traversal.
By adopting the password traversal method provided by the preferred embodiment, when the first digit character of a traversal password is determined, the first digit character is determined by referring to the previously determined traversal password, so that an effective password can be simply and quickly found in priority, and the efficiency of the password traversal method is further improved. Meanwhile, a threshold of the spatial coverage rate can be set according to actual use requirements, for example, if password traversal is intended to be completed in a short time, the threshold of the spatial coverage rate can be reduced, and if success rate is intended to be improved as much as possible, the threshold of the spatial coverage rate is improved.
Example 4
As shown in fig. 4, this embodiment provides a more preferable password traversal method, which includes steps S402 to S408 as follows.
Step S402: and acquiring a preset character set for password traversal.
Step S404: and acquiring a probability factor set and an association factor set corresponding to a preset character set.
Step S406: a password traversal is started to get the first password traversed.
Specifically, the step S406 may include the following steps:
a 2: and calculating the occurrence probability of each character in the preset character set at the first bit of the first traversal password according to the probability factor set and the association factor set.
Specifically, taking any character in the preset character set, that is, an X character as an example, the following two calculation methods can be adopted to calculate the occurrence probability of the X character at the first bit of the first traversal password:
first, the probability factor that the X character corresponds to the first bit of the password is taken as the probability of the X character appearing at the first bit of the first traversal password. By this calculation method, an occurrence probability can be obtained for the X character.
Secondly, the probability of the X character appearing at the first bit of the first traversal code is calculated by adopting the following formula,
P1=α1×a11×b1
wherein, P1for the probability of occurrence of the X character in the first digit of the first traversal code, α1for the probability factor, beta, that the X character corresponds to the first digit of the password1Is the association factor of X character with each character in the preset character set, a1And b1Is a preset weight value, and a1+b1by this calculation method, β for the X character1When the association factors of the X characters and different characters in the preset character set are taken, one occurrence probability can be obtained, so that for the X characters, if M characters exist in the preset character set, the calculation method can obtain M occurrence probabilities.
b 2: and determining the character with the highest occurrence probability in the first bit of the first traversal password in the preset character set as the first bit character of the first traversal password.
No matter which calculation method is adopted, the maximum value of all the occurrence probabilities obtained by calculation is taken, and the character corresponding to the maximum value is used as the first-bit character of the first traversal password.
c 2: after the N-1 bit character of the first traversal password is determined, calculating the occurrence probability of each character in the preset character set at the N bit of the first traversal password according to the N-1 bit character, the probability factor set and the association factor set, wherein N is 2,3,4 … N, and N is the password length for password traversal.
Specifically, taking any character in the preset character set, that is, an X character as an example, after determining the n-1 bit character of the first traversal password, the following calculation method may be adopted to calculate the probability of occurrence of the X character at the n bit of the first traversal password:
Pn=αn×ann×bn
wherein, Pnfor the probability of occurrence of the X character at the nth bit of the first traversal code, αnfor the probability factor, beta, of the nth digit of the password for the X characternFor the association of the X character with the (n-1) th character of the first traversal passwordA isnAnd bnIs a preset weight value, and an+bn=1。
By the calculation method, an occurrence probability can be obtained for the X character, and therefore, each character in the preset character set can obtain an occurrence probability at the nth bit of the first traversal password.
d 2: and determining the character with the highest probability of occurrence in the nth bit of the first traversal password in the preset character set as the nth bit character of the first traversal password.
In the method, the maximum value of all the occurrence probabilities obtained by calculation is taken, and the character corresponding to the maximum value is used as the nth character of the first traversal password.
e 2: and combining each bit character of the first traversal password according to bits to determine the first traversal password.
After the first digit character of the first traversal password is determined, the second digit character is determined according to the c2 and the d2, the third digit character is determined according to the c2 and the d2, and the like until the character on each digit of the first traversal password is determined, and finally, in e2, each digit character is combined according to the digits to obtain the first traversal password.
Step S408: and continuously traversing to obtain the jth traversal password.
Specifically, after a first traversal password is determined, updating the first traversal password according to the first traversal password, the probability factor set and the association factor set to obtain a second traversal password; and after the second traversal password is determined, updating the second traversal password according to the second traversal password, the probability factor set and the association factor set to obtain a third traversal password, and so on, namely after the J-1 th traversal password is determined, updating the J-1 th traversal password according to the J-1 th traversal password, the probability factor set and the association factor set to obtain the J-th traversal password, wherein J is 2,3,4 … J, and J is the number of passwords for password traversal.
Specifically, in implementing this step S408, the following definitions are first made: each bit character of the j-1 th traversal password has a next character, for example, the mth character is set as the next character of the mth bit character of the j-1 th traversal password, and the mth character is specifically defined as the next character adjacent to the mth bit character after the characters in the preset character set are sorted from large to small according to the occurrence probability of the mth bit of the j-1 traversal password. m is 1,2,3,4 … N.
If the probability corresponding to the mth character is defined as the occurrence probability of the mth character at the mth bit next character of the j-1 traversal password, the xth character is specially the next character of the xth bit character of the j-1 traversal password, and the probability corresponding to the xth character is the maximum probability in the probabilities corresponding to the next character of the xth bit character of the j-1 traversal password.
On the basis of the above definition of the mth character and the xth character, the step S408 includes the steps of:
a 3: sequentially taking the first-bit character to the X-1-bit character of the j-1 th traversal password as the first-bit character to the X-1-bit character of the j-1 th traversal password, wherein the front X-1-bit character of the j-1 th traversal password is respectively and correspondingly identical to the front X-1-bit character of the j-1 th traversal password.
b 3: and taking the X character as the X character of the jth traversal password.
c 3: aiming at the (X + 1) th bit character to the (N) th bit character of the jth traversal password, after the (l-1) th bit character of the jth traversal password is determined, calculating the occurrence probability of each character in a preset character set at the (l) th bit of the jth traversal password according to the (l-1) th bit character, a probability factor set and an association factor set, wherein l is X +1, and X +2 … N, and N is the password length for password traversal.
Specifically, taking any character in the preset character set, that is, an X character as an example, after the l-1 bit character of the jth traversal password is determined, the following calculation method may be adopted to calculate the occurrence probability of the X character at the l bit of the jth traversal password:
Pl=αl×all×bl
wherein, Plfor the probability of occurrence of the X character at the l-th bit of the jth traversal code, αlfor the probability factor, beta, of the first digit of the password for an X characterlis the correlation factor, alpha, of the X character with the l-1 bit character of the jth traversal passwordland betalIs a preset weight value, and al+bl=1。
By the calculation method, an occurrence probability can be obtained for the X character, and therefore, each character in the preset character set can obtain an occurrence probability at the ith bit of the jth traversal password.
d 3: and determining the character with the highest occurrence probability in the ith bit of the jth traversal password in the preset character set as the ith bit character of the jth traversal password.
In the method, the maximum value of all the occurrence probabilities obtained by calculation is taken, and the character corresponding to the maximum value is used as the l-th bit character of the jth traversal password.
e 3: and combining each bit character of the jth traversal password according to bits to determine the jth traversal password.
Determining the front X-bit character of the jth traversal password according to a3 and b3, after determining the X-bit character of the jth traversal password, determining the X + 1-bit character of the jth traversal password according to c3 and d3, determining the X + 2-bit character of the jth traversal password according to c3 and d3, and repeating the steps until determining the X + 1-bit character to the N-bit character of the jth traversal password, so that each bit character of the jth traversal password is determined, and finally combining each bit character according to bits in e3 to obtain the jth traversal password.
Example 5
This embodiment 5 provides a more preferable method for traversing a password, in which the number of password bits of a valid password is 6 to 16, and a preset character set is composed of 10 numbers of 0 to 9, 26 lower case letters of a to Z, and 26 upper case letters of a to Z, and the method of this embodiment includes the following steps.
Step 1: and (6) initializing traversal.
In the initialization process, a probability factor table, an association factor table and a preset character set are obtained, the password length is initialized to 6, and the threshold value of the space coverage rate is determined.
The probability factor table includes probability factors of the first bit to the sixteenth bit of the password corresponding to the plurality of characters, that is, each character has 16 probability factors corresponding to the first bit to the sixteenth bit of the password. The association factor table includes association factors for any two of the plurality of characters. The preset character set is a character set consisting of 10 numbers from 0 to 9, 26 lower-case letters from a to Z, and 26 upper-case letters from a to Z. The threshold for spatial coverage is a predetermined percentage, such as 40%.
Step 2: and cutting the probability factor table and the associated factor table according to the selected character set, and deleting factors corresponding to characters in the non-character sets in the two tables.
And step 3: the first digit of the password is first constructed. Because the first character does not need to be associated with other characters, the character corresponding to the maximum probability factor is taken from the probability factor table and substituted into the first character;
for each character in the character set, extracting the probability factor α of the character from the probability factor table, extracting the association factor β of the character and the first-bit character constructed in the step 3 from the association factor table, calculating α multiplied by 0.6+ β multiplied by 0.4 so as to obtain a calculation result corresponding to each character in the character set, and substituting the character corresponding to the maximum calculation result in all the calculation results into the second bit;
and 5: then, constructing a third character and a fourth character by adopting the method in the step 4, and so on until all the positions of the password are filled, and at the moment, completing the construction of one password;
comparing the value of alpha x 0.6+ β x 0.4 of the next character of the second digit character of the constructed password (namely, the second probability in the embodiment 2) with α of the next character of the first digit character (namely, the first probability in the embodiment 2), if α of the next character of the first digit character (namely, the first probability) is large, updating the first digit character of the constructed password, wherein the updated first digit character is the next character of the first digit character, and if the value of alpha x 0.6+ β x 0.4 of the next character is large, retaining the first digit character of the constructed password, updating the character of the second digit of the constructed password, and wherein the updated character of the second digit is the next character of the second digit character;
and 7: constructing a next password according to the method of the step 4-5 and the determination of the characters of all other bits left after the step 6;
and 8: and (6) repeating the steps 6-7 until the ratio of the constructed password number to the complete password space reaches a specified space coverage rate threshold, completing password traversal once, adding 1 to the password length, and performing password traversal once after the password length is changed.
By adopting the embodiment of the password traversal method provided by the embodiment, based on the research result of social engineering, the distribution statistical law of password characters is applied, the common password can be preferentially constructed, most of invalid passwords are positioned at the rear part of traversal, and compared with the prior art, the valid password can be found in a shorter time. Meanwhile, space coverage rate is introduced, so that the success rate is not greatly influenced while the password space is greatly reduced.
Example 6
This embodiment 6 provides a more preferable method for traversing a password, in which the number of password bits of a valid password is 6 to 16, and a preset character set is composed of 10 numbers of 0 to 9, 26 lower case letters of a to Z, and 26 upper case letters of a to Z, and the method of this embodiment includes the following steps.
Step 1: and (6) initializing traversal.
In the initialization process, a probability factor table, an association factor table and a preset character set are obtained, the password length is initialized to 1, and the threshold value of the space coverage rate is determined.
The probability factor table includes probability factors of the first bit to the sixteenth bit of the password corresponding to the plurality of characters, that is, each character has 16 probability factors corresponding to the first bit to the sixteenth bit of the password. The association factor table includes association factors for any two of the plurality of characters. The preset character set is a character set consisting of 10 numbers from 0 to 9, 26 lower-case letters from a to Z, and 26 upper-case letters from a to Z. The threshold for spatial coverage is a predetermined percentage, such as 40%.
Step 2: and cutting the probability factor table and the associated factor table according to the selected character set, and deleting factors corresponding to characters in the non-character sets in the two tables.
And step 3: the first digit of the password is first constructed. If the password length is only one bit, the first character is determined according to the probability calculated by the probability factor, that is, the character corresponding to the maximum probability factor is taken from the probability factor table and substituted into the first character, that is, the first calculation mode in embodiment 4a2 is adopted; if the password length is more than two bits, the second calculation method in embodiment 4a2 is adopted, where a is 0.6 and b is 0.4, and details are not repeated here.
step 4, constructing a second digit character of the password, wherein the method is implemented in embodiment 4c2, specifically, for each character in the character set, extracting the probability factor α of the character from the probability factor table, extracting the association factor β of the character and the first digit character constructed in step 3 from the association factor table, calculating α × 0.6+ β × 0.4, thereby obtaining a calculation result corresponding to each character in the character set, and then substituting the character corresponding to the maximum calculation result in all the calculation results into the second digit;
and 5: then, constructing a third character and a fourth character by adopting the method in the step 4, and so on until all the positions of the password are filled, and at the moment, completing the construction of one password;
step 6: on the basis of the currently constructed password, taking each character with the highest bit probability (i.e., the next character defined in step S408 in embodiment 4), determining the maximum value of P1-Pn (i.e., the probability corresponding to the X-th character in step S408 in embodiment 4) where the probability corresponding to each character with the highest bit probability is P1-Pn, for example, Pm is the maximum, updating m bits to the next character (i.e., b3 in embodiment 4), and not updating the characters before m bits;
and 7: updating the characters of all other bits after the X bit according to the method of the step 4-5, and constructing a next password;
and 8: and (6) repeating the steps 6-7 until the ratio of the constructed password number to the complete password space reaches a specified space coverage rate threshold, completing password traversal once, adding 1 to the password length, and performing password traversal once after the password length is changed.
By adopting the embodiment of the password traversal method provided by the embodiment, based on the research result of social engineering, the distribution statistical law of password characters is applied, the common password can be preferentially constructed, most of invalid passwords are positioned at the rear part of traversal, and compared with the prior art, the valid password can be found in a shorter time. Meanwhile, space coverage rate is introduced, so that the success rate is not greatly influenced while the password space is greatly reduced.
The above is a description of the password traversal method provided by the present invention. The following describes the password traversal apparatus provided by the present invention, and it should be noted that the apparatus can be used to execute any one of the above password traversal methods.
Example 7
Fig. 5 is a block diagram of a password traversal apparatus according to embodiment 7 of the present invention, which corresponds to the password traversal method provided in embodiment 1 of the present invention, and an embodiment of the present invention further provides a password traversal apparatus, which may include a first obtaining module 10, a second obtaining module 20, and a determining module 30, referring to fig. 5.
The first obtaining module 10 is configured to obtain a preset character set for password traversal.
The second obtaining module 20 is configured to obtain a probability factor set and an association factor set corresponding to a preset character set, where the probability factor set includes a probability factor of each bit of a password corresponding to each character in the preset character set, and the association factor set includes an association factor of any two characters in the preset character set, and specifically, the second obtaining module 20 executes the following steps: determining probability factors of each character in a preset character set corresponding to each digit of a password and association factors of any two characters in the preset character set according to research results of social engineering; or counting one or more password dictionaries to obtain a probability factor of each bit of the password corresponding to each character in the preset character set and an association factor of any two characters in the preset character set.
The determining module 30 is configured to determine a traversal password according to the set of probability factors and the set of association factors.
Preferably, the determination module 30 comprises a first traversal password determination module and a second traversal password determination module.
The first traversal password determination module is configured to perform the following steps: calculating the occurrence probability of each character in a preset character set at the first bit of the first traversal password according to the probability factor set and the association factor set; determining the character with the maximum occurrence probability of the first bit of the first traversal password in the preset character set as the first bit character of the first traversal password; after the N-1 bit character of the first traversal password is determined, calculating the occurrence probability of each character in a preset character set at the N bit of the first traversal password according to the N-1 bit character, the probability factor set and the association factor set, wherein N is 2,3,4 … N, and N is the password length for password traversal; determining the character with the maximum occurrence probability of the nth bit of the first traversal password in the preset character set as the nth bit character of the first traversal password; and combining each bit character of the first traversal password according to bits to determine the first traversal password.
The second traversal password determination module is used for executing the following steps: after the J-1 th traversal password is determined, updating the J-1 th traversal password according to the J-1 th traversal password, the probability factor set and the association factor set to obtain the J th traversal password, wherein J is 2,3,4 … J, and J is the number of passwords for password traversal.
Preferably, the first character is any one of the characters in the preset character set, and the first traversal password determining module specifically executes the following steps when calculating the occurrence probability of the first character at the first bit of the first traversal password: taking the probability factor of the first character corresponding to the first bit of the password as the occurrence probability of the first character at the first bit of the first traversal password; or the following formula is adopted to calculate the probability of the first character appearing at the first bit of the first traversal code,
P1=α1×a11×b1
wherein, P1for the probability of occurrence of the first character in the first digit of the first traversal code, α1the probability factor, β, for the first digit of the password corresponding to the first character1Is the association factor of the first character with each character in the preset character set, a1And b1Is a preset weight value, and a1+b1=1。
Preferably, the mth character is a next character of the mth bit character of the j-1 th traversal password, the mth character is a next character adjacent to the mth bit character after the characters in the preset character set are sorted from high to low according to the occurrence probability of the mth bit of the j-1 traversal password, the probability corresponding to the mth character is the occurrence probability of the mth character of the mth bit of the j-1 traversal password, and m is 1,2,3,4 … N; the Xth character is the next character of the Xth bit character of the j-1 th traversal password, and the probability corresponding to the Xth character is the maximum probability in the probabilities corresponding to the next character of the Xth bit character of the j-1 th traversal password.
The second traversal password determination module is used for executing the following steps: sequentially taking the first character to the X-1 bit character of the jth-1 traversal password as the first character to the X-1 bit character of the jth traversal password; taking the Xth character as the Xth bit character of the jth traversal password; aiming at the (X + 1) th bit character to the (N) th bit character of the jth traversal password, after the (l-1) th bit character of the jth traversal password is determined, calculating the occurrence probability of each character in a preset character set at the (l) th bit of the jth traversal password according to the (l-1) th bit character, a probability factor set and an association factor set, wherein l is X +1, and X +2 … N, and N is the password length for password traversal; determining the character with the maximum occurrence probability of the ith bit of the jth traversal password in the preset character set as the ith bit character of the jth traversal password; and combining each bit character of the jth traversal password according to bits to determine the jth traversal password.
Preferably, the second character is any character in a preset character set, and for the first traversal password, the first traversal password determination module calculates the probability of occurrence of the second character at the qth bit of the traversal password by using the following formula when calculating the probability of occurrence of the second character at the qth bit of the traversal password according to the qth-1 bit character, the probability factor set, and the association factor set of the traversal password:
Pq=αq×aqq×bq
wherein, Pqis the probability of occurrence of the second character at the qth bit of the traversal password, alphaqfor the second character, the probability factor, beta, corresponding to the q-th digit of the codeqIs the correlation factor of the second character and the q-1 th character of the traversal password, aqAnd bqIs a preset weight value, and aq+bq1, wherein q is 2,3,4 … N.
For the second traversal password, the third traversal password and the fourth traversal password …, the second traversal password determination module calculates the probability of occurrence of the second character at the q-th bit of the traversal password according to the q-1-th bit character, the probability factor set and the association factor set of the traversal password by adopting the following formula:
Pq=αq×aqq×bq
wherein, Pqis the probability of occurrence of the second character at the qth bit of the traversal password, alphaqfor the second character, the probability factor, beta, corresponding to the q-th digit of the codeqIs the correlation factor of the second character and the q-1 th character of the traversal password, aqAnd bqIs a preset weight value, and aq+bq1, wherein q is X +1, X +2 … N.
Preferably, the apparatus further comprises an end traversal module for performing the steps of: judging whether the jth traversal password is a valid password; if the jth traversal password is a valid password, ending the traversal; if the jth traversal password is not a valid password, calculating the proportion of the number of traversed passwords in a password space of a preset character set for password traversal, so as to obtain the space coverage rate of the traversed passwords; and when the spatial coverage rate is equal to a preset threshold value, ending the traversal.
It should be noted that the above device embodiments belong to preferred embodiments, and the modules referred to are not necessarily essential to the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiments of the present application, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
From the above description of the embodiments, it can be seen that the embodiments of the present invention achieve the following technical effects: the traversal passwords with high occurrence probability can be preferentially traversed, namely, the effective passwords can be preferentially found, so that a large number of ineffective passwords are prevented from being traversed, and the efficiency of the password traversal method is improved.
The above description is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of password traversal, comprising:
acquiring a preset character set for password traversal;
acquiring a probability factor set and an association factor set corresponding to the preset character set, wherein the probability factor set comprises a probability factor of each bit of a password corresponding to each character in the preset character set, and the association factor set comprises association factors of any two characters in the preset character set; and
and determining a traversal password according to the probability factor set and the association factor set.
2. The password traversal method according to claim 1, wherein the obtaining of the set of probability factors and the set of association factors corresponding to the preset character set specifically comprises:
determining probability factors of each character in the preset character set corresponding to each digit of the password and association factors of any two characters in the preset character set according to research results of social engineering; or
And counting one or more password dictionaries to obtain a probability factor of each bit of the password corresponding to each character in the preset character set and a correlation factor of any two characters in the preset character set.
3. The password traversal method of claim 1, wherein determining a traversal password from the set of probability factors and the set of association factors comprises:
calculating the occurrence probability of each character in the preset character set at the first bit of the first traversal password according to the probability factor set and the association factor set;
determining the character with the highest occurrence probability in the first bit of the first traversal password in the preset character set as the first bit character of the first traversal password;
after the N-1 bit character of the first traversal password is determined, calculating the occurrence probability of each character in the preset character set at the N bit of the first traversal password according to the N-1 bit character, the probability factor set and the association factor set, wherein N =2,3,4 … N, and N is the password length for password traversal;
determining the character with the maximum occurrence probability of the nth bit of the first traversal password in the preset character set as the nth bit character of the first traversal password;
combining each digit character of the first traversal password according to the digit to determine the first traversal password; and
after the J-1 th traversal password is determined, updating the J-1 th traversal password according to the J-1 th traversal password, the probability factor set and the association factor set to obtain the J th traversal password, wherein J =2,3,4 … J, and J is the number of passwords for password traversal.
4. The method for traversing a password according to claim 3, wherein if the first character is any character in the preset character set, the calculating the probability of the first character appearing at the first bit of the first traversal password specifically comprises:
taking the probability factor of the first character corresponding to the first bit of the password as the occurrence probability of the first character at the first bit of the first traversal password; or
Calculating the probability of occurrence of said first character at the first bit of said first traversal code using the following formula,
wherein,the probability of occurrence of the first digit of the first traversal password for the first character,the probability factor for the first character corresponding to the first digit of the password,for the association factor of the first character with each character in the preset character set,andis a preset weight value, and
5. the password traversal method of claim 3,
the m-th character is the next character of the m-th character of the j-1 th traversal password, the m-th character is the next character adjacent to the m-th character after the characters in the preset character set are sorted from high to low according to the occurrence probability of the m-th character of the j-1 traversal password, the probability corresponding to the m-th character is the occurrence probability of the m-th character next to the m-th character of the j-1 traversal password, and m =1,2,3,4 … N;
the Xth character is the next character of the Xth bit character of the j-1 th traversal password, the probability corresponding to the Xth character is the maximum probability in the probabilities corresponding to the next character of the Xth bit character of the j-1 th traversal password,
after the j-1 th traversal password is determined, updating the j-1 th traversal password according to the j-1 th traversal password, the probability factor set and the association factor set to obtain a j-1 th traversal password, wherein the step of updating the j-1 th traversal password according to the j-1 th traversal password, the probability factor set and the association factor set comprises the following steps:
sequentially using the first bit character to the X-1 bit character of the j-1 th traversal password as the first bit character to the X-1 bit character of the j-1 th traversal password;
taking the Xth character as the Xth bit character of the jth traversal password;
aiming at the (X + 1) th bit character to the (N) th bit character of the jth traversal password, after the (l-1) th bit character of the jth traversal password is determined, calculating the occurrence probability of each character in the preset character set at the (l) th bit of the jth traversal password according to the (l-1) th bit character, the probability factor set and the association factor set, wherein l = X +1, and X +2 … N is the password length for password traversal;
determining the character with the highest occurrence probability of the ith bit of the jth traversal password in the preset character set as the ith bit character of the jth traversal password;
and combining each bit character of the jth traversal password according to bits to determine the jth traversal password.
6. The password traversal method according to claim 5, wherein the second character is any character in the preset character set, and for any traversal password, when calculating the probability of occurrence of the second character at the qth bit of the traversal password according to the qth-1 bit character of the traversal password, the probability factor set, and the association factor set, the following formula is used for calculation:
wherein,the probability of occurrence of the second character at the qth bit of the traversal password,a probability factor for said second character corresponding to the qth digit of the password,the association factor of the second character and the q-1 th character of the traversal password,andis a preset weight value, and
when the traversal password is the first traversal password, q =2,3,4 … N, and when the traversal password is the jth traversal password, q = X +1, X +2 … N.
7. The password traversal method of claim 3, wherein after obtaining the jth traversal password, the method further comprises:
judging whether the jth traversal password is a valid password;
if the jth traversal password is the valid password, ending traversal;
if the jth traversal password is not the valid password, calculating the proportion of the number of traversed passwords to a password space for the password traversal of the preset character set to obtain the space coverage rate of the traversed passwords; and
and when the space coverage rate is equal to a preset threshold value, ending the traversal.
8. A password traversal apparatus, comprising:
the first acquisition module is used for acquiring a preset character set for password traversal;
a second obtaining module, configured to obtain a probability factor set and an association factor set corresponding to the preset character set, where the probability factor set includes a probability factor of each bit of a password corresponding to each character in the preset character set, and the association factor set includes association factors of any two characters in the preset character set; and
and the determining module is used for determining the traversal password according to the probability factor set and the association factor set.
9. The password traversal apparatus of claim 8, wherein the determination module comprises:
a first traversal password determination module to perform the steps of: calculating the occurrence probability of each character in the preset character set at the first bit of the first traversal password according to the probability factor set and the association factor set; determining the character with the highest occurrence probability in the first bit of the first traversal password in the preset character set as the first bit character of the first traversal password; after the N-1 bit character of the first traversal password is determined, calculating the occurrence probability of each character in the preset character set at the N bit of the first traversal password according to the N-1 bit character, the probability factor set and the association factor set, wherein N =2,3,4 … N, and N is the password length for password traversal; determining the character with the maximum occurrence probability of the nth bit of the first traversal password in the preset character set as the nth bit character of the first traversal password; combining each digit character of the first traversal password according to the digit to determine the first traversal password; and
a second traversal password determination module for performing the steps of: after the J-1 th traversal password is determined, updating the J-1 th traversal password according to the J-1 th traversal password, the probability factor set and the association factor set to obtain the J th traversal password, wherein J =2,3,4 … J, and J is the number of passwords for password traversal.
10. The password traversal apparatus of claim 9,
the m-th character is the next character of the m-th character of the j-1 th traversal password, the m-th character is the next character adjacent to the m-th character after the characters in the preset character set are sorted from high to low according to the occurrence probability of the m-th character of the j-1 traversal password, the probability corresponding to the m-th character is the occurrence probability of the m-th character next to the m-th character of the j-1 traversal password, and m =1,2,3,4 … N;
the Xth character is the next character of the Xth bit character of the j-1 th traversal password, the probability corresponding to the Xth character is the maximum probability in the probabilities corresponding to the next character of the Xth bit character of the j-1 th traversal password,
the second traversal password determination module is configured to perform the following steps: sequentially using the first bit character to the X-1 bit character of the j-1 th traversal password as the first bit character to the X-1 bit character of the j-1 th traversal password; taking the Xth character as the Xth bit character of the jth traversal password; aiming at the (X + 1) th bit character to the (N) th bit character of the jth traversal password, after the (l-1) th bit character of the jth traversal password is determined, calculating the occurrence probability of each character in the preset character set at the (l) th bit of the jth traversal password according to the (l-1) th bit character, the probability factor set and the association factor set, wherein l = X +1, and X +2 … N is the password length for password traversal; determining the character with the highest occurrence probability of the ith bit of the jth traversal password in the preset character set as the ith bit character of the jth traversal password; and combining each bit character of the jth traversal password according to bits to determine the jth traversal password.
CN201510069374.3A 2015-02-10 2015-02-10 Password traversal method and device Active CN104717058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510069374.3A CN104717058B (en) 2015-02-10 2015-02-10 Password traversal method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510069374.3A CN104717058B (en) 2015-02-10 2015-02-10 Password traversal method and device

Publications (2)

Publication Number Publication Date
CN104717058A CN104717058A (en) 2015-06-17
CN104717058B true CN104717058B (en) 2018-03-20

Family

ID=53416056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510069374.3A Active CN104717058B (en) 2015-02-10 2015-02-10 Password traversal method and device

Country Status (1)

Country Link
CN (1) CN104717058B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105262584B (en) * 2015-09-08 2018-09-07 厦门市美亚柏科信息股份有限公司 Distribution routing algorithm restoration methods and system
CN106559222A (en) * 2016-11-28 2017-04-05 广东省信息安全测评中心 Target password rule set acquisition methods and system in method of exhaustion decryption
CN107579821B (en) * 2017-09-19 2020-04-28 厦门市美亚柏科信息股份有限公司 Method for generating password dictionary and computer-readable storage medium
CN113407924B (en) * 2021-06-01 2022-11-11 厦门市美亚柏科信息股份有限公司 Barrier-free service-based application lock opening method, terminal device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263641A (en) * 2011-07-18 2011-11-30 辽宁国兴科技有限公司 Dynamic password generating and authenticating method
CN102983967A (en) * 2012-12-06 2013-03-20 厦门市美亚柏科信息股份有限公司 Quick traversal algorithm and device for complicated password
CN103701590A (en) * 2014-01-07 2014-04-02 厦门市美亚柏科信息股份有限公司 Dictionary-based complex password traversing method and device
EP2738975A1 (en) * 2011-07-25 2014-06-04 Mitsubishi Electric Corporation Encryption device, encryption method and encryption program
JP2014171020A (en) * 2013-03-01 2014-09-18 Kddi Corp Information transmission system, encoding device, decoding device, information transmission method, encoding method, decoding method, and program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009276916A (en) * 2008-05-13 2009-11-26 Sony Corp Communication device, communication method, reader/writer, and communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263641A (en) * 2011-07-18 2011-11-30 辽宁国兴科技有限公司 Dynamic password generating and authenticating method
EP2738975A1 (en) * 2011-07-25 2014-06-04 Mitsubishi Electric Corporation Encryption device, encryption method and encryption program
CN102983967A (en) * 2012-12-06 2013-03-20 厦门市美亚柏科信息股份有限公司 Quick traversal algorithm and device for complicated password
JP2014171020A (en) * 2013-03-01 2014-09-18 Kddi Corp Information transmission system, encoding device, decoding device, information transmission method, encoding method, decoding method, and program
CN103701590A (en) * 2014-01-07 2014-04-02 厦门市美亚柏科信息股份有限公司 Dictionary-based complex password traversing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
利用社会工程学进行密码猜想;杨浩;《西安文理学院学报:自然科学版(2013)》;20131031(第4期);全文 *

Also Published As

Publication number Publication date
CN104717058A (en) 2015-06-17

Similar Documents

Publication Publication Date Title
CN106161012B (en) A post-processing system and method for quantum key distribution based on polar code error correction
CN104717058B (en) Password traversal method and device
KR102519076B1 (en) Apparatus and method for constructing polar code
Peres Iterating von Neumann's procedure for extracting random bits
US20120166808A1 (en) Lattice-based ring signature method
CN115080615B (en) Data query method and device based on multiparty security calculation
CN111478885B (en) Asymmetric encryption and decryption method, equipment and storage medium
CN104270247A (en) Efficient Universal Hash Function Authentication Scheme for Quantum Cryptosystem
CN106452757B (en) quantum secret sharing system and sharing method and error correction method thereof
Song et al. Linear feature encoding for reinforcement learning
RU2444127C1 (en) Method for soft-decision decoding systematic block codes
Cadenas et al. Median filter architecture by accumulative parallel counters
CN115088038A (en) Improved quality value compression framework in aligned sequencing data based on new context
CN117155546B (en) Searching method and device for block cipher type cube attack, electronic equipment and medium
Wang et al. A Chaotic Key Expansion Algorithm Based on Genetic Algorithm.
Le Gal et al. Low-latency sorter architecture for polar codes successive-cancellation-list decoding
CN108804933A (en) A kind of system conversion method for big data
Hostens et al. Asymptotic adaptive bipartite entanglement-distillation protocol
CN102638344A (en) Method for constructing reinforced hash function based on compression function
CN112134679B (en) Combined high-order side channel attack method, device, equipment and medium for SM4
CN113971296B (en) ID fuzzification data processing system
CN116886273A (en) Three-dimensional medical image encryption method based on biological characteristic key and cubic S box
CN109660695B (en) Color image encryption method based on genetic simulated annealing algorithm and chaotic mapping
JPWO2018109809A1 (en) Decoding device, decoding method and program
CN114124351B (en) Rapid calculation method of nonlinear invariant

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant