
Have you ever wondered how to calculate the complexity of a password?
The basic element for calculating the complexity of a password is cardinality, which is the total number of elements in a set. The cardinality of the Italian alphabet, for example, is 21, which is the number of letters in it.
The cardinality of the English alphabet, on the other hand, is 26. Since it is in international use, it is also the alphabet of reference for this type of calculation.
Another element to keep in mind is the “search space,” the number of characters contained in the password (the search space of the word ‘apple,’ for example, is 4). As a matter of probability, of course, the longer the word is (and therefore the more the size of the search space is grade), the more secure the password.
Keeping in mind that the cardinality of special characters is 33, and that of numbers is 10, let us try a simple calculation together.
If my password is:
pizza
Lowercase letters of the alphabet: 26
uppercase letters of the alphabet: –
Numbers: –
Special characters: –
Search Space: 5
The result will be: 26 5
Pizza
Lower case letters of the alphabet: 26
Upper case letters of the alphabet: 26
Numbers: –
Special characters: –
Search Space: 5
The result will be:(26+26) 5
Pizza.
Lower case letters of the alphabet: 26
Upper case letters of the alphabet: 26
Numbers: –
Special characters: 33
Search Space: 6
The result will be: ( 26+ 26+ 33) 6
1Pizza!
Lower case letters of the alphabet: 26
Upper case letters of the alphabet: 26
Numbers: 10
Special characters: 33
Search Space: 7
The result will be: ( 26+ 26+ 33+ 10) 7
The trick is to add a cardinality for each element in the password. If the word contains only lowercase letters, then you will count the cardinality of the English alphabet only once, 26. If it contains both uppercase and lowercase letters, you will add 26+26, and so on for numbers and special characters as well.
The next step is to elevate the result by the number of total characters, or search space. The higher the number, the more secure the password!
Easy, isn’t it?
Curiosity!
- There are free sites, such as How big is your haystack? by the Gibson Research Corporation, that help you estimate the effectiveness of your password based precisely on complexity calculations.
- Did you miss our in-depth discussion on how to choose a secure Password?
Share