---
name: "libressl-evp"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-evp"
---

# libressl-evp(3)

high-level cryptographic functions

## NAME

**evp** – high-level cryptographic functions

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/evp.h\>**

## DESCRIPTION

The EVP library provides a high-level interface to cryptographic functions. The abbreviation “EVP” is intended to mean “EnVeloPe” in the sense of “wrapper library”. 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\_PKCS7(3).

EVP\_SealInit(3) and EVP\_OpenInit(3) provide public key encryption and decryption to implement digital "envelopes".

The EVP\_DigestSignInit(3) and EVP\_DigestVerifyInit(3) functions implement digital signatures and Message Authentication Codes (MACs). Also see the older EVP\_SignInit(3) and EVP\_VerifyInit(3) functions.

Symmetric encryption is available with the EVP\_EncryptInit(3) functions. The EVP\_DigestInit(3) functions provide message digests.

Authenticated encryption with additional data (AEAD) is available with the EVP\_AEAD\_CTX\_init(3) functions.

The **EVP\_PKEY\_\***() functions provide a high-level interface to asymmetric algorithms. To create a new *EVP\_PKEY*, see EVP\_PKEY\_new(3). *EVP\_PKEY*s can be associated with a private key of a particular algorithm by using the functions described in the EVP\_PKEY\_set1\_RSA(3) page, or new keys can be generated using EVP\_PKEY\_keygen(3). *EVP\_PKEY*s can be compared using EVP\_PKEY\_cmp(3) or printed using EVP\_PKEY\_print\_private(3).

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), and EVP\_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 the EVP\_DigestSignInit(3) functions for this purpose.

- For encryption and decryption see EVP\_PKEY\_encrypt(3) and EVP\_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 the EVP\_SealInit(3) and EVP\_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 typically not use this (preferring, for example, PBKDF2 from PCKS#5).

The EVP\_EncodeInit(3) family of functions provides base64 encoding and decoding.

## SEE ALSO

ASN1\_item\_digest(3), ASN1\_item\_sign(3), BIO\_f\_cipher(3), BIO\_f\_md(3), CMAC\_Init(3), CMS\_encrypt(3), CMS\_sign(3), [crypto(3)](/crypto/3.md), d2i\_PKCS8PrivateKey\_bio(3), d2i\_PrivateKey(3), EVP\_AEAD\_CTX\_init(3), EVP\_aes\_128\_cbc(3), EVP\_BytesToKey(3), EVP\_camellia\_128\_cbc(3), EVP\_chacha20(3), EVP\_CIPHER\_CTX\_ctrl(3), EVP\_CIPHER\_CTX\_get\_cipher\_data(3), EVP\_CIPHER\_CTX\_init(3), EVP\_CIPHER\_CTX\_set\_flags(3), EVP\_CIPHER\_do\_all(3), EVP\_CIPHER\_meth\_new(3), EVP\_CIPHER\_nid(3), EVP\_des\_cbc(3), EVP\_DigestInit(3), EVP\_DigestSignInit(3), EVP\_DigestVerifyInit(3), EVP\_EncodeInit(3), EVP\_EncryptInit(3), EVP\_MD\_CTX\_ctrl(3), EVP\_MD\_nid(3), EVP\_OpenInit(3), EVP\_PKCS82PKEY(3), EVP\_PKEY\_asn1\_get\_count(3), EVP\_PKEY\_cmp(3), EVP\_PKEY\_CTX\_ctrl(3), EVP\_PKEY\_CTX\_get\_operation(3), EVP\_PKEY\_CTX\_new(3), EVP\_PKEY\_CTX\_set\_hkdf\_md(3), EVP\_PKEY\_decrypt(3), EVP\_PKEY\_derive(3), EVP\_PKEY\_encrypt(3), EVP\_PKEY\_get\_default\_digest\_nid(3), EVP\_PKEY\_keygen(3), EVP\_PKEY\_new(3), EVP\_PKEY\_print\_private(3), EVP\_PKEY\_set1\_RSA(3), EVP\_PKEY\_sign(3), EVP\_PKEY\_size(3), EVP\_PKEY\_verify(3), EVP\_PKEY\_verify\_recover(3), EVP\_rc4(3), EVP\_SealInit(3), EVP\_sha1(3), EVP\_sha3\_224(3), EVP\_SignInit(3), EVP\_sm3(3), EVP\_sm4\_cbc(3), EVP\_VerifyInit(3), HMAC(3), OCSP\_basic\_sign(3), OCSP\_request\_sign(3), PEM\_get\_EVP\_CIPHER\_INFO(3), PEM\_read\_bio\_PrivateKey(3), PKCS12\_create(3), PKCS5\_PBKDF2\_HMAC(3), PKCS7\_encrypt(3), PKCS7\_sign(3), RSA\_pkey\_ctx\_ctrl(3), SSL\_CTX\_set\_tlsext\_ticket\_key\_cb(3), X509\_ALGOR\_set0(3), X509\_check\_private\_key(3), X509\_digest(3), X509\_get\_pubkey(3), X509\_PUBKEY\_set(3), X509\_sign(3), X509\_to\_X509\_REQ(3)
