Math vs Pack Combination
(Traduzir)
You who use secret locks, be careful! Because with the basics of Combinatorial Analysis it is possible to discover the password in several models! First, let’s define the modus operandi of the users of the secret locks whose model involves several digits visible at the same time, so that they can then be positioned in the correct digits of the password.
Users of these padlocks select a password with the N digits X_{1}, X_{2}, X_{3}, …, X_{N}. As they consider the exhaustive search for this password impossible, that is to test the 9^{N} combinations, they believe it is safe, soon they start to use the lock constantly. Each time they finish using the lock, make sure to shuffle the password, that is, choose Y_{1}, …, Y_{N} so for all digits, Y_{i} ≠ X_{i}.
If the shuffling process is carried out in a deterministic way, that is, always choosing the same Y_{1}, Y_{2}, Y_{3}, …, Y_{N}. The analysis of the padlock on different occasions will always give the same information … however, if the shuffling occurs in a non-deterministic way (that is, it shuffles at random, without following any pattern), we will have:
Y_{11}, Y_{12}, Y_{13}, …, Y_{1K}
Y_{21}, Y_{22}, Y_{23}, …, Y_{2K}
Y_{31}, Y_{32}, Y_{33}, …, Y_{3K}
…
Y_{N1}, Y_{N2}, Y_{N3}, …, Y_{NK}
Thus, if for all digits Y_{i} ≠ X_{i} (that is, whoever scrambled it made sure that no number of the password would remain in the final configuration). We can determine the frequencies with which each number appears in each digit. Digits with frequencies 0 will be candidates for the solution. This greatly reduces the space for combinations to be analyzed.
However, the risk is heightened for those who use several secret locks (such as computer lab technicians). Since an analysis of the laboratory’s M padlocks reduces its scope of possibilities.
Real example: in a computer lab, they use secret locks to secure ten of the computers’ cabinets. The password for each lock consists of 4 digits from 0 to 9.
When looking at the digit spaces, we can see up to 2 numbers (since they are not actually aligned as a password). Below I present the 10 configurations recorded on my last visit to the site. On the label of each column we have C-(padlock number), and in the lines below the two numbers visible in each space of the password.
C-1 |
C-2 |
C-3 |
C-4 |
C-5 |
C-6 |
C-7 |
C-8 |
C-9 |
C-10 |
7-6 |
4-3 |
6-5 |
4-3 |
5-4 |
9-8 |
7-6 |
5-4 |
3-2 |
8-7 |
2-1 |
4-3 |
7-6 |
1-0 |
9-8 |
3-2 |
1-0 |
1-0 |
9-8 |
5-4 |
2-1 |
4-3 |
2-1 |
4-3 |
6-5 |
4-3 |
0-9 |
3-2 |
4-3 |
6-5 |
4-3 |
4-3 |
8-7 |
8-7 |
8-7 |
3-2 |
2-1 |
2-1 |
5-4 |
2-1 |
Analyzing the digits that do not appear in the Y_{1}, Y_{2}, Y_{3}, Y_{4} positions of the lock, we have to:
Position Y1: 0 and 1 do not appear;
Position Y2: 7 does not appear;
Position Y3: 8 does not appear;
Position Y4: 0, 6 and 9 do not appear.
With this, we can reduce from the original combinations (9⁴) to the following 6:
1st possibility: 0-7-8-0;
2nd possibility: 0-7-8-6;
3rd possibility: 0-7-8-9;
4th possibility: 1-7-8-0;
5th possibility: 1-7-8-6;
6th possibility: 1-7-8-9.
However, it is worth noting that when we define the user’s modus operandi, we put the user to shuffle the password such that all digits Y_{i} ≠ X_{i}. But if instead of everyone they were “almost everyone” or “the majority”, the problem would become a little more complex. Because we would need a much larger amount of samples to infer among those with lower frequencies (not necessarily the lowest frequency), which candidates are the solution.
Out of curiosity, I tested these 6 combinations in the same laboratory and none of them opened the lock. Which allows us to conclude that the technician’s modus operandi does not guarantee that Y_{i} ≠ X_{i}. To decode these padlocks, we would then need to gather more results and choose as candidates those with lower frequencies, even if they are greater than 0.