strongbox-password-safe / Strongbox

A KeePass/Password Safe Client for iOS and OS X
https://strongboxsafe.com
GNU Affero General Public License v3.0
1.34k stars 102 forks source link

64 Byte non-hex Key File handled incorrectly #241

Closed seonwoolee closed 4 years ago

seonwoolee commented 4 years ago

Whenever I try to unlock my password database using Strongbox, I get the incorrect credentials error. I am 100% sure that I am typing in my password and selecting my keyfile properly.

This database is of 4.0 KDBX format. I can open it on my computer using KeePassXC under both Linux and Windows, and I can also open it using KeePass2Android on Android.

Incidentally the MiniKeePass app for iOS can't open my database either. I'm not sure if this is just a coincidence or there's some sort of iOS API limitation/bug

mmcguill commented 4 years ago

So it’s almost certain that what you’re entering in the password field is incorrect in some way. A few questions.

Have you verified that it looks correct with the reveal password button?

Do you use any strange characters?

Do you use a key file?

Another suggestion, create a dummy database with a simple one letter password and confirm that works.

seonwoolee commented 4 years ago

Yes, I have verified the password is correct with the reveal password button. I assure you, I am typing in the password correctly.

My password only uses alphanumeric characters.

Yes, I use a keyfile. I am selecting that file. I also copied the file back to my computer and verified the checksum matches.

I created a dummy database with a one letter password and my keyfile and it does not work either. When I create a dummy database with a one letter password and no keyfile, it works.

Strongbox seems incompatible with my keyfile for some reason. Is there a keyfile size limitation? Mine is 64 bytes.

mmcguill commented 4 years ago

Wow that's interesting. So this is definitely down to your key file. There are 4 different ways a key file can be specified. XML, 32 Byte Binary Digest, 64 Byte file containing hex characters in a string, and finally if none of the above work a sha256 of the file is taken...

You're hitting the 64 byte file situation.

Can I ask if this key file contains 64 Hex characters, or if it's just a binary file with 64 byte length?

Did you create this key file using a program or is it just a regular old 64 byte file?

It's possible Strongbox is not processing this correctly if the file doesn't contain hex-only characters.

seonwoolee commented 4 years ago

I created this key file years ago and I'm not 100% sure how I did so, but I'm fairly certain I actually created this key file with Veracrypt, not KeePass.

It's just a binary file with 64 byte length; cating the file results in gibberish.

mmcguill commented 4 years ago

Yeah, seems like this is a bug then, I'll get it fixed up in the next release

mmcguill commented 4 years ago

@seonwoolee - This should be fixed for you now on Mac and iOS (1.45.5)... Can you confirm?

seonwoolee commented 4 years ago

Yup! Thanks.

wirthal commented 1 year ago

I have the same problem. I am running keepass in Linux and Windows. My db is protected with master pw and yubikey challenge response. It does not open with strongbox (incorrect credentials). I am using a keyfile in XML. Creating a db in Strongbox works. However, I cannot open it on my PC running in Linux either.

strongbox-mark commented 1 year ago

Hi @wirthal - I'm not sure you have this exact problem, but it sounds like you are using 3 factors to unlock your database and one of them is most definitely incorrect. Please contact our support team (support@strongboxsafe.com) with your debug info and we can try to assist.