Skip to main content

Module kdbx

Module kdbx 

Source
Expand description

KeePass .kdbx databases (KeePass, KeePassXC, KeePassDX, KeeWeb, Strongbox; KDBX 3.1 and 4), opened with the person’s master password (spec §8.4).

A database chooses its own key-stretching cost, and opening it spends that cost before anything is known about the file. So the header is read first, by hand, and a database asking for more than MAX_ARGON_MEMORY, MAX_ARGON_ITERATIONS or MAX_AES_ROUNDS is refused before the password is ever tried (§8.7).

Constants§

MAGIC
MAX_AES_ROUNDS
AES-KDF rounds: a few seconds on a current machine.
MAX_ARGON_ITERATIONS
MAX_ARGON_MEMORY
Argon2 memory a database may ask for: 1 GiB.
MAX_ARGON_PARALLELISM
MAX_KEY_FILE
The most a key file may be: KeePass’s own are a few hundred bytes (an XML file, or 32 random ones).

Functions§

check_header
Refuses a database whose key-stretching is heavier than the caps, or whose header doesn’t parse. Reads nothing secret.
read