Hi there Gary
Hope it´s not too late, I´ll try to help you here anyway.
(1.) If a password is a code that consists of 10 digits what is the maximum number of combinations that have to be generated in order to break the code?
Supposing the password allows only decimal symbols, the maximun number of combinations would be
10^
10 (10 to the tenth power).
Where
10 is the quantity of different symbols that the password allows (in case of decimal, there are 10 different symbols: 0,1,2,3,4,5,6,7,8,9) and
10 is the length of the password.
Supposing the password allows only lowercase symbols from the alphabet, the maximun number of combinations would be
26^
10 (26 to the tenth power).
Where
26 is the quantity of different symbols that the password allows (in case of English alphabet, there are 26 different symbols-letters: a,b,c,d,e,f,g,h…) and
10 is the length of the password.
So, a generic answer would be: The maximun number of combinations would be
n^10, where
n is the numer of symbols the password accepts and 10 is the length of the password.
(2.) A password hacker devised a system of trying out passwords using a program which ran once a second. How long on average would it take to crack a password consisting of 6 characters taken from the alphabet (both upper and lower case) and the digits 0-9? Show all your calculations.
I believe that "Ran once a second" means that it tries a single combination-password per second. So, let´s first calculate the maximun number of combinations (like in exercise 1).
Okay, English Alphabet is 26 words right? So, considering both uppercase and lowercase, there will be 52 different symbols. But if we also add the decimal symbols (1,2,3,4,5,6,7,8,9), we will have a 62 symbols-"language", or in other words, the password will accept 62 different symbols.
So, the maximun number of combinations will be
62^
6 (62 to the sixth power).
Where
62 is the number of different available symbols to use in the password and
6 is the lenght of the password.
Okay, so if the program tries one combination per second, it will take the hacker
62^
6 (62 to the sixth power) seconds on average to gain acces to the system.
==================================
At this point there´s an interesting point of discussion that is related to the exercises you propose. When choosing a strong password, what do you think is more important: length of the password or the number of different symbols it consists of?