Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 1 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 2 | <!DOCTYPE html> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 3 | |
| 4 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 5 | <head> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 6 | <meta charset="utf-8" /> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 7 | <title>Changes to the API — PSA Crypto API 1.0.1 documentation</title> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 8 | <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" /> |
| 9 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 10 | <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 11 | <script type="text/javascript" src="../_static/jquery.js"></script> |
| 12 | <script type="text/javascript" src="../_static/underscore.js"></script> |
| 13 | <script type="text/javascript" src="../_static/doctools.js"></script> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 14 | <script type="text/javascript" src="../_static/language_data.js"></script> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 15 | <link rel="author" title="About these documents" href="../about.html" /> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 16 | <link rel="index" title="Index" href="../genindex.html" /> |
| 17 | <link rel="search" title="Search" href="../search.html" /> |
| 18 | <link rel="prev" title="Example macro implementations" href="specdef_values.html" /> |
| 19 | |
| 20 | <link rel="stylesheet" href="../_static/custom.css" type="text/css" /> |
| 21 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 22 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 23 | <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> |
| 24 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 25 | </head><body> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 26 | |
| 27 | |
| 28 | <div class="document"> |
| 29 | <div class="documentwrapper"> |
| 30 | <div class="bodywrapper"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 31 | |
| 32 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 33 | <div class="body" role="main"> |
| 34 | |
| 35 | <div class="section" id="changes-to-the-api"> |
| 36 | <h1>Changes to the API</h1> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 37 | <div class="section" id="document-change-history"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 38 | <span id="changes"></span><h2>Document change history</h2> |
| 39 | <p>This section provides the detailed changes made between published version of the document.</p> |
| 40 | <div class="section" id="changes-between-1-0-0-and-1-0-1"> |
| 41 | <h3>Changes between <em>1.0.0</em> and <em>1.0.1</em></h3> |
| 42 | <div class="section" id="id1"> |
| 43 | <h4>Changes to the API</h4> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 44 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 45 | <li><p>Added subtypes <a class="reference internal" href="../api/keys/lifetimes.html#c.psa_key_persistence_t" title="psa_key_persistence_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_persistence_t</span></code></a> and <a class="reference internal" href="../api/keys/lifetimes.html#c.psa_key_location_t" title="psa_key_location_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_location_t</span></code></a> for key lifetimes, and defined standard values for these attributes.</p></li> |
| 46 | <li><p>Added identifiers for <a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SM3" title="PSA_ALG_SM3"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SM3</span></code></a> and <a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_SM4" title="PSA_KEY_TYPE_SM4"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_SM4</span></code></a>.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 47 | </ul> |
| 48 | </div> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 49 | <div class="section" id="clarifications-and-fixes"> |
| 50 | <h4>Clarifications and fixes</h4> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 51 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 52 | <li><p>Provided citation references for all cryptographic algorithms in the specification.</p></li> |
| 53 | <li><p>Provided precise key size information for all key types.</p></li> |
| 54 | <li><p>Permitted implementations to store and export long HMAC keys in hashed form.</p></li> |
| 55 | <li><p>Provided details for initialization vectors in all unauthenticated cipher algorithms.</p></li> |
| 56 | <li><p>Provided details for nonces in all AEAD algorithms.</p></li> |
| 57 | <li><p>Clarified the input steps for HKDF.</p></li> |
| 58 | <li><p>Provided details of signature algorithms, include requirements when using with <a class="reference internal" href="../api/ops/sign.html#c.psa_sign_hash" title="psa_sign_hash"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_sign_hash()</span></code></a> and <a class="reference internal" href="../api/ops/sign.html#c.psa_verify_hash" title="psa_verify_hash"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_verify_hash()</span></code></a>.</p></li> |
| 59 | <li><p>Provided details of key agreement algorithms, and how to use them.</p></li> |
| 60 | <li><p>Aligned terminology relating to key policies, to clarify the combination of the usage flags and permitted algorithm in the policy.</p></li> |
| 61 | <li><p>Clarified the use of the individual key attributes for all of the key creation functions.</p></li> |
| 62 | <li><p>Restructured the description for <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_output_key" title="psa_key_derivation_output_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_output_key()</span></code></a>, to clarify the handling of the excess bits in ECC key generation when needing a string of bits whose length is not a multiple of <code class="docutils literal notranslate"><span class="pre">8</span></code>.</p></li> |
| 63 | <li><p>Referenced the correct buffer size macros for <a class="reference internal" href="../api/keys/management.html#c.psa_export_key" title="psa_export_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_export_key()</span></code></a>.</p></li> |
| 64 | <li><p>Removed the use of the <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_DOES_NOT_EXIST" title="PSA_ERROR_DOES_NOT_EXIST"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DOES_NOT_EXIST</span></code></a> error.</p></li> |
| 65 | <li><p>Clarified concurrency rules.</p></li> |
| 66 | <li><p>Document that <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_output_key" title="psa_key_derivation_output_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_output_key()</span></code></a> does not return <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_NOT_PERMITTED" title="PSA_ERROR_NOT_PERMITTED"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_NOT_PERMITTED</span></code></a> if the secret input is the result of a key agreement. This matches what was already documented for <a class="reference internal" href="../api/ops/kdf.html#c.PSA_KEY_DERIVATION_INPUT_SECRET" title="PSA_KEY_DERIVATION_INPUT_SECRET"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_DERIVATION_INPUT_SECRET</span></code></a>.</p></li> |
| 67 | <li><p>Relax the requirement to use the defined key derivation methods in <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_output_key" title="psa_key_derivation_output_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_output_key()</span></code></a>: implementation-specific KDF algorithms can use implementation-defined methods to derive the key material.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 68 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 69 | </div> |
| 70 | <div class="section" id="other-changes"> |
| 71 | <h4>Other changes</h4> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 72 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 73 | <li><p>Provided a glossary of terms.</p></li> |
| 74 | <li><p>Provided a table of references.</p></li> |
| 75 | <li><p>Restructured the <a class="reference internal" href="../api/keys/index.html#key-management"><span class="secref">Key management reference</span></a> chapter.</p> |
| 76 | <ul> |
| 77 | <li><p>Moved individual attribute types, values and accessor functions into their own sections.</p></li> |
| 78 | <li><p>Placed permitted algorithms and usage flags into <a class="reference internal" href="../api/keys/policy.html#key-policy"><span class="secref">Key policies</span></a>.</p></li> |
| 79 | <li><p>Moved most introductory material from the <a class="reference internal" href="../overview/functionality.html#functionality-overview"><span class="secref">Functionality overview</span></a> into the relevant API sections.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 80 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 81 | </li> |
| 82 | </ul> |
| 83 | </div> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 84 | </div> |
| 85 | <div class="section" id="changes-between-1-0-beta-3-and-1-0-0"> |
| 86 | <h3>Changes between <em>1.0 beta 3</em> and <em>1.0.0</em></h3> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 87 | <div class="section" id="id2"> |
| 88 | <h4>Changes to the API</h4> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 89 | <ul> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 90 | <li><p>Added <a class="reference internal" href="../api/library/library.html#c.PSA_CRYPTO_API_VERSION_MAJOR" title="PSA_CRYPTO_API_VERSION_MAJOR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CRYPTO_API_VERSION_MAJOR</span></code></a> and <a class="reference internal" href="../api/library/library.html#c.PSA_CRYPTO_API_VERSION_MINOR" title="PSA_CRYPTO_API_VERSION_MINOR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CRYPTO_API_VERSION_MINOR</span></code></a> to report the PSA Crypto API version.</p></li> |
| 91 | <li><p>Removed <code class="docutils literal notranslate"><span class="pre">PSA_ALG_GMAC</span></code> algorithm identifier.</p></li> |
| 92 | <li><p>Removed internal implementation macros from the API specification:</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 93 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 94 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_AEAD_TAG_LENGTH_OFFSET</span></code></p></li> |
| 95 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_FROM_BLOCK_FLAG</span></code></p></li> |
| 96 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_TAG_LENGTH_MASK</span></code></p></li> |
| 97 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE</span></code></p></li> |
| 98 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_AEAD</span></code></p></li> |
| 99 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION</span></code></p></li> |
| 100 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_CIPHER</span></code></p></li> |
| 101 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_HASH</span></code></p></li> |
| 102 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_KEY_AGREEMENT</span></code></p></li> |
| 103 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_KEY_DERIVATION</span></code></p></li> |
| 104 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_MAC</span></code></p></li> |
| 105 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_MASK</span></code></p></li> |
| 106 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CATEGORY_SIGN</span></code></p></li> |
| 107 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CIPHER_FROM_BLOCK_FLAG</span></code></p></li> |
| 108 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CIPHER_MAC_BASE</span></code></p></li> |
| 109 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_CIPHER_STREAM_FLAG</span></code></p></li> |
| 110 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_DETERMINISTIC_ECDSA_BASE</span></code></p></li> |
| 111 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_ECDSA_BASE</span></code></p></li> |
| 112 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_ECDSA_IS_DETERMINISTIC</span></code></p></li> |
| 113 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_HASH_MASK</span></code></p></li> |
| 114 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_HKDF_BASE</span></code></p></li> |
| 115 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_HMAC_BASE</span></code></p></li> |
| 116 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_IS_KEY_DERIVATION_OR_AGREEMENT</span></code></p></li> |
| 117 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_IS_VENDOR_DEFINED</span></code></p></li> |
| 118 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_KEY_AGREEMENT_MASK</span></code></p></li> |
| 119 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_KEY_DERIVATION_MASK</span></code></p></li> |
| 120 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_MAC_SUBCATEGORY_MASK</span></code></p></li> |
| 121 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_MAC_TRUNCATION_MASK</span></code></p></li> |
| 122 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_RSA_OAEP_BASE</span></code></p></li> |
| 123 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_RSA_PKCS1V15_SIGN_BASE</span></code></p></li> |
| 124 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_RSA_PSS_BASE</span></code></p></li> |
| 125 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_TLS12_PRF_BASE</span></code></p></li> |
| 126 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_TLS12_PSK_TO_MS_BASE</span></code></p></li> |
| 127 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_VENDOR_FLAG</span></code></p></li> |
| 128 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_BITS_TO_BYTES</span></code></p></li> |
| 129 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_BYTES_TO_BITS</span></code></p></li> |
| 130 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECDSA_SIGNATURE_SIZE</span></code></p></li> |
| 131 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_HMAC_MAX_HASH_BLOCK_SIZE</span></code></p></li> |
| 132 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_ASN1_INTEGER_MAX_SIZE</span></code></p></li> |
| 133 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_DSA_KEY_PAIR_MAX_SIZE</span></code></p></li> |
| 134 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_DSA_PUBLIC_KEY_MAX_SIZE</span></code></p></li> |
| 135 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_ECC_KEY_PAIR_MAX_SIZE</span></code></p></li> |
| 136 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE</span></code></p></li> |
| 137 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_RSA_KEY_PAIR_MAX_SIZE</span></code></p></li> |
| 138 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_RSA_PUBLIC_KEY_MAX_SIZE</span></code></p></li> |
| 139 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CATEGORY_FLAG_PAIR</span></code></p></li> |
| 140 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CATEGORY_KEY_PAIR</span></code></p></li> |
| 141 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CATEGORY_MASK</span></code></p></li> |
| 142 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY</span></code></p></li> |
| 143 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CATEGORY_RAW</span></code></p></li> |
| 144 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CATEGORY_SYMMETRIC</span></code></p></li> |
| 145 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DH_GROUP_MASK</span></code></p></li> |
| 146 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DH_KEY_PAIR_BASE</span></code></p></li> |
| 147 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE</span></code></p></li> |
| 148 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_ECC_CURVE_MASK</span></code></p></li> |
| 149 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_ECC_KEY_PAIR_BASE</span></code></p></li> |
| 150 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE</span></code></p></li> |
| 151 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_VENDOR_DEFINED</span></code></p></li> |
| 152 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_VENDOR_FLAG</span></code></p></li> |
| 153 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_MAC_TRUNCATED_LENGTH</span></code></p></li> |
| 154 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_MAC_TRUNCATION_OFFSET</span></code></p></li> |
| 155 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ROUND_UP_TO_MULTIPLE</span></code></p></li> |
| 156 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_RSA_MINIMUM_PADDING_SIZE</span></code></p></li> |
| 157 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_VENDOR_ECC_MAX_CURVE_BITS</span></code></p></li> |
| 158 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_VENDOR_RSA_MAX_KEY_BITS</span></code></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 159 | </ul> |
| 160 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 161 | <li><p>Remove the definition of implementation-defined macros from the specification, and clarified the implementation requirements for these macros in <a class="reference internal" href="../overview/implementation.html#implementation-specific-macro"><span class="secref">Implementation-specific macros</span></a>.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 162 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 163 | <li><p>Macros with implementation-defined values are indicated by <code class="docutils literal notranslate"><span class="pre">/*</span> <span class="pre">implementation-defined</span> <span class="pre">value</span> <span class="pre">*/</span></code> in the API prototype. |
| 164 | The implementation must provide the implementation.</p></li> |
| 165 | <li><p>Macros for algorithm and key type construction and inspection have specification-defined values. |
| 166 | This is indicated by <code class="docutils literal notranslate"><span class="pre">/*</span> <span class="pre">specification-defined</span> <span class="pre">value</span> <span class="pre">*/</span></code> in the API prototype. |
| 167 | Example definitions of these macros is provided in <a class="reference internal" href="specdef_values.html#appendix-specdef-values"><span class="secref">Example macro implementations</span></a>.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 168 | </ul> |
| 169 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 170 | <li><p>Changed the semantics of multi-part operations.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 171 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 172 | <li><p>Formalize the standard pattern for multi-part operations.</p></li> |
| 173 | <li><p>Require all errors to result in an error state, requiring a call to <code class="docutils literal notranslate"><span class="pre">psa_xxx_abort()</span></code> to reset the object.</p></li> |
| 174 | <li><p>Define behavior in illegal and impossible operation states, and for copying and reusing operation objects.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 175 | </ul> |
| 176 | <p>Although the API signatures have not changed, this change requires modifications to application flows that handle error conditions in multi-part operations.</p> |
| 177 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 178 | <li><p>Merge the key identifier and key handle concepts in the API.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 179 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 180 | <li><p>Replaced all references to key handles with key identifiers, or something similar.</p></li> |
| 181 | <li><p>Replaced all uses of <code class="docutils literal notranslate"><span class="pre">psa_key_handle_t</span></code> with <a class="reference internal" href="../api/keys/ids.html#c.psa_key_id_t" title="psa_key_id_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_id_t</span></code></a> in the API, and removes the <code class="docutils literal notranslate"><span class="pre">psa_key_handle_t</span></code> type.</p></li> |
| 182 | <li><p>Removed <code class="docutils literal notranslate"><span class="pre">psa_open_key</span></code> and <code class="docutils literal notranslate"><span class="pre">psa_close_key</span></code>.</p></li> |
| 183 | <li><p>Added <a class="reference internal" href="../api/keys/ids.html#c.PSA_KEY_ID_NULL" title="PSA_KEY_ID_NULL"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_ID_NULL</span></code></a> for the never valid zero key identifier.</p></li> |
| 184 | <li><p>Document rules related to destroying keys whilst in use.</p></li> |
| 185 | <li><p>Added the <a class="reference internal" href="../api/keys/policy.html#c.PSA_KEY_USAGE_CACHE" title="PSA_KEY_USAGE_CACHE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_CACHE</span></code></a> usage flag and the related <a class="reference internal" href="../api/keys/management.html#c.psa_purge_key" title="psa_purge_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_purge_key()</span></code></a> API.</p></li> |
| 186 | <li><p>Added clarification about caching keys to non-volatile memory.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 187 | </ul> |
| 188 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 189 | <li><p>Renamed <code class="docutils literal notranslate"><span class="pre">PSA_ALG_TLS12_PSK_TO_MS_MAX_PSK_LEN</span></code> to <a class="reference internal" href="../api/ops/kdf.html#c.PSA_TLS12_PSK_TO_MS_PSK_MAX_SIZE" title="PSA_TLS12_PSK_TO_MS_PSK_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_TLS12_PSK_TO_MS_PSK_MAX_SIZE</span></code></a>.</p></li> |
| 190 | <li><p>Relax definition of implementation-defined types.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 191 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 192 | <li><p>This is indicated in the specification by <code class="docutils literal notranslate"><span class="pre">/*</span> <span class="pre">implementation-defined</span> <span class="pre">type</span> <span class="pre">*/</span></code> in the type definition.</p></li> |
| 193 | <li><p>The specification only defines the name of implementation-defined types, and does not require that the implementation is a C struct.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 194 | </ul> |
| 195 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 196 | <li><p>Zero-length keys are not permitted. Attempting to create one will now result in an error.</p></li> |
| 197 | <li><p>Relax the constraints on inputs to key derivation:</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 198 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 199 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_input_bytes" title="psa_key_derivation_input_bytes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_input_bytes()</span></code></a> can be used for secret input steps. This is necessary if a zero-length input is required by the application.</p></li> |
| 200 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_input_key" title="psa_key_derivation_input_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_input_key()</span></code></a> can be used for non-secret input steps.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 201 | </ul> |
| 202 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 203 | <li><p>Multi-part cipher operations now require that the IV is passed using <a class="reference internal" href="../api/ops/ciphers.html#c.psa_cipher_set_iv" title="psa_cipher_set_iv"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_cipher_set_iv()</span></code></a>, the option to provide this as part of the input to <a class="reference internal" href="../api/ops/ciphers.html#c.psa_cipher_update" title="psa_cipher_update"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_cipher_update()</span></code></a> has been removed.</p> |
| 204 | <p>The format of the output from <a class="reference internal" href="../api/ops/ciphers.html#c.psa_cipher_encrypt" title="psa_cipher_encrypt"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_cipher_encrypt()</span></code></a>, and input to <a class="reference internal" href="../api/ops/ciphers.html#c.psa_cipher_decrypt" title="psa_cipher_decrypt"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_cipher_decrypt()</span></code></a>, is documented.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 205 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 206 | <li><p>Support macros to calculate the size of output buffers, IVs and nonces.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 207 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 208 | <li><p>Macros to calculate a key and/or algorithm specific result are provided for all output buffers. The new macros are:</p> |
| 209 | <ul> |
| 210 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_NONCE_LENGTH" title="PSA_AEAD_NONCE_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_NONCE_LENGTH()</span></code></a></p></li> |
| 211 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_ENCRYPT_OUTPUT_SIZE" title="PSA_CIPHER_ENCRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_ENCRYPT_OUTPUT_SIZE()</span></code></a></p></li> |
| 212 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_DECRYPT_OUTPUT_SIZE" title="PSA_CIPHER_DECRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_DECRYPT_OUTPUT_SIZE()</span></code></a></p></li> |
| 213 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_UPDATE_OUTPUT_SIZE" title="PSA_CIPHER_UPDATE_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_UPDATE_OUTPUT_SIZE()</span></code></a></p></li> |
| 214 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_FINISH_OUTPUT_SIZE" title="PSA_CIPHER_FINISH_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_FINISH_OUTPUT_SIZE()</span></code></a></p></li> |
| 215 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_IV_LENGTH" title="PSA_CIPHER_IV_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_IV_LENGTH()</span></code></a></p></li> |
| 216 | <li><p><a class="reference internal" href="../api/keys/management.html#c.PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE" title="PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE()</span></code></a></p></li> |
| 217 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE" title="PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE()</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 218 | </ul> |
| 219 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 220 | <li><p>Macros that evaluate to a maximum type-independent buffer size are provided. The new macros are:</p> |
| 221 | <ul> |
| 222 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE" title="PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE()</span></code></a></p></li> |
| 223 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_DECRYPT_OUTPUT_MAX_SIZE" title="PSA_AEAD_DECRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_DECRYPT_OUTPUT_MAX_SIZE()</span></code></a></p></li> |
| 224 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE" title="PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE()</span></code></a></p></li> |
| 225 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_FINISH_OUTPUT_MAX_SIZE" title="PSA_AEAD_FINISH_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_FINISH_OUTPUT_MAX_SIZE</span></code></a></p></li> |
| 226 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE" title="PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE</span></code></a></p></li> |
| 227 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_NONCE_MAX_SIZE" title="PSA_AEAD_NONCE_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_NONCE_MAX_SIZE</span></code></a></p></li> |
| 228 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_TAG_MAX_SIZE" title="PSA_AEAD_TAG_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_TAG_MAX_SIZE</span></code></a></p></li> |
| 229 | <li><p><a class="reference internal" href="../api/ops/pke.html#c.PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE</span></code></a></p></li> |
| 230 | <li><p><a class="reference internal" href="../api/ops/pke.html#c.PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE" title="PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE</span></code></a></p></li> |
| 231 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE" title="PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE()</span></code></a></p></li> |
| 232 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_DECRYPT_OUTPUT_MAX_SIZE" title="PSA_CIPHER_DECRYPT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_DECRYPT_OUTPUT_MAX_SIZE()</span></code></a></p></li> |
| 233 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_UPDATE_OUTPUT_MAX_SIZE" title="PSA_CIPHER_UPDATE_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_UPDATE_OUTPUT_MAX_SIZE()</span></code></a></p></li> |
| 234 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_FINISH_OUTPUT_MAX_SIZE" title="PSA_CIPHER_FINISH_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_FINISH_OUTPUT_MAX_SIZE</span></code></a></p></li> |
| 235 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_CIPHER_IV_MAX_SIZE" title="PSA_CIPHER_IV_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_CIPHER_IV_MAX_SIZE</span></code></a></p></li> |
| 236 | <li><p><a class="reference internal" href="../api/keys/management.html#c.PSA_EXPORT_KEY_PAIR_MAX_SIZE" title="PSA_EXPORT_KEY_PAIR_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_EXPORT_KEY_PAIR_MAX_SIZE</span></code></a></p></li> |
| 237 | <li><p><a class="reference internal" href="../api/keys/management.html#c.PSA_EXPORT_PUBLIC_KEY_MAX_SIZE" title="PSA_EXPORT_PUBLIC_KEY_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_EXPORT_PUBLIC_KEY_MAX_SIZE</span></code></a></p></li> |
| 238 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_RAW_KEY_AGREEMENT_OUTPUT_MAX_SIZE" title="PSA_RAW_KEY_AGREEMENT_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_RAW_KEY_AGREEMENT_OUTPUT_MAX_SIZE</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 239 | </ul> |
| 240 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 241 | <li><p>AEAD output buffer size macros are now parameterized on the key type as well as the algorithm:</p> |
| 242 | <ul> |
| 243 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_ENCRYPT_OUTPUT_SIZE" title="PSA_AEAD_ENCRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_ENCRYPT_OUTPUT_SIZE()</span></code></a></p></li> |
| 244 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_DECRYPT_OUTPUT_SIZE" title="PSA_AEAD_DECRYPT_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_DECRYPT_OUTPUT_SIZE()</span></code></a></p></li> |
| 245 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_UPDATE_OUTPUT_SIZE" title="PSA_AEAD_UPDATE_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_UPDATE_OUTPUT_SIZE()</span></code></a></p></li> |
| 246 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_FINISH_OUTPUT_SIZE" title="PSA_AEAD_FINISH_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_FINISH_OUTPUT_SIZE()</span></code></a></p></li> |
| 247 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_TAG_LENGTH" title="PSA_AEAD_TAG_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_TAG_LENGTH()</span></code></a></p></li> |
| 248 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_VERIFY_OUTPUT_SIZE" title="PSA_AEAD_VERIFY_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_VERIFY_OUTPUT_SIZE()</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 249 | </ul> |
| 250 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 251 | <li><p>Some existing macros have been renamed to ensure that the name of the support macros are consistent. The following macros have been renamed:</p> |
| 252 | <ul> |
| 253 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH()</span></code> → <a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG" title="PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG()</span></code></a></p></li> |
| 254 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_WITH_TAG_LENGTH()</span></code> → <a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_AEAD_WITH_SHORTENED_TAG" title="PSA_ALG_AEAD_WITH_SHORTENED_TAG"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_WITH_SHORTENED_TAG()</span></code></a></p></li> |
| 255 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_EXPORT_MAX_SIZE()</span></code> → <a class="reference internal" href="../api/keys/management.html#c.PSA_EXPORT_KEY_OUTPUT_SIZE" title="PSA_EXPORT_KEY_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_EXPORT_KEY_OUTPUT_SIZE()</span></code></a></p></li> |
| 256 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_HASH_SIZE()</span></code> → <a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_LENGTH" title="PSA_HASH_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_HASH_LENGTH()</span></code></a></p></li> |
| 257 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_MAC_FINAL_SIZE()</span></code> → <a class="reference internal" href="../api/ops/macs.html#c.PSA_MAC_LENGTH" title="PSA_MAC_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_MAC_LENGTH()</span></code></a></p></li> |
| 258 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_BLOCK_CIPHER_BLOCK_SIZE()</span></code> → <a class="reference internal" href="../api/ops/ciphers.html#c.PSA_BLOCK_CIPHER_BLOCK_LENGTH" title="PSA_BLOCK_CIPHER_BLOCK_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_BLOCK_CIPHER_BLOCK_LENGTH()</span></code></a></p></li> |
| 259 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_MAX_BLOCK_CIPHER_BLOCK_SIZE</span></code> → <a class="reference internal" href="../api/ops/ciphers.html#c.PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE" title="PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 260 | </ul> |
| 261 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 262 | <li><p>Documentation of the macros and of related APIs has been updated to reference the related API elements.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 263 | </ul> |
| 264 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 265 | <li><p>Provide hash-and-sign operations as well as sign-the-hash operations. The API for asymmetric signature has been changed to clarify the use of the new functions.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 266 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 267 | <li><p>The existing asymmetric signature API has been renamed to clarify that this is for signing a hash that is already computed:</p> |
| 268 | <ul> |
| 269 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_SIGN</span></code> → <a class="reference internal" href="../api/keys/policy.html#c.PSA_KEY_USAGE_SIGN_HASH" title="PSA_KEY_USAGE_SIGN_HASH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_SIGN_HASH</span></code></a></p></li> |
| 270 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_VERIFY</span></code> → <a class="reference internal" href="../api/keys/policy.html#c.PSA_KEY_USAGE_VERIFY_HASH" title="PSA_KEY_USAGE_VERIFY_HASH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_VERIFY_HASH</span></code></a></p></li> |
| 271 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_asymmetric_sign()</span></code> → <a class="reference internal" href="../api/ops/sign.html#c.psa_sign_hash" title="psa_sign_hash"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_sign_hash()</span></code></a></p></li> |
| 272 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_asymmetric_verify()</span></code> → <a class="reference internal" href="../api/ops/sign.html#c.psa_verify_hash" title="psa_verify_hash"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_verify_hash()</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 273 | </ul> |
| 274 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 275 | <li><p>New APIs added to provide the complete message signing operation:</p> |
| 276 | <ul> |
| 277 | <li><p><a class="reference internal" href="../api/keys/policy.html#c.PSA_KEY_USAGE_SIGN_MESSAGE" title="PSA_KEY_USAGE_SIGN_MESSAGE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_SIGN_MESSAGE</span></code></a></p></li> |
| 278 | <li><p><a class="reference internal" href="../api/keys/policy.html#c.PSA_KEY_USAGE_VERIFY_MESSAGE" title="PSA_KEY_USAGE_VERIFY_MESSAGE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_VERIFY_MESSAGE</span></code></a></p></li> |
| 279 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.psa_sign_message" title="psa_sign_message"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_sign_message()</span></code></a></p></li> |
| 280 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.psa_verify_message" title="psa_verify_message"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_verify_message()</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 281 | </ul> |
| 282 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 283 | <li><p>New Support macros to identify which algorithms can be used in which signing API:</p> |
| 284 | <ul> |
| 285 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_SIGN_HASH" title="PSA_ALG_IS_SIGN_HASH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_SIGN_HASH()</span></code></a></p></li> |
| 286 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_SIGN_MESSAGE" title="PSA_ALG_IS_SIGN_MESSAGE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_SIGN_MESSAGE()</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 287 | </ul> |
| 288 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 289 | <li><p>Renamed support macros that apply to both signing APIs:</p> |
| 290 | <ul> |
| 291 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ASYMMETRIC_SIGN_OUTPUT_SIZE()</span></code> → <a class="reference internal" href="../api/ops/sign.html#c.PSA_SIGN_OUTPUT_SIZE" title="PSA_SIGN_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_SIGN_OUTPUT_SIZE()</span></code></a></p></li> |
| 292 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ASYMMETRIC_SIGNATURE_MAX_SIZE</span></code> → <a class="reference internal" href="../api/ops/sign.html#c.PSA_SIGNATURE_MAX_SIZE" title="PSA_SIGNATURE_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_SIGNATURE_MAX_SIZE</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 293 | </ul> |
| 294 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 295 | <li><p>The usage flag values have been changed, including for <a class="reference internal" href="../api/keys/policy.html#c.PSA_KEY_USAGE_DERIVE" title="PSA_KEY_USAGE_DERIVE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_USAGE_DERIVE</span></code></a>.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 296 | </ul> |
| 297 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 298 | <li><p>Restructure <a class="reference internal" href="../api/keys/types.html#c.psa_key_type_t" title="psa_key_type_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_type_t</span></code></a> and reassign all key type values.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 299 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 300 | <li><p><a class="reference internal" href="../api/keys/types.html#c.psa_key_type_t" title="psa_key_type_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_type_t</span></code></a> changes from 32-bit to 16-bit integer.</p></li> |
| 301 | <li><p>Reassigned the key type categories.</p></li> |
| 302 | <li><p>Add a parity bit to the key type to ensure that valid key type values differ by at least 2 bits.</p></li> |
| 303 | <li><p>16-bit elliptic curve ids (<code class="docutils literal notranslate"><span class="pre">psa_ecc_curve_t</span></code>) replaced by 8-bit ECC curve family ids (<a class="reference internal" href="../api/keys/types.html#c.psa_ecc_family_t" title="psa_ecc_family_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_ecc_family_t</span></code></a>). |
| 304 | 16-bit Diffie-Hellman group ids (<code class="docutils literal notranslate"><span class="pre">psa_dh_group_t</span></code>) replaced by 8-bit DH group family ids (<a class="reference internal" href="../api/keys/types.html#c.psa_dh_family_t" title="psa_dh_family_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_dh_family_t</span></code></a>).</p> |
| 305 | <ul> |
| 306 | <li><p>These ids are no longer related to the IANA Group Registry specification.</p></li> |
| 307 | <li><p>The new key type values do not encode the key size for ECC curves or DH groups. The key bit size from the key attributes identify a specific ECC curve or DH group within the family.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 308 | </ul> |
| 309 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 310 | <li><p>The following macros have been removed:</p> |
| 311 | <ul> |
| 312 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_DH_GROUP_FFDHE2048</span></code></p></li> |
| 313 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_DH_GROUP_FFDHE3072</span></code></p></li> |
| 314 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_DH_GROUP_FFDHE4096</span></code></p></li> |
| 315 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_DH_GROUP_FFDHE6144</span></code></p></li> |
| 316 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_DH_GROUP_FFDHE8192</span></code></p></li> |
| 317 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_BITS</span></code></p></li> |
| 318 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_BRAINPOOL_P256R1</span></code></p></li> |
| 319 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_BRAINPOOL_P384R1</span></code></p></li> |
| 320 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_BRAINPOOL_P512R1</span></code></p></li> |
| 321 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_CURVE25519</span></code></p></li> |
| 322 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_CURVE448</span></code></p></li> |
| 323 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP160K1</span></code></p></li> |
| 324 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP160R1</span></code></p></li> |
| 325 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP160R2</span></code></p></li> |
| 326 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP192K1</span></code></p></li> |
| 327 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP192R1</span></code></p></li> |
| 328 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP224K1</span></code></p></li> |
| 329 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP224R1</span></code></p></li> |
| 330 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP256K1</span></code></p></li> |
| 331 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP256R1</span></code></p></li> |
| 332 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP384R1</span></code></p></li> |
| 333 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECP521R1</span></code></p></li> |
| 334 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT163K1</span></code></p></li> |
| 335 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT163R1</span></code></p></li> |
| 336 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT163R2</span></code></p></li> |
| 337 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT193R1</span></code></p></li> |
| 338 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT193R2</span></code></p></li> |
| 339 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT233K1</span></code></p></li> |
| 340 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT233R1</span></code></p></li> |
| 341 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT239K1</span></code></p></li> |
| 342 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT283K1</span></code></p></li> |
| 343 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT283R1</span></code></p></li> |
| 344 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT409K1</span></code></p></li> |
| 345 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT409R1</span></code></p></li> |
| 346 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT571K1</span></code></p></li> |
| 347 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ECC_CURVE_SECT571R1</span></code></p></li> |
| 348 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_GET_CURVE</span></code></p></li> |
| 349 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_GET_GROUP</span></code></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 350 | </ul> |
| 351 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 352 | <li><p>The following macros have been added:</p> |
| 353 | <ul> |
| 354 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_DH_FAMILY_RFC7919" title="PSA_DH_FAMILY_RFC7919"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_DH_FAMILY_RFC7919</span></code></a></p></li> |
| 355 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_BRAINPOOL_P_R1" title="PSA_ECC_FAMILY_BRAINPOOL_P_R1"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_BRAINPOOL_P_R1</span></code></a></p></li> |
| 356 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_SECP_K1" title="PSA_ECC_FAMILY_SECP_K1"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_SECP_K1</span></code></a></p></li> |
| 357 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_SECP_R1" title="PSA_ECC_FAMILY_SECP_R1"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_SECP_R1</span></code></a></p></li> |
| 358 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_SECP_R2" title="PSA_ECC_FAMILY_SECP_R2"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_SECP_R2</span></code></a></p></li> |
| 359 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_SECT_K1" title="PSA_ECC_FAMILY_SECT_K1"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_SECT_K1</span></code></a></p></li> |
| 360 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_SECT_R1" title="PSA_ECC_FAMILY_SECT_R1"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_SECT_R1</span></code></a></p></li> |
| 361 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_SECT_R2" title="PSA_ECC_FAMILY_SECT_R2"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_SECT_R2</span></code></a></p></li> |
| 362 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_MONTGOMERY" title="PSA_ECC_FAMILY_MONTGOMERY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_MONTGOMERY</span></code></a></p></li> |
| 363 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DH_GET_FAMILY" title="PSA_KEY_TYPE_DH_GET_FAMILY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DH_GET_FAMILY</span></code></a></p></li> |
| 364 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_ECC_GET_FAMILY" title="PSA_KEY_TYPE_ECC_GET_FAMILY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_ECC_GET_FAMILY</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 365 | </ul> |
| 366 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 367 | <li><p>The following macros have new values:</p> |
| 368 | <ul> |
| 369 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_AES" title="PSA_KEY_TYPE_AES"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_AES</span></code></a></p></li> |
| 370 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_ARC4" title="PSA_KEY_TYPE_ARC4"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_ARC4</span></code></a></p></li> |
| 371 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_CAMELLIA" title="PSA_KEY_TYPE_CAMELLIA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CAMELLIA</span></code></a></p></li> |
| 372 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_CHACHA20" title="PSA_KEY_TYPE_CHACHA20"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_CHACHA20</span></code></a></p></li> |
| 373 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DERIVE" title="PSA_KEY_TYPE_DERIVE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DERIVE</span></code></a></p></li> |
| 374 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DES" title="PSA_KEY_TYPE_DES"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DES</span></code></a></p></li> |
| 375 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_HMAC" title="PSA_KEY_TYPE_HMAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_HMAC</span></code></a></p></li> |
| 376 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_NONE" title="PSA_KEY_TYPE_NONE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_NONE</span></code></a></p></li> |
| 377 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_RAW_DATA" title="PSA_KEY_TYPE_RAW_DATA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_RAW_DATA</span></code></a></p></li> |
| 378 | <li><p><a class="reference internal" href="../api/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 notranslate"><span class="pre">PSA_KEY_TYPE_RSA_KEY_PAIR</span></code></a></p></li> |
| 379 | <li><p><a class="reference internal" href="../api/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 notranslate"><span class="pre">PSA_KEY_TYPE_RSA_PUBLIC_KEY</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 380 | </ul> |
| 381 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 382 | <li><p>The following macros with specification-defined values have new example implementations:</p> |
| 383 | <ul> |
| 384 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_BLOCK_CIPHER_BLOCK_LENGTH" title="PSA_BLOCK_CIPHER_BLOCK_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_BLOCK_CIPHER_BLOCK_LENGTH</span></code></a></p></li> |
| 385 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DH_KEY_PAIR" title="PSA_KEY_TYPE_DH_KEY_PAIR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DH_KEY_PAIR</span></code></a></p></li> |
| 386 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_DH_PUBLIC_KEY" title="PSA_KEY_TYPE_DH_PUBLIC_KEY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_DH_PUBLIC_KEY</span></code></a></p></li> |
| 387 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_ECC_KEY_PAIR" title="PSA_KEY_TYPE_ECC_KEY_PAIR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_ECC_KEY_PAIR</span></code></a></p></li> |
| 388 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_ECC_PUBLIC_KEY" title="PSA_KEY_TYPE_ECC_PUBLIC_KEY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_ECC_PUBLIC_KEY</span></code></a></p></li> |
| 389 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ASYMMETRIC" title="PSA_KEY_TYPE_IS_ASYMMETRIC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_ASYMMETRIC</span></code></a></p></li> |
| 390 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_DH" title="PSA_KEY_TYPE_IS_DH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_DH</span></code></a></p></li> |
| 391 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_DH_KEY_PAIR" title="PSA_KEY_TYPE_IS_DH_KEY_PAIR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_DH_KEY_PAIR</span></code></a></p></li> |
| 392 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_DH_PUBLIC_KEY" title="PSA_KEY_TYPE_IS_DH_PUBLIC_KEY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_DH_PUBLIC_KEY</span></code></a></p></li> |
| 393 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ECC" title="PSA_KEY_TYPE_IS_ECC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_ECC</span></code></a></p></li> |
| 394 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ECC_KEY_PAIR" title="PSA_KEY_TYPE_IS_ECC_KEY_PAIR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_ECC_KEY_PAIR</span></code></a></p></li> |
| 395 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY" title="PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY</span></code></a></p></li> |
| 396 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_KEY_PAIR" title="PSA_KEY_TYPE_IS_KEY_PAIR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_KEY_PAIR</span></code></a></p></li> |
| 397 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_PUBLIC_KEY" title="PSA_KEY_TYPE_IS_PUBLIC_KEY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_PUBLIC_KEY</span></code></a></p></li> |
| 398 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_RSA" title="PSA_KEY_TYPE_IS_RSA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_RSA</span></code></a></p></li> |
| 399 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_IS_UNSTRUCTURED" title="PSA_KEY_TYPE_IS_UNSTRUCTURED"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_IS_UNSTRUCTURED</span></code></a></p></li> |
| 400 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY" title="PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY</span></code></a></p></li> |
| 401 | <li><p><a class="reference internal" href="../api/keys/types.html#c.PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR" title="PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 402 | </ul> |
| 403 | </li> |
| 404 | </ul> |
| 405 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 406 | <li><p>Add ECC family <a class="reference internal" href="../api/keys/types.html#c.PSA_ECC_FAMILY_FRP" title="PSA_ECC_FAMILY_FRP"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ECC_FAMILY_FRP</span></code></a> for the FRP256v1 curve.</p></li> |
| 407 | <li><p>Restructure <a class="reference internal" href="../api/ops/algorithms.html#c.psa_algorithm_t" title="psa_algorithm_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_algorithm_t</span></code></a> encoding, to increase consistency across algorithm categories.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 408 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 409 | <li><p>Algorithms that include a hash operation all use the same structure to encode the hash algorithm. The following <code class="docutils literal notranslate"><span class="pre">PSA_ALG_XXXX_GET_HASH()</span></code> macros have all been replaced by a single macro <a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_GET_HASH" title="PSA_ALG_GET_HASH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_GET_HASH()</span></code></a>:</p> |
| 410 | <ul> |
| 411 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_HKDF_GET_HASH()</span></code></p></li> |
| 412 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_HMAC_GET_HASH()</span></code></p></li> |
| 413 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_RSA_OAEP_GET_HASH()</span></code></p></li> |
| 414 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_SIGN_GET_HASH()</span></code></p></li> |
| 415 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_TLS12_PRF_GET_HASH()</span></code></p></li> |
| 416 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ALG_TLS12_PSK_TO_MS_GET_HASH()</span></code></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 417 | </ul> |
| 418 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 419 | <li><p>Stream cipher algorithm macros have been removed; the key type indicates which cipher to use. Instead of <code class="docutils literal notranslate"><span class="pre">PSA_ALG_ARC4</span></code> and <code class="docutils literal notranslate"><span class="pre">PSA_ALG_CHACHA20</span></code>, use <a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_STREAM_CIPHER" title="PSA_ALG_STREAM_CIPHER"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_STREAM_CIPHER</span></code></a>.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 420 | </ul> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 421 | <p>All of the other <code class="docutils literal notranslate"><span class="pre">PSA_ALG_XXX</span></code> macros have updated values or updated example implementations.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 422 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 423 | <li><p>The following macros have new values:</p> |
| 424 | <ul> |
| 425 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_ANY_HASH" title="PSA_ALG_ANY_HASH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_ANY_HASH</span></code></a></p></li> |
| 426 | <li><p><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_CBC_MAC" title="PSA_ALG_CBC_MAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CBC_MAC</span></code></a></p></li> |
| 427 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_CBC_NO_PADDING" title="PSA_ALG_CBC_NO_PADDING"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CBC_NO_PADDING</span></code></a></p></li> |
| 428 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_CBC_PKCS7" title="PSA_ALG_CBC_PKCS7"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CBC_PKCS7</span></code></a></p></li> |
| 429 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_CCM" title="PSA_ALG_CCM"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CCM</span></code></a></p></li> |
| 430 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_CFB" title="PSA_ALG_CFB"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CFB</span></code></a></p></li> |
| 431 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_CHACHA20_POLY1305" title="PSA_ALG_CHACHA20_POLY1305"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CHACHA20_POLY1305</span></code></a></p></li> |
| 432 | <li><p><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_CMAC" title="PSA_ALG_CMAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CMAC</span></code></a></p></li> |
| 433 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_CTR" title="PSA_ALG_CTR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_CTR</span></code></a></p></li> |
| 434 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_ECDH" title="PSA_ALG_ECDH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_ECDH</span></code></a></p></li> |
| 435 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_ECDSA_ANY" title="PSA_ALG_ECDSA_ANY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_ECDSA_ANY</span></code></a></p></li> |
| 436 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_FFDH" title="PSA_ALG_FFDH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_FFDH</span></code></a></p></li> |
| 437 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_GCM" title="PSA_ALG_GCM"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_GCM</span></code></a></p></li> |
| 438 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD2" title="PSA_ALG_MD2"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_MD2</span></code></a></p></li> |
| 439 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD4" title="PSA_ALG_MD4"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_MD4</span></code></a></p></li> |
| 440 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_MD5" title="PSA_ALG_MD5"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_MD5</span></code></a></p></li> |
| 441 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_OFB" title="PSA_ALG_OFB"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_OFB</span></code></a></p></li> |
| 442 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_RIPEMD160" title="PSA_ALG_RIPEMD160"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_RIPEMD160</span></code></a></p></li> |
| 443 | <li><p><a class="reference internal" href="../api/ops/pke.html#c.PSA_ALG_RSA_PKCS1V15_CRYPT" title="PSA_ALG_RSA_PKCS1V15_CRYPT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_RSA_PKCS1V15_CRYPT</span></code></a></p></li> |
| 444 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_RSA_PKCS1V15_SIGN_RAW" title="PSA_ALG_RSA_PKCS1V15_SIGN_RAW"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_RSA_PKCS1V15_SIGN_RAW</span></code></a></p></li> |
| 445 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_1" title="PSA_ALG_SHA_1"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA_1</span></code></a></p></li> |
| 446 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_224" title="PSA_ALG_SHA_224"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA_224</span></code></a></p></li> |
| 447 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_256" title="PSA_ALG_SHA_256"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA_256</span></code></a></p></li> |
| 448 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_384" title="PSA_ALG_SHA_384"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA_384</span></code></a></p></li> |
| 449 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_512" title="PSA_ALG_SHA_512"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA_512</span></code></a></p></li> |
| 450 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_512_224" title="PSA_ALG_SHA_512_224"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA_512_224</span></code></a></p></li> |
| 451 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA_512_256" title="PSA_ALG_SHA_512_256"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA_512_256</span></code></a></p></li> |
| 452 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA3_224" title="PSA_ALG_SHA3_224"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA3_224</span></code></a></p></li> |
| 453 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA3_256" title="PSA_ALG_SHA3_256"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA3_256</span></code></a></p></li> |
| 454 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA3_384" title="PSA_ALG_SHA3_384"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA3_384</span></code></a></p></li> |
| 455 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_ALG_SHA3_512" title="PSA_ALG_SHA3_512"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_SHA3_512</span></code></a></p></li> |
| 456 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_XTS" title="PSA_ALG_XTS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_XTS</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 457 | </ul> |
| 458 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 459 | <li><p>The following macros with specification-defined values have new example implementations:</p> |
| 460 | <ul> |
| 461 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG" title="PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG()</span></code></a></p></li> |
| 462 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_AEAD_WITH_SHORTENED_TAG" title="PSA_ALG_AEAD_WITH_SHORTENED_TAG"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_AEAD_WITH_SHORTENED_TAG()</span></code></a></p></li> |
| 463 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_DETERMINISTIC_ECDSA" title="PSA_ALG_DETERMINISTIC_ECDSA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_DETERMINISTIC_ECDSA()</span></code></a></p></li> |
| 464 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_ECDSA" title="PSA_ALG_ECDSA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_ECDSA()</span></code></a></p></li> |
| 465 | <li><p><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_FULL_LENGTH_MAC" title="PSA_ALG_FULL_LENGTH_MAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_FULL_LENGTH_MAC()</span></code></a></p></li> |
| 466 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_HKDF" title="PSA_ALG_HKDF"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_HKDF()</span></code></a></p></li> |
| 467 | <li><p><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_HMAC" title="PSA_ALG_HMAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_HMAC()</span></code></a></p></li> |
| 468 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_AEAD" title="PSA_ALG_IS_AEAD"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_AEAD()</span></code></a></p></li> |
| 469 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER" title="PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER()</span></code></a></p></li> |
| 470 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_ASYMMETRIC_ENCRYPTION" title="PSA_ALG_IS_ASYMMETRIC_ENCRYPTION"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_ASYMMETRIC_ENCRYPTION()</span></code></a></p></li> |
| 471 | <li><p><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_IS_BLOCK_CIPHER_MAC" title="PSA_ALG_IS_BLOCK_CIPHER_MAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_BLOCK_CIPHER_MAC()</span></code></a></p></li> |
| 472 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_CIPHER" title="PSA_ALG_IS_CIPHER"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_CIPHER()</span></code></a></p></li> |
| 473 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_DETERMINISTIC_ECDSA" title="PSA_ALG_IS_DETERMINISTIC_ECDSA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_DETERMINISTIC_ECDSA()</span></code></a></p></li> |
| 474 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_IS_ECDH" title="PSA_ALG_IS_ECDH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_ECDH()</span></code></a></p></li> |
| 475 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_ECDSA" title="PSA_ALG_IS_ECDSA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_ECDSA()</span></code></a></p></li> |
| 476 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_IS_FFDH" title="PSA_ALG_IS_FFDH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_FFDH()</span></code></a></p></li> |
| 477 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_HASH" title="PSA_ALG_IS_HASH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_HASH()</span></code></a></p></li> |
| 478 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_HASH_AND_SIGN" title="PSA_ALG_IS_HASH_AND_SIGN"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_HASH_AND_SIGN()</span></code></a></p></li> |
| 479 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_IS_HKDF" title="PSA_ALG_IS_HKDF"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_HKDF()</span></code></a></p></li> |
| 480 | <li><p><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_IS_HMAC" title="PSA_ALG_IS_HMAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_HMAC()</span></code></a></p></li> |
| 481 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_KEY_AGREEMENT" title="PSA_ALG_IS_KEY_AGREEMENT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_KEY_AGREEMENT()</span></code></a></p></li> |
| 482 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_KEY_DERIVATION" title="PSA_ALG_IS_KEY_DERIVATION"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_KEY_DERIVATION()</span></code></a></p></li> |
| 483 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_MAC" title="PSA_ALG_IS_MAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_MAC()</span></code></a></p></li> |
| 484 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RANDOMIZED_ECDSA" title="PSA_ALG_IS_RANDOMIZED_ECDSA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_RANDOMIZED_ECDSA()</span></code></a></p></li> |
| 485 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_IS_RAW_KEY_AGREEMENT" title="PSA_ALG_IS_RAW_KEY_AGREEMENT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_RAW_KEY_AGREEMENT()</span></code></a></p></li> |
| 486 | <li><p><a class="reference internal" href="../api/ops/pke.html#c.PSA_ALG_IS_RSA_OAEP" title="PSA_ALG_IS_RSA_OAEP"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_RSA_OAEP()</span></code></a></p></li> |
| 487 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RSA_PKCS1V15_SIGN" title="PSA_ALG_IS_RSA_PKCS1V15_SIGN"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_RSA_PKCS1V15_SIGN()</span></code></a></p></li> |
| 488 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_RSA_PSS" title="PSA_ALG_IS_RSA_PSS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_RSA_PSS()</span></code></a></p></li> |
| 489 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_SIGN" title="PSA_ALG_IS_SIGN"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_SIGN()</span></code></a></p></li> |
| 490 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_IS_SIGN_MESSAGE" title="PSA_ALG_IS_SIGN_MESSAGE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_SIGN_MESSAGE()</span></code></a></p></li> |
| 491 | <li><p><a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_IS_STREAM_CIPHER" title="PSA_ALG_IS_STREAM_CIPHER"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_STREAM_CIPHER()</span></code></a></p></li> |
| 492 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_IS_TLS12_PRF" title="PSA_ALG_IS_TLS12_PRF"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_TLS12_PRF()</span></code></a></p></li> |
| 493 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_IS_TLS12_PSK_TO_MS" title="PSA_ALG_IS_TLS12_PSK_TO_MS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_TLS12_PSK_TO_MS()</span></code></a></p></li> |
| 494 | <li><p><a class="reference internal" href="../api/ops/algorithms.html#c.PSA_ALG_IS_WILDCARD" title="PSA_ALG_IS_WILDCARD"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_IS_WILDCARD()</span></code></a></p></li> |
| 495 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_KEY_AGREEMENT" title="PSA_ALG_KEY_AGREEMENT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_KEY_AGREEMENT()</span></code></a></p></li> |
| 496 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_KEY_AGREEMENT_GET_BASE" title="PSA_ALG_KEY_AGREEMENT_GET_BASE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_KEY_AGREEMENT_GET_BASE()</span></code></a></p></li> |
| 497 | <li><p><a class="reference internal" href="../api/ops/ka.html#c.PSA_ALG_KEY_AGREEMENT_GET_KDF" title="PSA_ALG_KEY_AGREEMENT_GET_KDF"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_KEY_AGREEMENT_GET_KDF()</span></code></a></p></li> |
| 498 | <li><p><a class="reference internal" href="../api/ops/pke.html#c.PSA_ALG_RSA_OAEP" title="PSA_ALG_RSA_OAEP"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_RSA_OAEP()</span></code></a></p></li> |
| 499 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_RSA_PKCS1V15_SIGN" title="PSA_ALG_RSA_PKCS1V15_SIGN"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_RSA_PKCS1V15_SIGN()</span></code></a></p></li> |
| 500 | <li><p><a class="reference internal" href="../api/ops/sign.html#c.PSA_ALG_RSA_PSS" title="PSA_ALG_RSA_PSS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_RSA_PSS()</span></code></a></p></li> |
| 501 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_TLS12_PRF" title="PSA_ALG_TLS12_PRF"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_TLS12_PRF()</span></code></a></p></li> |
| 502 | <li><p><a class="reference internal" href="../api/ops/kdf.html#c.PSA_ALG_TLS12_PSK_TO_MS" title="PSA_ALG_TLS12_PSK_TO_MS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_TLS12_PSK_TO_MS()</span></code></a></p></li> |
| 503 | <li><p><a class="reference internal" href="../api/ops/macs.html#c.PSA_ALG_TRUNCATED_MAC" title="PSA_ALG_TRUNCATED_MAC"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_TRUNCATED_MAC()</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 504 | </ul> |
| 505 | </li> |
| 506 | </ul> |
| 507 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 508 | <li><p>Added ECB block cipher mode, with no padding, as <a class="reference internal" href="../api/ops/ciphers.html#c.PSA_ALG_ECB_NO_PADDING" title="PSA_ALG_ECB_NO_PADDING"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_ECB_NO_PADDING</span></code></a>.</p></li> |
| 509 | <li><p>Add functions to suspend and resume hash operations:</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 510 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 511 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.psa_hash_suspend" title="psa_hash_suspend"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_hash_suspend()</span></code></a> halts the current operation and outputs a hash suspend state.</p></li> |
| 512 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.psa_hash_resume" title="psa_hash_resume"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_hash_resume()</span></code></a> continues a previously suspended hash operation.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 513 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 514 | <p>The format of the hash suspend state is documented in <a class="reference internal" href="../api/ops/hashes.html#hash-suspend-state"><span class="secref">Hash suspend state</span></a>, and supporting macros are provided for using this API:</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 515 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 516 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_OUTPUT_SIZE" title="PSA_HASH_SUSPEND_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_HASH_SUSPEND_OUTPUT_SIZE()</span></code></a></p></li> |
| 517 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_OUTPUT_MAX_SIZE" title="PSA_HASH_SUSPEND_OUTPUT_MAX_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_HASH_SUSPEND_OUTPUT_MAX_SIZE</span></code></a></p></li> |
| 518 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_ALGORITHM_FIELD_LENGTH" title="PSA_HASH_SUSPEND_ALGORITHM_FIELD_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_HASH_SUSPEND_ALGORITHM_FIELD_LENGTH</span></code></a></p></li> |
| 519 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH" title="PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_HASH_SUSPEND_INPUT_LENGTH_FIELD_LENGTH()</span></code></a></p></li> |
| 520 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH" title="PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_HASH_SUSPEND_HASH_STATE_FIELD_LENGTH()</span></code></a></p></li> |
| 521 | <li><p><a class="reference internal" href="../api/ops/hashes.html#c.PSA_HASH_BLOCK_LENGTH" title="PSA_HASH_BLOCK_LENGTH"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_HASH_BLOCK_LENGTH()</span></code></a></p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 522 | </ul> |
| 523 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 524 | <li><p>Complement <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code></a> with new error codes <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code></a> and <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_DATA_INVALID" title="PSA_ERROR_DATA_INVALID"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_INVALID</span></code></a>. These permit an implementation to distinguish different causes of failure when reading from key storage.</p></li> |
| 525 | <li><p>Added input step <a class="reference internal" href="../api/ops/kdf.html#c.PSA_KEY_DERIVATION_INPUT_CONTEXT" title="PSA_KEY_DERIVATION_INPUT_CONTEXT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_DERIVATION_INPUT_CONTEXT</span></code></a> for key derivation, supporting obvious mapping from the step identifiers to common KDF constructions.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 526 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 527 | </div> |
| 528 | <div class="section" id="clarifications"> |
| 529 | <h4>Clarifications</h4> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 530 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 531 | <li><p>Clarified rules regarding modification of parameters in concurrent environments.</p></li> |
| 532 | <li><p>Guarantee that <a class="reference internal" href="../api/keys/management.html#c.psa_destroy_key" title="psa_destroy_key"><code class="docutils literal notranslate"><span class="pre">psa_destroy_key</span></code></a><code class="docutils literal notranslate"><span class="pre">(</span></code><a class="reference internal" href="../api/keys/ids.html#c.PSA_KEY_ID_NULL" title="PSA_KEY_ID_NULL"><code class="docutils literal notranslate"><span class="pre">PSA_KEY_ID_NULL</span></code></a><code class="docutils literal notranslate"><span class="pre">)</span></code> always returns <a class="reference internal" href="../api/library/status.html#c.PSA_SUCCESS" title="PSA_SUCCESS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_SUCCESS</span></code></a>.</p></li> |
| 533 | <li><p>Clarified the TLS PSK to MS key agreement algorithm.</p></li> |
| 534 | <li><p>Document the key policy requirements for all APIs that accept a key parameter.</p></li> |
| 535 | <li><p>Document more of the error codes for each function.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 536 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 537 | </div> |
| 538 | <div class="section" id="id3"> |
| 539 | <h4>Other changes</h4> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 540 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 541 | <li><p>Require C99 for this specification instead of C89.</p></li> |
| 542 | <li><p>Removed references to non-standard mbed-crypto header files. The only header file that applications need to include is <code class="file docutils literal notranslate"><span class="pre">psa/crypto.h</span></code>.</p></li> |
| 543 | <li><p>Reorganized the API reference, grouping the elements in a more natural way.</p></li> |
| 544 | <li><p>Improved the cross referencing between all of the document sections, and from code snippets to API element descriptions.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 545 | </ul> |
| 546 | </div> |
| 547 | </div> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 548 | <div class="section" id="changes-between-1-0-beta-2-and-1-0-beta-3"> |
| 549 | <h3>Changes between <em>1.0 beta 2</em> and <em>1.0 beta 3</em></h3> |
| 550 | <div class="section" id="id4"> |
| 551 | <h4>Changes to the API</h4> |
| 552 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 553 | <li><p>Change the value of error codes, and some names, to align |
| 554 | with other PSA specifications. The name changes are:</p> |
| 555 | <ul> |
| 556 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_UNKNOWN_ERROR</span></code> → <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_GENERIC_ERROR" title="PSA_ERROR_GENERIC_ERROR"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_GENERIC_ERROR</span></code></a></p></li> |
| 557 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_OCCUPIED_SLOT</span></code> → <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_ALREADY_EXISTS" title="PSA_ERROR_ALREADY_EXISTS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_ALREADY_EXISTS</span></code></a></p></li> |
| 558 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_EMPTY_SLOT</span></code> → <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_DOES_NOT_EXIST" title="PSA_ERROR_DOES_NOT_EXIST"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DOES_NOT_EXIST</span></code></a></p></li> |
| 559 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_CAPACITY</span></code> → <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_INSUFFICIENT_DATA" title="PSA_ERROR_INSUFFICIENT_DATA"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_DATA</span></code></a></p></li> |
| 560 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_TAMPERING_DETECTED</span></code> → <a class="reference internal" href="../api/library/status.html#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code></a></p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 561 | </ul> |
| 562 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 563 | <li><p>Change the way keys are created to avoid “half-filled” handles |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 564 | that contained key metadata, but no key material. |
| 565 | Now, to create a key, first fill in a data structure containing |
| 566 | its attributes, then pass this structure to a function that |
| 567 | both allocates resources for the key and fills in the key |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 568 | material. This affects the following functions:</p> |
| 569 | <ul> |
| 570 | <li><p><a class="reference internal" href="../api/keys/management.html#c.psa_import_key" title="psa_import_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_import_key()</span></code></a>, <a class="reference internal" href="../api/keys/management.html#c.psa_generate_key" title="psa_generate_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_generate_key()</span></code></a>, <code class="docutils literal notranslate"><span class="pre">psa_generator_import_key()</span></code> |
| 571 | and <a class="reference internal" href="../api/keys/management.html#c.psa_copy_key" title="psa_copy_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_copy_key()</span></code></a> now take an attribute structure, as |
| 572 | a pointer to <a class="reference internal" href="../api/keys/attributes.html#c.psa_key_attributes_t" title="psa_key_attributes_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_attributes_t</span></code></a>, to specify key metadata. |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 573 | This replaces the previous method of passing arguments to |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 574 | <code class="docutils literal notranslate"><span class="pre">psa_create_key()</span></code> or to the key material creation function |
| 575 | or calling <code class="docutils literal notranslate"><span class="pre">psa_set_key_policy()</span></code>.</p></li> |
| 576 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_key_policy_t</span></code> and functions operating on that type |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 577 | no longer exist. A key’s policy is now accessible as part of |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 578 | its attributes.</p></li> |
| 579 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_get_key_information()</span></code> is also replaced by accessing the |
| 580 | key’s attributes, retrieved with <a class="reference internal" href="../api/keys/attributes.html#c.psa_get_key_attributes" title="psa_get_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_get_key_attributes()</span></code></a>.</p></li> |
| 581 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_create_key()</span></code> no longer exists. Instead, set the key id |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 582 | attribute and the lifetime attribute before creating the |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 583 | key material.</p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 584 | </ul> |
| 585 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 586 | <li><p>Allow <a class="reference internal" href="../api/ops/aead.html#c.psa_aead_update" title="psa_aead_update"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_aead_update()</span></code></a> to buffer data.</p></li> |
| 587 | <li><p>New buffer size calculation macros.</p></li> |
| 588 | <li><p>Key identifiers are no longer specific to a given lifetime value. <code class="docutils literal notranslate"><span class="pre">psa_open_key()</span></code> no longer takes a <code class="docutils literal notranslate"><span class="pre">lifetime</span></code> parameter.</p></li> |
| 589 | <li><p>Define a range of key identifiers for use by applications and a separate range for use by implementations.</p></li> |
| 590 | <li><p>Avoid the unusual terminology “generator”: call them |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 591 | “key derivation operations” instead. Rename a number of functions |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 592 | and other identifiers related to for clarity and consistency:</p> |
| 593 | <ul> |
| 594 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_crypto_generator_t</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_operation_t" title="psa_key_derivation_operation_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_derivation_operation_t</span></code></a></p></li> |
| 595 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_CRYPTO_GENERATOR_INIT</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.PSA_KEY_DERIVATION_OPERATION_INIT" title="PSA_KEY_DERIVATION_OPERATION_INIT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_DERIVATION_OPERATION_INIT</span></code></a></p></li> |
| 596 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_crypto_generator_init()</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_operation_init" title="psa_key_derivation_operation_init"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_operation_init()</span></code></a></p></li> |
| 597 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_GENERATOR_UNBRIDLED_CAPACITY</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.PSA_KEY_DERIVATION_UNLIMITED_CAPACITY" title="PSA_KEY_DERIVATION_UNLIMITED_CAPACITY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_DERIVATION_UNLIMITED_CAPACITY</span></code></a></p></li> |
| 598 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_set_generator_capacity()</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_set_capacity" title="psa_key_derivation_set_capacity"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_set_capacity()</span></code></a></p></li> |
| 599 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_get_generator_capacity()</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_get_capacity" title="psa_key_derivation_get_capacity"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_get_capacity()</span></code></a></p></li> |
| 600 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_key_agreement()</span></code> → <a class="reference internal" href="../api/ops/ka.html#c.psa_key_derivation_key_agreement" title="psa_key_derivation_key_agreement"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_key_agreement()</span></code></a></p></li> |
| 601 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_generator_read()</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_output_bytes" title="psa_key_derivation_output_bytes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_output_bytes()</span></code></a></p></li> |
| 602 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_generate_derived_key()</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_output_key" title="psa_key_derivation_output_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_output_key()</span></code></a></p></li> |
| 603 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_generator_abort()</span></code> → <a class="reference internal" href="../api/ops/kdf.html#c.psa_key_derivation_abort" title="psa_key_derivation_abort"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_abort()</span></code></a></p></li> |
| 604 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_key_agreement_raw_shared_secret()</span></code> → <a class="reference internal" href="../api/ops/ka.html#c.psa_raw_key_agreement" title="psa_raw_key_agreement"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_raw_key_agreement()</span></code></a></p></li> |
| 605 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_KDF_STEP_xxx</span></code> → <code class="docutils literal notranslate"><span class="pre">PSA_KEY_DERIVATION_INPUT_xxx</span></code></p></li> |
| 606 | <li><p><code class="docutils literal notranslate"><span class="pre">PSA_xxx_KEYPAIR</span></code> → <code class="docutils literal notranslate"><span class="pre">PSA_xxx_KEY_PAIR</span></code></p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 607 | </ul> |
| 608 | </li> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 609 | <li><p>Convert TLS1.2 KDF descriptions to multi-part key derivation.</p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 610 | </ul> |
| 611 | </div> |
| 612 | <div class="section" id="id5"> |
| 613 | <h4>Clarifications</h4> |
| 614 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 615 | <li><p>Specify <code class="docutils literal notranslate"><span class="pre">psa_generator_import_key()</span></code> for most key types.</p></li> |
| 616 | <li><p>Clarify the behavior in various corner cases.</p></li> |
| 617 | <li><p>Document more error conditions.</p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 618 | </ul> |
| 619 | </div> |
| 620 | </div> |
| 621 | <div class="section" id="changes-between-1-0-beta-1-and-1-0-beta-2"> |
| 622 | <h3>Changes between <em>1.0 beta 1</em> and <em>1.0 beta 2</em></h3> |
| 623 | <div class="section" id="id6"> |
| 624 | <h4>Changes to the API</h4> |
| 625 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 626 | <li><p>Remove obsolete definition <code class="docutils literal notranslate"><span class="pre">PSA_ALG_IS_KEY_SELECTION</span></code>.</p></li> |
| 627 | <li><p><a class="reference internal" href="../api/ops/aead.html#c.PSA_AEAD_FINISH_OUTPUT_SIZE" title="PSA_AEAD_FINISH_OUTPUT_SIZE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_AEAD_FINISH_OUTPUT_SIZE</span></code></a>: remove spurious parameter <code class="docutils literal notranslate"><span class="pre">plaintext_length</span></code>.</p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 628 | </ul> |
| 629 | </div> |
| 630 | <div class="section" id="id7"> |
| 631 | <h4>Clarifications</h4> |
| 632 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 633 | <li><p><code class="docutils literal notranslate"><span class="pre">psa_key_agreement()</span></code>: document <code class="docutils literal notranslate"><span class="pre">alg</span></code> parameter.</p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 634 | </ul> |
| 635 | </div> |
| 636 | <div class="section" id="id8"> |
| 637 | <h4>Other changes</h4> |
| 638 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 639 | <li><p>Document formatting improvements.</p></li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 640 | </ul> |
| 641 | </div> |
| 642 | </div> |
| 643 | </div> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 644 | <div class="section" id="planned-changes-for-version-1-0-x"> |
| 645 | <h2>Planned changes for version 1.0.x</h2> |
| 646 | <p>Future versions of this specification that use a 1.0.x version will describe the same API as this specification. Any changes will not affect application compatibility and will not introduce major features. These updates are intended to add minor requirements on implementations, introduce optional definitions, make corrections, clarify potential or actual ambiguities, or improve the documentation.</p> |
| 647 | <p>These are the changes that we are currently planning to make for version 1.0.x:</p> |
| 648 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 649 | <li><p>Declare identifiers for additional cryptographic algorithms.</p></li> |
| 650 | <li><p>Mandate certain checks when importing some types of asymmetric keys.</p></li> |
| 651 | <li><p>Specify the computation of algorithm and key type values.</p></li> |
| 652 | <li><p>Further clarifications on API usage and implementation.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 653 | </ul> |
| 654 | </div> |
| 655 | <div class="section" id="future-additions"> |
| 656 | <span id="future"></span><h2>Future additions</h2> |
| 657 | <p>Major additions to the API will be defined in future drafts and editions of a 1.x or 2.x version of this specification. Features that are being considered include:</p> |
| 658 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 659 | <li><p>Multi-part operations for hybrid cryptography. For example, this includes |
| 660 | hash-and-sign for EdDSA, and hybrid encryption for ECIES.</p></li> |
| 661 | <li><p>A more general interface to key derivation and key exchange. This would |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 662 | enable an application to derive a non-extractable session key from |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 663 | non-extractable secrets, without leaking the intermediate material.</p></li> |
| 664 | <li><p>Key wrapping mechanisms to extract and import keys in an encrypted and authenticated form.</p></li> |
| 665 | <li><p>Key discovery mechanisms. This would enable an application to locate a key by |
| 666 | its name or attributes.</p></li> |
| 667 | <li><p>Implementation capability description. This would enable an application to |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 668 | determine the algorithms, key types and storage lifetimes that the |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 669 | implementation provides.</p></li> |
| 670 | <li><p>An ownership and access control mechanism allowing a multi-client |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 671 | implementation to have privileged clients that are able to manage keys of |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 672 | other clients.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 673 | </ul> |
| 674 | </div> |
| 675 | </div> |
| 676 | |
| 677 | |
| 678 | </div> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 679 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 680 | </div> |
| 681 | </div> |
| 682 | <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 683 | <div class="sphinxsidebarwrapper"><h3><a href="../index.html"><b>PSA Crypto API</b></a></h3> |
| 684 | IHI 0086<br/> |
| 685 | Non-confidential<br/> |
| 686 | Version 1.0.1 |
| 687 | <span style="color: red; font-weight: bold;"></span> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 688 | <ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 689 | <li class="toctree-l1"><a class="reference internal" href="../about.html">About this document</a></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 690 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 691 | <ul> |
| 692 | <li class="toctree-l1"><a class="reference internal" href="../overview/intro.html">1. Introduction</a></li> |
| 693 | <li class="toctree-l1"><a class="reference internal" href="../overview/goals.html">2. Design goals</a></li> |
| 694 | <li class="toctree-l1"><a class="reference internal" href="../overview/functionality.html">3. Functionality overview</a></li> |
| 695 | <li class="toctree-l1"><a class="reference internal" href="../overview/sample-arch.html">4. Sample architectures</a></li> |
| 696 | <li class="toctree-l1"><a class="reference internal" href="../overview/conventions.html">5. Library conventions</a></li> |
| 697 | <li class="toctree-l1"><a class="reference internal" href="../overview/implementation.html">6. Implementation considerations</a></li> |
| 698 | <li class="toctree-l1"><a class="reference internal" href="../overview/usage.html">7. Usage considerations</a></li> |
| 699 | <li class="toctree-l1"><a class="reference internal" href="../api/library/index.html">8. Library management reference</a></li> |
| 700 | <li class="toctree-l1"><a class="reference internal" href="../api/keys/index.html">9. Key management reference</a></li> |
| 701 | <li class="toctree-l1"><a class="reference internal" href="../api/ops/index.html">10. Cryptographic operation reference</a></li> |
| 702 | </ul> |
| 703 | <ul class="current"> |
| 704 | <li class="toctree-l1"><a class="reference internal" href="example_header.html">Example header file</a></li> |
| 705 | <li class="toctree-l1"><a class="reference internal" href="specdef_values.html">Example macro implementations</a></li> |
| 706 | <li class="toctree-l1 current"><a class="current reference internal" href="#">Changes to the API</a><ul> |
| 707 | <li class="toctree-l2"><a class="reference internal" href="#document-change-history">Document change history</a><ul> |
| 708 | <li class="toctree-l3"><a class="reference internal" href="#changes-between-1-0-0-and-1-0-1">Changes between <em>1.0.0</em> and <em>1.0.1</em></a></li> |
| 709 | <li class="toctree-l3"><a class="reference internal" href="#changes-between-1-0-beta-3-and-1-0-0">Changes between <em>1.0 beta 3</em> and <em>1.0.0</em></a></li> |
| 710 | <li class="toctree-l3"><a class="reference internal" href="#changes-between-1-0-beta-2-and-1-0-beta-3">Changes between <em>1.0 beta 2</em> and <em>1.0 beta 3</em></a></li> |
| 711 | <li class="toctree-l3"><a class="reference internal" href="#changes-between-1-0-beta-1-and-1-0-beta-2">Changes between <em>1.0 beta 1</em> and <em>1.0 beta 2</em></a></li> |
| 712 | </ul> |
| 713 | </li> |
| 714 | <li class="toctree-l2"><a class="reference internal" href="#planned-changes-for-version-1-0-x">Planned changes for version 1.0.x</a></li> |
| 715 | <li class="toctree-l2"><a class="reference internal" href="#future-additions">Future additions</a></li> |
| 716 | </ul> |
| 717 | </li> |
| 718 | </ul> |
| 719 | <ul> |
| 720 | <li class="toctree-l1"><a class="reference internal" href="../psa_c-identifiers.html">Index of API elements</a></li> |
| 721 | </ul> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 722 | <div id="searchbox" style="display: none" role="search"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 723 | <h3 id="searchlabel">Quick search</h3> |
| 724 | <div class="searchformwrapper"> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 725 | <form class="search" action="../search.html" method="get"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 726 | <input type="text" name="q" aria-labelledby="searchlabel" /> |
| 727 | <input type="submit" value="Go" /> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 728 | </form> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 729 | </div> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 730 | </div> |
| 731 | <script type="text/javascript">$('#searchbox').show(0);</script> |
| 732 | </div> |
| 733 | </div> |
| 734 | <div class="clearer"></div> |
| 735 | </div> |
| 736 | <div class="footer"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 737 | © 2018-2020, Arm Limited or its affiliates. All rights reserved. |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 738 | |
| 739 | | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame^] | 740 | Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a> |
| 741 | & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 742 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 743 | </div> |
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | </body> |
| 749 | </html> |