shishi_n_fold(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– shishi_n_fold(3) πŸ’–

okay bestie, welcome to the shishi manual, part shishi_n_fold(3) β€” yes the manual name is literally shishi, we're in the shishi section of the manual, keep up πŸ’…


✨ NAME ✨

shishi_n_fold β€” it's an API function, babes. that's the whole name section. slay.


🌸 SYNOPSIS 🌸

#include <shishi.h>

int shishi_n_fold(Shishi * handle, const char * in, size_t inlen, char *
out, size_t outlen);

like. look at her. five args, one int, main character energy fr fr πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Shishi * handle β€” the shishi handle, the one you got from shishi_init(). she's the whole foundation, no cap.
  • const char * in β€” input array holding the data to decrypt. yes, decrypt. that's what it says.
  • size_t inlen β€” the size of that input array, aka "M". πŸ’œ
  • char * out β€” output array where the decrypted data goes. she's the destination, the moment.
  • size_t outlen β€” the size of the output array, aka "N". and N is a fixed length, foreshadowing ✨

🌈 DESCRIPTION 🌈

so the vibe is: you take data and you fold it into a fixed-length output array. the whole intent (and this is the cute part) is to give each input bit approximately equal weight in determining the value of each output bit. democracy for bits, honestly 🫢

the algorithm comes from "A Better Key Schedule For DES-like Ciphers" by Uri Blumenthal and Steven M. Bellovin, over at:

http://www.research.att.com/~smb/papers/ides.pdf
⚠️ but bestie, lowkey important: the sample vectors provided by that paper are incorrect. not us, them. the paper's wrong, the function's fine. do NOT come for us. πŸ’€

⭐ RETURN VALUE ⭐

returns SHISHI_OK iff successful. that's it. that's the whole thing. iff. iconic. πŸ‘‘


πŸ“ REPORTING BUGS πŸ“

found a bug? don't suffer in silence, tell the people:


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 off, just keep the receipts πŸ’–)


🌟 SEE ALSO 🌟

the full documentation for shishi lives in a Texinfo manual β€” very demure, very thorough. if the info and shishi programs are properly installed at your site, then:

info shishi

should give you access to the complete manual. periodt. 🧚


and that's the whole page, bestie!! this was shishi version 1.0.3, page shishi_n_fold(3), mwah πŸ’…βœ¨ thanks for reading, go fold some bits responsibly πŸ¦‹πŸ’œ