EVP(7SSL)
β¨ NAME β¨
evp β high-level cryptographic functions π (yes bestie, the whole vibe of OpenSSL's crypto API lives here)
πΈ SYNOPSIS πΈ
#include <openssl/evp.h>
π¦ DESCRIPTION π¦
okay so. the EVP library is literally the high-level interface to cryptographic functions. she's the main character and all the low-level algorithm-specific stuff is just, like, background dancers. π
The EVP_SealXXX and EVP_OpenXXX functions do public key encryption and decryption, and their whole thing is implementing digital "envelopes". π«Ά
The EVP_DigestSignXXX and EVP_DigestVerifyXXX functions implement digital signatures and Message Authentication Codes (MACs). Also peep the older EVP_SignXXX and EVP_VerifyXXX functions, they're still around. π
Symmetric encryption? that's the EVP_EncryptXXX functions. Message digests? that's the EVP_DigestXXX functions. slay, organized. β¨
The EVP_PKEYXXX functions give you a high-level interface to asymmetric algorithms. To create a new EVP_PKEY see EVP_PKEY_new(3). EVP_PKEYs can be associated with a private key of a particular algorithm by using the functions described on the EVP_PKEY_fromdata(3) page, or new keys can be generated using EVP_PKEY_keygen(3). EVP_PKEYs can be compared using EVP_PKEY_eq(3), or printed using EVP_PKEY_print_private(3). And EVP_PKEY_todata(3) can be used to convert a key back into an OSSL_PARAM(3) array. π
The EVP_PKEY functions support the full range of asymmetric algorithm operations:
- For key agreement see
EVP_PKEY_derive(3)π€ - For signing and verifying see
EVP_PKEY_sign(3),EVP_PKEY_verify(3)andEVP_PKEY_verify_recover(3). However, note that these functions do not perform a digest of the data to be signed. Therefore, normally you would use theEVP_DigestSignInit(3)functions for this purpose. β οΈ - For encryption and decryption see
EVP_PKEY_encrypt(3)andEVP_PKEY_decrypt(3)respectively. However, note that these functions perform encryption and decryption only. As public key encryption is an expensive operation, normally you would wrap an encrypted message in a "digital envelope" using theEVP_SealInit(3)andEVP_OpenInit(3)functions. π
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). π
The EVP_EncodeXXX and EVP_DecodeXXX functions implement base64 encoding and decoding. π€
Providers can supply implementations for a wide range of cryptographic operations, including symmetric algorithms (ciphers), digests, asymmetric algorithms (public key algorithms), key management, parameter generation, and more. For more information, consult the provider(7) man page. π
Although low-level algorithm specific functions exist for many algorithms, their use is discouraged. They do not call into providers such as the fips provider and thus they are not FIPS 140-3 validated. If an accelerated implementation of an algorithm is provided through a third party provider the low level API will not use that implementation either. π
fr fr: if you're reaching for the low-level per-algorithm functions, bestie, why. the EVP layer ate. use her instead. π
π 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),
π COPYRIGHT π
Copyright 2000-2025 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 whole page bestie π this was the OpenSSL 4.0.3 era, dated 2026-09-29, and she ate, no cap πππ¦
π¦ where this page comes from
- ubuntu stonking: openssl 4.0.3-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms