shishi_decrypt_iv_etype(3)
π shishi_decrypt_iv_etype π
okay bestie, welcome to the shishi manual, section 3 β this one's about shishi_decrypt_iv_etype(3), and yes she's an API function, no cap. grab a boba, we're decrypting β¨
πΈ NAME πΈ
shishi_decrypt_iv_etype β it's an API function, that's the whole name, she's lowkey mysterious like that π
β¨ SYNOPSIS β¨
#include <shishi.h>
int shishi_decrypt_iv_etype(Shishi * handle, Shishi_key * key, int
keyusage, int32_t etype, const char * iv, size_t ivlen, const char * in,
size_t inlen, char ** out, size_t * outlen);
π ARGUMENTS π
okay so here's the whole cast, main character energy each one:
Shishi * handleβ your shishi handle, the one you got fromshishi_init(). she's the whole foundation fr.Shishi_key * keyβ the key you're decrypting with πint keyusageβ an integer that says what this key is decrypting. like, context, yk?int32_t etypeβ an integer saying which cipher to use. pick your fighter π«Άconst char * ivβ input array holding the initialization vector.size_t ivlenβ the size of that initialization vector input array.const char * inβ input array with the data you wanna decrypt.size_t inlenβ size of the data-to-decrypt input array.char ** outβ output array with the newly allocated decrypted data. she's fresh, she's new β¨size_t * outlenβ output variable with the size of that newly allocated output array.
π DESCRIPTION π
so what does she do? she decrypts data as per encryption method using specified initialization vector and key. that's the vibe. π
the key that actually gets used is derived using the key usage. and listen β if key usage is 0, then no key derivation is used. periodt.
β οΈ the OUT buffer must be deallocated by the caller. don't forget, bestie, that's a you problem if you do π
π«Ά also, the next IV is lost β so if you need it, go see shishi_decrypt_ivupdate_etype instead. iykyk.
and now the part that's giving plot twist: note that DECRYPT(ENCRYPT(data)) does not necessarily yield data exactly. not me being honest π some encryption types add pad to make the data fit into the block size of the encryption algorithm. and the pad is not guaranteed to look in any special way, although existing implementations often pad with the zero byte.
what that means for you: you may have to "frame" data, so it's possible to infer the original length after decryption. compare ASN.1 DER, which contains such information. π
β RETURN VALUE β
returns SHISHI_OK iff successful. that's it, that's the whole flex π
π₯ REPORTING BUGS π₯
found a bug? report it 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. she's generous like that π
π 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 her, she ate πβ¨
and that's the whole page, bestie π this was shishi version 1.0.3, page shishi_decrypt_iv_etype(3), copyright vibes running 2002-2022. 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