libluksde(3)
๐ libluksde โ the manual page, bestie edition ๐
okay so you know how some disks are like "bestie I'm encrypted, you're not getting in without a key"? That's LUKS, and this is libluksde(3), the library that lets your code peek inside the Linux Unified Key Setup (LUKS) Disk Encryption format. It's a C library, it lives in libluksde.h, and we're gonna go through the whole thing together. no skipping. grab a snack. ๐
๐ธ NAME ๐ธ
libluksde.h โ the library to access the Linux Unified Key Setup (LUKS) Disk Encryption format. that's the whole vibe. she unlocks things. ๐
โจ SYNOPSIS โจ
first of all, you gotta pull her in:
#include <libluksde.h>
cool cool cool. now here's every single function, grouped exactly how the header groups them. no cap. ๐
๐ซถ Support functions
const char *
libluksde_get_version(void);
int
libluksde_get_access_flags_read(void);
int
libluksde_get_codepage(int *codepage, libluksde_error_t **error);
int
libluksde_set_codepage(int codepage, libluksde_error_t **error);
int
libluksde_check_volume_signature(const char *filename,
libluksde_error_t **error);
int
libluksde_check_volume_signature_wide(const wchar_t *filename,
libluksde_error_t **error);
๐ง Available when compiled with libbfio support:
int
libluksde_check_volume_signature_file_io_handle(libbfio_handle_t *file_io_handle,
libluksde_error_t **error);
๐ Notify functions
void
libluksde_notify_set_verbose(int verbose);
int
libluksde_notify_set_stream(FILE *stream, libluksde_error_t **error);
int
libluksde_notify_stream_open(const char *filename,
libluksde_error_t **error);
int
libluksde_notify_stream_close(libluksde_error_t **error);
๐ Error functions
void
libluksde_error_free(libluksde_error_t **error);
int
libluksde_error_fprint(libluksde_error_t *error, FILE *stream);
int
libluksde_error_sprint(libluksde_error_t *error, char *string,
size_t size);
int
libluksde_error_backtrace_fprint(libluksde_error_t *error,
FILE *stream);
int
libluksde_error_backtrace_sprint(libluksde_error_t *error, char *string,
size_t size);
๐ Volume functions
like, the main characters, honestly.
int
libluksde_volume_initialize(libluksde_volume_t **volume,
libluksde_error_t **error);
int
libluksde_volume_free(libluksde_volume_t **volume,
libluksde_error_t **error);
int
libluksde_volume_signal_abort(libluksde_volume_t *volume,
libluksde_error_t **error);
int
libluksde_volume_open(libluksde_volume_t *volume, const char *filename,
int access_flags, libluksde_error_t **error);
int
libluksde_volume_close(libluksde_volume_t *volume,
libluksde_error_t **error);
int
libluksde_volume_is_locked(libluksde_volume_t *volume,
libluksde_error_t **error);
int
libluksde_volume_unlock(libluksde_volume_t *volume,
libluksde_error_t **error);
ssize_t
libluksde_volume_read_buffer(libluksde_volume_t *volume, void *buffer,
size_t buffer_size, libluksde_error_t **error);
ssize_t
libluksde_volume_read_buffer_at_offset(libluksde_volume_t *volume,
void *buffer, size_t buffer_size, off64_t offset,
libluksde_error_t **error);
off64_t
libluksde_volume_seek_offset(libluksde_volume_t *volume, off64_t offset,
int whence, libluksde_error_t **error);
int
libluksde_volume_get_offset(libluksde_volume_t *volume, off64_t *offset,
libluksde_error_t **error);
int
libluksde_volume_get_size(libluksde_volume_t *volume, size64_t *size,
libluksde_error_t **error);
int
libluksde_volume_get_encryption_method(libluksde_volume_t *volume,
int *encryption_method, int *encryption_chaining_mode,
libluksde_error_t **error);
int
libluksde_volume_get_volume_identifier(libluksde_volume_t *volume,
uint8_t *uuid_data, size_t uuid_data_size,
libluksde_error_t **error);
int
libluksde_volume_set_key(libluksde_volume_t *volume,
const uint8_t *master_key, size_t master_key_size,
libluksde_error_t **error);
int
libluksde_volume_set_utf8_password(libluksde_volume_t *volume,
const uint8_t *utf8_string, size_t utf8_string_length,
libluksde_error_t **error);
int
libluksde_volume_set_utf16_password(libluksde_volume_t *volume,
const uint16_t *utf16_string, size_t utf16_string_length,
libluksde_error_t **error);
๐ Available when compiled with wide character string support:
int
libluksde_volume_open_wide(libluksde_volume_t *volume,
const wchar_t *filename, int access_flags,
libluksde_error_t **error);
๐ฆ Available when compiled with libbfio support:
int
libluksde_volume_open_file_io_handle(libluksde_volume_t *volume,
libbfio_handle_t *file_io_handle, int access_flags,
libluksde_error_t **error);
๐ DESCRIPTION ๐
okay so literally the entire DESCRIPTION section is one singular function, she's that iconic:
libluksde_get_version()โ you call this to grab the library version. that's it. that's the whole section. version check era. โจ
๐ RETURN VALUES ๐
most of the functions hand you back NULL or -1 when something goes wrong โ which one depends on the return type, so pay attention, bestie. and for the actual return values? go read "libluksde.h". the header knows all, the header tells all. ๐ฎ
๐ธ ENVIRONMENT ๐ธ
None
nothing. zero. the environment section is on a digital detox. ๐
๐ฆ FILES ๐ฆ
None
also nothing. same energy. โจ
โญ NOTES โญ
libluksdecan be compiled with wide character support (wchar_t). wide char girlies rise up ๐ซถ- to compile
libluksdewith wide character support, you use:
./configure --enable-wide-character-type=yes
or you define:
_UNICODE
or:
UNICODE
during compilation.
LIBLUKSDE_WIDE_CHARACTER_TYPEinlibluksde/features.hcan be used to determine iflibluksdewas compiled with wide character support. like a little vibe check for your build. ๐
๐ BUGS ๐
found a bug? not on my watch. please report bugs of any kind on the project issue tracker:
https://github.com/libyal/libluksde/issues
we don't gatekeep. fr fr. ๐
๐ AUTHOR ๐
these man pages are generated from "libluksde.h". the header is the author, the header is the moment. ๐ญ
๐ฅ COPYRIGHT ๐ฅ
Copyright (C) 2013-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. she's giving, but she is NOT promising. periodt.
๐ SEE ALSO ๐
- the
libluksde.hinclude file
and that's the page, bestie!! ๐ source/version: libluksde, and the date stamp on this beauty is January 21, 2022 โ section libluksde(3). go forth and read headers, mwah ๐
๐ฆ where this page comes from
- debian trixie: libluksde-dev 20240503-1+b1 ยท LGPL-3.0-or-later
- opensuse-leap 16.0: libluksde-devel 20240503-bp160.1.12 ยท GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libluksde-devel 20240503-bp160.1.12 ยท GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libluksde-devel 20240503-bp160.1.12 ยท GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libluksde-devel 20240503-bp160.1.12 ยท GFDL-1.3-or-later AND LGPL-3.0-or-later
- ubuntu questing: libluksde-dev 20240503-1build1
- ubuntu resolute: libluksde-dev 20240503-1build2 ยท LGPL-3.0-or-later
- ubuntu stonking: libluksde-dev 20240503-1build2 ยท 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