# Time taken for Brute Force Attack on DES

An attacker is equipped with a computer that performs 10 trillion (1013) DES decryptions per second, what is the average time required, in hours, for a brute force attacker to break DES? Key size is 56 bits.

I tried 256/1013 divided by 3600 but the answer is incorrect.

• $2^{56}/10^{13}$ [as in the original statement] is incorrect for three reasons: a) it does not account for the "average" word of the problem statement. b) it does not account for the "hours" word of the problem statement [update: that part got fixed]. c) nitpick: it does not account for the "time" word of the problem statement, for lack of unit: if it not asked how many hours are required... Second rule of sucess in exams: in a good problem, every word counts (first rule is: attend).
– fgrieu
Apr 30, 2020 at 13:28
• Is 'Bruce Force' done by comedic Australians? May 2, 2020 at 1:56

## 1 Answer

You got $$2^{56}$$ different keys and the attacker can test $$10^{13}$$ keys per second.

In the worst case, the last tested key is the solution. For that you need $$2^{56} / 10^{13} \approx 7205$$ sec. -> around $$2$$ hours.

In the best case, the first tested key is the solution. This takes about 1 second.

On Average you need to test half of the keys. That means: $$0.5 * (2^{56} / 10^{13}) \approx 1$$ hour.

• Redo your calculations, $2^{56} / 10^{13} \not\approx 8796093022208$ May 1, 2020 at 14:03
• also if he can test $10^{13}$ keys/second how come it takes a full second when the first key tested is the correct key? May 1, 2020 at 23:49
• That's why i wrote "about 1 sec." You can lower that time to nearly 0 sec. But for calculating the average case, it makes no difference. May 2, 2020 at 14:18