Skip to main content

BdeError

Enum BdeError 

Source
pub enum BdeError {
    Io(Error),
    NotBitLocker {
        signature: [u8; 8],
    },
    NoValidMetadata {
        offsets: [u64; 3],
    },
    UnsupportedEncryptionMethod {
        method: u16,
    },
    UnvalidatedEncryptionMethod {
        method: u16,
    },
    NoUnlockProtector {
        protector: &'static str,
        found: Vec<u16>,
    },
    InvalidRecoveryPassword {
        reason: &'static str,
    },
    MissingKeyMaterial {
        what: &'static str,
    },
    AuthenticationFailed {
        what: &'static str,
    },
    MalformedKeyContainer {
        what: &'static str,
        got: usize,
        need: usize,
    },
}
Expand description

An error decoding or unlocking a BitLocker (BDE) volume.

Variants§

§

Io(Error)

An I/O error reading the underlying volume.

§

NotBitLocker

The volume header carries neither a BitLocker -FVE-FS- signature nor a BitLocker To Go MSWIN4.1 signature. The offending bytes at offset 3 are included so the caller can identify what was actually there.

Fields

§signature: [u8; 8]

The 8 bytes found at offset 3 of the volume header.

§

NoValidMetadata

No FVE metadata block carried a valid -FVE-FS- block-header signature at any of the three candidate offsets read from the volume header.

Fields

§offsets: [u64; 3]

The three candidate byte offsets tried.

§

UnsupportedEncryptionMethod

The encryption-method value is not one of the six defined BitLocker ciphers (0x80000x8005). The raw value is included.

Fields

§method: u16

The raw 16-bit encryption-method value from the metadata header.

§

UnvalidatedEncryptionMethod

The encryption method is a recognized BitLocker cipher but this build has no oracle-validated decrypt for it yet (AES-256-CBC 0x8003, or AES-XTS 0x8004/0x8005, or AES-256-CBC + diffuser 0x8001). It is refused rather than decrypted by construction. The raw value is named.

Fields

§method: u16

The raw 16-bit encryption-method value from the metadata header.

§

NoUnlockProtector

The metadata carries no VMK for the protector the caller tried to unlock with (password 0x2000 or recovery password 0x0800). The protector types that were present are listed to guide the examiner toward the right unlock path.

Fields

§protector: &'static str

The protector the caller attempted (e.g. “password”, “recovery password”).

§found: Vec<u16>

The key-protection types that were present.

§

InvalidRecoveryPassword

The supplied recovery password is not a valid 48-digit BitLocker recovery key (wrong group count, a non-digit, a failed divisible-by-11 checksum, or an out-of-range group). The specific reason is named.

Fields

§reason: &'static str

Why the recovery password was rejected.

§

MissingKeyMaterial

The password-protected VMK is missing its stretch key or AES-CCM key entry, so the VMK cannot be derived. Names which part is absent.

Fields

§what: &'static str

Which required sub-entry was absent (e.g. “stretch key”, “AES-CCM key”).

§

AuthenticationFailed

The AES-CCM authentication tag did not verify — for a password unlock this means the supplied password is wrong; for FVEK it means the VMK is wrong.

Fields

§what: &'static str

Which key was being unwrapped (“volume master key” or “FVEK”).

§

MalformedKeyContainer

A decrypted key container was shorter than the fixed layout requires, or a key field ran past the end of the plaintext.

Fields

§what: &'static str

Which container (“volume master key” or “FVEK”).

§got: usize

Bytes actually present.

§need: usize

Minimum bytes the layout requires.

Trait Implementations§

Source§

impl Debug for BdeError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BdeError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for BdeError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for BdeError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.