Post · 8 min read· pp. 2772–2775

FVE_DATUM

SKETCH OF HOW RESEARCH MIGHT CONTINUE AND RESULTS BE PRESENTED

The FVE_DATUM structure (formally _FVE_DATUM) is the most basic of fixed-size headers in the packaging of arbitrary BitLocker data. Each datum is wrapped with descriptions of such things as its type and purpose. For instance, the raw bytes of an encryption key may be packaged with indications of which algorithm to use and of what it’s intended to encrypt. The whole datum is a fixed-size header and some variable-size continuation. The header is the wrapping. The continuation is the raw datum. Different types of datum have different fixed-size headers, but all begin the same way: the FVE_DATUM is the fixed-size header that is common to all the type-specific headers.

Documentation Status

No documentation of the FVE_DATUM structure is known from Microsoft, but the name is Microsoft’s. This is knowable from public symbol files for the user-mode FVEAPI.DLL, many of whose internal routines are written in C++ such that types of arguments survive in decorated names.

For some types of datum, the variable-size continuation beyond the fixed-size header is a sequence of nested data, each in this form of a fixed-size header and variable-size continuation. Most types of datum do not allow such nesting and the continuation is then known as the data segment. This term data segment is inferred from the name of the internal routine FveDatumGetDataSegment which FVEVOL, FVEAPI and even the boot manager pick up from a library.

Layout

The FVE_DATUM structure is eight bytes:

OffsetSizeDescription
0x00wordtotal size in bytes
0x02wordrole
0x04wordtype
0x06wordbit flags

The size at offset 0x00 is that of the fixed-size header, which may itself be larger than the FVE_DATUM, and of any variable-size continuation whether this be a single data segment or a sequence of nested data.

Type

What follows the eight bytes of the FVE_DATUM depends on the type at offset 0x04. For many types, the FVE_DATUM is the start of a larger fixed-size header. For most types, the header is followed immediately by the data segment. For five types, the header is followed by nested data.

For the following table of defined types, each Description is Microsoft’s name for the corresponding type-specific header, if known from public symbol files, but is otherwise inferred from the names of internal variables that are addressed from a table of datum properties.

TypeDescriptionSize of HeaderNested DataVersions
0x0000Erased0x08no6.0 and higher
0x0001FVE_DATUM_KEY0x0Cno6.0 and higher
0x0002FVE_DATUM_UNICODE0x08no6.0 and higher
0x0003Stretch Key0x1Cyes6.0 and higher
0x0004Use Key0x0Cyes6.0 and higher
0x0005FVE_DATUM_AESCCM_ENC0x24no6.0 and higher
0x0006TPM Enc Blob0x0Cno6.0 and higher
0x0007FVE_DATUM_VALIDATION_INFO0x08no6.0 and higher
0x0008FVE_DATUM_VMK_INFO0x24yes6.0 and higher
0x0009FVE_DATUM_EXTERNAL_INFO0x20yes6.0 and higher
0x000AUpdate0x2Cyes6.0 and higher
0x000BError0x34no6.0 and higher
0x000CFVE_DATUM_ASYM_ENC_BLOB0x08no6.1 and higher
0x000DFVE_DATUM_EXPORTED_PUBLIC_KEY0x08no6.1 and higher
0x000EFVE_DATUM_PUBLIC_KEY_INFO0x08no6.1 and higher
0x000FVirtualization Info0x18no6.1 and higher
0x0010Simple0x0Cno6.1 and higher
0x0011Simple0x0Cno6.1 and higher
0x0012Concat Hash Key0x1Cno6.1 and higher
0x0013Simple0x0Cno6.1 and higher
0x0014Simple Large0x10no6.3 and higher
0x0015Backup Info0x1Cno1903 and higher

Three types are all described just as Simple and another just as Simple Large. None of these are known ever to be created with a data segment. The Simple of the description is just that the type-specific header continues beyond the FVE_DATUM with just one four-byte member, growing to eight bytes for Simple Large. In the only known use of Simple Large, the eight-byte member is specifically an iteration count for key stretching.

Role

If the type at offset 0x04 tells how to interpret what follows the FVE_DATUM, then the role at offset 0x02 tells what the datum is for. The role is not a sub-type. The type and role are independent. This seems safe to infer from such internal (library) routines as FveDatumNestedGetNext which can search a sequence of nested data for all that have a particular combination of type and role, or all that have a specified type (whatever the role), but also for all that have a specified role (whatever the type).

Much less evidence is published by Microsoft for any classification of roles than of the type. That the member is thought of by Microsoft as a role, rather than a purpose or some other category, is here taken from some sort of white paper Addressing a Commercial Grade Operating System Security Functional Requirement Set with Windows Vista and Server 2008 that Microsoft published in 2008 but which has all but disappeared from the Internet. (The link is long stale.) In a relatively small section headed “Full volume encryption”, this paper names several structures consistently with public symbol files. It therefore comes with some assurance that all its names that seem to have been taken from the programming actually have been. As well as naming several structures whose names are not known from public symbol files (but which might otherwise be guessed with confidence), it names a constant, FVE_ROLE_VMK_CACHE, and describes its use closely enough for deducing that it is intended for this member of the FVE_DATUM (and that its value is 5).

RoleDescriptionVersions
0x0000none specified (default)6.0 and higher
0x0001
0x0002for an FVE_DATUM_VMK_INFO in a dataset6.0 and higher
0x0003for an FVE_DATUM_AESCCM_ENC in a dataset, data segment is encrypted FVE_DATUM_KEY whose decrypted data segment is the FVEK6.0 and higher
0x0004for an FVE_DATUM_VALIDATION_INFO in a dataset6.0 and higher
0x0005for an FVE_DATUM_KEY in a dataset, data segment is the cached VMK6.0 and higher
0x0006for an FVE_DATUM_EXTERNAL_INFO in a dataset6.0 and higher
0x0007for an FVE_DATUM_UNICODE in a dataset, data segment is description6.0 and higher
0x0008for an Update datum (type 0x000A) in a dataset6.0 and higher
0x0009for an FVE_DATUM_PUBLIC_KEY_INFO in a dataset, data segment is FVE_DEVICE_LOCKOUT_STATE6.2 and higher
0x000Afor an Error datum (type 0x000B) in a dataset6.0 and higher
0x000Bfor an FVE_DATUM_AESCCM_ENC in a dataset, data segment is encrypted FVE_DATUM_KEY whose decrypted data segment is the AMK6.1 and higher
0x000Cfor an FVE_DATUM_EXPORTED_PUBLIC_KEY nested in an FVE_DATUM_VMK_INFO6.1 and higher
0x000Dfor an FVE_DATUM_EXPORTED_PUBLIC_KEY nested in an FVE_DATUM_VMK_INFO6.1 and higher
0x000Efor an FVE_DATUM_AESCCM_ENC in a dataset, data segment is encrypted FVE_DATUM_UNICODE whose decrypted data segment is the identification field6.1 and higher
0x000Ffor Virtualization Info (type 0x000F) in a dataset6.1 and higher
0x0010
0x0011for an FVE_DATUM_VALIDATION_INFO in a dataset6.3 and higher
0x0012for an FVE_DATUM_AESCCM_ENC nested in a stretch key (type 3), data segment is encrypted FVE_DATUM_KEY whose decrypted data segment is password to stretch6.3 and higher
0x0013for an FVE_DATUM_AESCCM_ENC nested in a stretch key (type 3)6.3 and higher
0x0014for an FVE_DATUM_UNICODE nested in a stretch key (type 3), data segment names algorithm for stretching key6.3 and higher
0x0015for an FVE_DATUM_KEY nested in a stretch key (type 3), data segment is salt for stretching key6.3 and higher

Flags

The only known original use for the word at offset 0x06 is that the 0x0001 bit is set in an FVE_DATUM that is contained in some larger structure such as a dataset or as a nested datum. Internally, this bit’s being set marks the datum as one that is not to be individually freed from memory. Only rarely would this not apply to the typical datum in the typical circumstances of much typical analysis, e.g., of a datum in a dataset that is in turn in an information sectors that persists on disk.

For this original purpose, the flags word looks to be intended for all types of datum. As BitLocker has evolved, some need seems to have developed for type-specific bit flags but without space being easily made in the corresponding type-specific extension of the header beyond the FVE_DATUM. Remember that all these headers can pass between components at run-time and can persist on disk, and therefore have non-trivial constraints for compatibility. Inevitably, the space for bit flags in the non-specific header has ended up being used for type-specific bits. For instance, a datum for what’s called the clear key (when BitLocker is suspended) can have the 0x0004 bit set in these flags to signify that the high byte of the flags is the suspend count. By now, most bits in this flags word have some such type-specific interpretation. More study is required.