# Dynamic Markov Model: Password Guessing Using Probability Adjustment Method
## 3 Method
### Dynamic Markov Model  
We employ the dynamic distribution mechanism in the standard Markov model and propose a dynamic Markov model. Given the way passwords are modeled by Markov chain, we have to make subtle adjustments in practice. There are three deviations compared with the ideal theory in Theorem 1. When the model generates password \(P_{G}:c_{1}c_{2}\ldots c_{m}\), it is impossible to verify whether \(N\times p(P_{G})\) is more than 1 or not, because \(N\) is unknown, therefore the model has to replace the verification method with another simplified method. As multiple n-gram fragments jointly determine the probability of the password, it is very complicated to deal with the probability of the whole password, so the dynamic Markov model executes operations at the n-gram level instead of the password level. So we judge whether the probability value of the n-gram fragment is greater than \(\alpha\). Moreover, the experimental results also prove that this simplification can effectively make the distribution of the password more uniform. In order to reduce the probability of \(P_{G}\), we can only adjust the conditional probability. If \(m\) conditional probability values are all adjusted, the model will consume too much calculation time, affecting the overall password generating speed. Simultaneously, a large number of passwords will be affected, and the probability distribution will change greatly, so it is difficult to guarantee the cover rate. For example, 123456 and 123456789 are both high-probability passwords; 123456 has been generated and 123456789 has not appeared. Adjusting 6 conditional probability values of password 123456 will greatly reduce the probability of 123456789, so randomly getting 123456789 becomes more difficult. Hence, the dynamic Markov model randomly selects one of \(m\) conditional probability to adjust each time. This approach of modifying the probability is matched with password modeling mode, and it limits the influence range of modifying as much as possible. We need to increase the probability of passwords in \(S_{M}\) except for \(P_{G}\), but it is impossible to traverse all of these passwords. Therefore, we increase the probability of some passwords which have the selected n-gram fragments, while the probability of other unrelated passwords remains the same. The dynamic Markov model ensures that the changes of the password probability distribution just restrict on the support set \(S_{M}\) and do not propagate into the string space \(S_{S}\). Although that only modifies a small part of the password, it avoids the time-consuming modification of all passwords every time. Overall, because the number of passwords in the support set \(N\) is unknown and large, and [PERSON]'s modeling strategy for passwords makes them share n-gram fragments, the dynamic Markov model makes the above three modifications on the basis of comprehensive consideration of computational efficiency and practical difficulties. It successfully realizes the application of the dynamic distribution mechanism. It should be noted that there is a balancing effect in the dynamic distribution mechanism itself. For example, changing the probability distribution of the n-gram fragment \(c|a,b\) would result in the over modification of some passwords (such as those that contain \(c|a,b\); \(d|a,b;e|a,b\); etc. ), but would have no effect on other passwords (such as those that do not contain these above n-gram fragments). These two simultaneous effects would be partially offset during the multiple processes of random sampling to generate passwords. Our dynamic distribution mechanism works as follows in practice: for example, first randomly select n-gram fragment \(c_{3}|c_{1},c_{2}\).