xref: /freebsd/secure/lib/libcrypto/man/man7/evp.7 (revision 06c3fb27)
Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)

Standard preamble:
========================================================================
..
..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "EVP 7ossl"
EVP 7ossl "2023-09-19" "3.0.11" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
evp - high-level cryptographic functions
"SYNOPSIS"
Header "SYNOPSIS" .Vb 1 #include <openssl/evp.h> .Ve
"DESCRIPTION"
Header "DESCRIPTION" The \s-1EVP\s0 library provides a high-level interface to cryptographic functions.

The EVP_Seal\s-1XXX\s0 and EVP_Open\s-1XXX\s0 functions provide public key encryption and decryption to implement digital \*(L"envelopes\*(R".

The EVP_DigestSign\s-1XXX\s0 and \fBEVP_DigestVerify\s-1XXX\s0 functions implement digital signatures and Message Authentication Codes (MACs). Also see the older \fBEVP_Sign\s-1XXX\s0 and EVP_Verify\s-1XXX\s0 functions.

Symmetric encryption is available with the EVP_Encrypt\s-1XXX\s0 functions. The EVP_Digest\s-1XXX\s0 functions provide message digests.

The \s-1EVP_PKEY\s0\s-1XXX\s0 functions provide a high-level interface to asymmetric algorithms. To create a new \s-1EVP_PKEY\s0 see \fBEVP_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 \fBEVP_PKEY_print_private\|(3). EVP_PKEY_todata\|(3) can be used to convert a key back into an \s-1OSSL_PARAM\s0\|(3) array.

The \s-1EVP_PKEY\s0 functions support the full range of asymmetric algorithm operations:

"For key agreement see EVP_PKEY_derive\|(3)" 4
Item "For key agreement see EVP_PKEY_derive"

0

"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." 4
Item "For signing and verifying see EVP_PKEY_sign, EVP_PKEY_verify and EVP_PKEY_verify_recover. However, note that these functions do not perform a digest of the data to be signed. Therefore, normally you would use the EVP_DigestSignInit functions for this purpose." Item "For encryption and decryption see EVP_PKEY_encrypt and EVP_PKEY_decrypt 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 and EVP_OpenInit functions."

The EVP_BytesToKey\|(3) function provides some limited support for password based encryption. Careful selection of the parameters will provide a PKCS#5 \s-1PBKDF1\s0 compatible implementation. However, new applications should not typically use this (preferring, for example, \s-1PBKDF2\s0 from PCKS#5).

The EVP_Encode\s-1XXX\s0 and \fBEVP_Decode\s-1XXX\s0 functions implement base 64 encoding and decoding.

All the symmetric algorithms (ciphers), digests and asymmetric algorithms (public key algorithms) can be replaced by \s-1ENGINE\s0 modules providing alternative implementations. If \s-1ENGINE\s0 implementations of ciphers or digests are registered as defaults, then the various \s-1EVP\s0 functions will automatically use those implementations automatically in preference to built in software implementations. For more information, consult the engine\|(3) man page.

Although low-level algorithm specific functions exist for many algorithms their use is discouraged. They cannot be used with an \s-1ENGINE\s0 and \s-1ENGINE\s0 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.

"SEE ALSO"
Header "SEE ALSO" \fBEVP_DigestInit\|(3), \fBEVP_EncryptInit\|(3), \fBEVP_OpenInit\|(3), \fBEVP_SealInit\|(3), \fBEVP_DigestSignInit\|(3), \fBEVP_SignInit\|(3), \fBEVP_VerifyInit\|(3), \fBEVP_EncodeInit\|(3), \fBEVP_PKEY_new\|(3), \fBEVP_PKEY_fromdata\|(3), \fBEVP_PKEY_todata\|(3), \fBEVP_PKEY_keygen\|(3), \fBEVP_PKEY_print_private\|(3), \fBEVP_PKEY_decrypt\|(3), \fBEVP_PKEY_encrypt\|(3), \fBEVP_PKEY_sign\|(3), \fBEVP_PKEY_verify\|(3), \fBEVP_PKEY_verify_recover\|(3), \fBEVP_PKEY_derive\|(3), \fBEVP_BytesToKey\|(3), \fBENGINE_by_id\|(3)
"COPYRIGHT"
Header "COPYRIGHT" Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.