EVP_DES_CBC(3)
π EVP_DES_CBC β the DES cipher moment (libcrypto, bestie) π
okay so this page lives in the libcrypto library, and it's literally the whole DES cipher family rolled into one gorgeous little cast list. 22 functions. all of them returning const EVP_CIPHER *. no cap, they're all icons. β¨
πΈ SYNOPSIS πΈ
so first things first, you gotta pull in the header:
#include <openssl/evp.h>
and then every single one of these is a const EVP_CIPHER * function that takes no arguments β she just exists and hands you a cipher. main character energy fr fr:
const EVP_CIPHER *
EVP_des_cbc(void);
const EVP_CIPHER *
EVP_des_cfb(void);
const EVP_CIPHER *
EVP_des_cfb1(void);
const EVP_CIPHER *
EVP_des_cfb8(void);
const EVP_CIPHER *
EVP_des_cfb64(void);
const EVP_CIPHER *
EVP_des_ecb(void);
const EVP_CIPHER *
EVP_des_ofb(void);
const EVP_CIPHER *
EVP_des_ede(void);
const EVP_CIPHER *
EVP_des_ede_cbc(void);
const EVP_CIPHER *
EVP_des_ede_cfb(void);
const EVP_CIPHER *
EVP_des_ede_cfb64(void);
const EVP_CIPHER *
EVP_des_ede_ecb(void);
const EVP_CIPHER *
EVP_des_ede_ofb(void);
const EVP_CIPHER *
EVP_des_ede3(void);
const EVP_CIPHER *
EVP_des_ede3_cbc(void);
const EVP_CIPHER *
EVP_des_ede3_cfb(void);
const EVP_CIPHER *
EVP_des_ede3_cfb1(void);
const EVP_CIPHER *
EVP_des_ede3_cfb8(void);
const EVP_CIPHER *
EVP_des_ede3_cfb64(void);
const EVP_CIPHER *
EVP_des_ede3_ecb(void);
const EVP_CIPHER *
EVP_des_ede3_ofb(void);
const EVP_CIPHER *
EVP_desx_cbc(void);
π¦ DESCRIPTION π¦
so these functions give you the DES encryption algorithm inside the evp(3) framework. DES is a block cipher that operates on 64 bit blocks, and the key length you pass to EVP_EncryptInit(3) is 64 bits. π«
but β and this is the spicy bit β only 56 of those bits actually get used in the encryption algorithm. the least significant bit in each of the eight bytes is only used for checking parity. so yeah, it's giving "mostly vibes". π«Ά
β οΈ using this algorithm is discouraged, bestie. the short key length makes it vulnerable to brute force attacks. it's a legacy icon, not a security icon. periodt. π
π plain DES, the OG π
EVP_des_cbc()β DES in CBC modeEVP_des_cfb1()β DES in CFB mode with a 1-bit shiftEVP_des_cfb8()β DES in CFB mode with an 8-bit shiftEVP_des_cfb64()β DES in CFB mode with a 64-bit shiftEVP_des_ecb()β DES in ECB modeEVP_des_ofb()β DES in OFB mode
and then EVP_des_cfb() is an alias for EVP_des_cfb64(), implemented as a macro. so if you see her, she's just EVP_des_cfb64() wearing a different wig. π
π two key triple DES (ede) π
EVP_des_ede_cbc()β two key triple DES in CBC modeEVP_des_ede_cfb64()β two key triple DES in CFB mode with a 64-bit shiftEVP_des_ede_ecb()β two key triple DES in ECB modeEVP_des_ede_ofb()β two key triple DES in OFB mode
EVP_des_ede_cfb() is an alias for EVP_des_ede_cfb64(), implemented as a macro. and EVP_des_ede() is an alias for EVP_des_ede_ecb(). cute little nicknames, we love to see it. π
π three key triple DES (ede3) π
EVP_des_ede3_cbc()β three key triple DES in CBC modeEVP_des_ede3_cfb1()β three key triple DES in CFB mode with a 1-bit shiftEVP_des_ede3_cfb8()β three key triple DES in CFB mode with an 8-bit shiftEVP_des_ede3_cfb64()β three key triple DES in CFB mode with a 64-bit shiftEVP_des_ede3_ecb()β three key triple DES in ECB modeEVP_des_ede3_ofb()β three key triple DES in OFB mode
EVP_des_ede3_cfb() is an alias for EVP_des_ede3_cfb64(), implemented as a macro. and EVP_des_ede3() is an alias for EVP_des_ede3_ecb(). the way that this family just keeps aliasing each other π iconic. π
π DES-X, the dramatic one π
EVP_desx_cbc()β provides the DES-X encryption algorithm in CBC mode. she uses a key length of 128 bits and acts on blocks of 128 bits. yes bestie, both 128. she's built different. π₯
π RETURN VALUES π
every single one of these functions returns an EVP_CIPHER structure that provides the implementation of the symmetric cipher. that's it. that's the tea. no error codes hiding in the shadows. β
π§ SEE ALSO π§
go read those next, iykyk. π¦
πΈ HISTORY πΈ
okay history lesson, gather round:
EVP_des_cbc(),EVP_des_cfb(),EVP_des_ecb(),EVP_des_ofb(),EVP_des_ede(),EVP_des_ede_cbc(),EVP_des_ede_cfb(),EVP_des_ede_ofb(),EVP_des_ede3(),EVP_des_ede3_cbc(),EVP_des_ede3_cfb(), andEVP_des_ede3_ofb()first appeared in SSLeay 0.5.1. βEVP_desx_cbc()first appeared in SSLeay 0.6.2.- all of those have been available since OpenBSD 2.4.
then later era:
EVP_des_ede_ecb()andEVP_des_ede3_ecb()first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2. π
and the CFB girlies arrived last:
EVP_des_cfb1(),EVP_des_cfb8(),EVP_des_cfb64(),EVP_des_ede_cfb64(),EVP_des_ede3_cfb1(),EVP_des_ede3_cfb8(), andEVP_des_ede3_cfb64()first appeared in OpenSSL 0.9.7e and have been available since OpenBSD 3.8. π
π and that's the whole page, bestie! this came from theDebianbuild of the manual, dated June 8, 2025, and it's theEVP_DES_CBC(3)page in the Library Functions Manual. go encrypt something (responsibly, and probably with something that isn't DES π). mwah! πβ¨
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2017 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms