sm4_expandkey(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms