EVP_SM4_CBC(3ossl)

✨ EVP_SM4_CBC ✨</p> β€” the OpenSSL manual page, bestie edition πŸŽ€

okay so you're here because you wanna know about EVP_sm4_cbc, EVP_sm4_ecb, EVP_sm4_cfb, EVP_sm4_cfb128, EVP_sm4_ofb, and EVP_sm4_ctr β€” the EVP SM4 cipher girlies πŸ’…. This is from the OpenSSL 3.5.9 manual, dated 2026-09-29. Sit down, hydrate, let's go πŸ¦‹


🌸 NAME 🌸

EVP_sm4_cbc, EVP_sm4_ecb, EVP_sm4_cfb, EVP_sm4_cfb128, EVP_sm4_ofb, EVP_sm4_ctr β€” the EVP SM4 cipher πŸ”₯


✨ SYNOPSIS ✨

#include <openssl/evp.h>

const EVP_CIPHER *EVP_sm4_cbc(void);
const EVP_CIPHER *EVP_sm4_ecb(void);
const EVP_CIPHER *EVP_sm4_cfb(void);
const EVP_CIPHER *EVP_sm4_cfb128(void);
const EVP_CIPHER *EVP_sm4_ofb(void);
const EVP_CIPHER *EVP_sm4_ctr(void);

no cap, that's the whole roster πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

The SM4 blockcipher (GB/T 32907-2016) for EVP. she's giving standardized, she's giving official, she's giving legit πŸ“œ

All modes below use a key length of 128 bits and acts on blocks of 128 bits. every single one. no exceptions, that's the vibe check βœ…

  • EVP_sm4_cbc(), EVP_sm4_ecb(), EVP_sm4_cfb(), EVP_sm4_cfb128(), EVP_sm4_ofb(), EVP_sm4_ctr() β€” The SM4 blockcipher with a 128-bit key in CBC, ECB, CFB, OFB and CTR modes respectively. one function per mode, matching order, periodt πŸ’…

🫢 NOTES 🫢

bestie, listen. devs should be aware of the negative performance implications of calling these functions multiple times 😭 β€” like, it's not the moment, okay?

instead, consider using EVP_CIPHER_fetch(3) with EVP_CIPHER-SM4(7). and go read "Performance" in crypto(7) for further information. she did her research, you should too πŸ“šβœ¨

fr fr, call once and cache it. your CPU will thank you 🧚

πŸ’œ RETURN VALUES πŸ’œ

These functions return a EVP_CIPHER structure that contains the implementation of the symmetric cipher. if you wanna know what's inside that EVP_CIPHER structure, go look at EVP_CIPHER_meth_new(3) for details πŸ‘€


🌈 SEE ALSO 🌈

the friend group πŸ’ž go read all of them, iykyk


Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved. Copyright 2017 Ribose Inc. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


πŸ’€ legal girlies stay winning. read the license, don't be messy.

and that's the whole page, bestie!! this was OpenSSL 3.5.9, dated 2026-09-29, filed under EVP_SM4_CBC(3ossl). slay, stay encrypted, and go touch some grass πŸŒ±πŸ’–πŸ¦‹

πŸ“¦ where this page comes from