-
-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary keyfiles of 64 bytes are not handled correctly #835
Comments
Thank you for your issue. |
Sorry, I thought you were talking about something else. I relied on the KeePass documentation, here : https://keepass.info/help/base/keys.html
So if the key file contains something other than these characters, it is normally hashed (3rd point). |
It seems that the second point is not correct, I will recode it. We should also contact KeePassDroid because it is part of it. |
After all of my testing it looks like the second condition is not included in KeePass2, I tested with a text file containing a key as shown, but it is recognized as a binary file. And if I directly create a file with 64 hexadecimal characters, it gives me a 32 bit file, so the first condition is called. |
Describe the bug
When using a binary file of 64 bytes as a keyfile, databases generated by KeePass can't be opened using KeePassDX
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The database should open correctly
Additional context
The code handling keyfiles of 64 bytes assumes it is a UTF-8 formatted hex string.
I don't know what it is supposed to do but from my testings, using AES for encryption and key derivation, it looks like the keyfile (of 64B) is hashed using SHA2-256 like keyfiles >64B
The text was updated successfully, but these errors were encountered: