crypto_lskcipher_encrypt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

crypto_lskcipher_encrypt β€” encrypt plaintext πŸ’–

okay so bestie, welcome to the crypto_lskcipher_encrypt(9) page from the Kernel API Manual. This is the function that handles the actual plaintext encryption, and yes she's iconic for it. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

int crypto_lskcipher_encrypt (struct crypto_lskcipher *tfm , const u8 *src , u8 *dst , unsigned len , u8 *siv );

πŸŽ€ ARGUMENTS πŸŽ€

  • tfm β€” the lskcipher handle. That's your main-character cipher object, periodt.
  • src β€” source buffer. This is where the plaintext is sitting.
  • dst β€” destination buffer. This is where the encrypted output goes.
  • len β€” number of bytes to process. Literally the count of bytes invited to the party.
  • siv β€” IV + state for the cipher operation. The length of the IV must comply with the IV size defined by crypto_lskcipher_ivsize. The IV is then followed with a buffer with the length as specified by crypto_lskcipher_statesize. Encrypt plaintext data using the lskcipher handle. So yeah: IV first, state buffer right after it, and those length rules are not optional, bestie. 🫢

πŸ’… RETURN πŸ’…

>=0 if the cipher operation was successful. If it's positive, then this many bytes have been left unprocessed. < 0 if an error occurred. Like, negative is the "something went wrong" vibe, and positive is "we did it but some bytes are still outside the club." 😭

🌈 SEE ALSO 🌈

okay the reference list is long and honestly she ate. Start with the Kernel file ./include/crypto/skcipher.h, then the whole squad:


cute sign-off: this page is from the Kernel API Manual, lives under the source ./include/crypto, and is stamped October 2026 with the name crypto_lskcipher_encrypt(9) on the label. πŸ’– Go encrypt something iconic, bestie. πŸ¦‹

πŸ“¦ where this page comes from