Probability of guessing a password

  • Thread starter Thread starter alman9898
  • Start date Start date
  • Tags Tags
    Probability
Click For Summary

Homework Help Overview

The discussion revolves around calculating the probability of a hacker successfully guessing a password composed of two lowercase letters, given five attempts before detection. Participants are exploring the implications of independent guesses and the total number of possible passwords.

Discussion Character

  • Conceptual clarification, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants are considering different interpretations of the guessing process, including whether guesses are made with or without replacement. There is discussion about using geometric distribution to model the probability of success over multiple attempts.

Discussion Status

Some participants are questioning the assumptions about independence of guesses and whether the hacker remembers previous attempts. There is a mix of opinions on how to approach the calculation, with some suggesting a focus on the probability of failure across attempts.

Contextual Notes

Participants are operating under the assumption that there are 26*26 possible passwords and are debating the implications of the hacker's guessing strategy on the overall probability of success.

alman9898
Messages
9
Reaction score
0

Homework Statement


Consider a simple password scheme using only two lowercase letters. A hacker is given 5 chances to guess the pw before being detected. Computer probability hacker is successful.


Homework Equations


p = 1/(26*26)


The Attempt at a Solution



I'm assuming the hacker isn't guessing randomly, but without replacement.

I feel that I may be multiplying the wrong probabilities, but what the heck:

P(attacker is successful) = \frac{1}{26^{2}} + \frac{1}{26^{2}*(26^{2}-1)} + \frac{1}{26^{2}*(26^{2}-1)*(26^{2}-2)} + \frac{1}{26^{2}*(26^{2}-1)*(26^{2}-2)*(26^{2}-3)} + \frac{1}{26^{2}*(26^{2}-1)*(26^{2}-2)*(26^{2}-3)*(26^{2}-4)}

This was an intuitive guess, since each guess is equally likely, I just subtract one from the sample space for each of the five guesses.
 
Physics news on Phys.org
There are 26*26 possible passwords. Only one of them is correct. The hacker gets 5 chances. So, yes, the hacker will pick 5 different possibilities of that group of 26*26 passwords. You are way overthinking this problem.
 
Wait, what? I don't think 5/(26*26) would be the right answer, since that implies there is a 5 in 26^2 chance that they get the answer right on the first try...

My teacher has since told me to assume the attempts are independent (dumb hacker, I guess) so I'm modeling this as a geometric distribution with p = 1/(26*26). The total probability will be the probability hacker is successful in one try, two tries, three, four, or five tries all summed up. Does that sound right?
 
alman9898 said:
Wait, what? I don't think 5/(26*26) would be the right answer, since that implies there is a 5 in 26^2 chance that they get the answer right on the first try...

My teacher has since told me to assume the attempts are independent (dumb hacker, I guess) so I'm modeling this as a geometric distribution with p = 1/(26*26). The total probability will be the probability hacker is successful in one try, two tries, three, four, or five tries all summed up. Does that sound right?

Or do you actually mean the tries are TRULY independent? I.e. he forgets which passwords he's tried before? Oh, I'll bet you do, sorry. Then you can treat the problem more easily by computing the odds the hacker will fail. He needs to guess the wrong password five times in a row.
 
For this problem, the wisest way to go about it is the way that you said. Think about it this way. If it is independent and the hacker may or may not retry the same password. One must compute the odds that the hacker will get it right on his first try. That means 1/(26*26). Once we get this we multiply this by five. That will give you the correct answer.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 29 ·
Replies
29
Views
7K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K