Skip to main content

Crate bitlocker

Crate bitlocker 

Source
Expand description

§bitlocker-core — a from-scratch BitLocker (BDE) reader and decryptor

Parses the BitLocker Drive Encryption on-disk format (the -FVE-FS- / BitLocker To Go volume header, the FVE metadata block, and its key-protector entries) and decrypts a volume from a password, exposing a plaintext Read + Seek view.

Scope of this build: the password protector (type 0x2000) over the AES-128-CBC + Elephant Diffuser cipher (method 0x8000) — exactly what the Tier-1 dfvfs bdetogo.raw oracle validates. AES-XTS, recovery-password, startup-key and TPM protectors are deliberately out of scope here (see the crate README); the metadata parser still reports their presence.

Every primitive comes from an audited RustCrypto crate — aes, cbc, ccm, sha2 — except the Elephant Diffuser, for which no crate exists; it is implemented to the libbde reference and validated only against the Tier-1 oracle (never a self-authored round-trip, which would prove nothing).

use std::fs::File;
use bitlocker::BitLockerVolume;

let image = File::open("bdetogo.raw")?;
let mut volume = BitLockerVolume::unlock_with_password(image, "bde-TEST")?;
let mut boot = [0u8; 512];
volume.read_at(0, &mut boot)?;

Structs§

BitLockerVolume
Namespace for opening a BitLocker volume. All state lives in the returned DecryptedVolume; this type carries no data itself.
DecryptedVolume
A plaintext view of an unlocked BitLocker volume.
FveMetadata
A parsed FVE metadata block: cipher, identity, and the entry array, plus the block-header fields the read path needs (encrypted size and the relocated volume-header region).
MetadataEntry
One FVE metadata entry (entry_type, value_type, version, and the raw value data that follows the 8-byte entry header).
VolumeHeader
The parsed BitLocker volume header.

Enums§

BdeError
An error decoding or unlocking a BitLocker (BDE) volume.
BdeVariant
Which BitLocker on-disk volume-header layout was recognised.

Functions§

format_guid
Render a 16-byte Microsoft GUID in canonical 8-4-4-4-12 lowercase form.

Type Aliases§

Result
Convenience alias for reader results.