AES(3)

πŸ“¦ version 0_git20260208, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

✨ NAME ✨

okay so this is the AES(3) page from the Library Functions Manual, and the main characters are setupAESstate, aesCBCencrypt, and aesCBCdecrypt β€” all about the advanced encryption standard (rijndael). slay. πŸ’…


🌸 SYNOPSIS 🌸

#include <u.h>
#include <libc.h>
#include <mp.h>
#include <libsec.h>

void setupAESstate(AESstate *s, uchar key[], int keybytes, uchar *ivec)

void aesCBCencrypt(uchar*, int, AESstate*)

void aesCBCdecrypt(uchar*, int, AESstate*)

πŸ’… DESCRIPTION πŸ’…

bestie, here's the tea: DES is being replaced by Rijndael, also known as AES, as the preferred block ciper. πŸ‘‘ setupAESstate, aesCBCencrypt, and aesCBCdecrypt implement cipher block chaining encryption. periodt.

Keybytes should be 16, 24, or 32. No cap.

The initialization vector ivec of AESbsize bytes should be random enough to be unlikely to be reused β€” but it does not need to be cryptographically strongly unpredictable. fr fr, that's literally the spec. 🌈


πŸŽ€ SOURCE πŸŽ€

/src/libsec β€” that's where this lives, bestie. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– that's a wrap on AES(3) from the Library Functions Manual β€” source/version: /src/libsec; date: not listed on this page. byeeeee πŸŽ€βœ¨