shishi_aes_cts(3)
β¨ shishi_aes_cts β¨
okay bestie, so we're looking at a page from the shishi manual β specifically shishi_aes_cts(3), which is the AES-CTS function. it's giving crypto, it's giving "my data is safe and cute", and honestly? obsessed. π
πΈ NAME πΈ
shishi_aes_cts β it's an API function, babe. that's the whole name. short, sweet, iconic. π
β¨ SYNOPSIS β¨
#include <shishi.h>
int shishi_aes_cts(Shishi * handle, int decryptp, const char * key,
size_t keylen, const char iv[16], char * ivout[16], const char * in,
size_t inlen, char ** out);
so yeah, you pull in <shishi.h> and then you call this one function with a lot of arguments. she's high maintenance but she delivers. π«Ά
π ARGUMENTS π
here's the group chat roll call, one by one, no cap:
Shishi * handleβ your shishi handle, the one you got fromshishi_init(). this is like your ID at the door, don't show up without it. πͺͺint decryptpβ the vibe switch.0means we're encrypting, anything non-0means we're decrypting. literally the whole plot twist lives in this int. πconst char * keyβ the input character array holding the key you wanna use. yes, that key. guard it with your life. πsize_t keylenβ the length of that input character array with the key. size matters here, respectfully. πconst char iv[16]β input character array with the initialization vector to use. it's exactly 16 chars, and you can also passNULLif that's your mood. πchar * ivout[16]β output character array with the updated initialization vector. also takesNULLif you're not about that IV-life. β¨const char * inβ input character array of the data to encrypt/decrypt. this is the actual tea. βsize_t inlenβ the length of that input character array of data to encrypt/decrypt. gotta tell her how much tea there is. πchar ** outβ newly allocated character array with the encrypted/decrypted data. she's fresh, she's new, and she is 100% your responsibility now. π
π DESCRIPTION π
so what does she actually do? she encrypts or decrypts data β and which one happens depends on decryptp, bestie. the mode is AES in CBC-CTS mode, which is fancy for "AES but with the ciphertext-stealing glow-up". π
the length of the key, keylen, is what decides whether you're getting AES 128 or AES 256. so yeah, pick your key length with intention. no guessing. iykyk. π₯
β οΈ and this part is IMPORTANT: the out buffer must be deallocated by the caller. that's on you, not on the function. she allocates, you free. that's the deal. don't leave her hanging or you'll be leaking memory and we'll both be sad. π
β RETURN VALUE β
returns SHISHI_OK iff successful. that's the good ending, the slay ending, the "everything worked" ending. anything else? not that. π
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie, tell the devs:
- report bugs to <bug-shishi@gnu.org>
- GNU Shishi home page:
http://www.gnu.org/software/shishi/ - general help using GNU software:
http://www.gnu.org/gethelp/
they wanna hear from you, fr fr. π¬
π COPYRIGHT π
Copyright Β© 2002-2022 Simon Josefsson.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
so like, go ahead and share it, remix it, print it on a tote bag β just keep the copyright notice and this notice. that's the whole ask. π
π¦ SEE ALSO π¦
the full documentation for shishi is maintained as a Texinfo manual. if the info and shishi programs are properly installed at your site, the command
info shishi
should give you access to the complete manual. go read it, it's the director's cut. π
and that's the whole page, bestie! this was page shishi_aes_cts(3), from shishi version 1.0.3. stay encrypted, stay iconic, and free your buffers. mwah. πβ¨π
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: shishi-doc 1.0.3-7 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms