libfvde(3)
π libfvde(3) π
okay bestie, you found the manual for libfvde.h. This is the Library to access the FileVault Drive Encryption (FVDE) format, and it's giving main character energy fr fr. Let's get into it. π
π NAME π
libfvde.h β Library to access the FileVault Drive Encryption (FVDE) format.
β¨ SYNOPSIS β¨
First thing first, include the header, no cap:
#include <libfvde.h>
π Support functions π
These are the little helper besties: version, access flags, codepage, and signature checks. Slay.
const char *
libfvde_get_version(void);
int
libfvde_get_access_flags_read(void);
int
libfvde_get_codepage(int *codepage, libfvde_error_t **error);
int
libfvde_set_codepage(int codepage, libfvde_error_t **error);
int
libfvde_check_volume_signature(const char *filename,
libfvde_error_t **error);
Available when compiled with wide character string support:
int
libfvde_check_volume_signature_wide(const wchar_t *filename,
libfvde_error_t **error);
Available when compiled with libbfio support:
int
libfvde_check_volume_signature_file_io_handle(libbfio_handle_t *file_io_handle,
libfvde_error_t **error);
πΈ Notify functions πΈ
Notifications? Yes queen. Verbose mode, streams, open and close. Obsessed.
void
libfvde_notify_set_verbose(int verbose);
int
libfvde_notify_set_stream(FILE *stream, libfvde_error_t **error);
int
libfvde_notify_stream_open(const char *filename,
libfvde_error_t **error);
int
libfvde_notify_stream_close(libfvde_error_t **error);
π Error functions π
When things go wrong, these are the cleanup crew. Free errors, print them, sprint them, backtrace them. Iconic.
void
libfvde_error_free(libfvde_error_t **error);
int
libfvde_error_fprint(libfvde_error_t *error, FILE *stream);
int
libfvde_error_sprint(libfvde_error_t *error, char *string, size_t size);
int
libfvde_error_backtrace_fprint(libfvde_error_t *error, FILE *stream);
int
libfvde_error_backtrace_sprint(libfvde_error_t *error, char *string,
size_t size);
π¦ Volume functions π¦
Volume stuff! Initialize, free, signal abort, open, open physical volume files, close, read encrypted root plist, get volume group. Big brain moves.
int
libfvde_volume_initialize(libfvde_volume_t **volume,
libfvde_error_t **error);
int
libfvde_volume_free(libfvde_volume_t **volume, libfvde_error_t **error);
int
libfvde_volume_signal_abort(libfvde_volume_t *volume,
libfvde_error_t **error);
int
libfvde_volume_open(libfvde_volume_t *volume, const char *filename,
int access_flags, libfvde_error_t **error);
int
libfvde_volume_open_physical_volume_files(libfvde_volume_t *volume,
char * const filenames[], int number_of_filenames,
libfvde_error_t **error);
int
libfvde_volume_close(libfvde_volume_t *volume, libfvde_error_t **error);
int
libfvde_volume_read_encrypted_root_plist(libfvde_volume_t *volume,
const char *filename, libfvde_error_t **error);
int
libfvde_volume_get_volume_group(libfvde_volume_t *volume,
libfvde_volume_group_t **volume_group, libfvde_error_t **error);
Available when compiled with wide character string support:
int
libfvde_volume_open_wide(libfvde_volume_t *volume,
const wchar_t *filename, int access_flags, libfvde_error_t **error);
int
libfvde_volume_open_physical_volume_files_wide(libfvde_volume_t *volume,
wchar_t * const filenames[], int number_of_filenames,
libfvde_error_t **error);
int
libfvde_volume_read_encrypted_root_plist_wide(libfvde_volume_t *volume,
const wchar_t *filename, libfvde_error_t **error);
Available when compiled with libbfio support:
int
libfvde_volume_open_file_io_handle(libfvde_volume_t *volume,
libbfio_handle_t *file_io_handle, int access_flags,
libfvde_error_t **error);
int
libfvde_volume_open_physical_volume_files_file_io_pool(libfvde_volume_t *volume,
libbfio_pool_t *file_io_pool, libfvde_error_t **error);
int
libfvde_volume_read_encrypted_root_plist_file_io_handle(libfvde_volume_t *volume,
libbfio_handle_t *file_io_handle, libfvde_error_t **error);
π Volume group functions π
Volume groups: free them, get identifiers, get UTF-8 and UTF-16 names, count physical and logical volumes, grab them by index. The way that this is just chef's kiss.
int
libfvde_volume_group_free(libfvde_volume_group_t **volume_group,
libfvde_error_t **error);
int
libfvde_volume_group_get_identifier(libfvde_volume_group_t *volume_group,
uint8_t *uuid_data, size_t uuid_data_size, libfvde_error_t **error);
int
libfvde_volume_group_get_utf8_name_size(libfvde_volume_group_t *volume_group,
size_t *utf8_string_size, libfvde_error_t **error);
int
libfvde_volume_group_get_utf8_name(libfvde_volume_group_t *volume_group,
uint8_t *utf8_string, size_t utf8_string_size,
libfvde_error_t **error);
int
libfvde_volume_group_get_utf16_name_size(libfvde_volume_group_t *volume_group,
size_t *utf16_string_size, libfvde_error_t **error);
int
libfvde_volume_group_get_utf16_name(libfvde_volume_group_t *volume_group,
uint16_t *utf16_string, size_t utf16_string_size,
libfvde_error_t **error);
int
libfvde_volume_group_get_number_of_physical_volumes(libfvde_volume_group_t *volume_group,
int *number_of_physical_volumes, libfvde_error_t **error);
int
libfvde_volume_group_get_physical_volume_by_index(libfvde_volume_group_t *volume_group,
int volume_index, libfvde_physical_volume_t **physical_volume,
libfvde_error_t **error);
int
libfvde_volume_group_get_number_of_logical_volumes(libfvde_volume_group_t *volume_group,
int *number_of_logical_volumes, libfvde_error_t **error);
int
libfvde_volume_group_get_logical_volume_by_index(libfvde_volume_group_t *volume_group,
int volume_index, libfvde_logical_volume_t **logical_volume,
libfvde_error_t **error);
π₯ Physical volume functions π₯
Physical volumes: free, get identifier, get encryption method, get size. Short and sweet.
int
libfvde_physical_volume_free(libfvde_physical_volume_t **physical_volume,
libfvde_error_t **error);
int
libfvde_physical_volume_get_identifier(libfvde_physical_volume_t *physical_volume,
uint8_t *uuid_data, size_t uuid_data_size, libfvde_error_t **error);
int
libfvde_physical_volume_get_encryption_method(libfvde_physical_volume_t *physical_volume,
uint32_t *encryption_method, libfvde_error_t **error);
int
libfvde_physical_volume_get_size(libfvde_physical_volume_t *physical_volume,
size64_t *size, libfvde_error_t **error);
π Logical volume functions π
Logical volumes are the moment. Free, unlock, read buffers, read at offset, seek, get offset, get identifiers, get UTF-8 and UTF-16 names, get size, check locked, set key, set passwords, set recovery passwords. So many functions, but we're eating.
int
libfvde_logical_volume_free(libfvde_logical_volume_t **logical_volume,
libfvde_error_t **error);
int
libfvde_logical_volume_unlock(libfvde_logical_volume_t *logical_volume,
libfvde_error_t **error);
ssize_t
libfvde_logical_volume_read_buffer(libfvde_logical_volume_t *logical_volume,
void *buffer, size_t buffer_size, libfvde_error_t **error);
ssize_t
libfvde_logical_volume_read_buffer_at_offset(libfvde_logical_volume_t *logical_volume,
void *buffer, size_t buffer_size, off64_t offset,
libfvde_error_t **error);
off64_t
libfvde_logical_volume_seek_offset(libfvde_logical_volume_t *logical_volume,
off64_t offset, int whence, libfvde_error_t **error);
int
libfvde_logical_volume_get_offset(libfvde_logical_volume_t *logical_volume,
off64_t *offset, libfvde_error_t **error);
int
libfvde_logical_volume_get_identifier(libfvde_logical_volume_t *logical_volume,
uint8_t *uuid_data, size_t uuid_data_size, libfvde_error_t **error);
int
libfvde_logical_volume_get_utf8_name_size(libfvde_logical_volume_t *logical_volume,
size_t *utf8_string_size, libfvde_error_t **error);
int
libfvde_logical_volume_get_utf8_name(libfvde_logical_volume_t *logical_volume,
uint8_t *utf8_string, size_t utf8_string_size,
libfvde_error_t **error);
int
libfvde_logical_volume_get_utf16_name_size(libfvde_logical_volume_t *logical_volume,
size_t *utf16_string_size, libfvde_error_t **error);
int
libfvde_logical_volume_get_utf16_name(libfvde_logical_volume_t *logical_volume,
uint16_t *utf16_string, size_t utf16_string_size,
libfvde_error_t **error);
int
libfvde_logical_volume_get_size(libfvde_logical_volume_t *logical_volume,
size64_t *size, libfvde_error_t **error);
int
libfvde_logical_volume_is_locked(libfvde_logical_volume_t *logical_volume,
libfvde_error_t **error);
int
libfvde_logical_volume_set_key(libfvde_logical_volume_t *logical_volume,
const uint8_t *volume_master_key, size_t volume_master_key_size,
libfvde_error_t **error);
int
libfvde_logical_volume_set_utf8_password(libfvde_logical_volume_t *logical_volume,
const uint8_t *utf8_string, size_t utf8_string_length,
libfvde_error_t **error);
int
libfvde_logical_volume_set_utf16_password(libfvde_logical_volume_t *logical_volume,
const uint16_t *utf16_string, size_t utf16_string_length,
libfvde_error_t **error);
int
libfvde_logical_volume_set_utf8_recovery_password(libfvde_logical_volume_t *logical_volume,
const uint8_t *utf8_string, size_t utf8_string_length,
libfvde_error_t **error);
int
libfvde_logical_volume_set_utf16_recovery_password(libfvde_logical_volume_t *logical_volume,
const uint16_t *utf16_string, size_t utf16_string_length,
libfvde_error_t **error);
π LVF encryption context and EncryptedRoot.plist file functions π
This is the EncryptedRoot.plist era. Initialize, free, get data size, copy data, decrypt. And if libbfio is around, read from a file IO handle.
int
libfvde_encryption_context_plist_initialize(libfvde_encryption_context_plist_t **plist,
libfvde_error_t **error);
int
libfvde_encryption_context_plist_free(libfvde_encryption_context_plist_t **plist,
libfvde_error_t **error);
int
libfvde_encryption_context_plist_get_data_size(libfvde_encryption_context_plist_t *plist,
size64_t *data_size, libfvde_error_t **error);
int
libfvde_encryption_context_plist_copy_data(libfvde_encryption_context_plist_t *plist,
uint8_t *data, size_t data_size, libfvde_error_t **error);
int
libfvde_encryption_context_plist_decrypt(libfvde_encryption_context_plist_t *plist,
const uint8_t *key, size_t key_bit_size, libfvde_error_t **error);
Available when compiled with libbfio support:
int
libfvde_encryption_context_plist_read_file_io_handle(libfvde_encryption_context_plist_t *plist,
libbfio_handle_t *file_io_handle, libfvde_error_t **error);
π DESCRIPTION π
The libfvde_get_version() function is used to retrieve the library version. That's literally it, bestie. Short and iconic.
π RETURN VALUES π
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see libfvde.h.
πΏ ENVIRONMENT πΏ
None.
π FILES π
None.
β¨ NOTES β¨
libfvdecan be compiled with wide character support (wchar_t).- To compile
libfvdewith wide character support use:./configure --enable-wide-character-type=yesor define:_UNICODEorUNICODEduring compilation. LIBFVDE_WIDE_CHARACTER_TYPEinlibfvde/features.hcan be used to determine iflibfvdewas compiled with wide character support.
π BUGS π
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libfvde/issues
π«Ά AUTHOR π«Ά
These man pages are generated from libfvde.h.
π COPYRIGHT π
okay bestie, the legal tea β β no we cannot skip it, this is the part that keeps everybody out of trouble:
Copyright (C) 2011-2024, Omar Choudary <choudary.omar@gmail.com>,
Joachim Metz <joachim.metz@gmail.com>.
two whole legends holding it down from 2011 all the way to 2024 π«Ά that's not a phase, that's commitment, that's legacy, that's main character energy fr fr.
and the licensing vibe? it's free software π β if you wanna know the exact copying conditions, you go peep the source, because that's where the rules live, periodt. iykyk. β¨
β οΈ and now the part where i grab you by the shoulders, bestie, because this one is serious: there is NO warranty. like, none. not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. that's not me being dramatic, that's the actual sentence. no cap. π
π₯ SEE ALSO π₯
like, it's giving minimalist and honestly? we respect it:
- the
libfvde.hinclude file β that's it, that's the whole list π go look at it, it's right there, iconic behavior honestly π¦
and that's a wrap on this page bestie π«Ά it was libfvde(3), dated January 19, 2022, and it ate, no crumbs. go be brilliant, go hydrate, and slay πβ¨πΈ
π¦ where this page comes from
- debian trixie: libfvde-dev 20240502-1+b1 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libfvde-devel 20240502-bp160.1.13 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfvde-devel 20240502-bp160.1.13 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfvde-devel 20240502-bp160.1.13 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfvde-devel 20240502-bp160.1.13 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- ubuntu questing: libfvde-dev 20240502-1build1
- ubuntu resolute: libfvde-dev 20240502-2build1 Β· LGPL-3.0-or-later
- ubuntu stonking: libfvde-dev 20240502-2build1 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms