dissect.fve.luks

Submodules

Package Contents

Classes

LUKS

LUKS disk encryption.

Functions

is_luks_volume

Return whether the file-like object is a LUKS volume.

class dissect.fve.luks.LUKS(fh: BinaryIO)

LUKS disk encryption.

References

fh
header = None
header1 = None
header2 = None
cipher_name = None
cipher_mode = None
hash_spec = None
label = None
checksum_algorithm = None
uuid
property unlocked: bool
property keyslots: dict[int, dissect.fve.luks.metadata.Keyslot]
unlock(key: bytes, keyslot: int) None

Unlock the volume with the volume encryption key.

unlock_with_key_file(path: pathlib.Path, offset: int = 0, size: int = -1, keyslot: int | None = None) None
unlock_with_key_fh(fh: BinaryIO, offset: int = 0, size: int = -1, keyslot: int | None = None) None
unlock_with_passphrase(passphrase: str, keyslot: int | None = None) None

Unlock this volume with a passphrase and optional keyslot hint.

find_digest(keyslot: int) dissect.fve.luks.metadata.Digest

Find digest metadata corresponding to the given keyslot.

find_segment(keyslot: int) dissect.fve.luks.metadata.Segment

Find segment metadata corresponding to the given keyslot.

open() dissect.fve.crypto.dmcrypt.CryptStream

Open this volume and return a readable (decrypted) stream.

dissect.fve.luks.is_luks_volume(fh: BinaryIO) bool

Return whether the file-like object is a LUKS volume.