EVP(7ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’– EVP(7ossl) β€” high-level cryptographic functions πŸ’–

okay so this is the EVP(7ossl) page from the OpenSSL manual set (yes, section 7, we're fancy like that), and it's basically the group chat where all the high-level crypto functions hang out. bestie, if you've ever been like "why is crypto so much work," it's because you were doing it the hard way. this page is the glow-up. ✨


✨ SYNOPSIS ✨

#include <openssl/evp.h>

that's it. one include and you're in. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

The EVP library provides a high-level interface to cryptographic functions. that's the whole vibe β€” high-level, meaning you don't have to touch the scary low-level bits. iconic.

The EVP_SealXXX and EVP_OpenXXX functions provide public key encryption and decryption to implement digital "envelopes". yes, like an envelope, but cryptographic. slay. πŸ’Œ

The EVP_DigestSignXXX and EVP_DigestVerifyXXX functions implement digital signatures and Message Authentication Codes (MACs). Also see the older EVP_SignXXX and EVP_VerifyXXX functions β€” they're the vintage versions, still valid, just older. npc energy but in a respected way.

Symmetric encryption is available with the EVP_EncryptXXX functions. The EVP_DigestXXX functions provide message digests. both absolute main characters in their own lanes. πŸ”₯

The EVP_PKEYXXX functions provide a high-level interface to asymmetric algorithms.

πŸŽ€ making and managing keys πŸŽ€

πŸ‘‘ what the EVP_PKEY functions actually do πŸ‘‘

The EVP_PKEY functions support the full range of asymmetric algorithm operations:

πŸ“ passwords and base64 πŸ“

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. However, new applications should not typically use this (preferring, for example, PBKDF2 from PCKS#5). so like... it exists, it's there, but it's giving legacy. πŸ™ˆ

The EVP_EncodeXXX and EVP_DecodeXXX functions implement base64 encoding and decoding. ily base64, never change. πŸ’œ

🌈 ENGINEs (yes, the swap-in magic) 🌈

All the symmetric algorithms (ciphers), digests and asymmetric algorithms (public key algorithms) can be replaced by ENGINE modules providing alternative implementations.

If ENGINE implementations of ciphers or digests are registered as defaults, then the various EVP functions will automatically use those implementations automatically in preference to built in software implementations. like, they just pick it up, no extra work from you. For more information, consult the engine(3) man page.

πŸ’€ and now the warning section, sorry πŸ’€

Although low-level algorithm specific functions exist for many algorithms their use is discouraged. fr fr. here's why:

  • They cannot be used with an ENGINE.
  • ENGINE versions of new algorithms cannot be accessed using the low-level functions.
  • Also makes code harder to adapt to new algorithms.
  • And some options are not cleanly supported at the low-level.
  • And some operations are more efficient using the high-level interface.

so bestie, use the high-level interface. it's not a phase, it's a lifestyle. πŸ§šβ€β™€οΈ


🌸 SEE ALSO 🌸

EVP_DigestInit(3), EVP_EncryptInit(3), EVP_OpenInit(3), EVP_SealInit(3), EVP_DigestSignInit(3), EVP_SignInit(3), EVP_VerifyInit(3), EVP_EncodeInit(3), EVP_PKEY_new(3), EVP_PKEY_fromdata(3), EVP_PKEY_todata(3), EVP_PKEY_keygen(3), EVP_PKEY_print_private(3), EVP_PKEY_decrypt(3), EVP_PKEY_encrypt(3), EVP_PKEY_sign(3), EVP_PKEY_verify(3), EVP_PKEY_verify_recover(3), EVP_PKEY_derive(3), EVP_BytesToKey(3), ENGINE_by_id(3)

the whole friend group, linked. go read them, they're all bangers. πŸ“š


Copyright 2000-2024 The OpenSSL Project Authors. 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>.


and that's the page!! πŸ’– this was version 3.5.6, dated 2026-04-07 β€” so go forth, use the high-level interface, and remember: low-level functions are not the move. mwah. πŸŽ€πŸ’‹

πŸ“¦ where this page comes from