evp.3 revision 331638
Automatically generated by Pod::Man 4.07 (Pod::Simple 3.35)

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'.
.. . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\}
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
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 3"
evp 3 "2018-03-27" "1.0.2o" "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.

\fBEVP_Seal... and EVP_Open... provide public key encryption and decryption to implement digital \*(L"envelopes\*(R".

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

Symmetric encryption is available with the EVP_Encrypt... functions. The EVP_Digest... functions provide message digests.

The \s-1EVP_PKEY\s0... functions provide a high level interface to asymmetric algorithms. To create a new \s-1EVP_PKEY\s0 see \fIEVP_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_set1_RSA\|(3) page, or new keys can be generated using EVP_PKEY_keygen\|(3). EVP_PKEYs can be compared using EVP_PKEY_cmp\|(3), or printed using \fIEVP_PKEY_print_private\|(3).

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_DigestSign... 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_DigestSign... 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_Seal... and EVP_Open... 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... and \fBEVP_Decode... functions implement base 64 encoding and decoding.

Algorithms are loaded with OpenSSL_add_all_algorithms\|(3).

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" \fIEVP_DigestInit\|(3), \fIEVP_EncryptInit\|(3), \fIEVP_OpenInit\|(3), \fIEVP_SealInit\|(3), \fIEVP_DigestSignInit\|(3), \fIEVP_SignInit\|(3), \fIEVP_VerifyInit\|(3), \fIEVP_EncodeInit\|(3), \fIEVP_PKEY_new\|(3), \fIEVP_PKEY_set1_RSA\|(3), \fIEVP_PKEY_keygen\|(3), \fIEVP_PKEY_print_private\|(3), \fIEVP_PKEY_decrypt\|(3), \fIEVP_PKEY_encrypt\|(3), \fIEVP_PKEY_sign\|(3), \fIEVP_PKEY_verify\|(3), \fIEVP_PKEY_verify_recover\|(3), \fIEVP_PKEY_derive\|(3), \fIEVP_BytesToKey\|(3), \fIOpenSSL_add_all_algorithms\|(3), \fIengine\|(3)