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 π
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
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms