1EVP(7ossl)                          OpenSSL                         EVP(7ossl)
2
3
4

NAME

6       evp - high-level cryptographic functions
7

SYNOPSIS

9        #include <openssl/evp.h>
10

DESCRIPTION

12       The EVP library provides a high-level interface to cryptographic
13       functions.
14
15       The EVP_SealXXX and EVP_OpenXXX functions provide public key encryption
16       and decryption to implement digital "envelopes".
17
18       The EVP_DigestSignXXX and EVP_DigestVerifyXXX functions implement
19       digital signatures and Message Authentication Codes (MACs). Also see
20       the older EVP_SignXXX and EVP_VerifyXXX functions.
21
22       Symmetric encryption is available with the EVP_EncryptXXX functions.
23       The EVP_DigestXXX functions provide message digests.
24
25       The EVP_PKEYXXX functions provide a high-level interface to asymmetric
26       algorithms. To create a new EVP_PKEY see EVP_PKEY_new(3). EVP_PKEYs can
27       be associated with a private key of a particular algorithm by using the
28       functions described on the EVP_PKEY_fromdata(3) page, or new keys can
29       be generated using EVP_PKEY_keygen(3).  EVP_PKEYs can be compared using
30       EVP_PKEY_eq(3), or printed using EVP_PKEY_print_private(3).
31       EVP_PKEY_todata(3) can be used to convert a key back into an
32       OSSL_PARAM(3) array.
33
34       The EVP_PKEY functions support the full range of asymmetric algorithm
35       operations:
36
37       For key agreement see EVP_PKEY_derive(3)
38       For signing and verifying see EVP_PKEY_sign(3), EVP_PKEY_verify(3) and
39       EVP_PKEY_verify_recover(3). However, note that these functions do not
40       perform a digest of the data to be signed. Therefore, normally you
41       would use the EVP_DigestSignInit(3) functions for this purpose.
42       For encryption and decryption see EVP_PKEY_encrypt(3) and
43       EVP_PKEY_decrypt(3) respectively. However, note that these functions
44       perform encryption and decryption only. As public key encryption is an
45       expensive operation, normally you would wrap an encrypted message in a
46       "digital envelope" using the EVP_SealInit(3) and EVP_OpenInit(3)
47       functions.
48
49       The EVP_BytesToKey(3) function provides some limited support for
50       password based encryption. Careful selection of the parameters will
51       provide a PKCS#5 PBKDF1 compatible implementation. However, new
52       applications should not typically use this (preferring, for example,
53       PBKDF2 from PCKS#5).
54
55       The EVP_EncodeXXX and EVP_DecodeXXX functions implement base 64
56       encoding and decoding.
57
58       All the symmetric algorithms (ciphers), digests and asymmetric
59       algorithms (public key algorithms) can be replaced by ENGINE modules
60       providing alternative implementations. If ENGINE implementations of
61       ciphers or digests are registered as defaults, then the various EVP
62       functions will automatically use those implementations automatically in
63       preference to built in software implementations. For more information,
64       consult the engine(3) man page.
65
66       Although low-level algorithm specific functions exist for many
67       algorithms their use is discouraged. They cannot be used with an ENGINE
68       and ENGINE versions of new algorithms cannot be accessed using the low-
69       level functions.  Also makes code harder to adapt to new algorithms and
70       some options are not cleanly supported at the low-level and some
71       operations are more efficient using the high-level interface.
72

SEE ALSO

74       EVP_DigestInit(3), EVP_EncryptInit(3), EVP_OpenInit(3),
75       EVP_SealInit(3), EVP_DigestSignInit(3), EVP_SignInit(3),
76       EVP_VerifyInit(3), EVP_EncodeInit(3), EVP_PKEY_new(3),
77       EVP_PKEY_fromdata(3), EVP_PKEY_todata(3), EVP_PKEY_keygen(3),
78       EVP_PKEY_print_private(3), EVP_PKEY_decrypt(3), EVP_PKEY_encrypt(3),
79       EVP_PKEY_sign(3), EVP_PKEY_verify(3), EVP_PKEY_verify_recover(3),
80       EVP_PKEY_derive(3), EVP_BytesToKey(3), ENGINE_by_id(3)
81
83       Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
84
85       Licensed under the Apache License 2.0 (the "License").  You may not use
86       this file except in compliance with the License.  You can obtain a copy
87       in the file LICENSE in the source distribution or at
88       <https://www.openssl.org/source/license.html>.
89
90
91
923.0.5                             2022-07-05                        EVP(7ossl)
Impressum