blob: e7992416900d421a6173e6665ddeeeedb47ab686 [file] [log] [blame]
Gilles Peskine6c723a22020-04-17 16:57:52 +02001
Bence Szépkútie26ccad2021-02-01 14:26:11 +01002<!DOCTYPE html>
Gilles Peskine6c723a22020-04-17 16:57:52 +02003
4<html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
Bence Szépkútie26ccad2021-02-01 14:26:11 +01006 <meta charset="utf-8" />
Gilles Peskinec2db5f02021-01-18 20:36:53 +01007 <title>4. Sample architectures &#8212; PSA Crypto API 1.0.1 documentation</title>
Gilles Peskine6c723a22020-04-17 16:57:52 +02008 <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
9 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
Bence Szépkútie26ccad2021-02-01 14:26:11 +010010 <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
Gilles Peskine6c723a22020-04-17 16:57:52 +020011 <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útie26ccad2021-02-01 14:26:11 +010014 <script type="text/javascript" src="../_static/language_data.js"></script>
Gilles Peskinec2db5f02021-01-18 20:36:53 +010015 <link rel="author" title="About these documents" href="../about.html" />
Gilles Peskine6c723a22020-04-17 16:57:52 +020016 <link rel="index" title="Index" href="../genindex.html" />
17 <link rel="search" title="Search" href="../search.html" />
Gilles Peskinec2db5f02021-01-18 20:36:53 +010018 <link rel="next" title="5. Library conventions" href="conventions.html" />
19 <link rel="prev" title="3. Functionality overview" href="functionality.html" />
Gilles Peskine6c723a22020-04-17 16:57:52 +020020
21 <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
22
Bence Szépkútie26ccad2021-02-01 14:26:11 +010023
Gilles Peskine6c723a22020-04-17 16:57:52 +020024 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
25
Bence Szépkútie26ccad2021-02-01 14:26:11 +010026 </head><body>
Gilles Peskine6c723a22020-04-17 16:57:52 +020027
28
29 <div class="document">
30 <div class="documentwrapper">
31 <div class="bodywrapper">
Bence Szépkútie26ccad2021-02-01 14:26:11 +010032
33
Gilles Peskine6c723a22020-04-17 16:57:52 +020034 <div class="body" role="main">
35
36 <div class="section" id="sample-architectures">
Gilles Peskinec2db5f02021-01-18 20:36:53 +010037<span id="architectures"></span><h1>4. Sample architectures</h1>
Gilles Peskine6c723a22020-04-17 16:57:52 +020038<p>This section describes some example architectures that can be used for
39implementations of the interface described in this specification. This list is
40not exhaustive and the section is entirely non-normative.</p>
41<div class="section" id="single-partition-architecture">
Gilles Peskinec2db5f02021-01-18 20:36:53 +010042<h2>4.1. Single-partition architecture</h2>
Gilles Peskine6c723a22020-04-17 16:57:52 +020043<p>In the single-partition architecture, there is no security boundary inside the system. The
44application code can access all the system memory, including the memory used by
45the cryptographic services described in this specification. Thus, the
46architecture 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
48Security Model</em>. However, it is useful for providing cryptographic services
49that use the same interface, even on devices that cannot support any security
50boundary. So, while this architecture is not the primary design goal of the API
51defined in the present specification, it is supported.</p>
52<p>The functions in this specification simply execute the underlying algorithmic
53code. Security checks can be kept to a minimum, since the cryptoprocessor cannot
54defend against a malicious application. Key import and export copy data inside
55the same memory space.</p>
56<p>This architecture also describes a subset of some larger systems, where the
57cryptographic services are implemented inside a high-security partition,
58separate from the code of the main application, though it shares this
59high-security partition with other platform security services.</p>
60</div>
61<div class="section" id="cryptographic-token-and-single-application-processor">
Gilles Peskinec2db5f02021-01-18 20:36:53 +010062<span id="isolated-cryptoprocessor"></span><h2>4.2. Cryptographic token and single-application processor</h2>
Gilles Peskine6c723a22020-04-17 16:57:52 +020063<p>This system is composed of two partitions: one is a cryptoprocessor and the
64other partition runs an application. There is a security boundary between the
65two partitions, so that the application cannot access the cryptoprocessor,
66except 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
68some non-volatile storage, a TRNG, and possibly, some cryptographic accelerators.</p>
69<p>There are a number of potential physical realizations: the cryptoprocessor might
70be a separate chip, a separate processor on the same chip, or a logical
71partition using a combination of hardware and software to provide the isolation.
72These realizations are functionally equivalent in terms of the offered software
73interface, but they would typically offer different levels of security
74guarantees.</p>
75<p>The PSA crypto API in the application processor consists of a thin layer of code
76that translates function calls to remote procedure calls in the cryptoprocessor.
77All cryptographic computations are, therefore, performed inside the
78cryptoprocessor. Non-volatile keys are stored inside the cryptoprocessor.</p>
79</div>
80<div class="section" id="cryptoprocessor-with-no-key-storage">
Gilles Peskinec2db5f02021-01-18 20:36:53 +010081<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 Peskine6c723a22020-04-17 16:57:52 +020083is also composed of two partitions separated by a security boundary and also
84provides <a class="reference internal" href="goals.html#isolation"><span class="std std-ref">cryptoprocessor isolation</span></a>.
85However, unlike the previous architecture, in this system, the cryptoprocessor
86does not have any secure, persistent storage that could be used to store
87application keys.</p>
88<p>If the cryptoprocessor is not capable of storing cryptographic material, then
89there is little use for a separate cryptoprocessor, since all data would have to
90be imported by the application.</p>
91<p>The cryptoprocessor can provide useful services if it is able to store at least
92one key. This might be a hardware unique key that is burnt to one-time
93programmable memory during the manufacturing of the device. This key can be used
94for one or more purposes:</p>
95<ul class="simple">
Bence Szépkútie26ccad2021-02-01 14:26:11 +010096<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
99the hardware unique key.</p></li>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200100</ul>
101</div>
102<div class="section" id="multi-client-cryptoprocessor">
Gilles Peskinec2db5f02021-01-18 20:36:53 +0100103<h2>4.4. Multi-client cryptoprocessor</h2>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200104<p>This is an expanded variant of the <a class="reference internal" href="#isolated-cryptoprocessor"><span class="std std-ref">cryptographic token plus application
105architecture</span></a>. In this
106variant, the cryptoprocessor serves multiple applications that are mutually
107untrustworthy. This architecture provides <a class="reference internal" href="goals.html#isolation"><span class="std std-ref">caller
108isolation</span></a>.</p>
109<p>In this architecture, API calls are translated to remote procedure calls, which
110encode the identity of the client application. The cryptoprocessor carefully
111segments its internal storage to ensure that a client’s data is never leaked to
112another client.</p>
113</div>
114<div class="section" id="multi-cryptoprocessor-architecture">
Gilles Peskinec2db5f02021-01-18 20:36:53 +0100115<h2>4.5. Multi-cryptoprocessor architecture</h2>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200116<p>This system includes multiple cryptoprocessors. There are several reasons to
117have multiple cryptoprocessors:</p>
118<ul class="simple">
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100119<li><p>Different compromises between security and performance for different keys.
Gilles Peskine6c723a22020-04-17 16:57:52 +0200120Typically, this means a cryptoprocessor that runs on the same hardware as the
121main application and processes short-term secrets, a secure element or a
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100122similar 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
125example, a smartcard or HSM.</p></li>
126<li><p>Cryptoprocessors managed by different stakeholders who do not trust each
127other.</p></li>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200128</ul>
129<p>The keystore implementation needs to dispatch each request to the correct
130processor. For example:</p>
131<ul class="simple">
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100132<li><p>All requests involving a non-extractable key must be processed in the
133cryptoprocessor that holds that key.</p></li>
134<li><p>Requests involving a persistent key must be processed in the cryptoprocessor
135that corresponds to the key’s lifetime value.</p></li>
136<li><p>Requests involving a volatile key might target a cryptoprocessor based on
Gilles Peskine6c723a22020-04-17 16:57:52 +0200137parameters supplied by the application, or based on considerations such as
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100138performance inside the implementation.</p></li>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200139</ul>
140</div>
141</div>
142
143
144 </div>
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100145
Gilles Peskine6c723a22020-04-17 16:57:52 +0200146 </div>
147 </div>
148 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
Gilles Peskinec2db5f02021-01-18 20:36:53 +0100149 <div class="sphinxsidebarwrapper"><h3><a href="../index.html"><b>PSA Crypto API</b></a></h3>
150IHI 0086<br/>
151Non-confidential<br/>
152Version 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 Peskine6c723a22020-04-17 16:57:52 +0200167</ul>
168</li>
Gilles Peskinec2db5f02021-01-18 20:36:53 +0100169<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 Peskine6c723a22020-04-17 16:57:52 +0200175</ul>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200176<ul>
Gilles Peskinec2db5f02021-01-18 20:36:53 +0100177<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 Peskine6c723a22020-04-17 16:57:52 +0200180</ul>
Gilles Peskinec2db5f02021-01-18 20:36:53 +0100181<ul>
182<li class="toctree-l1"><a class="reference internal" href="../psa_c-identifiers.html">Index of API elements</a></li>
183</ul>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200184<div id="searchbox" style="display: none" role="search">
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100185 <h3 id="searchlabel">Quick search</h3>
186 <div class="searchformwrapper">
Gilles Peskine6c723a22020-04-17 16:57:52 +0200187 <form class="search" action="../search.html" method="get">
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100188 <input type="text" name="q" aria-labelledby="searchlabel" />
189 <input type="submit" value="Go" />
Gilles Peskine6c723a22020-04-17 16:57:52 +0200190 </form>
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100191 </div>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200192</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 Peskinec2db5f02021-01-18 20:36:53 +0100199 &copy; 2018-2020, Arm Limited or its affiliates. All rights reserved.
Gilles Peskine6c723a22020-04-17 16:57:52 +0200200
201 |
Bence Szépkútie26ccad2021-02-01 14:26:11 +0100202 Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a>
203 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
Gilles Peskine6c723a22020-04-17 16:57:52 +0200204
Gilles Peskine6c723a22020-04-17 16:57:52 +0200205 </div>
206
207
208
209
210 </body>
211</html>