EVP(3)

πŸ“¦ version 4.1.0, in opensuse-leap 16.0

πŸ’… EVP(3) β€” okay bestie, this is the Library Functions Manual page for evp and she is GORGEOUS ✨

🌸 NAME 🌸

evp β€” high-level cryptographic functions</p> πŸ”₯ like the wrapper that makes all the scary crypto actually usable, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <openssl/evp.h>

That's it. One include and you're in. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

Okay so the EVP library gives you a high-level interface to cryptographic functions. And the abbreviation β€œEVP” is intended to mean β€œEnVeloPe” β€” like, in the sense of β€œwrapper library”. 🫢

⚠️ But bestie, hear me β€” it is NOT related to the technical meaning of the term β€œenvelope” in contexts like CMS_encrypt(3), EVP_SealInit(3), PKCS7_encrypt(3), or SMIME_write_ASN1(3). Two different envelopes, iykyk. Don't mix them up. πŸ™ˆ

EVP_SealInit(3) and EVP_OpenInit(3) are the ones that actually do public key encryption and decryption, implementing those digital "envelopes". πŸ“¨

The EVP_DigestSignInit(3) and EVP_DigestVerifyInit(3) functions implement digital signatures and Message Authentication Codes (MACs). And yes, the older EVP_SignInit(3) and EVP_VerifyInit(3) functions exist too β€” they're giving legacy icon energy. πŸ‘‘

Symmetric encryption? That's available with the EVP_EncryptInit(3) functions. πŸ’– Message digests? Those live in the EVP_DigestInit(3) functions.

Authenticated encryption with additional data (AEAD) β€” the ✨fancy✨ one β€” is available with the EVP_AEAD_CTX_init(3) functions.


🌈 The EVP_PKEY_*() era 🌈

The EVP_PKEY_*() functions provide a high-level interface to asymmetric algorithms. Literally the main character of this whole page.

The EVP_PKEY_*() functions support the full range of asymmetric algorithm operations, and here's the rundown:


πŸ“ Password-based stuff πŸ“

The EVP_BytesToKey(3) function provides some limited support for password based encryption. Careful selection of the parameters will provide a PKCS#5 PBKDF1 compatible implementation. πŸ‘‘

πŸ’€ But real talk: new applications should typically not use this β€” preferring, for example, PBKDF2 from PCKS#5. (Yes, the typo is canon, I don't make the rules.) πŸ™ˆ

🧚 Base64 moment 🧚

The EVP_EncodeInit(3) family of functions provides base64 encoding and decoding. Slay, honestly. ⭐


πŸ’œ SEE ALSO πŸ’œ

Okay, this list is long, so buckle up bestie β€” every single one, no skipping, no cap. πŸ“‹βœ¨


And that's the whole page, bestie. 🫢 She's from Debian, dated December 6, 2024, and she ate. πŸ’…βœ¨ Go forth and #include <openssl/evp.h> responsibly. πŸŽ€

πŸ“¦ where this page comes from