libcaes(3)
π libcaes(3) β Library Functions Manual π
okay bestie, sit down, hydrate, because we're about to talk about libcaes πΈ β the cross-platform AES encryption library. The whole vibe lives in libcaes.h, and every single thing below is straight out of that header. no gatekeeping in this house π
β¨ NAME β¨
libcaes.h β the library that supports cross-platform AES encryption πβ¨
π SYNOPSIS π
first move, always, no exceptions:
#include <libcaes.h>
and then you've got four little function families to meet. let's go π
π«Ά Support functions
const char *
libcaes_get_version(void);
π Error functions
void
libcaes_error_free(libcaes_error_t **error);
int
libcaes_error_fprint(libcaes_error_t *error, FILE *stream);
int
libcaes_error_sprint(libcaes_error_t *error, char *string, size_t size);
int
libcaes_error_backtrace_fprint(libcaes_error_t *error, FILE *stream);
int
libcaes_error_backtrace_sprint(libcaes_error_t *error, char *string,
size_t size);
π§ Context functions
int
libcaes_context_initialize(libcaes_context_t **context,
libcaes_error_t **error);
int
libcaes_context_free(libcaes_context_t **context,
libcaes_error_t **error);
int
libcaes_context_set_key(libcaes_context_t *context, int mode,
const uint8_t *key, size_t key_bit_size, libcaes_error_t **error);
int
libcaes_crypt_cbc(libcaes_context_t *context, int mode,
const uint8_t *initialization_vector,
size_t initialization_vector_size, const uint8_t *input_data,
size_t input_data_size, uint8_t *output_data,
size_t output_data_size, libcaes_error_t **error);
int
libcaes_crypt_ccm(libcaes_context_t *context, int mode,
const uint8_t *nonce, size_t nonce_size, const uint8_t *input_data,
size_t input_data_size, uint8_t *output_data,
size_t output_data_size, libcaes_error_t **error);
int
libcaes_crypt_ecb(libcaes_context_t *context, int mode,
const uint8_t *input_data, size_t input_data_size,
uint8_t *output_data, size_t output_data_size,
libcaes_error_t **error);
π Tweaked context functions
yes queen, there's a whole tweaked branch, she's different, she's special, respect her π¦
int
libcaes_tweaked_context_initialize(libcaes_tweaked_context_t **tweaked_context,
libcaes_error_t **error);
int
libcaes_tweaked_context_free(libcaes_tweaked_context_t **tweaked_context,
libcaes_error_t **error);
int
libcaes_tweaked_context_set_keys(libcaes_tweaked_context_t *tweaked_context,
int mode, const uint8_t *key, size_t key_bit_size,
const uint8_t *tweak_key, size_t tweak_key_bit_size,
libcaes_error_t **error);
int
libcaes_crypt_xts(libcaes_tweaked_context_t *tweaked_context, int mode,
const uint8_t *tweak_value, size_t tweak_value_size,
const uint8_t *input_data, size_t input_data_size,
uint8_t *output_data, size_t output_data_size,
libcaes_error_t **error);
π DESCRIPTION π
so, the one function the page actually spills tea about:
libcaes_get_version()β she's the one you call when you wanna retrieve the library version π« that's literally her entire job and she does it flawlessly.
π RETURN VALUES π
okay so this is the part where you pay attention, bestie:
most of these functions return NULL or -1 when something goes wrong β which one you get depends on the return type of the function, obviously. π
for the actual return values, go read libcaes.h itself. no cap, that's where the receipts are.
π ENVIRONMENT π
None
like... nothing. empty. she doesn't read env vars. she's unbothered π
π FILES π
None
also nothing. no files touched, no files needed. clean girl aesthetic β¨
π BUGS π
found a bug? a little glitch? a chaos moment? π do not suffer in silence β please report bugs of any kind on the project issue tracker:
https://github.com/libyal/libcaes/issues
they want to hear it, fr fr π«Ά
ποΈ AUTHOR ποΈ
these man pages are generated from libcaes.h. that's the source of truth, the blueprint, the moment π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (C) 2011-2025, 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.
okay so like β free software, yes, slay, but zero warranty. not even the basic "it'll probably work" one. none. nada. read the source for the actual copying conditions π
π SEE ALSO π
- the
libcaes.hinclude file
and that's the whole page, bestie π this was the libcaes(3) manual page, coming to you from libcaes, dated March 18, 2019 π now go encrypt something iconic π β¨
π¦ where this page comes from
- ubuntu stonking: libcaes-dev 0~20251121-1 Β· 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