Introduction
Welcome to the KDBX compendium! This book is intended as an overview of the KeePass KDBX file format for developers implementing support for KeePass databases in their applications.
Notable KDBX format implementations
This book aims to compare different implementations of the KDBX file format, with direct references to the source code of each implementation. This is toidentify gotchas that developers might encounter.
Example: For Argon2, some implementationsKP, KP2A, STBX default to 2 lanes of parallelism, while some default to 4KPXC, KPDX, KPIU, . Libraries generally don’t have a default, and require the caller to specify the number of lanes.
GUI applications
| Application | Shortcode | Platforms | Language | Notes |
|---|---|---|---|---|
| KeePass | KP | Windows, (Linux, MacOS) | C# | No public git repo, will use unofficial mirror |
| KeePassXC | KPXC | Windows, Linux, MacOS | C++ | |
| Keepass2Android | KP2A | Android | Java | |
| KeePassDX | KPDX | Android | Kotlin | |
| KeePassium | KPIU | iOS | Swift | |
| Strongbox | STBX | iOS, macOS | Objective-C, Swift |
Libraries
| Library | Shortcode | Language | Read support | Write support | Notes |
|---|---|---|---|---|---|
| pykeepass | PYKP | Python | KDBX3, KDBX4 | ? | |
| keepass-rs | KPRS | Rust | KDB, KDBX3, KDBX4, KDBX4.1 | experimental, KDBX4.1 | maintained by the author of this book |
| kdbxweb | KDBW | TypeScript | KDBX3, KDBX4, KDBX4.1 | KDBX3, KDBX4 | seems unmaintained, last commit Dec 2024 |
Other resources
- KeePass KDBX file format specification
- KeePass KDBX XML Schema (partial)
- Almost Secure: “Documenting KeePass KDBX4 file format”
Conventions in this Document
- All byte offsets are zero-based, so the first byte of a structure is at offset
0. - All byte ranges are non-inclusive, so the byte range
0-4includes bytes at offsets0,1,2, and3, but not the byte at offset4. - All lengths are in bytes, so a length of
4means that the value occupies 4 bytes. - All hexadecimal numbers are prefixed with
0x, so the number255will be represented as0xFF.