My question is kinda simple.

I want to use AES-256 encryption to encrypt my backup. Using a password like this: 7okufZ308@lB$^KTINX1NWbpdw6rkysxv@giMW5jgI#ZaX*#YwloT3Y$*c*2qVCW

This has 64 chars and I wanted to know what is the possible cracking time for a password like this? The software I will be using has a custom iteration configuration so I set it to 20,000.

(The server running the encryption software has a lot of cpu power) Running a quad Xeon with 128GB of ram so I am not really worried about the encryption time.

I am more worried about how long will it take to crack a password like that?

  • $\begingroup$ "cracking" time will strongly depend on the hardware used to attack it. A simple mobile device will take ages (as in "forget it") while a server farm will definitely be quicker attacking it (read "governmental resources are bigger/better/faster than a mobile device"). What attacker resources exactly are you thinking about in your scenario? Also, how big are the chances the potential attacker knows your input is a limited range of ASCII symbols instead of a cryptographically random binary key? $\endgroup$
    – e-sushi
    Commented May 2, 2018 at 20:26

1 Answer 1


It will happen immediately, because you just posted your password to the internet, where the adversary is watching.

On the other hand, if you can describe the procedure you used to generate it, we can quantify the adversary's probability, knowing only the procedure and not the specific outcome, of guessing the password in one trial. From there one can quantify the expected cost of an attack that finds it, or the number of trials to find it with any prescribed probability.

For example, if you picked it uniformly at random out of a hat containing

  • 7okufZ308@lB$^KTINX1NWbpdw6rkysxv@giMW5jgI#ZaX*#YwloT3Y$*c*2qVCW
  • aqfSLH4)K{*zDH:$t6(G^alcSEN\Tbc#8X)W3P[whp%kC@Kn>T#.Q8BQ6=q+![/>
  • D%]Auqkuel:W4l(/YqBuXSTx7Oh.0]Wq"jly>["t?8wVmUnR+ivCS?<)}+P=-:1N
  • I am the very model of a modern major passphrase

then the adversary has a 1/4 probability of getting it right in the first trial, and the expected number of trials before the adversary will get it right is 2.

I recommend picking it uniformly at random out of a hat containing at least $2^{128}$ possibilities.

For example, you could flip a coin 128 times and use the outcome as a seed for a CSPRNG from which you sample octets, rejecting those that do not encode graphic characters in US-ASCII, until you have collected 64 of them.

That's not a very efficient use of the password space, though: the adversary's most efficient attack is probably on the 128 coin flip outcomes rather than on the password. So you could safely bring your password down to 20 US-ASCII characters.

Alternatively, if you want it to be more memorable, you could pick a sequence of 10 words independently and uniformly at random out of a list of 7776 of them, with the help of diceware and a standard household appliance, or with the same rejection sampling technique on a CSPRNG if your name is not Raphael Weldon.

Note that for a uniform distribution on $2^{128}$ possible passwords to be safe against multi-target attacks, you must be sure to combine your password with a hefty salt. Otherwise, or if you are concerned about quantum computers, it may be prudent to double these numbers (256 coin flips, 40 US-ASCII characters, 20 diceware words) to bring it up to $2^{256}$ equiprobable possibilities, or at least bring it up to $2^{192}$.

  • 1
    $\begingroup$ I cant mark your answer as useful yet due to new user limitations. But thank you very much for the detailed answer! $\endgroup$
    – user58555
    Commented May 2, 2018 at 14:06
  • $\begingroup$ Solving for $n$ in $\log_2(x^{n}) \ge 128$ over the integers where $x$ is the number of symbols you can use will tell you how many characters you need to achieve a 128-bit security level. When $x = 62$ (as in the case of a purely alphanumeric password), $n \ge 22$. When $x = 95$ (US keyboard), $n \ge 20$. $\endgroup$
    – forest
    Commented May 3, 2018 at 2:34
  • $\begingroup$ Ok, so if I use a 20 character pass phrase with a random seed based AES 256 encryption, how long would it take the most advanced super computer to crack it? $\endgroup$ Commented Dec 17, 2020 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.