{"id":3908,"date":"2022-12-20T17:28:23","date_gmt":"2022-12-20T20:28:23","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/evp-man7\/"},"modified":"2022-12-20T17:28:23","modified_gmt":"2022-12-20T20:28:23","slug":"evp-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/evp-man7\/","title":{"rendered":"EVP (man7)"},"content":{"rendered":"<h1 align=\"center\">EVP<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">evp \u2212 high\u2212level cryptographic functions<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">#include <openssl\/evp.h><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <small>EVP<\/small> library provides a high-level interface to cryptographic functions.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>EVP_Seal<\/b> <i><small>XXX<\/small><\/i> and <b>EVP_Open<\/b> <i><small>XXX<\/small><\/i> functions provide public key encryption and decryption to implement digital &#8220;envelopes&#8221;.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>EVP_DigestSign<\/b> <i><small>XXX<\/small><\/i> and <b>EVP_DigestVerify<\/b> <i><small>XXX<\/small><\/i> functions implement digital signatures and Message Authentication Codes (MACs). Also see the older <b>EVP_Sign<\/b> <i><small>XXX<\/small><\/i> and <b>EVP_Verify<\/b> <i><small>XXX<\/small><\/i> functions.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Symmetric encryption is available with the <b>EVP_Encrypt<\/b> <i><small>XXX<\/small><\/i> functions. The <b>EVP_Digest<\/b> <i><small>XXX<\/small><\/i> functions provide message digests.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b><small>EVP_PKEY<\/small><\/b><small><i>XXX<\/i><\/small> functions provide a high-level interface to asymmetric algorithms. To create a new <small>EVP_PKEY<\/small> see <b>EVP_PKEY_new<\/b>(3). EVP_PKEYs can be associated with a private key of a particular algorithm by using the functions described on the <b>EVP_PKEY_set1_RSA<\/b>(3) page, or new keys can be generated using <b>EVP_PKEY_keygen<\/b>(3). EVP_PKEYs can be compared using <b>EVP_PKEY_cmp<\/b>(3), or printed using <b>EVP_PKEY_print_private<\/b>(3).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <small>EVP_PKEY<\/small> functions support the full range of asymmetric algorithm operations: <br \/> For key agreement see <b>EVP_PKEY_derive<\/b>(3) <br \/> For signing and verifying see <b>EVP_PKEY_sign<\/b>(3), <b>EVP_PKEY_verify<\/b>(3) and <b><br \/> EVP_PKEY_verify_recover<\/b>(3). However, note that these functions do not <br \/> perform a digest of the data to be signed. Therefore, normally you <br \/> would use the <b>EVP_DigestSignInit<\/b>(3) functions for this purpose. <br \/> For encryption and decryption see <b>EVP_PKEY_encrypt<\/b>(3) and <b><br \/> EVP_PKEY_decrypt<\/b>(3) respectively. However, note that these functions <br \/> perform encryption and decryption only. As public key encryption is an <br \/> expensive operation, normally you would wrap an encrypted message in a <br \/> &#8220;digital envelope&#8221; using the <b>EVP_SealInit<\/b>(3) and <b>EVP_OpenInit<\/b>(3) <br \/> functions.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>EVP_BytesToKey<\/b>(3) function provides some limited support for password based encryption. Careful selection of the parameters will provide a PKCS#5 <small>PBKDF1<\/small> compatible implementation. However, new applications should not typically use this (preferring, for example, <small>PBKDF2<\/small> from PCKS#5).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>EVP_Encode<\/b> <i><small>XXX<\/small><\/i> and <b>EVP_Decode<\/b> <i><small>XXX<\/small><\/i> functions implement base 64 encoding and decoding.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">All the symmetric algorithms (ciphers), digests and asymmetric algorithms (public key algorithms) can be replaced by <small>ENGINE<\/small> modules providing alternative implementations. If <small>ENGINE<\/small> implementations of ciphers or digests are registered as defaults, then the various <small>EVP<\/small> functions will automatically use those implementations automatically in preference to built in software implementations. For more information, consult the <b>engine<\/b>(3) man page.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Although low-level algorithm specific functions exist for many algorithms their use is discouraged. They cannot be used with an <small>ENGINE<\/small> and <small>ENGINE<\/small> 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.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>EVP_DigestInit<\/b>(3), <b>EVP_EncryptInit<\/b>(3), <b>EVP_OpenInit<\/b>(3), <b>EVP_SealInit<\/b>(3), <b>EVP_DigestSignInit<\/b>(3), <b>EVP_SignInit<\/b>(3), <b>EVP_VerifyInit<\/b>(3), <b>EVP_EncodeInit<\/b>(3), <b>EVP_PKEY_new<\/b>(3), <b>EVP_PKEY_set1_RSA<\/b>(3), <b>EVP_PKEY_keygen<\/b>(3), <b>EVP_PKEY_print_private<\/b>(3), <b>EVP_PKEY_decrypt<\/b>(3), <b>EVP_PKEY_encrypt<\/b>(3), <b>EVP_PKEY_sign<\/b>(3), <b>EVP_PKEY_verify<\/b>(3), <b>EVP_PKEY_verify_recover<\/b>(3), <b>EVP_PKEY_derive<\/b>(3), <b>EVP_BytesToKey<\/b>(3), <b>ENGINE_by_id<\/b>(3)<\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright 2000\u22122020 The OpenSSL Project Authors. All Rights Reserved.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Licensed under the OpenSSL license (the &#8220;License&#8221;). You may not use this file except in compliance with the License. You can obtain a copy in the file <small>LICENSE<\/small> in the source distribution or at <https:\/\/www.openssl.org\/source\/license.html>.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  evp \u2212 high\u2212level cryptographic functions <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,1002,972],"class_list":["post-3908","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-evp","tag-man7"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3908"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3908\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}