Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for information security professionals. It's 100% free, no registration required.

How easily could someone crack my keepass .kdbx file if that person steals the file but never obtains the Master Password?

Is this a serious threat, or would a brute force attack require massive computing time?

Assume a password more than 10 characters long with randomly distributed characters of the set including all letters, numbers and most non-alphanumeric keyboard symbols.

share|improve this question
If you're really paranoid, you could drop the .kdbx file in a Truecrypt volume for extra safety. –  Iszi Jul 6 '12 at 20:28
Since the KeePass source code is open, it should be possible use it to implement a recovery tool that's a bit smarter than just trying passwords one by one. I remember that there was one tool around, but I've forgotten the name. Maybe Mr. Google can help... –  user27557 Jun 23 '13 at 18:06
talking about million years, i guess the data will be useless after 5 years... or may be less.. –  sage29 Sep 28 '13 at 23:45
@Iszi If you're really paranoid, you want never put all your eggs in one basket! –  F. Hauri Sep 29 '13 at 8:54
@F.Hauri In a sense, putting the KDBX file into a TrueCrypt volume is putting your eggs into more than one basket - in this case though, the baskets are inside each other. –  Iszi Sep 30 '13 at 13:43

3 Answers 3

up vote 79 down vote accepted

KeePass uses a custom password derivation process which includes multiple iterations of symmetric encryption with a random key (which then serves as salt), as explained there. The default number of iterations is 6000, so that's 12000 AES invocations for processing one password (encryption is done on a 256-bit value, AES uses 128-bit blocks, so there must be two AES invocations at least for each round). With a quad-core recent PC (those with the spiffy AES instructions), you should be able to test about 32000 potential passwords per second.

With ten random characters chosen uniformly among the hundred-of-so of characters which can be typed on a keyboard, there are 1020 potential passwords, and brute force will, on average, try half of them. You're in for 1020*0.5/32000 seconds, also known as 50 million years. But with two PC that's only 25 million years.

This assumes that the password derivation process is not flawed in some way. In "custom password derivation process", the "custom" is a scary word. Also, the number of iterations is configurable (6000 is only the default value).

share|improve this answer
+1 for the "with two PC that's only 25 mi..." –  woliveirajr Oct 29 '11 at 5:24
You just killed my hopes in recovering the password of my own Keepass store in at least a few days... I especially loved the 25 million year thing, but that would just work if both are trying different offsets, otherwise they'd just do the same work twice... just sayin'. :D –  user8469 Mar 15 '12 at 18:46
@DoNuT If it's your own password, you don't have to brute force it. You will have a LOT of information about what kind of passwords you keep, do you put numbers in, do you remember any specific characters (or password length)? All of them can be used to bring down the time immensely. It only takes 25 million years if you want to break someone else's password (and they can't even be "social-engineered"). –  recluze Mar 22 '12 at 2:59
Keepass has an excellent feature where you can set the number if iterations based on how many your CPU can perform in 1 second. So this means that you wait 1 second for it to decrypt your data, but it limits brute-force attacks to 1 per second, which would discourage most attempts. –  Simon East Sep 3 '13 at 10:25

if moores law is correct, then every 18 months, in general terms a computer gets twice as fast,, in 50 or 60 years you end up with a number with 14 or 15 numerals,,ie 1, 2, 4, 8, 16, do that 50 times or 50 years,, a password you make now cant be cracked for 50 million years,, but a computer in 50 years will crack it in a second

share|improve this answer
This doesn't directly answer the question, though. I'm assuming the user means with present-day equipment. –  jonsca Dec 9 '12 at 1:03
Moore's Law is starting to fail already - thermal limits have been reached for semiconductor transistors and the future is all about parallelization, which scales linearly, not exponentially. –  Thomas Dec 9 '12 at 11:19
@Thomas, Except in the future may we have other unpredictably faster ways to compute besides using electrical computers. en.wikipedia.org/wiki/… –  Pacerier Apr 11 '14 at 13:44
@Pacerier Except most of these are not practical yet. If you are able to predict the future evolution of computing power with exotic hardware, then you can certainly make a good estimate of what constitutes a "hard problem". Most of us can't. –  Thomas Apr 12 '14 at 0:31
@Thomas, Except that your claim "the future is all about parallelization" is obviously wrong as explained in that article I've linked. –  Pacerier Apr 12 '14 at 11:11

You are right it takes long time. But don't forget, that you don't need to try every password combinaten. If you hit the correct one you are done. So you don't really need 50million years. And you have a lot more options than using 2 quadcore PCs. You can use a Amazon Cloud based Cluster and can start 5000 High CPU instances. Of course this is expensive but you don't need to buy 5000 HighEnd Computer so it decrease the price dramaticly.

But i don't know how long you will bruteforce that by using a Cluster. And of course you are rigt that is takes long time for a normal PC today.

share|improve this answer
a) 50 million years is the average time to crack, so we've already factored in the fact that you might get it on the first day. (You might just as likely also get it on the last day of the 100 millionth year.) b) With 5,000 PCs you get the average down to 10,000 years, which is scant consolation. –  Graham Hill Nov 6 '12 at 11:51
Back of an envelope, using ec2 GPU instances it would cost about $2 Billion dollars for 50 Million years of CPU time (per GPU core). You would really have to be worth hacking for that much money. –  Jeremy French Nov 26 '12 at 14:40

protected by Community Dec 12 '13 at 23:59

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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