| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <title>10.8. Asymmetric encryption — PSA Crypto API 1.1.0 documentation</title> |
| <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" /> |
| <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> |
| <script type="text/javascript"> |
| var DOCUMENTATION_OPTIONS = { |
| URL_ROOT: '../../', |
| VERSION: '1.1.0', |
| COLLAPSE_INDEX: false, |
| FILE_SUFFIX: '.html', |
| HAS_SOURCE: false, |
| SOURCELINK_SUFFIX: '.txt' |
| }; |
| </script> |
| <script type="text/javascript" src="../../_static/jquery.js"></script> |
| <script type="text/javascript" src="../../_static/underscore.js"></script> |
| <script type="text/javascript" src="../../_static/doctools.js"></script> |
| <link rel="author" title="About these documents" href="../../about.html" /> |
| <link rel="index" title="Index" href="../../genindex.html" /> |
| <link rel="search" title="Search" href="../../search.html" /> |
| <link rel="next" title="10.9. Key agreement" href="ka.html" /> |
| <link rel="prev" title="10.7. Asymmetric signature" href="sign.html" /> |
| |
| <link rel="stylesheet" href="../../_static/custom.css" type="text/css" /> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> |
| |
| </head> |
| <body> |
| |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <div class="section" id="asymmetric-encryption"> |
| <span id="pke"></span><h1>10.8. Asymmetric encryption</h1> |
| <p>Asymmetric encryption is provided through the functions <a class="reference internal" href="#c.psa_asymmetric_encrypt" title="psa_asymmetric_encrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_encrypt()</span></code></a> and <a class="reference internal" href="#c.psa_asymmetric_decrypt" title="psa_asymmetric_decrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_decrypt()</span></code></a>.</p> |
| <div class="section" id="asymmetric-encryption-algorithms"> |
| <span id="id1"></span><h2>10.8.1. Asymmetric encryption algorithms</h2> |
| <div class="section" id="PSA_ALG_RSA_PKCS1V15_CRYPT"> |
| <span id="c.PSA_ALG_RSA_PKCS1V15_CRYPT"></span><h3><code class="docutils literal"><span class="pre">PSA_ALG_RSA_PKCS1V15_CRYPT</span></code> (macro)</h3> |
| <p>The RSA PKCS#1 v1.5 asymmetric encryption algorithm.</p> |
| <pre class="literal-block"> |
| #define <a class="reference internal" href="#c.PSA_ALG_RSA_PKCS1V15_CRYPT" title="PSA_ALG_RSA_PKCS1V15_CRYPT">PSA_ALG_RSA_PKCS1V15_CRYPT</a> ((<a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t">psa_algorithm_t</a>)0x07000200) |
| </pre> |
| <p>This encryption scheme is defined by <span><em>PKCS #1: RSA Cryptography Specifications Version 2.2</em> <a class="reference internal" href="../../about.html#citation-rfc8017"><span class="cite">[RFC8017]</span></a></span> <a class="reference external" href="https://tools.ietf.org/html/rfc8017.html#section-7.2">§7.2</a> under the name RSAES-PKCS-v1_5.</p> |
| <p class="rubric">Compatible key types</p> |
| <div class="line-block"> |
| <div class="line"><a class="reference internal" href="../keys/types.html#c.PSA_KEY_TYPE_RSA_KEY_PAIR" title="PSA_KEY_TYPE_RSA_KEY_PAIR"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_TYPE_RSA_KEY_PAIR</span></code></a></div> |
| <div class="line"><a class="reference internal" href="../keys/types.html#c.PSA_KEY_TYPE_RSA_PUBLIC_KEY" title="PSA_KEY_TYPE_RSA_PUBLIC_KEY"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_TYPE_RSA_PUBLIC_KEY</span></code></a> (asymmetric encryption only)</div> |
| </div> |
| </div> |
| <div class="section" id="PSA_ALG_RSA_OAEP"> |
| <span id="c.PSA_ALG_RSA_OAEP"></span><h3><code class="docutils literal"><span class="pre">PSA_ALG_RSA_OAEP</span></code> (macro)</h3> |
| <p>The RSA OAEP asymmetric encryption algorithm.</p> |
| <pre class="literal-block"> |
| #define <a class="reference internal" href="#c.PSA_ALG_RSA_OAEP" title="PSA_ALG_RSA_OAEP">PSA_ALG_RSA_OAEP</a>(hash_alg) <em><a class="reference internal" href="../../overview/implementation.html#specification-defined-value"><span class="std std-ref">/* specification-defined value */</span></a></em> |
| </pre> |
| <p class="rubric">Parameters</p> |
| <dl class="docutils"> |
| <dt> <code class="docutils literal"><span class="pre">hash_alg</span></code></dt> |
| <dd>A hash algorithm: a value of type <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="xref any c c-type docutils literal"><span class="pre">psa_algorithm_t</span></code></a> such that <a class="reference internal" href="algorithms.html#c.PSA_ALG_IS_HASH" title="PSA_ALG_IS_HASH"><code class="docutils literal"><span class="pre">PSA_ALG_IS_HASH</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">hash_alg</span></code><code class="docutils literal"><span class="pre">)</span></code> is true. The hash algorithm is used for <em>MGF1</em>.</dd> |
| </dl> |
| <p class="rubric">Returns</p> |
| <p>The corresponding RSA OAEP encryption algorithm.</p> |
| <p>Unspecified if <code class="docutils literal"><span class="pre">hash_alg</span></code> is not a supported hash algorithm.</p> |
| <p class="rubric">Description</p> |
| <p>This encryption scheme is defined by <a class="reference internal" href="../../about.html#citation-rfc8017"><span class="cite">[RFC8017]</span></a> <a class="reference external" href="https://tools.ietf.org/html/rfc8017.html#section-7.1">§7.1</a> under the name RSAES-OAEP, with the following options:</p> |
| <ul class="simple"> |
| <li>The mask generation function <em>MGF1</em> defined in <a class="reference internal" href="../../about.html#citation-rfc8017"><span class="cite">[RFC8017]</span></a> <a class="reference external" href="https://tools.ietf.org/html/rfc8017.html#appendix-B.2.1">Appendix B.2.1</a>.</li> |
| <li>The specified hash algorithm is used to hash the label, and for the mask generation function.</li> |
| </ul> |
| <p class="rubric">Compatible key types</p> |
| <div class="line-block"> |
| <div class="line"><a class="reference internal" href="../keys/types.html#c.PSA_KEY_TYPE_RSA_KEY_PAIR" title="PSA_KEY_TYPE_RSA_KEY_PAIR"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_TYPE_RSA_KEY_PAIR</span></code></a></div> |
| <div class="line"><a class="reference internal" href="../keys/types.html#c.PSA_KEY_TYPE_RSA_PUBLIC_KEY" title="PSA_KEY_TYPE_RSA_PUBLIC_KEY"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_TYPE_RSA_PUBLIC_KEY</span></code></a> (asymmetric encryption only)</div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="asymmetric-encryption-functions"> |
| <h2>10.8.2. Asymmetric encryption functions</h2> |
| <div class="section" id="psa_asymmetric_encrypt"> |
| <span id="c.psa_asymmetric_encrypt"></span><h3><code class="docutils literal"><span class="pre">psa_asymmetric_encrypt</span></code> (function)</h3> |
| <p>Encrypt a short message with a public key.</p> |
| <pre class="literal-block"> |
| <a class="reference internal" href="../library/status.html#c.psa_status_t" title="psa_status_t">psa_status_t</a> <a class="reference internal" href="#c.psa_asymmetric_encrypt" title="psa_asymmetric_encrypt">psa_asymmetric_encrypt</a>(<a class="reference internal" href="../keys/ids.html#c.psa_key_id_t" title="psa_key_id_t">psa_key_id_t</a> key, |
| <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t">psa_algorithm_t</a> alg, |
| const uint8_t * input, |
| size_t input_length, |
| const uint8_t * salt, |
| size_t salt_length, |
| uint8_t * output, |
| size_t output_size, |
| size_t * output_length); |
| </pre> |
| <p class="rubric">Parameters</p> |
| <dl class="docutils"> |
| <dt> <code class="docutils literal"><span class="pre">key</span></code></dt> |
| <dd>Identifer of the key to use for the operation. It must be a public key or an asymmetric key pair. |
| It must allow the usage <a class="reference internal" href="../keys/policy.html#c.PSA_KEY_USAGE_ENCRYPT" title="PSA_KEY_USAGE_ENCRYPT"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_USAGE_ENCRYPT</span></code></a>.</dd> |
| <dt> <code class="docutils literal"><span class="pre">alg</span></code></dt> |
| <dd>The asymmetric encryption algorithm to compute: a value of type <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="xref any c c-type docutils literal"><span class="pre">psa_algorithm_t</span></code></a> such that <a class="reference internal" href="algorithms.html#c.PSA_ALG_IS_ASYMMETRIC_ENCRYPTION" title="PSA_ALG_IS_ASYMMETRIC_ENCRYPTION"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ASYMMETRIC_ENCRYPTION</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code> is true.</dd> |
| <dt> <code class="docutils literal"><span class="pre">input</span></code></dt> |
| <dd>The message to encrypt.</dd> |
| <dt> <code class="docutils literal"><span class="pre">input_length</span></code></dt> |
| <dd>Size of the <code class="docutils literal"><span class="pre">input</span></code> buffer in bytes.</dd> |
| <dt> <code class="docutils literal"><span class="pre">salt</span></code></dt> |
| <dd>A salt or label, if supported by the encryption algorithm. If the algorithm does not support a salt, pass <code class="docutils literal"><span class="pre">NULL</span></code>. If the algorithm supports an optional salt, pass <code class="docutils literal"><span class="pre">NULL</span></code> to indicate that there is no salt.</dd> |
| <dt> <code class="docutils literal"><span class="pre">salt_length</span></code></dt> |
| <dd>Size of the <code class="docutils literal"><span class="pre">salt</span></code> buffer in bytes. If <code class="docutils literal"><span class="pre">salt</span></code> is <code class="docutils literal"><span class="pre">NULL</span></code>, pass <code class="docutils literal"><span class="pre">0</span></code>.</dd> |
| <dt> <code class="docutils literal"><span class="pre">output</span></code></dt> |
| <dd>Buffer where the encrypted message is to be written.</dd> |
| <dt> <code class="docutils literal"><span class="pre">output_size</span></code></dt> |
| <dd><p class="first">Size of the <code class="docutils literal"><span class="pre">output</span></code> buffer in bytes. |
| This must be appropriate for the selected algorithm and key:</p> |
| <ul class="last simple"> |
| <li>The required output size is <a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE"><code class="docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">key_type</span></code><code class="docutils literal"><span class="pre">,</span> </code><code class="docutils literal"><span class="pre">key_bits</span></code><code class="docutils literal"><span class="pre">,</span> </code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code> where <code class="docutils literal"><span class="pre">key_type</span></code> and <code class="docutils literal"><span class="pre">key_bits</span></code> are the type and bit-size respectively of <code class="docutils literal"><span class="pre">key</span></code>.</li> |
| <li><a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE</span></code></a> evaluates to the maximum output size of any supported asymmetric encryption.</li> |
| </ul> |
| </dd> |
| <dt> <code class="docutils literal"><span class="pre">output_length</span></code></dt> |
| <dd>On success, the number of bytes that make up the returned output.</dd> |
| </dl> |
| <p class="rubric">Returns: <a class="reference internal" href="../library/status.html#c.psa_status_t" title="psa_status_t"><code class="docutils literal"><span class="pre">psa_status_t</span></code></a></p> |
| <dl class="docutils"> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_SUCCESS" title="PSA_SUCCESS"><code class="docutils literal"><span class="pre">PSA_SUCCESS</span></code></a></dt> |
| <dd>Success. |
| The first <code class="docutils literal"><span class="pre">(*output_length)</span></code> bytes of <code class="docutils literal"><span class="pre">output</span></code> contain the encrypted output.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_BAD_STATE" title="PSA_ERROR_BAD_STATE"><code class="docutils literal"><span class="pre">PSA_ERROR_BAD_STATE</span></code></a></dt> |
| <dd>The library requires initializing by a call to <a class="reference internal" href="../library/library.html#c.psa_crypto_init" title="psa_crypto_init"><code class="xref any c c-func docutils literal"><span class="pre">psa_crypto_init()</span></code></a>.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INVALID_HANDLE" title="PSA_ERROR_INVALID_HANDLE"><code class="docutils literal"><span class="pre">PSA_ERROR_INVALID_HANDLE</span></code></a></dt> |
| <dd><code class="docutils literal"><span class="pre">key</span></code> is not a valid key identifier.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_NOT_PERMITTED" title="PSA_ERROR_NOT_PERMITTED"><code class="docutils literal"><span class="pre">PSA_ERROR_NOT_PERMITTED</span></code></a></dt> |
| <dd>The key does not have the <a class="reference internal" href="../keys/policy.html#c.PSA_KEY_USAGE_ENCRYPT" title="PSA_KEY_USAGE_ENCRYPT"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_USAGE_ENCRYPT</span></code></a> flag, or it does not permit the requested algorithm.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_BUFFER_TOO_SMALL" title="PSA_ERROR_BUFFER_TOO_SMALL"><code class="docutils literal"><span class="pre">PSA_ERROR_BUFFER_TOO_SMALL</span></code></a></dt> |
| <dd>The size of the <code class="docutils literal"><span class="pre">output</span></code> buffer is too small. |
| <a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE()</span></code></a> or <a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE</span></code></a> can be used to determine a sufficient buffer size.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INVALID_ARGUMENT" title="PSA_ERROR_INVALID_ARGUMENT"><code class="docutils literal"><span class="pre">PSA_ERROR_INVALID_ARGUMENT</span></code></a></dt> |
| <dd><p class="first">The following conditions can result in this error:</p> |
| <ul class="last simple"> |
| <li><code class="docutils literal"><span class="pre">alg</span></code> is not an asymmetric encryption algorithm.</li> |
| <li><code class="docutils literal"><span class="pre">key</span></code> is not a public key or an asymmetric key pair, that is compatible with <code class="docutils literal"><span class="pre">alg</span></code>.</li> |
| <li><code class="docutils literal"><span class="pre">input_length</span></code> is not valid for the algorithm and key type.</li> |
| <li><code class="docutils literal"><span class="pre">salt_length</span></code> is not valid for the algorithm and key type.</li> |
| </ul> |
| </dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_NOT_SUPPORTED" title="PSA_ERROR_NOT_SUPPORTED"><code class="docutils literal"><span class="pre">PSA_ERROR_NOT_SUPPORTED</span></code></a></dt> |
| <dd><p class="first">The following conditions can result in this error:</p> |
| <ul class="last simple"> |
| <li><code class="docutils literal"><span class="pre">alg</span></code> is not supported or is not an asymmetric encryption algorithm.</li> |
| <li><code class="docutils literal"><span class="pre">key</span></code> is not supported for use with <code class="docutils literal"><span class="pre">alg</span></code>.</li> |
| <li><code class="docutils literal"><span class="pre">input_length</span></code> or <code class="docutils literal"><span class="pre">salt_length</span></code> are too large for the implementation.</li> |
| </ul> |
| </dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INSUFFICIENT_ENTROPY" title="PSA_ERROR_INSUFFICIENT_ENTROPY"><code class="docutils literal"><span class="pre">PSA_ERROR_INSUFFICIENT_ENTROPY</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INSUFFICIENT_MEMORY" title="PSA_ERROR_INSUFFICIENT_MEMORY"><code class="docutils literal"><span class="pre">PSA_ERROR_INSUFFICIENT_MEMORY</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="docutils literal"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED"><code class="docutils literal"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE"><code class="docutils literal"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT"><code class="docutils literal"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_DATA_INVALID" title="PSA_ERROR_DATA_INVALID"><code class="docutils literal"><span class="pre">PSA_ERROR_DATA_INVALID</span></code></a></dt> |
| <dd></dd> |
| </dl> |
| <p class="rubric">Description</p> |
| <ul class="simple"> |
| <li>For <a class="reference internal" href="#c.PSA_ALG_RSA_PKCS1V15_CRYPT" title="PSA_ALG_RSA_PKCS1V15_CRYPT"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ALG_RSA_PKCS1V15_CRYPT</span></code></a>, no salt is supported.</li> |
| </ul> |
| </div> |
| <div class="section" id="psa_asymmetric_decrypt"> |
| <span id="c.psa_asymmetric_decrypt"></span><h3><code class="docutils literal"><span class="pre">psa_asymmetric_decrypt</span></code> (function)</h3> |
| <p>Decrypt a short message with a private key.</p> |
| <pre class="literal-block"> |
| <a class="reference internal" href="../library/status.html#c.psa_status_t" title="psa_status_t">psa_status_t</a> <a class="reference internal" href="#c.psa_asymmetric_decrypt" title="psa_asymmetric_decrypt">psa_asymmetric_decrypt</a>(<a class="reference internal" href="../keys/ids.html#c.psa_key_id_t" title="psa_key_id_t">psa_key_id_t</a> key, |
| <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t">psa_algorithm_t</a> alg, |
| const uint8_t * input, |
| size_t input_length, |
| const uint8_t * salt, |
| size_t salt_length, |
| uint8_t * output, |
| size_t output_size, |
| size_t * output_length); |
| </pre> |
| <p class="rubric">Parameters</p> |
| <dl class="docutils"> |
| <dt> <code class="docutils literal"><span class="pre">key</span></code></dt> |
| <dd>Identifier of the key to use for the operation. It must be an asymmetric key pair. |
| It must allow the usage <a class="reference internal" href="../keys/policy.html#c.PSA_KEY_USAGE_DECRYPT" title="PSA_KEY_USAGE_DECRYPT"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_USAGE_DECRYPT</span></code></a>.</dd> |
| <dt> <code class="docutils literal"><span class="pre">alg</span></code></dt> |
| <dd>The asymmetric encryption algorithm to compute: a value of type <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="xref any c c-type docutils literal"><span class="pre">psa_algorithm_t</span></code></a> such that <a class="reference internal" href="algorithms.html#c.PSA_ALG_IS_ASYMMETRIC_ENCRYPTION" title="PSA_ALG_IS_ASYMMETRIC_ENCRYPTION"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ASYMMETRIC_ENCRYPTION</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code> is true.</dd> |
| <dt> <code class="docutils literal"><span class="pre">input</span></code></dt> |
| <dd>The message to decrypt.</dd> |
| <dt> <code class="docutils literal"><span class="pre">input_length</span></code></dt> |
| <dd>Size of the <code class="docutils literal"><span class="pre">input</span></code> buffer in bytes.</dd> |
| <dt> <code class="docutils literal"><span class="pre">salt</span></code></dt> |
| <dd>A salt or label, if supported by the encryption algorithm. If the algorithm does not support a salt, pass <code class="docutils literal"><span class="pre">NULL</span></code>. If the algorithm supports an optional salt, pass <code class="docutils literal"><span class="pre">NULL</span></code> to indicate that there is no salt.</dd> |
| <dt> <code class="docutils literal"><span class="pre">salt_length</span></code></dt> |
| <dd>Size of the <code class="docutils literal"><span class="pre">salt</span></code> buffer in bytes. If <code class="docutils literal"><span class="pre">salt</span></code> is <code class="docutils literal"><span class="pre">NULL</span></code>, pass <code class="docutils literal"><span class="pre">0</span></code>.</dd> |
| <dt> <code class="docutils literal"><span class="pre">output</span></code></dt> |
| <dd>Buffer where the decrypted message is to be written.</dd> |
| <dt> <code class="docutils literal"><span class="pre">output_size</span></code></dt> |
| <dd><p class="first">Size of the <code class="docutils literal"><span class="pre">output</span></code> buffer in bytes. |
| This must be appropriate for the selected algorithm and key:</p> |
| <ul class="last simple"> |
| <li>The required output size is <a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE"><code class="docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">key_type</span></code><code class="docutils literal"><span class="pre">,</span> </code><code class="docutils literal"><span class="pre">key_bits</span></code><code class="docutils literal"><span class="pre">,</span> </code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code> where <code class="docutils literal"><span class="pre">key_type</span></code> and <code class="docutils literal"><span class="pre">key_bits</span></code> are the type and bit-size respectively of <code class="docutils literal"><span class="pre">key</span></code>.</li> |
| <li><a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE</span></code></a> evaluates to the maximum output size of any supported asymmetric decryption.</li> |
| </ul> |
| </dd> |
| <dt> <code class="docutils literal"><span class="pre">output_length</span></code></dt> |
| <dd>On success, the number of bytes that make up the returned output.</dd> |
| </dl> |
| <p class="rubric">Returns: <a class="reference internal" href="../library/status.html#c.psa_status_t" title="psa_status_t"><code class="docutils literal"><span class="pre">psa_status_t</span></code></a></p> |
| <dl class="docutils"> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_SUCCESS" title="PSA_SUCCESS"><code class="docutils literal"><span class="pre">PSA_SUCCESS</span></code></a></dt> |
| <dd>Success. |
| The first <code class="docutils literal"><span class="pre">(*output_length)</span></code> bytes of <code class="docutils literal"><span class="pre">output</span></code> contain the decrypted output.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_BAD_STATE" title="PSA_ERROR_BAD_STATE"><code class="docutils literal"><span class="pre">PSA_ERROR_BAD_STATE</span></code></a></dt> |
| <dd>The library requires initializing by a call to <a class="reference internal" href="../library/library.html#c.psa_crypto_init" title="psa_crypto_init"><code class="xref any c c-func docutils literal"><span class="pre">psa_crypto_init()</span></code></a>.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INVALID_HANDLE" title="PSA_ERROR_INVALID_HANDLE"><code class="docutils literal"><span class="pre">PSA_ERROR_INVALID_HANDLE</span></code></a></dt> |
| <dd><code class="docutils literal"><span class="pre">key</span></code> is not a valid key identifier.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_NOT_PERMITTED" title="PSA_ERROR_NOT_PERMITTED"><code class="docutils literal"><span class="pre">PSA_ERROR_NOT_PERMITTED</span></code></a></dt> |
| <dd>The key does not have the <a class="reference internal" href="../keys/policy.html#c.PSA_KEY_USAGE_DECRYPT" title="PSA_KEY_USAGE_DECRYPT"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_KEY_USAGE_DECRYPT</span></code></a> flag, or it does not permit the requested algorithm.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_BUFFER_TOO_SMALL" title="PSA_ERROR_BUFFER_TOO_SMALL"><code class="docutils literal"><span class="pre">PSA_ERROR_BUFFER_TOO_SMALL</span></code></a></dt> |
| <dd>The size of the <code class="docutils literal"><span class="pre">output</span></code> buffer is too small. |
| <a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE()</span></code></a> or <a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE</span></code></a> can be used to determine a sufficient buffer size.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INVALID_PADDING" title="PSA_ERROR_INVALID_PADDING"><code class="docutils literal"><span class="pre">PSA_ERROR_INVALID_PADDING</span></code></a></dt> |
| <dd>The algorithm uses padding, and the input does not contain valid padding.</dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INVALID_ARGUMENT" title="PSA_ERROR_INVALID_ARGUMENT"><code class="docutils literal"><span class="pre">PSA_ERROR_INVALID_ARGUMENT</span></code></a></dt> |
| <dd><p class="first">The following conditions can result in this error:</p> |
| <ul class="last simple"> |
| <li><code class="docutils literal"><span class="pre">alg</span></code> is not an asymmetric encryption algorithm.</li> |
| <li><code class="docutils literal"><span class="pre">key</span></code> is not an asymmetric key pair, that is compatible with <code class="docutils literal"><span class="pre">alg</span></code>.</li> |
| <li><code class="docutils literal"><span class="pre">input_length</span></code> is not valid for the algorithm and key type.</li> |
| <li><code class="docutils literal"><span class="pre">salt_length</span></code> is not valid for the algorithm and key type.</li> |
| </ul> |
| </dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_NOT_SUPPORTED" title="PSA_ERROR_NOT_SUPPORTED"><code class="docutils literal"><span class="pre">PSA_ERROR_NOT_SUPPORTED</span></code></a></dt> |
| <dd><p class="first">The following conditions can result in this error:</p> |
| <ul class="last simple"> |
| <li><code class="docutils literal"><span class="pre">alg</span></code> is not supported or is not an asymmetric encryption algorithm.</li> |
| <li><code class="docutils literal"><span class="pre">key</span></code> is not supported for use with <code class="docutils literal"><span class="pre">alg</span></code>.</li> |
| <li><code class="docutils literal"><span class="pre">input_length</span></code> or <code class="docutils literal"><span class="pre">salt_length</span></code> are too large for the implementation.</li> |
| </ul> |
| </dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INSUFFICIENT_ENTROPY" title="PSA_ERROR_INSUFFICIENT_ENTROPY"><code class="docutils literal"><span class="pre">PSA_ERROR_INSUFFICIENT_ENTROPY</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INSUFFICIENT_MEMORY" title="PSA_ERROR_INSUFFICIENT_MEMORY"><code class="docutils literal"><span class="pre">PSA_ERROR_INSUFFICIENT_MEMORY</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="docutils literal"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED"><code class="docutils literal"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE"><code class="docutils literal"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT"><code class="docutils literal"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code></a></dt> |
| <dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_DATA_INVALID" title="PSA_ERROR_DATA_INVALID"><code class="docutils literal"><span class="pre">PSA_ERROR_DATA_INVALID</span></code></a></dt> |
| <dd></dd> |
| </dl> |
| <p class="rubric">Description</p> |
| <ul class="simple"> |
| <li>For <a class="reference internal" href="#c.PSA_ALG_RSA_PKCS1V15_CRYPT" title="PSA_ALG_RSA_PKCS1V15_CRYPT"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ALG_RSA_PKCS1V15_CRYPT</span></code></a>, no salt is supported.</li> |
| </ul> |
| </div> |
| </div> |
| <div class="section" id="support-macros"> |
| <h2>10.8.3. Support macros</h2> |
| <div class="section" id="PSA_ALG_IS_RSA_OAEP"> |
| <span id="c.PSA_ALG_IS_RSA_OAEP"></span><h3><code class="docutils literal"><span class="pre">PSA_ALG_IS_RSA_OAEP</span></code> (macro)</h3> |
| <p>Whether the specified algorithm is an RSA OAEP encryption algorithm.</p> |
| <pre class="literal-block"> |
| #define <a class="reference internal" href="#c.PSA_ALG_IS_RSA_OAEP" title="PSA_ALG_IS_RSA_OAEP">PSA_ALG_IS_RSA_OAEP</a>(alg) <em><a class="reference internal" href="../../overview/implementation.html#specification-defined-value"><span class="std std-ref">/* specification-defined value */</span></a></em> |
| </pre> |
| <p class="rubric">Parameters</p> |
| <dl class="docutils"> |
| <dt> <code class="docutils literal"><span class="pre">alg</span></code></dt> |
| <dd>An algorithm identifier: a value of type <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="xref any c c-type docutils literal"><span class="pre">psa_algorithm_t</span></code></a>.</dd> |
| </dl> |
| <p class="rubric">Returns</p> |
| <p><code class="docutils literal"><span class="pre">1</span></code> if <code class="docutils literal"><span class="pre">alg</span></code> is an RSA OAEP algorithm, <code class="docutils literal"><span class="pre">0</span></code> otherwise.</p> |
| <p>This macro can return either <code class="docutils literal"><span class="pre">0</span></code> or <code class="docutils literal"><span class="pre">1</span></code> if <code class="docutils literal"><span class="pre">alg</span></code> is not a supported algorithm identifier.</p> |
| </div> |
| <div class="section" id="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE"> |
| <span id="c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE"></span><h3><code class="docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE</span></code> (macro)</h3> |
| <p>Sufficient output buffer size for <a class="reference internal" href="#c.psa_asymmetric_encrypt" title="psa_asymmetric_encrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_encrypt()</span></code></a>.</p> |
| <pre class="literal-block"> |
| #define <a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE</a>(key_type, key_bits, alg) \ |
| <em><a class="reference internal" href="../../overview/implementation.html#implementation-defined-value"><span class="std std-ref">/* implementation-defined value */</span></a></em> |
| </pre> |
| <p class="rubric">Parameters</p> |
| <dl class="docutils"> |
| <dt> <code class="docutils literal"><span class="pre">key_type</span></code></dt> |
| <dd>An asymmetric key type, either a key pair or a public key.</dd> |
| <dt> <code class="docutils literal"><span class="pre">key_bits</span></code></dt> |
| <dd>The size of the key in bits.</dd> |
| <dt> <code class="docutils literal"><span class="pre">alg</span></code></dt> |
| <dd>An asymmetric encryption algorithm: a value of type <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="xref any c c-type docutils literal"><span class="pre">psa_algorithm_t</span></code></a> such that <a class="reference internal" href="algorithms.html#c.PSA_ALG_IS_ASYMMETRIC_ENCRYPTION" title="PSA_ALG_IS_ASYMMETRIC_ENCRYPTION"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ASYMMETRIC_ENCRYPTION</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code> is true.</dd> |
| </dl> |
| <p class="rubric">Returns</p> |
| <p>A sufficient output buffer size for the specified asymmetric encryption algorithm and key parameters. An implementation can return either <code class="docutils literal"><span class="pre">0</span></code> or a correct size for an asymmetric encryption algorithm and key parameters that it recognizes, but does not support. If the parameters are not valid, the return value is unspecified.</p> |
| <p class="rubric">Description</p> |
| <p>If the size of the output buffer is at least this large, it is guaranteed that <a class="reference internal" href="#c.psa_asymmetric_encrypt" title="psa_asymmetric_encrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_encrypt()</span></code></a> will not fail due to an insufficient buffer size. The actual size of the output might be smaller in any given call.</p> |
| <p>See also <a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE</span></code></a>.</p> |
| </div> |
| <div class="section" id="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE"> |
| <span id="c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE"></span><h3><code class="docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE</span></code> (macro)</h3> |
| <p>A sufficient output buffer size for <a class="reference internal" href="#c.psa_asymmetric_encrypt" title="psa_asymmetric_encrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_encrypt()</span></code></a>, for any of the supported key types and asymmetric encryption algorithms.</p> |
| <pre class="literal-block"> |
| #define <a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE</a> \ |
| <em><a class="reference internal" href="../../overview/implementation.html#implementation-defined-value"><span class="std std-ref">/* implementation-defined value */</span></a></em> |
| </pre> |
| <p>If the size of the output buffer is at least this large, it is guaranteed that <a class="reference internal" href="#c.psa_asymmetric_encrypt" title="psa_asymmetric_encrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_encrypt()</span></code></a> will not fail due to an insufficient buffer size.</p> |
| <p>See also <a class="reference internal" href="#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE()</span></code></a>.</p> |
| </div> |
| <div class="section" id="PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE"> |
| <span id="c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE"></span><h3><code class="docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE</span></code> (macro)</h3> |
| <p>Sufficient output buffer size for <a class="reference internal" href="#c.psa_asymmetric_decrypt" title="psa_asymmetric_decrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_decrypt()</span></code></a>.</p> |
| <pre class="literal-block"> |
| #define <a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE">PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE</a>(key_type, key_bits, alg) \ |
| <em><a class="reference internal" href="../../overview/implementation.html#implementation-defined-value"><span class="std std-ref">/* implementation-defined value */</span></a></em> |
| </pre> |
| <p class="rubric">Parameters</p> |
| <dl class="docutils"> |
| <dt> <code class="docutils literal"><span class="pre">key_type</span></code></dt> |
| <dd>An asymmetric key type, either a key pair or a public key.</dd> |
| <dt> <code class="docutils literal"><span class="pre">key_bits</span></code></dt> |
| <dd>The size of the key in bits.</dd> |
| <dt> <code class="docutils literal"><span class="pre">alg</span></code></dt> |
| <dd>An asymmetric encryption algorithm: a value of type <a class="reference internal" href="algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="xref any c c-type docutils literal"><span class="pre">psa_algorithm_t</span></code></a> such that <a class="reference internal" href="algorithms.html#c.PSA_ALG_IS_ASYMMETRIC_ENCRYPTION" title="PSA_ALG_IS_ASYMMETRIC_ENCRYPTION"><code class="docutils literal"><span class="pre">PSA_ALG_IS_ASYMMETRIC_ENCRYPTION</span></code></a><code class="docutils literal"><span class="pre">(</span></code><code class="docutils literal"><span class="pre">alg</span></code><code class="docutils literal"><span class="pre">)</span></code> is true.</dd> |
| </dl> |
| <p class="rubric">Returns</p> |
| <p>A sufficient output buffer size for the specified asymmetric encryption algorithm and key parameters. An implementation can return either <code class="docutils literal"><span class="pre">0</span></code> or a correct size for an asymmetric encryption algorithm and key parameters that it recognizes, but does not support. If the parameters are not valid, the return value is unspecified.</p> |
| <p class="rubric">Description</p> |
| <p>If the size of the output buffer is at least this large, it is guaranteed that <a class="reference internal" href="#c.psa_asymmetric_decrypt" title="psa_asymmetric_decrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_decrypt()</span></code></a> will not fail due to an insufficient buffer size. The actual size of the output might be smaller in any given call.</p> |
| <p>See also <a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE</span></code></a>.</p> |
| </div> |
| <div class="section" id="PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE"> |
| <span id="c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE"></span><h3><code class="docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE</span></code> (macro)</h3> |
| <p>A sufficient output buffer size for <a class="reference internal" href="#c.psa_asymmetric_decrypt" title="psa_asymmetric_decrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_decrypt()</span></code></a>, for any of the supported key types and asymmetric encryption algorithms.</p> |
| <pre class="literal-block"> |
| #define <a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE">PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE</a> \ |
| <em><a class="reference internal" href="../../overview/implementation.html#implementation-defined-value"><span class="std std-ref">/* implementation-defined value */</span></a></em> |
| </pre> |
| <p>If the size of the output buffer is at least this large, it is guaranteed that <a class="reference internal" href="#c.psa_asymmetric_decrypt" title="psa_asymmetric_decrypt"><code class="xref any c c-func docutils literal"><span class="pre">psa_asymmetric_decrypt()</span></code></a> will not fail due to an insufficient buffer size.</p> |
| <p>See also <a class="reference internal" href="#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_SIZE()</span></code></a>.</p> |
| </div> |
| </div> |
| </div> |
| |
| |
| </div> |
| </div> |
| </div> |
| <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
| <div class="sphinxsidebarwrapper"><h3><a href="../../index.html"><b>PSA Crypto API</b></a></h3> |
| IHI 0086<br/> |
| Non-confidential<br/> |
| Version 1.1.0 |
| <span style="color: red; font-weight: bold;"></span> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../about.html">About this document</a></li> |
| </ul> |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/intro.html">1. Introduction</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/goals.html">2. Design goals</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/functionality.html">3. Functionality overview</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/sample-arch.html">4. Sample architectures</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/conventions.html">5. Library conventions</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/implementation.html">6. Implementation considerations</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/usage.html">7. Usage considerations</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../library/index.html">8. Library management reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../keys/index.html">9. Key management reference</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="index.html">10. Cryptographic operation reference</a><ul class="current"> |
| <li class="toctree-l2"><a class="reference internal" href="algorithms.html">10.1. Algorithms</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="hashes.html">10.2. Message digests (Hashes)</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="macs.html">10.3. Message authentication codes (MAC)</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="ciphers.html">10.4. Unauthenticated ciphers</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="aead.html">10.5. Authenticated encryption with associated data (AEAD)</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="kdf.html">10.6. Key derivation</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="sign.html">10.7. Asymmetric signature</a></li> |
| <li class="toctree-l2 current"><a class="current reference internal" href="#">10.8. Asymmetric encryption</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#asymmetric-encryption-algorithms">10.8.1. Asymmetric encryption algorithms</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#asymmetric-encryption-functions">10.8.2. Asymmetric encryption functions</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="#support-macros">10.8.3. Support macros</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="ka.html">10.9. Key agreement</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="rng.html">10.10. Other cryptographic services</a></li> |
| </ul> |
| </li> |
| </ul> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/example_header.html">Example header file</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/encodings.html">Algorithm and key type encoding</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/specdef_values.html">Example macro implementations</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/sra.html">Security Risk Assessment</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/history.html">Changes to the API</a></li> |
| </ul> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../psa_c-identifiers.html">Index of API elements</a></li> |
| </ul> |
| <div id="searchbox" style="display: none" role="search"> |
| <h3>Quick search</h3> |
| <form class="search" action="../../search.html" method="get"> |
| <div><input type="text" name="q" /></div> |
| <div><input type="submit" value="Go" /></div> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| <script type="text/javascript">$('#searchbox').show(0);</script> |
| </div> |
| </div> |
| <div class="clearer"></div> |
| </div> |
| <div class="footer"> |
| © 2018-2022, Arm Limited or its affiliates. All rights reserved. |
| |
| | |
| Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.7</a> |
| & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a> |
| |
| </div> |
| |
| |
| |
| |
| </body> |
| </html> |