shishi_decrypt_ivupdate(3)
π shishi_decrypt_ivupdate β the glow-up for your IV π
okay bestie, welcome to shishi_decrypt_ivupdate(3), part of the shishi manual family. this is the function that decrypts your data and hands you back a fresh, updated initialization vector so you can keep the chain going. it's giving β¨continuityβ¨. let's get into it π«Ά
πΈ SYNOPSIS πΈ
#include <shishi.h>
int shishi_decrypt_ivupdate(Shishi * handle, Shishi_key * key, int
keyusage, const char * iv, size_t ivlen, char ** ivout, size_t *
ivoutlen, const char * in, size_t inlen, char ** out, size_t * outlen);
π ARGUMENTS π
like, so many arguments, but every single one of them is doing its little job and we respect that π
Shishi * handleβ the shishi handle, which you got fromshishi_init(). your whole main character entry pass.Shishi_key * keyβ the key you're decrypting with. the β¨keyβ¨, literally.int keyusageβ an integer that says what this key is being used to decrypt. it's how the key knows its role.const char * ivβ input array holding the initialization vector.size_t ivlenβ the size of that input array with the initialization vector. gotta know how big it is, no cap.char ** ivoutβ output array with the newly allocated updated initialization vector. fresh IV, hot off the press π₯size_t * ivoutlenβ the size of that output array with the updated initialization vector.const char * inβ input array with the data you wanna decrypt.size_t inlenβ size of the input array with the data to decrypt.char ** outβ output array with the newly allocated decrypted data. this is the one you've been waiting for πsize_t * outlenβ output variable with the size of that newly allocated output array.
π¦ DESCRIPTION π¦
so basically: this decrypts your data using the initialization vector and key you specified. the key it actually uses is derived using the key usage β so if keyusage is 0, then no key derivation happens at all. periodt.
the OUT buffer? yeah, the caller has to deallocate it. it's yours now, you own it, take care of it π«Ά
and if IVOUT or IVOUTLEN is NULL, then the updated IV just... isn't saved anywhere. it simply vibes off into the void. π«₯
β οΈ okay this part is important so pay attention bestie:DECRYPT(ENCRYPT(data))does not necessarily give you backdataexactly. some encryption types add pad to make the data fit into the block size of the encryption algorithm. and worse β that pad is not guaranteed to look in any special way, although existing implementations often pad with the zero byte. so what does that mean for you? it means you may have to "frame" your data, so it's possible to infer the original length after decryption. think of it likeASN.1 DER, which contains exactly this kind of information. slay π
β RETURN VALUE β
returns SHISHI_OK iff successful. that's it, that's the whole vibe check β
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie. 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/
π 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. iconic, honestly π
π 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, this command:
info shishi
should give you access to the complete manual. iykyk π§
that's the whole page, bestie! this was shishi_decrypt_ivupdate(3) from shishi version 1.0.3 β go forth, decrypt responsibly, and remember to free your buffers πβ¨π
π¦ 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