|
libkeepass 0.2.0
KeePass key database importer/exporter library
|
Scope: this document records which real-world KeePass ecosystem files were verified against libkeepass, and which provider-specific divergences are known. "KeePass itself" (reference) is covered in test/kdbx4.cc (KeePass 2.57 fixtures); this document focuses on KeePassXC and Strongbox.
| Provider | File (in test/data/compat/) | Format | Cipher / KDF / compression | Master key | Verified expectations |
|---|---|---|---|---|---|
| KeePassXC (test corpus) | Format400.kdbx | KDBX 4.0 | ChaCha20 + Argon2d / gzip | t | Root group Format400, one entry with title/username/password Format400, attachment Format400 → "Format400\n" |
| KeePassXC (test corpus) | ProtectedStrings.kdbx | KDBX 3.1 | AES-KDF (legacy) | masterpw | Entry Sample Entry (username Protected User Name, password ProtectedPassword) with per-field protection flags preserved: TestProtected (protected, ABC) vs TestUnprotected (unprotected, DEF) |
| KeePassXC (test corpus) | RecycleBinWithData.kdbx | KDBX 3.1 | AES-KDF (legacy) | 123 | Recycle-bin group resolves to the same group object that holds the deleted entries (Obsolete e-mail, Old Wi-fi) |
The KeePassXC fixtures are byte-identical copies of files published in KeePassXC's own test corpus (tests/data/); their expected contents match what KeePassXC's own unit tests assert. The dedicated test binary test/compat.cc (ctest -R compat) verifies them and runs in CI.
Additional provider coverage is already embedded in test/data/kdbx4/:
test/kdbx4.cc).kdbx4-aes-argon2d-keyfile.kdbx with test.key), without keyfile, and with a wrong keyfile/password.KeePassXC writes KDBX 4.0 databases with ChaCha20 + Argon2d + gzip by default, while KeePass defaults to AES + Argon2d + gzip. Both combinations (and AES-KDF) are verified. The KDBX 4.1 previous_parent_group field is a KeePass extension; KeePassXC emits it as well in recent versions.
Strongbox (iOS/macOS) cannot be executed in this environment, so no Strongbox-authored file is imported directly. Upstream divergence reports were used instead, and each is mapped to libkeepass behavior/coverage:
kdbx4-aes-argon2d-gzip.kdbx, kdbx4-aes-argon2id.kdbx, kdbx4-aes-argon2d-keyfile.kdbx).K (secret) and A (associated data) in the KDF variant dictionary. Like KeePass/KeePassXC, libkeepass ignores parameters it does not act upon instead of rejecting the file.Data) and the 64-hex-character text file. Raw 32-byte binary digest files and the arbitrary-binary hashing fallback are not supported (Key::SetKeyFile rejects them) — this is a documented limitation, not a silent fallback.libkeepass applies the following policy to unknown / future data:
FormatError). This is deliberate: decrypting with wrong semantics is worse than failing loudly.This policy was confirmed/kept as part of the KeePassXC/Strongbox work and is documented here so future format work has a single reference point.