shishi_decrypt(3)
π shishi_decrypt(3) β the shishi girlies' guide to decrypting stuff π
okay bestie, welcome to the shishi manual, page shishi_decrypt(3). this is an API function and it is, lowkey, the moment. π¦
β¨ NAME β¨
shishi_decrypt β it's an API function, bestie. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <shishi.h>
int shishi_decrypt(Shishi * handle, Shishi_key * key, int keyusage,
const char * in, size_t inlen, char ** out, size_t * outlen);
likeβ¦ look at her. iconic signature. no notes. π
π ARGUMENTS π
Shishi * handleβ the shishi handle, allocated byshishi_init(). your main character, fr fr.Shishi_key * keyβ the key you're decrypting with. the key to the whole situation, literally. πint keyusageβ an integer saying what this key is decrypting. it's giving "context matters". β¨const char * inβ input array holding the data to decrypt. the mystery box. πsize_t inlenβ size of that input array. know your lengths, bestie.char ** outβ output array with newly allocated decrypted data. freshly allocated, just for you. πsize_t * outlenβ output variable with the size of that newly allocated output array. she tells you how big the gift is.
π DESCRIPTION π
so, bestie: this function decrypts data with the specified key. the key that actually gets used is derived using the key usage. and if the key usage is 0, no key derivation happens at all β none, zero, nada. π
the OUT buffer must be deallocated by the caller. yes, you. you have to free it. it's yours now. the default IV is used β so if you need to change it, go see shishi_decrypt_iv. and heads up, the next IV gets lost β if you need it, that's a shishi_decrypt_ivupdate situation. π
now for the part that's a little π:
Note thatDECRYPT(ENCRYPT(data))does not necessarily yielddataexactly.
not me being betrayed by crypto π. some encryption types add pad to make the data fit into the block size of the encryption algorithm. and the pad isn't guaranteed to look any particular way either, even though existing implementations often pad with the zero byte. which means you may have to "frame" your data so you can infer the original length after decryption. compare ASN.1 DER, which contains exactly that kind of info. so likeβ¦ frame it. slay responsibly. β¨
β RETURN VALUE β
returns SHISHI_OK iff successful. that's it, that's the bar. π
π REPORTING BUGS π
found a bug? don't gatekeep, 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. so like, keep the receipts, bestie. π
π 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 page, bestie!! this came to you from shishi 1.0.3, page shishi_decrypt(3). stay decrypted, stay iconic, periodt. π
ππ¦
π¦ 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