libcaes(3)

πŸ“¦
version 0~20251121 Β· 2 versions
, in ubuntu stonking

πŸŽ€ 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 (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.h include 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