openssl-prebuild/linux_amd64/ssl/share/doc/openssl/html/man7/evp.html
2020-03-02 16:50:34 +00:00

139 lines
5.8 KiB
HTML
Executable File

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>evp</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>evp - high-level cryptographic functions</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
#include &lt;openssl/evp.h&gt;</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The EVP library provides a high-level interface to cryptographic
functions.</p>
<p>The <em><strong>EVP_Seal</strong><em>XXX</em></em> and <em><strong>EVP_Open</strong><em>XXX</em></em>
functions provide public key encryption and decryption to implement digital &quot;envelopes&quot;.</p>
<p>The <em><strong>EVP_DigestSign</strong><em>XXX</em></em> and
<em><strong>EVP_DigestVerify</strong><em>XXX</em></em> functions implement
digital signatures and Message Authentication Codes (MACs). Also see the older
<em><strong>EVP_Sign</strong><em>XXX</em></em> and <em><strong>EVP_Verify</strong><em>XXX</em></em>
functions.</p>
<p>Symmetric encryption is available with the <em><strong>EVP_Encrypt</strong><em>XXX</em></em>
functions. The <em><strong>EVP_Digest</strong><em>XXX</em></em> functions provide message digests.</p>
<p>The <strong>EVP_PKEY</strong><em>XXX</em> functions provide a high level interface to
asymmetric algorithms. To create a new EVP_PKEY see
<em>EVP_PKEY_new(3)</em>. EVP_PKEYs can be associated
with a private key of a particular algorithm by using the functions
described on the <em>EVP_PKEY_set1_RSA(3)</em> page, or
new keys can be generated using <em>EVP_PKEY_keygen(3)</em>.
EVP_PKEYs can be compared using <em>EVP_PKEY_cmp(3)</em>, or printed using
<em>EVP_PKEY_print_private(3)</em>.</p>
<p>The EVP_PKEY functions support the full range of asymmetric algorithm operations:</p>
<dl>
<dt><strong><a name="evp_pkey_derive" class="item">For key agreement see <a href="#evp_pkey_derive">EVP_PKEY_derive(3)</a></a></strong></dt>
<dt><strong><a name="evp_pkey_sign" class="item">For signing and verifying see <a href="#evp_pkey_sign">EVP_PKEY_sign(3)</a>,
<em>EVP_PKEY_verify(3)</em> and <em>EVP_PKEY_verify_recover(3)</em>.
However, note that
these functions do not perform a digest of the data to be signed. Therefore
normally you would use the <em>EVP_DigestSignInit(3)</em>
functions for this purpose.</a></strong></dt>
<dt><strong><a name="evp_pkey_encrypt" class="item">For encryption and decryption see <a href="#evp_pkey_encrypt">EVP_PKEY_encrypt(3)</a>
and <em>EVP_PKEY_decrypt(3)</em> 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 &quot;digital envelope&quot; using the <em>EVP_SealInit(3)</em> and
<em>EVP_OpenInit(3)</em> functions.</a></strong></dt>
</dl>
<p>The <em>EVP_BytesToKey(3)</em> function provides some limited support for password
based encryption. Careful selection of the parameters will provide a PKCS#5 PBKDF1 compatible
implementation. However, new applications should not typically use this (preferring, for example,
PBKDF2 from PCKS#5).</p>
<p>The <em><strong>EVP_Encode</strong><em>XXX</em></em> and
<em><strong>EVP_Decode</strong><em>XXX</em></em> functions implement base 64 encoding
and decoding.</p>
<p>All the symmetric algorithms (ciphers), digests and asymmetric algorithms
(public key algorithms) can be replaced by ENGINE modules providing alternative
implementations. If ENGINE implementations of ciphers or digests are registered
as defaults, then the various EVP functions will automatically use those
implementations automatically in preference to built in software
implementations. For more information, consult the <code>engine(3)</code> man page.</p>
<p>Although low level algorithm specific functions exist for many algorithms
their use is discouraged. They cannot be used with an ENGINE and ENGINE
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>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>EVP_DigestInit(3)</em>,
<em>EVP_EncryptInit(3)</em>,
<em>EVP_OpenInit(3)</em>,
<em>EVP_SealInit(3)</em>,
<em>EVP_DigestSignInit(3)</em>,
<em>EVP_SignInit(3)</em>,
<em>EVP_VerifyInit(3)</em>,
<em>EVP_EncodeInit(3)</em>,
<em>EVP_PKEY_new(3)</em>,
<em>EVP_PKEY_set1_RSA(3)</em>,
<em>EVP_PKEY_keygen(3)</em>,
<em>EVP_PKEY_print_private(3)</em>,
<em>EVP_PKEY_decrypt(3)</em>,
<a href="#evp_pkey_encrypt">EVP_PKEY_encrypt(3)</a>,
<a href="#evp_pkey_sign">EVP_PKEY_sign(3)</a>,
<em>EVP_PKEY_verify(3)</em>,
<em>EVP_PKEY_verify_recover(3)</em>,
<a href="#evp_pkey_derive">EVP_PKEY_derive(3)</a>,
<em>EVP_BytesToKey(3)</em>,
<em>ENGINE_by_id(3)</em></p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.</p>
<p>Licensed under the Apache License 2.0 (the &quot;License&quot;). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
<a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
</body>
</html>