digital signatures and Message Authentication Codes (MACs). Also see the older
\&\fBEVP_Sign\fR\fI\s-1XXX\s0\fR and \fBEVP_Verify\fR\fI\s-1XXX\s0\fR
functions.
.PP
Symmetric encryption is available with the \fBEVP_Encrypt\fR\fI\s-1XXX\s0\fR
functions. The \fBEVP_Digest\fR\fI\s-1XXX\s0\fR functions provide message digests.
.PP
The \fB\s-1EVP_PKEY\s0\fR\fI\s-1XXX\s0\fR functions provide a high level interface to
asymmetric algorithms. To create a new \s-1EVP_PKEY\s0 see
\&\fIEVP_PKEY_new\fR\|(3). EVP_PKEYs can be associated
with a private key of a particular algorithm by using the functions
described on the \fIEVP_PKEY_set1_RSA\fR\|(3) page, or
new keys can be generated using \fIEVP_PKEY_keygen\fR\|(3).
EVP_PKEYs can be compared using \fIEVP_PKEY_cmp\fR\|(3), or printed using
\&\fIEVP_PKEY_print_private\fR\|(3).
.PP
The \s-1EVP_PKEY\s0 functions support the full range of asymmetric algorithm operations:
.IP"For key agreement see \fIEVP_PKEY_derive\fR\|(3)"4
.IXItem"For key agreement see EVP_PKEY_derive"
.PD0
.IP"For signing and verifying see \fIEVP_PKEY_sign\fR\|(3), \fIEVP_PKEY_verify\fR\|(3) and \fIEVP_PKEY_verify_recover\fR\|(3). However, note that these functions do not perform a digest of the data to be signed. Therefore normally you would use the \fIEVP_DigestSignInit\fR\|(3) functions for this purpose."4
.IXItem"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."
.ien.IP"For encryption and decryption see \fIEVP_PKEY_encrypt\fR\|(3) and \fIEVP_PKEY_decrypt\fR\|(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 \fIEVP_SealInit\fR\|(3) and \fIEVP_OpenInit\fR\|(3) functions."4
.el.IP"For encryption and decryption see \fIEVP_PKEY_encrypt\fR\|(3) and \fIEVP_PKEY_decrypt\fR\|(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 \fIEVP_SealInit\fR\|(3) and \fIEVP_OpenInit\fR\|(3) functions."4
.IXItem"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."
.PD
.PP
The \fIEVP_BytesToKey\fR\|(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).
.PP
The \fBEVP_Encode\fR\fI\s-1XXX\s0\fR and
\&\fBEVP_Decode\fR\fI\s-1XXX\s0\fR functions implement base 64 encoding
and decoding.
.PP
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 \fIengine\fR\|(3) man page.
.PP
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.
.SH"SEE ALSO"
.IXHeader"SEE ALSO"
\&\fIEVP_DigestInit\fR\|(3),
\&\fIEVP_EncryptInit\fR\|(3),
\&\fIEVP_OpenInit\fR\|(3),
\&\fIEVP_SealInit\fR\|(3),
\&\fIEVP_DigestSignInit\fR\|(3),
\&\fIEVP_SignInit\fR\|(3),
\&\fIEVP_VerifyInit\fR\|(3),
\&\fIEVP_EncodeInit\fR\|(3),
\&\fIEVP_PKEY_new\fR\|(3),
\&\fIEVP_PKEY_set1_RSA\fR\|(3),
\&\fIEVP_PKEY_keygen\fR\|(3),
\&\fIEVP_PKEY_print_private\fR\|(3),
\&\fIEVP_PKEY_decrypt\fR\|(3),
\&\fIEVP_PKEY_encrypt\fR\|(3),
\&\fIEVP_PKEY_sign\fR\|(3),
\&\fIEVP_PKEY_verify\fR\|(3),
\&\fIEVP_PKEY_verify_recover\fR\|(3),
\&\fIEVP_PKEY_derive\fR\|(3),
\&\fIEVP_BytesToKey\fR\|(3),
\&\fIENGINE_by_id\fR\|(3)
.SH"COPYRIGHT"
.IXHeader"COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.