blob: 5d2fd9c056ff16ddda9735e858b5e4983817ba22 [file] [log] [blame]
Gilles Peskine6c723a22020-04-17 16:57:52 +02001
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 <title>PSA Crypto library &#8212; PSA Crypto API 1.0.0 documentation</title>
9 <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
10 <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
11 <script type="text/javascript">
12 var DOCUMENTATION_OPTIONS = {
13 URL_ROOT: '../../',
14 VERSION: '1.0.0',
15 COLLAPSE_INDEX: false,
16 FILE_SUFFIX: '.html',
17 HAS_SOURCE: true,
18 SOURCELINK_SUFFIX: '.txt'
19 };
20 </script>
21 <script type="text/javascript" src="../../_static/jquery.js"></script>
22 <script type="text/javascript" src="../../_static/underscore.js"></script>
23 <script type="text/javascript" src="../../_static/doctools.js"></script>
24 <link rel="index" title="Index" href="../../genindex.html" />
25 <link rel="search" title="Search" href="../../search.html" />
26 <link rel="next" title="Key management reference" href="../keys/index.html" />
27 <link rel="prev" title="PSA status codes" href="status.html" />
28
29 <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
30
31 <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
32
33 </head>
34 <body>
35
36
37 <div class="document">
38 <div class="documentwrapper">
39 <div class="bodywrapper">
40 <div class="body" role="main">
41
42 <div class="section" id="psa-crypto-library">
43<h1>PSA Crypto library</h1>
44<div class="section" id="api-version">
45<span id="id1"></span><h2>API version</h2>
46<div class="section" id="PSA_CRYPTO_API_VERSION_MAJOR">
47<span id="c.PSA_CRYPTO_API_VERSION_MAJOR"></span><h3><code class="docutils literal"><span class="pre">PSA_CRYPTO_API_VERSION_MAJOR</span></code> (macro)</h3>
48<p>The major version of this implementation of the PSA Crypto API.</p>
49<pre class="literal-block">
50#define <a class="reference internal" href="#c.PSA_CRYPTO_API_VERSION_MAJOR" title="PSA_CRYPTO_API_VERSION_MAJOR">PSA_CRYPTO_API_VERSION_MAJOR</a> 1
51</pre>
52</div>
53<div class="section" id="PSA_CRYPTO_API_VERSION_MINOR">
54<span id="c.PSA_CRYPTO_API_VERSION_MINOR"></span><h3><code class="docutils literal"><span class="pre">PSA_CRYPTO_API_VERSION_MINOR</span></code> (macro)</h3>
55<p>The minor version of this implementation of the PSA Crypto API.</p>
56<pre class="literal-block">
57#define <a class="reference internal" href="#c.PSA_CRYPTO_API_VERSION_MINOR" title="PSA_CRYPTO_API_VERSION_MINOR">PSA_CRYPTO_API_VERSION_MINOR</a> 0
58</pre>
59</div>
60</div>
61<div class="section" id="library-initialization">
62<span id="library-init"></span><h2>Library initialization</h2>
63<div class="section" id="psa_crypto_init">
64<span id="c.psa_crypto_init"></span><h3><code class="docutils literal"><span class="pre">psa_crypto_init</span></code> (function)</h3>
65<p>Library initialization.</p>
66<pre class="literal-block">
67<a class="reference internal" href="status.html#c.psa_status_t" title="psa_status_t">psa_status_t</a> <a class="reference internal" href="#c.psa_crypto_init" title="psa_crypto_init">psa_crypto_init</a>(void);
68</pre>
69<p class="rubric">Returns: <a class="reference internal" href="status.html#c.psa_status_t" title="psa_status_t"><code class="docutils literal"><span class="pre">psa_status_t</span></code></a></p>
70<dl class="docutils">
71<dt> <a class="reference internal" href="status.html#c.PSA_SUCCESS" title="PSA_SUCCESS"><code class="docutils literal"><span class="pre">PSA_SUCCESS</span></code></a></dt>
72<dd></dd>
73<dt> <a class="reference internal" href="status.html#c.PSA_ERROR_INSUFFICIENT_MEMORY" title="PSA_ERROR_INSUFFICIENT_MEMORY"><code class="docutils literal"><span class="pre">PSA_ERROR_INSUFFICIENT_MEMORY</span></code></a></dt>
74<dd></dd>
75<dt> <a class="reference internal" href="status.html#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="docutils literal"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a></dt>
76<dd></dd>
77<dt> <a class="reference internal" href="status.html#c.PSA_ERROR_HARDWARE_FAILURE" title="PSA_ERROR_HARDWARE_FAILURE"><code class="docutils literal"><span class="pre">PSA_ERROR_HARDWARE_FAILURE</span></code></a></dt>
78<dd></dd>
79<dt> <a class="reference internal" href="status.html#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED"><code class="docutils literal"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code></a></dt>
80<dd></dd>
81<dt> <a class="reference internal" href="status.html#c.PSA_ERROR_INSUFFICIENT_ENTROPY" title="PSA_ERROR_INSUFFICIENT_ENTROPY"><code class="docutils literal"><span class="pre">PSA_ERROR_INSUFFICIENT_ENTROPY</span></code></a></dt>
82<dd></dd>
83</dl>
84<p class="rubric">Description</p>
85<p>Applications must call this function before calling any other function in this module.</p>
86<p>Applications are permitted to call this function more than once. Once a call succeeds, subsequent calls are guaranteed to succeed.</p>
87<p>If the application calls other functions before calling <a class="reference internal" href="#c.psa_crypto_init" title="psa_crypto_init"><code class="xref any c c-func docutils literal"><span class="pre">psa_crypto_init()</span></code></a>, the behavior is undefined. In this situation:</p>
88<ul class="simple">
89<li>Implementations are encouraged to either perform the operation as if the library had been initialized or to return <a class="reference internal" href="status.html#c.PSA_ERROR_BAD_STATE" title="PSA_ERROR_BAD_STATE"><code class="xref any c c-macro docutils literal"><span class="pre">PSA_ERROR_BAD_STATE</span></code></a> or some other applicable error.</li>
90<li>Implementations must not return a success status if the lack of initialization might have security implications, for example due to improper seeding of the random number generator.</li>
91</ul>
92</div>
93</div>
94</div>
95
96
97 </div>
98 </div>
99 </div>
100 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
101 <div class="sphinxsidebarwrapper">
102 <h3><a href="../../index.html">Table Of Contents</a></h3>
103 <ul>
104<li><a class="reference internal" href="#">PSA Crypto library</a><ul>
105<li><a class="reference internal" href="#api-version">API version</a><ul>
106<li><a class="reference internal" href="#PSA_CRYPTO_API_VERSION_MAJOR"><code class="docutils literal"><span class="pre">PSA_CRYPTO_API_VERSION_MAJOR</span></code> (macro)</a></li>
107<li><a class="reference internal" href="#PSA_CRYPTO_API_VERSION_MINOR"><code class="docutils literal"><span class="pre">PSA_CRYPTO_API_VERSION_MINOR</span></code> (macro)</a></li>
108</ul>
109</li>
110<li><a class="reference internal" href="#library-initialization">Library initialization</a><ul>
111<li><a class="reference internal" href="#psa_crypto_init"><code class="docutils literal"><span class="pre">psa_crypto_init</span></code> (function)</a></li>
112</ul>
113</li>
114</ul>
115</li>
116</ul>
117<div class="relations">
118<h3>Related Topics</h3>
119<ul>
120 <li><a href="../../index.html">Documentation overview</a><ul>
121 <li><a href="index.html">Library management reference</a><ul>
122 <li>Previous: <a href="status.html" title="previous chapter">PSA status codes</a></li>
123 <li>Next: <a href="../keys/index.html" title="next chapter">Key management reference</a></li>
124 </ul></li>
125 </ul></li>
126</ul>
127</div>
128 <div role="note" aria-label="source link">
129 <h3>This Page</h3>
130 <ul class="this-page-menu">
131 <li><a href="../../_sources/api/library/library.rst.txt"
132 rel="nofollow">Show Source</a></li>
133 </ul>
134 </div>
135<div id="searchbox" style="display: none" role="search">
136 <h3>Quick search</h3>
137 <form class="search" action="../../search.html" method="get">
138 <div><input type="text" name="q" /></div>
139 <div><input type="submit" value="Go" /></div>
140 <input type="hidden" name="check_keywords" value="yes" />
141 <input type="hidden" name="area" value="default" />
142 </form>
143</div>
144<script type="text/javascript">$('#searchbox').show(0);</script>
145 </div>
146 </div>
147 <div class="clearer"></div>
148 </div>
149 <div class="footer">
150 &copy; 2019-2020, Arm Limited or its affiliates. All rights reserved.
151
152 |
153 Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.7</a>
154 &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
155
156 |
157 <a href="../../_sources/api/library/library.rst.txt"
158 rel="nofollow">Page source</a>
159 </div>
160
161
162
163
164 </body>
165</html>