1
$\begingroup$

I am having trouble figuring out how long it takes to decrypt a 64-bit key, given that a computer can do 1 billion trials per second. I know that there are $2^{64} = 1.844 \times 10^{19}$ possible keys for this key size, but then how do I go about figuring out the rest? If there is a formula for this, I would be very curious to know what it is.

$\endgroup$
12
  • 3
    $\begingroup$ You know the number of possible keys, and you know how many keys per second the computer can attempt. Can you not figure out the average/worst case times? Hint: you know K and K/s, and you need to figure out s $\endgroup$
    – Marc
    Sep 9, 2020 at 20:48
  • $\begingroup$ @Marc I think maybe I'm really overthinking this and I just need to divide the number of keys by 1 billion? $\endgroup$ Sep 9, 2020 at 21:30
  • $\begingroup$ For the worst case, yes. I'll let you work out the average case, don't overthink it. $\endgroup$
    – Marc
    Sep 9, 2020 at 21:37
  • 1
    $\begingroup$ Math tip: this is much easier if you stick to powers of two and use the laws of exponents. A billion is $2^{30}$ plus change. So trying $2^{64}$ keys at $2^{30}$ keys/second is just a division. And since we've expressed everything as powers of two, we can do it by subtracting exponents: $2^{64} ÷ 2^{30} = 2^{64 - 30} = 2^{34}$ seconds, which is $2^{4 + 30} = 2^4 \times 2^{30} =$ about 16 billion seconds and change in the worst case. Average is half that. $\endgroup$ Sep 9, 2020 at 22:28
  • 1
    $\begingroup$ I'm surprised no one pointed out that we don't decrypt keys, we decrypt a ciphertext by trying all possible keys. The method is known as brute-force. $\endgroup$
    – tum_
    Sep 10, 2020 at 6:59

1 Answer 1

0
$\begingroup$

If you measure the number of keys you can guess per second (as suggested in the comments) you can calculate from there. As a frame of reference, if you can calculate 1,000,000,000,000 (1 trillion) keys per second, the time to break a 64-bit key would we an average of 15.25 weeks (106.75 days), with the longest possible time to break being 30.5 weeks (213.5 days).

You need to benchmark the number of keys per second on your own system to know the time it would take for you. If you can calculate half the keys, it takes twice as long. If your system calculates 10 trillion keys/sec it would take only $\frac1{10}$ the time (10.675 days average, 21.35 days max). I think you get the picture.

$\endgroup$

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.