Password security assessment method and device based on graph structure generation
Through graph convolutional neural network and adversarial learning, the graph structure of passwords is constructed, which solves the problem of password security evaluation that ignores graph structures in the prior art, and achieves a more accurate and secure password evaluation.
Patent Information
- Application Number
- CN202210037914.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-01-13
AI Technical Summary
The prior art mainly based on text generation in password security evaluation, ignores processing passwords from the perspective of the graph, and fails to make full use of the relationship information of password elements.
Graph convolutional neural network (GCN) is used to combine adversarial learning, and the graph structure of the password is constructed, the generation and discrimination modules are optimized, and password distribution and internal relationships are mined to achieve password security evaluation.
Through the learning of graph structure and adversarial learning, the generated passwords are increasingly consistent with the real distribution, and can more accurately evaluate and generate password sets with higher security, grasping the potential relationship of password elements.
Smart Images

Figure CN114611091B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet technology, and in particular, relates to a password security assessment method and device based on graph structure generation. Background Art
[0002] With the continuous advancement of science and technology, various security threats and attack methods continue to emerge, bringing many security issues. Identity authentication technology is an important line of defense for information system security, and text password authentication is the simplest and most practical type of identity authentication technology. The text password is a private data that is not disclosed according to the agreement between the two parties to verify the identity of the user. In general, in order to access system resources, the user enters a text password pair (usually a user ID and a text password). The system checks whether the information entered by the user matches the data of the corresponding user owned by the system, thereby distinguishing whether the input information is a legitimate user. Therefore, password research is very important for the security of information systems and is also conducive to the development of national information security.
[0003] With the introduction of N-order Markov models (Markov N-grams) and probabilistic context-free grammar models (PCFG), researchers have entered a new era in the study of passwords. These models have laid the foundation for password security assessment in recent years because they are fundamentally different from traditional heuristic password algorithms. At the same time, with the development of deep learning, researchers have found that the use of neural networks can greatly promote password security assessment technology. For example, the PassGAN method uses adversarial learning to adaptively learn password distribution and automatically infer password distribution information. However, these methods are all based on text generation, and basically no one considers password generation from a graph perspective. If each element of the password is regarded as a point and the adjacent relationship is regarded as an edge, then each password is a directed graph. Converting password guessing into graph guessing and generation can obtain information that cannot be considered at the text level.
[0004] Therefore, the present invention starts from the perspective of graph, utilizes graph convolutional neural network (GCN), and combines it with adversarial learning to adaptively mine password distribution and internal relations, giving new features to password security assessment. Summary of the invention
[0005] In view of the above description, the present invention proposes a password security assessment method and device based on graph structure generation. The present invention regards each password as a graph, each element of the password represents a point, and the adjacent relationship of the elements represents an edge. The connection between the characters of the password is converted into the learning of the graph structure. Specifically, the present invention first uses a convolutional neural network (CNN) to generate a graph structure. The generated graph represents each password, and the generated graph is constrained to conform to the distribution of real samples. Then, features are mined from the data distribution, and GCN is used to determine the authenticity of the generated graph. After adversarial learning of the generation module and the discrimination module, the generated graph structure is more and more consistent with the distribution of real samples. Finally, the password is guessed. The present invention innovatively considers password guessing from the perspective of the graph, analyzes the data, grasps the element distribution information, and explores the potential relationship between the passwords by constructing a graph structure, thereby generating a more secure password set.
[0006] In order to achieve the above object, the specific technical solution adopted by the present invention is:
[0007] A password security assessment method based on graph structure generation, the steps of which include:
[0008] Acquire a password set, and calculate an element frequency feature vector of the password set based on the occurrence frequency of each element in the password set;
[0009] Represent each sample password in the password set as a graph to obtain a graph structure matrix G;
[0010] The graph structure generation module and the graph structure discrimination module are optimized by adversarial learning, wherein the graph structure generation module is used to calculate the output password based on the feature vector obtained by concatenating the element frequency feature vector and the random noise, and the graph structure discrimination module is used to determine the truth or falsity of the password based on the graph structure matrix G or the graph structure matrix G′, wherein the graph structure matrix G′ is obtained by graphing the output password;
[0011] The optimized graph structure generation module is used to perform security assessment on the password to be evaluated.
[0012] Furthermore, the method for calculating the occurrence frequency includes: calculating based on the elements included in the password set and the number of times each element appears.
[0013] Furthermore, the graph structure matrix G and the graph structure matrix G′ may be in the form of: an adjacency matrix.
[0014] Further, the adjacency matrix corresponding to the output password is obtained by the following steps:
[0015] 1) Obtain the vector matrix H of the output password;
[0016] 2) Set a zero matrix A;
[0017] 3) If i is less than L, obtain the ordinate of the element with the largest value in the i-th row of the vector matrix H, and record it as the value n i , and fill the elements of the [(i+1)%L]th row of the vector matrix H into the matrix A i The nth i rows, where L is the length of the vector matrix H;
[0018] If i is equal to L, the output matrix A L as the adjacency matrix.
[0019] Furthermore, the optimization of the graph structure generation module and the graph structure discrimination module by adversarial learning includes:
[0020] When training the graph structure discrimination module, using an adversarial loss function to make the graph structure discrimination module determine that the sample password is true and the output password is false;
[0021] When training the graph structure generation module, an adversarial loss function is used to make the graph structure discrimination module determine that the output password is true.
[0022] Furthermore, the adversarial loss function is
[0023] Where x represents sample passwords, z represents random noise, and p represents the characteristic vector of the frequency of occurrence of the elements described in step 200; E(·) represents the expected value; p(x) represents the distribution of password set samples, and p(z) represents the noise distribution; D represents the graph structure discrimination module, and G represents the graph structure generation module
[0024] Furthermore, the input of the graph structure identification module includes: the graph structure matrix G, the graph structure matrix G′ and a diagonal matrix whose diagonal is the occurrence frequency of each element.
[0025] Furthermore, the graph structure generation module after application optimization performs security assessment on the password to be assessed, including:
[0026] 1) Based on the element distribution information in the password to be evaluated, calculate the element frequency feature vector of the password to be evaluated;
[0027] 2) Generate a simulated password based on the element frequency feature vector of the password to be evaluated and the graph structure generation module after the random noise input optimization;
[0028] 3) By comparing the password to be evaluated with the simulated password, a security assessment is performed on the password to be evaluated.
[0029] A storage medium stores a computer program, wherein the computer program is configured to execute the above method when running.
[0030] An electronic device includes a memory and a processor, wherein the memory stores a program for executing the above method.
[0031] Compared with the prior art, the present invention has the following positive effects:
[0032] At present, almost all password security assessment methods based on neural networks are based on text generation, and ignore the fact that passwords can be treated as graphs. When the elements of each password are regarded as points and the adjacent relationships as edges, each password can form a graph. Therefore, the present invention innovatively considers password security assessment from the perspective of a graph, and converts password generation into graph generation. The present invention uses adversarial learning, which not only grasps the element distribution information in learning, but also uses GCN to build a discrimination module to determine the relationship between the graph structure distribution and the actual distribution of the password. Password discrimination from the perspective of the graph can better grasp the relationship between the password elements, thereby connecting passwords in series from a large number of password elements. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A technical schematic diagram of the method proposed by the present invention;
[0034] Figure 2 A schematic diagram of the process of the method proposed by the present invention;
[0035] Figure 3 Schematic diagram of graph structure generation. DETAILED DESCRIPTION
[0036] In order to make the technical solution of the present invention better understood by the persons skilled in the art, and to make the features and purposes of the present invention more understandable, the following will describe the specific implementation methods in conjunction with the accompanying drawings.
[0037] The present invention proposes a new idea for password security assessment, which considers password generation from the perspective of graphs. A password set is generally composed of a number of characters. How to string together a password from a large number of characters in a suitable order is an important process in password security assessment, and this process can be well represented in the form of a graph. Figure 1 As shown, the present invention uses adversarial learning and uses a generation module (G) to generate passwords. These passwords will eventually be represented in the form of a graph and put into the discriminator (D) together with the real passwords for identification. After continuous learning, the graph structure of the passwords generated by the generation module is more and more consistent with the distribution of the real world. This method not only innovatively considers password security assessment from the perspective of a graph, but also better fits the relationship between password elements in the form of a graph. The following will describe the details of the training and actual use of the present invention based on specific drawings:
[0038] like Figure 2 As shown, the process schematic diagram of the method proposed by the present invention includes:
[0039] Step 100, obtain a password set and process the password set. The present invention mainly analyzes the password set and performs relevant data statistics. First, it is necessary to count the elements contained in the password, the number of times each element appears, and calculate the frequency. The calculation method is as follows:
[0040]
[0041] Among them C i represents the number of occurrences of the i-th element, P i represents the frequency of occurrence of the i-th element, and T represents the total number of elements in the entire password set. The frequency values of various elements are concatenated to obtain the frequency feature vector of the password set elements. Then, each password needs to be represented by a graph, and the present invention adopts the form of an adjacency matrix. Figure 3 As shown, for example, when the entire password set contains 6 elements (1, 4, 7, a, j, k), when representing the password 714jk, it is only necessary to set the adjacent positions to 1 and the other positions to 0 to obtain a 6×6 adjacency matrix.
[0042] Step 200, construct a graph structure generation module. Generally, the input of the generation module is random noise that conforms to the normal distribution, and then the generation module learns and outputs a vector of generated passwords. Finally, after adversarial learning, the generated passwords are more and more consistent with the real distribution. This method only fits the data distribution from the perspective of the output. The present invention further considers the input and adds element distribution information to the input. The input of the present invention not only includes random noise that conforms to the normal distribution, denoted as Z, but also includes the characteristic vector of the frequency of occurrence of the elements in step 100, denoted as P. Z and P are spliced, which is the input of the graph structure generation module of the present invention. In this way, the distribution information of the password set is fully utilized, which makes the generated password more consistent with the distribution of the password set. The network structure of the graph structure generation module of the present invention is mainly based on the generator of the PassGAN method. In order to adapt to the improved input, the present invention modifies the generator of the PassGAN method, mainly adding a three-layer structure to the head of the generator, as shown in Table 1.
[0043] Table 1 Network structure added by graph structure generation module based on PassGAN
[0044] Network structure Output Dimensions Fully connected layer [Linear (input dimension, 128)] 1×128 Normalization layer [BatchNorm1d(128)] 1×128 Activation layer [ReLU] 1×128
[0045] The "input dimension" in the table is the sum of the dimensions of Z and P. Finally, the vector of the output command (denoted as H) is structurally transformed and converted into the corresponding adjacency matrix, that is, the graph structure. This transformation method mainly transforms the position of the row vector of H, as shown in the algorithm process in Table 2.
[0046] Table 2 Adjacency matrix conversion algorithm table
[0047]
[0048] Step 300, construct a graph structure discrimination module. The present invention uses a graph convolutional neural network (GCN) to judge the graph structure. The input of the module is the adjacency matrix of the real sample of the password set and the sample generated in step 200, as well as the feature matrix F. The general practice is to use the unit matrix as the feature matrix F, but the present invention takes into account the distribution information of each element, so the diagonal matrix whose diagonal is the frequency of occurrence of various elements is used as F. Other settings are consistent with the general GCN method. Finally, the module outputs the judgment information of the graph. Judging the distribution of password elements from the perspective of the graph not only conforms to the characteristics of the password itself, but also grasps the relationship between the elements.
[0049] Step 400, conduct adversarial learning. The present invention adopts the learning method of generative adversarial network (GAN) to optimize the constructed graph structure generation module and graph structure discrimination module. The core idea of the optimization is adversarial learning: adopting an alternating training method; when training the discrimination module, using the adversarial loss function to constrain the discrimination module to judge the sample input of the password set as true, and the sample generated by the generation module as false; when training the generation module, using the adversarial loss to make the discrimination module believe that the sample generated by the generation module is true. After multiple rounds of adversarial training, the samples generated by the generation module are more and more consistent with the distribution of the password set. The adversarial loss function used is as follows:
[0050]
[0051] Wherein, x represents the input of the real sample, i.e., the password set sample; z represents random noise, p represents the characteristic vector of the frequency of occurrence of the element described in step 200; E(·) represents the expected value; p(x) represents the distribution of the password set sample, p(z) represents the noise distribution; D represents the graph structure discrimination module, and G represents the graph structure generation module.
[0052] Step 500: Use the generation module to perform password security assessment. After training, the generation module is basically capable of generating samples that conform to the password set distribution. At this time, the generation module can be used to perform password collisions in actual applications. Based on the input random noise and element distribution information, the generation module outputs the password.
[0053] Finally, it should be noted that the above implementation cases are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention is described in detail using examples, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A password security assessment method based on graph structure generation, the steps comprising: Acquire a password set, and calculate an element frequency feature vector P of the password set based on the occurrence frequency of each element in the password set; Based on the graph structure generation module, a vector of output passwords corresponding to each sample password in the password set is obtained; wherein the graph structure discrimination module adds a fully connected layer, a normalized layer, and an activation layer on the basis of the generator of the PassGAN method, and the input dimension of the fully connected layer is the sum of the dimension of the random noise Z conforming to the normal distribution and the dimension of the element frequency feature vector P; Perform structural transformation on the vector of the output password to obtain the adjacency matrix A; The graph structure generation module and the graph structure discrimination module are optimized by adversarial learning, wherein the input of the graph structure discrimination module is a sample password in a password set, an adjacency matrix A of the sample password, and a feature matrix F, wherein the feature matrix F is a diagonal matrix whose diagonal line is the frequency of occurrence of each element, and the output of the graph structure discrimination module is the judgment information of the adjacency matrix A. The graph structure generation module and the graph structure discrimination module are optimized by adversarial learning, including: When training the graph structure discrimination module, the adversarial loss function is used to constrain the graph structure discrimination module to judge the sample password input in the password set as true, and to judge the output password generated by the graph structure generation module as false; When training the graph structure generation module, using the adversarial loss function to make the graph structure discrimination module believe that the output password generated by the graph structure generation module is true; The optimized graph structure generation module is used to perform security assessment on the password to be evaluated.
2. The method according to claim 1, characterized in that The method for calculating the occurrence frequency includes: calculating based on the elements included in the password set and the number of times each element appears.
3. The method according to claim 1, characterized in that The structure transformation of the vector of the output password is performed to obtain an adjacency matrix A, including: 1) Obtain the vector matrix H of the output password; 2) Set a zero matrix A; 3) If i is less than L, obtain the ordinate of the element with the largest value in the i-th row of the vector matrix H, and record it as the value n i , and fill the elements of the [(i+1)%L]th row of the vector matrix H into the matrix A i The nth i rows, where L is the length of the vector matrix H; If i is equal to L, the output matrix A L as the adjacency matrix.
4. The method according to claim 1, characterized in that The adversarial loss function is Where x represents sample passwords, z represents random noise, and p represents the characteristic vector of the frequency of occurrence of the elements described in step 200; E(·) represents the expected value; p(x) represents the distribution of password set samples, and p(z) represents the noise distribution; D represents the graph structure discrimination module, and G represents the graph structure generation module.
5. The method according to claim 1, characterized in that The graph structure generation module after application optimization performs security assessment on the password to be assessed, including: 1) Based on the element distribution information in the password to be evaluated, calculate the element frequency feature vector of the password to be evaluated; 2) Generate a simulated password based on the element frequency feature vector of the password to be evaluated and the graph structure generation module after the random noise input optimization; 3) By comparing the password to be evaluated with the simulated password, a security assessment is performed on the password to be evaluated.
6. A storage medium storing a computer program, wherein: The computer program is configured to execute the method according to any one of claims 1 to 5 when executed.
7. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Bulk password grading priori check method
CN104268450A
Password strength evaluation method based on weak password deduction
CN108647511A
User authentication password security evaluation method and device based on random forest model
CN110334488A
Password strength evaluation method based on sequence generation adversarial neural network
CN112000948A
Password dictionary generation method and system based on Markov chain and neural network
CN112257433A