KeePassXC fails to open databases that were generated with KeePass2 and use passphrases and keyfiles. I am not sure if this is the same issue as #2834 as I don't get any segfaults.
KeePassXC should be able to open the database.
When opening a kdbx database that was generated using KeePass 2.38 on a Windows 7 x64 system, opening fails. KeePassXC shows a wrong pw/corrupted db error message.
The respective database uses AES with AES-Key Derivation, GZip Compression.
The db is using both a passphrase and a keyfile.
The behaviour is reproducible, I can provide a test-db if required.
KeePassXC - Version 2.4.0
Revision: c51752d
Libraries:
Operating system: Windows 7 SP 1 (6.1)
CPU architecture: x86_64
Kernel: winnt 6.1.7601
Enabled extensions:
Please provide a test database for our use. KeePass 2.38 is pretty old, you should update to 2.41.
Sure, db + keyfile is here: testdb.zip
The passphrase for the db is 1testpassword!
In the meantime I'll try open and save that db with KeePass 2.41
Ok, KeePass 2.38 vs 2.41 does not show different behaviour when opening with KeePassXC:
db + keyfile generated with 2.38, opened with 2.41, entry modified, saved -> Unable to open
db + keyfile generated with 2.38, opened with 2.41, master password changed, saved -> Unable to open
db + keyfile generated with 2.41 -> Unable to open
All tests done with AES encryption, AES KDF and enabled GZip compression.
I have the same issue, also happens when a database uses different encryption algorithms. One thing I noticed is that keyfiles generated with Keepass are simple XML textfiles, while keyfiles generated with KeePassXC (at least in version 2.4) are binary files. Maybe that has something to do with it?
AH HAH! I found the issue. If the key file contains a '/' in the data section our check for Base64 fails which prevents loading the key.
This can't possibly be a new bug, can it?
No it was present in 2.3.x as well
To anyone experiencing this, I recommend you just generate a new key file in 2.3.4, which will open in 2.4.0. Or you wait until the fix lands in 2.4.1, but there is really no reason to stick with legacy key files.
Regenerating the keyfile seemed to work fine for me. On Windows I was using 2.3.4 and going to 2.4 which had the same issue.
Made a keepasscx database on Mac, cannot open it with keepass2android, Invalid composite key. Tried to open it with linux keepasscx, same cannot open it but different error (description):
Error while reading the database: Invalid credentials were provided, please try again.
If this reoccurs, then your database file may be corrupt. (HMAC mismatch)
All versions are as the latest versions available of today ( fresh installations, 10-05-2020) .
Test database attached x-special/nautilus-clipboard
copy
file:///home/rickvek/Downloads/Diverse/Passwords.kdbx
Password of database = "LetMeIn"
Most helpful comment
AH HAH! I found the issue. If the key file contains a '/' in the data section our check for Base64 fails which prevents loading the key.