libbde(3)

πŸ“¦
this version Β· 2 versions
, in debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ libbde β€” the manual page, bestie edition πŸ‘‘

okay so. welcome to libbde(3), which lives in the Library Functions Manual section 3 of your manual pages, and which is literally the whole guide to the libbde.h library. if you're here you're probably staring at a BitLocker-encrypted volume and you want in. grab a snack, we're doing this. πŸ“


🌸 NAME 🌸

libbde.h β€” the Library to access the BitLocker Drive Encryption (BDE) format. that's it, that's the vibe. πŸŽ€


✨ SYNOPSIS ✨

#include <libbde.h>

πŸ’– Support functions

const char *
libbde_get_version(void);

int
libbde_get_access_flags_read(void);

int
libbde_get_codepage(int *codepage, libbde_error_t **error);

int
libbde_set_codepage(int codepage, libbde_error_t **error);

int
libbde_check_volume_signature(const char *filename,
    libbde_error_t **error);

Available when compiled with wide character string support:

int
libbde_check_volume_signature_wide(const wchar_t *filename,
    libbde_error_t **error);

Available when compiled with libbfio support:

int
libbde_check_volume_signature_file_io_handle(libbfio_handle_t *file_io_handle,
    libbde_error_t **error);

πŸ¦‹ Notify functions

void
libbde_notify_set_verbose(int verbose);

int
libbde_notify_set_stream(FILE *stream, libbde_error_t **error);

int
libbde_notify_stream_open(const char *filename, libbde_error_t **error);

int
libbde_notify_stream_close(libbde_error_t **error);

πŸ’… Error functions

void
libbde_error_free(libbde_error_t **error);

int
libbde_error_fprint(libbde_error_t *error, FILE *stream);

int
libbde_error_sprint(libbde_error_t *error, char *string, size_t size);

int
libbde_error_backtrace_fprint(libbde_error_t *error, FILE *stream);

int
libbde_error_backtrace_sprint(libbde_error_t *error, char *string,
    size_t size);

πŸ‘‘ Volume functions

int
libbde_volume_initialize(libbde_volume_t **volume,
    libbde_error_t **error);

int
libbde_volume_free(libbde_volume_t **volume, libbde_error_t **error);

int
libbde_volume_signal_abort(libbde_volume_t *volume,
    libbde_error_t **error);

int
libbde_volume_open(libbde_volume_t *volume, const char *filename,
    int access_flags, libbde_error_t **error);

int
libbde_volume_close(libbde_volume_t *volume, libbde_error_t **error);

int
libbde_volume_is_locked(libbde_volume_t *volume,
    libbde_error_t **error);

int
libbde_volume_unlock(libbde_volume_t *volume, libbde_error_t **error);

ssize_t
libbde_volume_read_buffer(libbde_volume_t *volume, void *buffer,
    size_t buffer_size, libbde_error_t **error);

ssize_t
libbde_volume_read_buffer_at_offset(libbde_volume_t *volume,
    void *buffer, size_t buffer_size, off64_t offset,
    libbde_error_t **error);

off64_t
libbde_volume_seek_offset(libbde_volume_t *volume, off64_t offset,
    int whence, libbde_error_t **error);

int
libbde_volume_get_offset(libbde_volume_t *volume, off64_t *offset,
    libbde_error_t **error);

int
libbde_volume_get_size(libbde_volume_t *volume, size64_t *size,
    libbde_error_t **error);

int
libbde_volume_get_encryption_method(libbde_volume_t *volume,
    uint16_t *encryption_method, libbde_error_t **error);

int
libbde_volume_get_volume_identifier(libbde_volume_t *volume,
    uint8_t *guid_data, size_t guid_data_size, libbde_error_t **error);

int
libbde_volume_get_creation_time(libbde_volume_t *volume,
    uint64_t *filetime, libbde_error_t **error);

int
libbde_volume_get_utf8_description_size(libbde_volume_t *volume,
    size_t *utf8_string_size, libbde_error_t **error);

int
libbde_volume_get_utf8_description(libbde_volume_t *volume,
    uint8_t *utf8_string, size_t utf8_string_size,
    libbde_error_t **error);

int
libbde_volume_get_utf16_description_size(libbde_volume_t *volume,
    size_t *utf16_string_size, libbde_error_t **error);

int
libbde_volume_get_utf16_description(libbde_volume_t *volume,
    uint16_t *utf16_string, size_t utf16_string_size,
    libbde_error_t **error);

int
libbde_volume_get_number_of_key_protectors(libbde_volume_t *volume,
    int *number_of_key_protectors, libbde_error_t **error);

int
libbde_volume_get_key_protector_by_index(libbde_volume_t *volume,
    int key_protector_index, libbde_key_protector_t **key_protector,
    libbde_error_t **error);

int
libbde_volume_set_keys(libbde_volume_t *volume,
    const uint8_t *full_volume_encryption_key,
    size_t full_volume_encryption_key_size, const uint8_t *tweak_key,
    size_t tweak_key_size, libbde_error_t **error);

int
libbde_volume_set_utf8_password(libbde_volume_t *volume,
    const uint8_t *utf8_string, size_t utf8_string_length,
    libbde_error_t **error);

int
libbde_volume_set_utf16_password(libbde_volume_t *volume,
    const uint16_t *utf16_string, size_t utf16_string_length,
    libbde_error_t **error);

int
libbde_volume_set_utf8_recovery_password(libbde_volume_t *volume,
    const uint8_t *utf8_string, size_t utf8_string_length,
    libbde_error_t **error);

int
libbde_volume_set_utf16_recovery_password(libbde_volume_t *volume,
    const uint16_t *utf16_string, size_t utf16_string_length,
    libbde_error_t **error);

int
libbde_volume_read_startup_key(libbde_volume_t *volume,
    const char *filename, libbde_error_t **error);

int
libbde_volume_read_startup_key_wide(libbde_volume_t *volume,
    const wchar_t *filename, libbde_error_t **error);

Available when compiled with wide character string support:

int
libbde_volume_open_wide(libbde_volume_t *volume,
    const wchar_t *filename, int access_flags, libbde_error_t **error);

Available when compiled with libbfio support:

int
libbde_volume_open_file_io_handle(libbde_volume_t *volume,
    libbfio_handle_t *file_io_handle, int access_flags,
    libbde_error_t **error);

int
libbde_volume_read_startup_key_file_io_handle(libbde_volume_t *volume,
    libbfio_handle_t *file_io_handle, libbde_error_t **error);

πŸŽ€ Key protector functions

int
libbde_key_protector_free(libbde_key_protector_t **key_protector,
    libbde_error_t **error);

int
libbde_key_protector_get_identifier(libbde_key_protector_t *key_protector,
    uint8_t *guid_data, size_t guid_data_size, libbde_error_t **error);

int
libbde_key_protector_get_type(libbde_key_protector_t *key_protector,
    uint16_t *type, libbde_error_t **error);

πŸ’– DESCRIPTION πŸ’–

so β€” and this is not me being shady, this is just the facts β€” the libbde_get_version() function is what you call to retrieve the library version. that's the function this page actually narrates for you. the rest of them are up there in the synopsis being gorgeous and mysterious. iykyk. πŸ’…


🌈 RETURN VALUES 🌈

okay bestie listen up because this is the part people skip and then cry about. most of the functions return NULL or -1 on error, and which one it is depends on that function's return type. fr fr. for the actual return values, go look at "libbde.h" β€” that's the source of truth, no cap. πŸ”₯


🧚 ENVIRONMENT 🧚

None

like... literally none. nothing to set. go off. ✨


πŸ¦‹ FILES πŸ¦‹

None

nope, no files either. i told you, nothing. πŸ™ˆ


πŸ’œ NOTES πŸ’œ

libbde can be compiled with wide character support (wchar_t). okay that's the whole thing.

to compile libbde with wide character support, use:

./configure --enable-wide-character-type=yes

or define:

_UNICODE

or:

UNICODE

during compilation. pick your fighter. πŸ₯Š

and the icon that tells you which one you got: LIBBDE_WIDE_CHARACTER_TYPE in libbde/features.h can be used to determine if libbde was compiled with wide character support. slay. πŸ‘‘


πŸ’€ BUGS πŸ’€

found a bug? of any kind? please report bugs of any kind on the project issue tracker:

https://github.com/libyal/libbde/issues

do not suffer in silence, bestie, that's not the move. 🫢


🌸 AUTHOR 🌸

these man pages are generated from "libbde.h". so if the prose feels a little... generated, that's because it literally is. 😭


Copyright (C) 2011-2024, Joachim Metz <joachim.metz@gmail.com>.

this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. like, none. zero. don't come for them. πŸ’…


🌟 SEE ALSO 🌟

  • the libbde.h include file

that's the one. the origin. the blueprint. ✨


and that's the whole page, diva. this was libbde from the manual pages, dated May 2, 2024 β€” catch you on the flip side, go unlock something responsibly. πŸ’–πŸŽ€πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from