📜 ⬆️ ⬇️

The optimal length and composition of the password

Introduction



Against the background of numerous posts about passwords, I decided to do a little research.

Currently, password protection is the most common and, unfortunately, the most unreliable method of protection. There are many articles on the topic “How to make a strong password”, but I haven’t met any articles that provide real data on the strength of passwords.
')
The study assesses the reliability of passwords to resist brute force attacks. The most effective method of brute force in the search for passwords for hash functions is the compilation of rainbow tables.

Calculations are carried out for the three hash functions md5, sha1 and sha2 (modification sha512). The data on collisions in these hash functions are not taken into account, as from a practical point of view they will not help in real password selection, and there are no open implementations of worthy software. The study involved passwords with a length of 7, 8, 10 and 12 characters of three different alphabets.

For clarity, the results provide data on the number of passwords, the amount of disk space for storing rainbow tables, and the estimated time to build rainbow tables.

Tools.



Intermediate calculations.


The number of combinations of passwords is (the number of characters in the alphabet) ^ (the number of characters in the password)
The study involved 3 alphabets:

Results.


For the alphabet A1
NoNumber of charactersHash algorithmDisk spaceCounting time
one7md52.98 GB5 days
2eightmd589.4 GB159 days
3tenmd5113,249 GB661.5 years
four12md5178 754 329 GB1.19851e + 006 years
five7sha12.98 GB7 days
6eightsha189.4 GB230 days
7tensha1113,249 GB918 years old
eight12sha1178 754 329 GB1,58632e + 006 years
97sha5122.98 GB16 days
teneightsha51289.4 GB1.4 years
eleventensha512113,249 GB1905 years
1212sha512178 754 329 GB3.1438e + 006


For alphabet A2
NoNumber of charactersHash algorithmDisk spaceCounting time
one7md5232.5 GB1 year
2eightmd517,881.4 GB90.2 years
3tenmd577,486,038.2 GB462539 years old
four12md5--
five7sha1232.5 GB1.6 years
6eightsha117,881.4 GB129 years
7tensha177,486,038.2 GB638089 years old
eight12sha1--
97sha512232.5 GB3.54 years
teneightsha51217,881.4 GB286.5 years
eleventensha51277,486,038.2 GB1.33807e + 006 years
1212sha512--

For alphabet A3
NoNumber of charactersHash algorithmDisk spaceCounting time
one7md5596 GB2.73 years
2eightmd541,723 GB206 years
3tenmd5238,418 579 GB1,38521e + 006 years
four12md5--
five7sha1596 GB4 years
6eightsha141,723 GB301 year
7tensha1238,418 579 GB1.91805e + 006 years
eight12sha1--
97sha512596 GB9 years
teneightsha51241,723 GB654 years
eleventensha512238,418 579 GB3,95008e + 006 years
1212sha512--

For alphabet A4
NoNumber of charactersHash algorithmDisk spaceCounting time
one12md559.6 GB133 days
215md559 604.64 GB426 years
317md55,960,464.47 GB47,574 years
four20md51 665 497 181 GB4,94612e + 007 years
five12sha159.6 GB175 days
615sha159 604.64 GB563 years
717sha15,960,464.47 GB60 505 years
eight20sha11 665 497 181 GB6.2405e + 007 years
912sha51259.6 GB359 days
ten15sha51259 604.64 GB1040 years
eleven17sha5125,960,464.47 GB110 162 years
1220sha5121 665 497 181 GB1.12256e + 008 years

Dash where the program has decided that it will be enough to count.

Findings.


Everyone should choose the length and composition of passwords for himself, from myself I can only say, it is better to choose a password up to 12 characters and periodically change it, rather than take a password of 20 characters and feel completely safe.

PS This is my first post on Habré, do not kick much, please.

UPD Added A4 alphabet and statistics to it.

Source: https://habr.com/ru/post/80036/


All Articles