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>4. Sample architectures — 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" /> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 18 | <link rel="next" title="5. Library conventions" href="conventions.html" /> |
| 19 | <link rel="prev" title="3. Functionality overview" href="functionality.html" /> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 20 | |
| 21 | <link rel="stylesheet" href="../_static/custom.css" type="text/css" /> |
| 22 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 23 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 24 | <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> |
| 25 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 26 | </head><body> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 27 | |
| 28 | |
| 29 | <div class="document"> |
| 30 | <div class="documentwrapper"> |
| 31 | <div class="bodywrapper"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 32 | |
| 33 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 34 | <div class="body" role="main"> |
| 35 | |
| 36 | <div class="section" id="sample-architectures"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 37 | <span id="architectures"></span><h1>4. Sample architectures</h1> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 38 | <p>This section describes some example architectures that can be used for |
| 39 | implementations of the interface described in this specification. This list is |
| 40 | not exhaustive and the section is entirely non-normative.</p> |
| 41 | <div class="section" id="single-partition-architecture"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 42 | <h2>4.1. Single-partition architecture</h2> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 43 | <p>In the single-partition architecture, there is no security boundary inside the system. The |
| 44 | application code can access all the system memory, including the memory used by |
| 45 | the cryptographic services described in this specification. Thus, the |
| 46 | architecture provides <a class="reference internal" href="goals.html#isolation"><span class="std std-ref">no isolation</span></a>.</p> |
| 47 | <p>This architecture does not conform to the Arm <em>Platform Security Architecture |
| 48 | Security Model</em>. However, it is useful for providing cryptographic services |
| 49 | that use the same interface, even on devices that cannot support any security |
| 50 | boundary. So, while this architecture is not the primary design goal of the API |
| 51 | defined in the present specification, it is supported.</p> |
| 52 | <p>The functions in this specification simply execute the underlying algorithmic |
| 53 | code. Security checks can be kept to a minimum, since the cryptoprocessor cannot |
| 54 | defend against a malicious application. Key import and export copy data inside |
| 55 | the same memory space.</p> |
| 56 | <p>This architecture also describes a subset of some larger systems, where the |
| 57 | cryptographic services are implemented inside a high-security partition, |
| 58 | separate from the code of the main application, though it shares this |
| 59 | high-security partition with other platform security services.</p> |
| 60 | </div> |
| 61 | <div class="section" id="cryptographic-token-and-single-application-processor"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 62 | <span id="isolated-cryptoprocessor"></span><h2>4.2. Cryptographic token and single-application processor</h2> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 63 | <p>This system is composed of two partitions: one is a cryptoprocessor and the |
| 64 | other partition runs an application. There is a security boundary between the |
| 65 | two partitions, so that the application cannot access the cryptoprocessor, |
| 66 | except through its public interface. Thus, the architecture provides |
| 67 | <a class="reference internal" href="goals.html#isolation"><span class="std std-ref">cryptoprocessor isolation</span></a>. The cryptoprocessor has |
| 68 | some non-volatile storage, a TRNG, and possibly, some cryptographic accelerators.</p> |
| 69 | <p>There are a number of potential physical realizations: the cryptoprocessor might |
| 70 | be a separate chip, a separate processor on the same chip, or a logical |
| 71 | partition using a combination of hardware and software to provide the isolation. |
| 72 | These realizations are functionally equivalent in terms of the offered software |
| 73 | interface, but they would typically offer different levels of security |
| 74 | guarantees.</p> |
| 75 | <p>The PSA crypto API in the application processor consists of a thin layer of code |
| 76 | that translates function calls to remote procedure calls in the cryptoprocessor. |
| 77 | All cryptographic computations are, therefore, performed inside the |
| 78 | cryptoprocessor. Non-volatile keys are stored inside the cryptoprocessor.</p> |
| 79 | </div> |
| 80 | <div class="section" id="cryptoprocessor-with-no-key-storage"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 81 | <h2>4.3. Cryptoprocessor with no key storage</h2> |
| 82 | <p>As in the <a class="reference internal" href="#isolated-cryptoprocessor"><span class="secref">Cryptographic token and single-application processor</span></a> architecture, this system |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 83 | is also composed of two partitions separated by a security boundary and also |
| 84 | provides <a class="reference internal" href="goals.html#isolation"><span class="std std-ref">cryptoprocessor isolation</span></a>. |
| 85 | However, unlike the previous architecture, in this system, the cryptoprocessor |
| 86 | does not have any secure, persistent storage that could be used to store |
| 87 | application keys.</p> |
| 88 | <p>If the cryptoprocessor is not capable of storing cryptographic material, then |
| 89 | there is little use for a separate cryptoprocessor, since all data would have to |
| 90 | be imported by the application.</p> |
| 91 | <p>The cryptoprocessor can provide useful services if it is able to store at least |
| 92 | one key. This might be a hardware unique key that is burnt to one-time |
| 93 | programmable memory during the manufacturing of the device. This key can be used |
| 94 | for one or more purposes:</p> |
| 95 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 96 | <li><p>Encrypt and authenticate data stored in the application processor.</p></li> |
| 97 | <li><p>Communicate with a paired device.</p></li> |
| 98 | <li><p>Allow the application to perform operations with keys that are derived from |
| 99 | the hardware unique key.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 100 | </ul> |
| 101 | </div> |
| 102 | <div class="section" id="multi-client-cryptoprocessor"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 103 | <h2>4.4. Multi-client cryptoprocessor</h2> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 104 | <p>This is an expanded variant of the <a class="reference internal" href="#isolated-cryptoprocessor"><span class="std std-ref">cryptographic token plus application |
| 105 | architecture</span></a>. In this |
| 106 | variant, the cryptoprocessor serves multiple applications that are mutually |
| 107 | untrustworthy. This architecture provides <a class="reference internal" href="goals.html#isolation"><span class="std std-ref">caller |
| 108 | isolation</span></a>.</p> |
| 109 | <p>In this architecture, API calls are translated to remote procedure calls, which |
| 110 | encode the identity of the client application. The cryptoprocessor carefully |
| 111 | segments its internal storage to ensure that a client’s data is never leaked to |
| 112 | another client.</p> |
| 113 | </div> |
| 114 | <div class="section" id="multi-cryptoprocessor-architecture"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 115 | <h2>4.5. Multi-cryptoprocessor architecture</h2> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 116 | <p>This system includes multiple cryptoprocessors. There are several reasons to |
| 117 | have multiple cryptoprocessors:</p> |
| 118 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 119 | <li><p>Different compromises between security and performance for different keys. |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 120 | Typically, this means a cryptoprocessor that runs on the same hardware as the |
| 121 | main application and processes short-term secrets, a secure element or a |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 122 | similar separate chip that retains long-term secrets.</p></li> |
| 123 | <li><p>Independent provisioning of certain secrets.</p></li> |
| 124 | <li><p>A combination of a non-removable cryptoprocessor and removable ones, for |
| 125 | example, a smartcard or HSM.</p></li> |
| 126 | <li><p>Cryptoprocessors managed by different stakeholders who do not trust each |
| 127 | other.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 128 | </ul> |
| 129 | <p>The keystore implementation needs to dispatch each request to the correct |
| 130 | processor. For example:</p> |
| 131 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 132 | <li><p>All requests involving a non-extractable key must be processed in the |
| 133 | cryptoprocessor that holds that key.</p></li> |
| 134 | <li><p>Requests involving a persistent key must be processed in the cryptoprocessor |
| 135 | that corresponds to the key’s lifetime value.</p></li> |
| 136 | <li><p>Requests involving a volatile key might target a cryptoprocessor based on |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 137 | parameters supplied by the application, or based on considerations such as |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 138 | performance inside the implementation.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 139 | </ul> |
| 140 | </div> |
| 141 | </div> |
| 142 | |
| 143 | |
| 144 | </div> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 145 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 146 | </div> |
| 147 | </div> |
| 148 | <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 149 | <div class="sphinxsidebarwrapper"><h3><a href="../index.html"><b>PSA Crypto API</b></a></h3> |
| 150 | IHI 0086<br/> |
| 151 | Non-confidential<br/> |
| 152 | Version 1.0.1 |
| 153 | <span style="color: red; font-weight: bold;"></span> |
| 154 | <ul> |
| 155 | <li class="toctree-l1"><a class="reference internal" href="../about.html">About this document</a></li> |
| 156 | </ul> |
| 157 | <ul class="current"> |
| 158 | <li class="toctree-l1"><a class="reference internal" href="intro.html">1. Introduction</a></li> |
| 159 | <li class="toctree-l1"><a class="reference internal" href="goals.html">2. Design goals</a></li> |
| 160 | <li class="toctree-l1"><a class="reference internal" href="functionality.html">3. Functionality overview</a></li> |
| 161 | <li class="toctree-l1 current"><a class="current reference internal" href="#">4. Sample architectures</a><ul> |
| 162 | <li class="toctree-l2"><a class="reference internal" href="#single-partition-architecture">4.1. Single-partition architecture</a></li> |
| 163 | <li class="toctree-l2"><a class="reference internal" href="#cryptographic-token-and-single-application-processor">4.2. Cryptographic token and single-application processor</a></li> |
| 164 | <li class="toctree-l2"><a class="reference internal" href="#cryptoprocessor-with-no-key-storage">4.3. Cryptoprocessor with no key storage</a></li> |
| 165 | <li class="toctree-l2"><a class="reference internal" href="#multi-client-cryptoprocessor">4.4. Multi-client cryptoprocessor</a></li> |
| 166 | <li class="toctree-l2"><a class="reference internal" href="#multi-cryptoprocessor-architecture">4.5. Multi-cryptoprocessor architecture</a></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 167 | </ul> |
| 168 | </li> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 169 | <li class="toctree-l1"><a class="reference internal" href="conventions.html">5. Library conventions</a></li> |
| 170 | <li class="toctree-l1"><a class="reference internal" href="implementation.html">6. Implementation considerations</a></li> |
| 171 | <li class="toctree-l1"><a class="reference internal" href="usage.html">7. Usage considerations</a></li> |
| 172 | <li class="toctree-l1"><a class="reference internal" href="../api/library/index.html">8. Library management reference</a></li> |
| 173 | <li class="toctree-l1"><a class="reference internal" href="../api/keys/index.html">9. Key management reference</a></li> |
| 174 | <li class="toctree-l1"><a class="reference internal" href="../api/ops/index.html">10. Cryptographic operation reference</a></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 175 | </ul> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 176 | <ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 177 | <li class="toctree-l1"><a class="reference internal" href="../appendix/example_header.html">Example header file</a></li> |
| 178 | <li class="toctree-l1"><a class="reference internal" href="../appendix/specdef_values.html">Example macro implementations</a></li> |
| 179 | <li class="toctree-l1"><a class="reference internal" href="../appendix/history.html">Changes to the API</a></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 180 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 181 | <ul> |
| 182 | <li class="toctree-l1"><a class="reference internal" href="../psa_c-identifiers.html">Index of API elements</a></li> |
| 183 | </ul> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 184 | <div id="searchbox" style="display: none" role="search"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 185 | <h3 id="searchlabel">Quick search</h3> |
| 186 | <div class="searchformwrapper"> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 187 | <form class="search" action="../search.html" method="get"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 188 | <input type="text" name="q" aria-labelledby="searchlabel" /> |
| 189 | <input type="submit" value="Go" /> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 190 | </form> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 191 | </div> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 192 | </div> |
| 193 | <script type="text/javascript">$('#searchbox').show(0);</script> |
| 194 | </div> |
| 195 | </div> |
| 196 | <div class="clearer"></div> |
| 197 | </div> |
| 198 | <div class="footer"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 199 | © 2018-2020, Arm Limited or its affiliates. All rights reserved. |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 200 | |
| 201 | | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 202 | Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a> |
| 203 | & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 204 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 205 | </div> |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | </body> |
| 211 | </html> |