+ 3

[Code challenge] pin number complexity calculator

Lets say, you want to choose a 8 digits pin number as a password, and you know that, a scammer may find out what some of the digits are by looking at the finger prints on a keypad (but would not know in what order they are) Write a program that will answer those questions: - how many combinations will the scammer have to try? - is it safer to have duplicate digits in the pin code? - is it safer to allow less than the 8 digits for the password? (ie, the password can be 8 digits or less) - how much safer (quantitatively) if alphanumerical characters are allowed? - assuming it takes 1 sec to enter a 8 digits code, how long is needed to try all combinations?

3rd Jun 2018, 12:26 AM
ifl
ifl - avatar
7 ответов
+ 4
😄😄😄😄
15th Jun 2018, 9:23 PM
Mr. Bot
Mr. Bot - avatar
+ 3
then we should burn all maths books and start coding instead. Mathematics is about solving problem , coding is implementation of that solution in computer's language
15th Jun 2018, 9:18 PM
Mr. Bot
Mr. Bot - avatar
+ 2
this is just math not coding bro😝
15th Jun 2018, 9:10 PM
Mr. Bot
Mr. Bot - avatar
+ 1
Hello, i am a bit new to this so I might have not completely understood your question, but as far as i am concerned this seems more like a mathematical problem. I would answer your questions with : - the combinations are those of p buttons to make an 8 digit number (this part can easily be coded in about two lines). - No it is not safer to have duplicate unless the scammer would have to test 8 digits regardless. - No it is not safer since the scammer will know the number of digits involved, unless he is led to believe that there may be duplicates, regardeless while the number of possibilities would indeed increase, smaller passwords would probably be the easiest to crack. - Not much since the scammer knows the characters involverd in any case. - at best 10**8 and at worst 10**8+10**7+10**6+10**5+10**4+10**3+10**2+10 in seconds, i would say (though i might be way too pesmistic in my calculations since the scammer would assume there are no duplicate if 8 digits are invoved wich would make 8! possibilities instead of 10**8) Good day to you
3rd Jun 2018, 5:15 PM
Salah
+ 1
Salah yes indeed, this is a math problem to solve. The coding challenge is about coding the program to give the answer, as to demonstrate coding skills... for example : - maybe use the math formula directly, or instead, use a loop to create all combination, and count the number of combinations found. - maybe take the length of pin number as parameter - maybe take the list of known digits as parameter - having the program printing out the findings, or/and the answers to the questions.....
3rd Jun 2018, 5:49 PM
ifl
ifl - avatar
0
Mr. Bot coding something that solves a math problem is still coding. 🤔😁
15th Jun 2018, 9:11 PM
ifl
ifl - avatar
0
Mr. Bot Maybe.... we could also stop saying hello, since there are so many "Hello world " programs out there!!! 😁
15th Jun 2018, 9:21 PM
ifl
ifl - avatar