libkeepass 0.2.0
KeePass key database importer/exporter library
Loading...
Searching...
No Matches
constants.hh File Reference

On-disk signatures, version numbers, cipher/KDF UUIDs and framing limits shared by the KDB and KDBX codecs. More...

#include <array>
#include <cstdint>

Go to the source code of this file.

Variables

constexpr uint32_t keepass::detail::kKdbSignature0 = 0x9aa2d903
 First signature word shared by KDB and KDBX.
 
constexpr uint32_t keepass::detail::kKdbSignature1 = 0xb54bfb65
 Second signature word identifying a legacy KDB database.
 
constexpr uint32_t keepass::detail::kKdbxSignature0 = 0x9aa2d903
 First signature word of a KDBX database (same as KDB).
 
constexpr uint32_t keepass::detail::kKdbxSignature1 = 0xb54bfb67
 Second signature word identifying a KDBX database.
 
constexpr uint32_t keepass::detail::kKdbxVersion3 = 0x00030000
 Lowest KDBX 3 version accepted/written.
 
constexpr uint32_t keepass::detail::kKdbxVersionCriticalMin = 0x00030001
 Lowest KDBX 3 critical version (3.1).
 
constexpr uint32_t keepass::detail::kKdbxVersion4 = 0x00040000
 KDBX 4.0 critical version.
 
constexpr uint32_t keepass::detail::kKdbxVersion4_1 = 0x00040001
 KDBX 4.1 critical version.
 
constexpr uint32_t keepass::detail::kKdbxVersionCriticalMask = 0xffff0000
 Mask selecting the critical (major) part of a KDBX version field.
 
constexpr std::array< uint8_t, 16 > keepass::detail::kKdbxCipherAes
 
constexpr std::array< uint8_t, 16 > keepass::detail::kKdbxCipherChaCha20
 
constexpr std::array< uint8_t, 16 > keepass::detail::kKdbxCipherTwofish
 
constexpr std::array< uint8_t, 16 > keepass::detail::kKdbxKdfAesKdbx4
 
constexpr std::array< uint8_t, 16 > keepass::detail::kKdbxKdfAesKdbx3
 
constexpr std::array< uint8_t, 16 > keepass::detail::kKdbxKdfArgon2d
 
constexpr std::array< uint8_t, 16 > keepass::detail::kKdbxKdfArgon2id
 
constexpr std::array< uint8_t, 8 > keepass::detail::kKdbxInnerRandomStreamInitVec
 Fixed Salsa20 IV used by the KDBX inner random stream.
 
constexpr uint32_t keepass::detail::kMaxOuterHeaderFieldSize = 1U << 20
 Upper bound for a single outer KDBX header field (1 MiB).
 

Detailed Description

On-disk signatures, version numbers, cipher/KDF UUIDs and framing limits shared by the KDB and KDBX codecs.

Variable Documentation

◆ kKdbxCipherAes

constexpr std::array<uint8_t, 16> keepass::detail::kKdbxCipherAes
constexpr
Initial value:
= {{0x31, 0xc1, 0xf2, 0xe6, 0xbf, 0x71, 0x43, 0x50,
0xbe, 0x58, 0x05, 0x21, 0x6a, 0xfc, 0x5a,
0xff}}

◆ kKdbxCipherChaCha20

constexpr std::array<uint8_t, 16> keepass::detail::kKdbxCipherChaCha20
constexpr
Initial value:
= {{0xd6, 0x03, 0x8a, 0x2b, 0x8b, 0x6f, 0x4c,
0xb5, 0xa5, 0x24, 0x33, 0x9a, 0x31, 0xdb,
0xb5, 0x9a}}

◆ kKdbxCipherTwofish

constexpr std::array<uint8_t, 16> keepass::detail::kKdbxCipherTwofish
constexpr
Initial value:
= {{0xad, 0x68, 0xf2, 0x9f, 0x57, 0x6f, 0x4b,
0xb9, 0xa3, 0x6a, 0xd4, 0x7a, 0xf9, 0x65,
0x34, 0x6c}}

◆ kKdbxInnerRandomStreamInitVec

constexpr std::array<uint8_t, 8> keepass::detail::kKdbxInnerRandomStreamInitVec
constexpr
Initial value:
= {
{0xe8, 0x30, 0x09, 0x4b, 0x97, 0x20, 0x5d, 0x2a}}

Fixed Salsa20 IV used by the KDBX inner random stream.

◆ kKdbxKdfAesKdbx3

constexpr std::array<uint8_t, 16> keepass::detail::kKdbxKdfAesKdbx3
constexpr
Initial value:
= {{0xc9, 0xd9, 0xf3, 0x9a, 0x62, 0x8a, 0x44,
0x60, 0xbf, 0x74, 0x0d, 0x08, 0xc1, 0x8a,
0x4f, 0xea}}

◆ kKdbxKdfAesKdbx4

constexpr std::array<uint8_t, 16> keepass::detail::kKdbxKdfAesKdbx4
constexpr
Initial value:
= {{0x7c, 0x02, 0xbb, 0x82, 0x79, 0xa7, 0x4a,
0xc0, 0x92, 0x7d, 0x11, 0x4a, 0x00, 0x64,
0x82, 0x38}}

◆ kKdbxKdfArgon2d

constexpr std::array<uint8_t, 16> keepass::detail::kKdbxKdfArgon2d
constexpr
Initial value:
= {{0xef, 0x63, 0x6d, 0xdf, 0x8c, 0x29, 0x44,
0x4b, 0x91, 0xf7, 0xa9, 0xa4, 0x03, 0xe3,
0x0a, 0x0c}}

◆ kKdbxKdfArgon2id

constexpr std::array<uint8_t, 16> keepass::detail::kKdbxKdfArgon2id
constexpr
Initial value:
= {{0x9e, 0x29, 0x8b, 0x19, 0x56, 0xdb, 0x47,
0x73, 0xb2, 0x3d, 0xfc, 0x3e, 0xc6, 0xf0,
0xa1, 0xe6}}