config root man

Current Path : /usr/opt/openssl11/share/doc/openssl/html/man3/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/opt/openssl11/share/doc/openssl/html/man3/RSA_padding_check_none.html

<?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>RSA_padding_add_PKCS1_type_1</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@hsxx.drive.ne.jp" />
</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="#return_values">RETURN VALUES</a></li>
	<li><a href="#warnings">WARNINGS</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>RSA_padding_add_PKCS1_type_1, RSA_padding_check_PKCS1_type_1,
RSA_padding_add_PKCS1_type_2, RSA_padding_check_PKCS1_type_2,
RSA_padding_add_PKCS1_OAEP, RSA_padding_check_PKCS1_OAEP,
RSA_padding_add_PKCS1_OAEP_mgf1, RSA_padding_check_PKCS1_OAEP_mgf1,
RSA_padding_add_SSLv23, RSA_padding_check_SSLv23,
RSA_padding_add_none, RSA_padding_check_none - asymmetric encryption
padding</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
 #include &lt;openssl/rsa.h&gt;</pre>
<pre>
 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
                                  const unsigned char *f, int fl);</pre>
<pre>
 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
                                    const unsigned char *f, int fl, int rsa_len);</pre>
<pre>
 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
                                  const unsigned char *f, int fl);</pre>
<pre>
 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
                                    const unsigned char *f, int fl, int rsa_len);</pre>
<pre>
 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
                                const unsigned char *f, int fl,
                                const unsigned char *p, int pl);</pre>
<pre>
 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
                                  const unsigned char *f, int fl, int rsa_len,
                                  const unsigned char *p, int pl);</pre>
<pre>
 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
                                     const unsigned char *f, int fl,
                                     const unsigned char *p, int pl,
                                     const EVP_MD *md, const EVP_MD *mgf1md);</pre>
<pre>
 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
                                       const unsigned char *f, int fl, int rsa_len,
                                       const unsigned char *p, int pl,
                                       const EVP_MD *md, const EVP_MD *mgf1md);</pre>
<pre>
 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
                            const unsigned char *f, int fl);</pre>
<pre>
 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
                              const unsigned char *f, int fl, int rsa_len);</pre>
<pre>
 int RSA_padding_add_none(unsigned char *to, int tlen,
                          const unsigned char *f, int fl);</pre>
<pre>
 int RSA_padding_check_none(unsigned char *to, int tlen,
                            const unsigned char *f, int fl, int rsa_len);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The <code>RSA_padding_xxx_xxx()</code> functions are called from the RSA encrypt,
decrypt, sign and verify functions. Normally they should not be called
from application programs.</p>
<p>However, they can also be called directly to implement padding for other
asymmetric ciphers. RSA_padding_add_PKCS1_OAEP() and
RSA_padding_check_PKCS1_OAEP() may be used in an application combined
with <strong>RSA_NO_PADDING</strong> in order to implement OAEP with an encoding
parameter.</p>
<p><code>RSA_padding_add_xxx()</code> encodes <strong>fl</strong> bytes from <strong>f</strong> so as to fit into
<strong>tlen</strong> bytes and stores the result at <strong>to</strong>. An error occurs if <strong>fl</strong>
does not meet the size requirements of the encoding method.</p>
<p>The following encoding methods are implemented:</p>
<dl>
<dt><strong><a name="pkcs1_type_1" class="item">PKCS1_type_1</a></strong></dt>

<dd>
<p>PKCS #1 v2.0 EMSA-PKCS1-v1_5 (PKCS #1 v1.5 block type 1); used for signatures</p>
</dd>
<dt><strong><a name="pkcs1_type_2" class="item">PKCS1_type_2</a></strong></dt>

<dd>
<p>PKCS #1 v2.0 EME-PKCS1-v1_5 (PKCS #1 v1.5 block type 2)</p>
</dd>
<dt><strong><a name="pkcs1_oaep" class="item">PKCS1_OAEP</a></strong></dt>

<dd>
<p>PKCS #1 v2.0 EME-OAEP</p>
</dd>
<dt><strong><a name="sslv23" class="item">SSLv23</a></strong></dt>

<dd>
<p>PKCS #1 EME-PKCS1-v1_5 with SSL-specific modification</p>
</dd>
<dt><strong><a name="none" class="item">none</a></strong></dt>

<dd>
<p>simply copy the data</p>
</dd>
</dl>
<p>The random number generator must be seeded prior to calling
<code>RSA_padding_add_xxx()</code>.
If the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to
external circumstances (see <em>RAND(7)</em>), the operation will fail.</p>
<p><code>RSA_padding_check_xxx()</code> verifies that the <strong>fl</strong> bytes at <strong>f</strong> contain
a valid encoding for a <strong>rsa_len</strong> byte RSA key in the respective
encoding method and stores the recovered data of at most <strong>tlen</strong> bytes
(for <strong>RSA_NO_PADDING</strong>: of size <strong>tlen</strong>)
at <strong>to</strong>.</p>
<p>For <code>RSA_padding_xxx_OAEP()</code>, <strong>p</strong> points to the encoding parameter
of length <strong>pl</strong>. <strong>p</strong> may be <strong>NULL</strong> if <strong>pl</strong> is 0.</p>
<p>For RSA_padding_xxx_OAEP_mgf1(), <strong>md</strong> points to the md hash,
if <strong>md</strong> is <strong>NULL</strong> that means md=sha1, and <strong>mgf1md</strong> points to
the mgf1 hash, if <strong>mgf1md</strong> is <strong>NULL</strong> that means mgf1md=md.</p>
<p>
</p>
<hr />
<h1><a name="return_values">RETURN VALUES</a></h1>
<p>The <code>RSA_padding_add_xxx()</code> functions return 1 on success, 0 on error.
The <code>RSA_padding_check_xxx()</code> functions return the length of the
recovered data, -1 on error. Error codes can be obtained by calling
<em>ERR_get_error(3)</em>.</p>
<p>
</p>
<hr />
<h1><a name="warnings">WARNINGS</a></h1>
<p>The result of RSA_padding_check_PKCS1_type_2() is a very sensitive
information which can potentially be used to mount a Bleichenbacher
padding oracle attack. This is an inherent weakness in the PKCS #1
v1.5 padding design. Prefer PKCS1_OAEP padding. If that is not
possible, the result of RSA_padding_check_PKCS1_type_2() should be
checked in constant time if it matches the expected length of the
plaintext and additionally some application specific consistency
checks on the plaintext need to be performed in constant time.
If the plaintext is rejected it must be kept secret which of the
checks caused the application to reject the message.
Do not remove the zero-padding from the decrypted raw RSA data
which was computed by <code>RSA_private_decrypt()</code> with <strong>RSA_NO_PADDING</strong>,
as this would create a small timing side channel which could be
used to mount a Bleichenbacher attack against any padding mode
including PKCS1_OAEP.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>RSA_public_encrypt(3)</em>,
<em>RSA_private_decrypt(3)</em>,
<em>RSA_sign(3)</em>, <em>RSA_verify(3)</em>,
<em>RAND(7)</em></p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.</p>
<p>Licensed under the OpenSSL license (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>

Man Man