Skip to main content

Crate luks

Crate luks 

Source

Re-exports§

pub use af::LUKS1_AF_STRIPES;
pub use af::Luks2Af;
pub use af::Luks2AfType;
pub use hash::HASH_SHA256;
pub use hash::HASH_SHA512;
pub use hash::LUKS2_CHECKSUM_ALG_ID_LEN;
pub use hash::Luks2HashAlg;
pub use hash::SHA256_DIGEST_SIZE;
pub use hash::SHA512_DIGEST_SIZE;
pub use kdf::Luks2Kdf;
pub use key::UnlockKey;
pub use key::VolumeKey;
pub use keyslot::KeySlotId;
pub use keyslot::Luks2Area;
pub use keyslot::Luks2AreaEncryption;
pub use keyslot::Luks2KeySize;
pub use keyslot::Luks2Keyslot;
pub use keyslot::Luks2KeyslotPriority;
pub use keyslot::Luks2ReencryptDirection;
pub use keyslot::Luks2ReencryptMode;

Modules§

af
hash
kdf
key
keyslot

Structs§

Luks2Config
Global configuration for a LUKS2 device.
Luks2Header
The primary binary header for LUKS2.
Luks2Metadata
The complete LUKS2 metadata, typically stored in the JSON area of the header.
Luks2U64
A 64-bit unsigned integer that is represented as a decimal string in JSON.
LuksDevice
A representation of a LUKS device, including its header and keyslots.
LuksDeviceUuid
A LUKS device UUID.

Enums§

Luks2Digest
A LUKS2 digest, used to verify the volume key.
Luks2Segment
A LUKS2 segment, representing a range of data on the device.
Luks2SegmentSize
The size of a LUKS2 segment.
Luks2Token
A LUKS2 token, used to store additional metadata or references to external keys.
LuksError
Errors that can occur when working with LUKS devices.
LuksHeader
A LUKS header, either version 1 or 2.

Constants§

AES128_KEY_SIZE
The key size for AES-128 in bytes.
AES256_KEY_SIZE
The key size for AES-256 in bytes.
AES_BLOCK_SIZE
The block size for the AES cipher in bytes.
KDF_SALT_SIZE
The size of a KDF salt in bytes.
LUKS2_BINARY_HEADER_SIZE
The size of the LUKS2 binary header area in bytes.
LUKS2_CHECKSUM_OFFSET
The offset in bytes where the LUKS2 checksum field begins.
LUKS2_CHECKSUM_SIZE
Size of the LUKS2 checksum field in bytes.
LUKS2_DEFAULT_JSON_SIZE
The number of anti-forensic stripes used by the LUKS1 AF feature.
LUKS2_DEFAULT_KEYSLOTS_SIZE
Default size of the LUKS2 keyslots area in bytes.
LUKS2_LABEL_SIZE
Size of the LUKS2 label field in bytes.
LUKS2_SALT_SIZE
Size of the LUKS2 salt field in bytes.
LUKS2_SUBSYSTEM_SIZE
Size of the LUKS2 subsystem field in bytes.
LUKS2_UUID_SIZE
Size of the LUKS2 uuid field in bytes.
LUKS_MAGIC
The magic signature for LUKS devices: “LUKS\xBA\xBE”.
LUKS_MAGIC_SIZE
Size of the LUKS magic signature in bytes.
LUKS_VERSION_SIZE
Size of the LUKS version field in bytes.
SECTOR_SIZE
The standard sector size in bytes.

Functions§

is_luks_device
Returns true if the device at the given path is a LUKS device.