sm4_expandkey(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– sm4_expandkey(9) πŸ’–

okay bestie, welcome to the sm4_expandkey(9) page from the Kernel API Manual β€” and it's literally all about expanding the SM4 key the way GB/T 32907-2016 says to do it. no cap 🫢

✨ NAME ✨

sm4_expandkey β€” expands the SM4 key as described in GB/T 32907-2016. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

int sm4_expandkey (struct sm4_ctx *ctx , const u8 *in_key , unsigned int
      key_len );

πŸ’… ARGUMENTS πŸ’…

  • ctx β€” the location where the computed key will be stored. πŸ’–
  • in_key β€” the supplied key. πŸ”‘
  • key_len β€” the length of the supplied key. πŸ“

🌸 DESCRIPTION 🌸

Returns 0 on success. ✨ The function fails only if an invalid key size (or pointer) is supplied. 😭

bestie, that's the fail vibe: invalid key size (or pointer), and that's it. 🫢

πŸŽ€ SEE ALSO πŸŽ€

Also peek at the Kernel file ./include/crypto/sm4.h and sm4_crypt_block(9). πŸ‘€


xoxo bestie, this page came from ./include/crypto, dated October 2026 β€” stay slay and may your keys always expand correctly πŸ’–βœ¨

πŸ“¦ where this page comes from