Update API specifications to version 1.0 beta1

Documentation generated from the PSA Crypto API documentation private
repository at tag "psa-crypto-api-1.0-beta1".

This uses some of the files include/psa/crypto*.h from the mbed-crypto
repository at tag "psa-api-1.0-beta".
diff --git a/docs/html/crypto__enum_8h_source.html b/docs/html/crypto__enum_8h_source.html
new file mode 100644
index 0000000..2a7b432
--- /dev/null
+++ b/docs/html/crypto__enum_8h_source.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>Platform Security Architecture — cryptography and keystore interface: psa/crypto_enum.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Platform Security Architecture — cryptography and keystore interface
+   &#160;<span id="projectnumber">Working draft</span>
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="modules.html"><span>Modules</span></a></li>
+      <li><a href="annotated.html"><span>Classes</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+  <ul>
+<li class="navelem"><a class="el" href="dir_7dae9cfde651cd3cb034485ce5e391b9.html">psa</a></li>  </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">crypto_enum.h</div>  </div>
+</div><!--header-->
+<div class="contents">
+<a href="crypto__enum_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *  Copyright (C) 2018, ARM Limited, All Rights Reserved</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *  SPDX-License-Identifier: Apache-2.0</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *  Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *  not use this file except in compliance with the License.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *  You may obtain a copy of the License at</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *  http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *  Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *  distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment"> *  See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"> *  limitations under the License.</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment"> *  This file is part of mbed TLS (https://tls.mbed.org)</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#ifndef PSA_CRYPTO_ENUM_H</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#define PSA_CRYPTO_ENUM_H</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#if defined(PSA_SUCCESS)</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="comment">/* If PSA_SUCCESS is defined, assume that PSA crypto is being used</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment"> * together with PSA IPC, which also defines the identifier</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment"> * PSA_SUCCESS. We must not define PSA_SUCCESS ourselves in that case;</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="comment"> * the other error code names don&#39;t clash. Also define psa_status_t as</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="comment"> * an alias for the type used by PSA IPC. This is a temporary hack</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="comment"> * until we unify error reporting in PSA IPC and PSA crypto.</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment"> * Note that psa_defs.h must be included before this header!</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">typedef</span> psa_error_t <a class="code" href="group__error.html#ga05676e70ba5c6a7565aff3c36677c1f9">psa_status_t</a>;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* defined(PSA_SUCCESS) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__error.html#ga05676e70ba5c6a7565aff3c36677c1f9">   66</a></span>&#160;<span class="keyword">typedef</span> int32_t <a class="code" href="group__error.html#ga05676e70ba5c6a7565aff3c36677c1f9">psa_status_t</a>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="group__error.html#ga4cc859e2c66ca381c7418db3527a65e1">   69</a></span>&#160;<span class="preprocessor">#define PSA_SUCCESS ((psa_status_t)0)</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* !defined(PSA_SUCCESS) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="group__error.html#ga24d5fdcdd759f846f79d9e581c63a83f">   78</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_UNKNOWN_ERROR         ((psa_status_t)1)</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="group__error.html#ga1dcc6d130633ed5db8942257581b55dd">   87</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_NOT_SUPPORTED         ((psa_status_t)2)</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="group__error.html#ga4d1b8dd8526177a15a210b7afc1accb1">  100</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_NOT_PERMITTED         ((psa_status_t)3)</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="group__error.html#ga695025f4ec11249aee7ea3d0f65e01c8">  112</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_BUFFER_TOO_SMALL      ((psa_status_t)4)</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="group__error.html#gac2fee3a51249fbea45360aaa911f3e58">  120</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_OCCUPIED_SLOT         ((psa_status_t)5)</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="group__error.html#gaba00e3e6ceb2b12965a81e5ac02ae040">  128</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_EMPTY_SLOT            ((psa_status_t)6)</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="group__error.html#ga933d40fa2a591004f2e93aa91e11db84">  140</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_BAD_STATE             ((psa_status_t)7)</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="group__error.html#ga798df25a505ebf931f7bec1f80f1f85f">  156</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INVALID_ARGUMENT      ((psa_status_t)8)</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="group__error.html#ga91b2ad8a867517a2651f1b076c5216e5">  162</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_MEMORY   ((psa_status_t)9)</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="group__error.html#ga897a45eb206a6f6b7be7ffbe36f0d766">  171</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_STORAGE  ((psa_status_t)10)</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="group__error.html#ga5cdb6948371d49e916106249020ea3f7">  188</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_COMMUNICATION_FAILURE ((psa_status_t)11)</span></div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="group__error.html#gadd169a1af2707862b95fb9df91dfc37d">  213</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_STORAGE_FAILURE       ((psa_status_t)12)</span></div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="group__error.html#ga08b10e70fa5ff0b05c631d9f8f6b2c6b">  219</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_HARDWARE_FAILURE      ((psa_status_t)13)</span></div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="group__error.html#ga2c5dda1485cb54f2385cb9c1279a7004">  250</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_TAMPERING_DETECTED    ((psa_status_t)14)</span></div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno"><a class="line" href="group__error.html#ga4deb59fec02297ec5d8b42178323f675">  269</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_ENTROPY  ((psa_status_t)15)</span></div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="group__error.html#ga35927f755d232c4766de600f2c49e9f2">  279</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INVALID_SIGNATURE     ((psa_status_t)16)</span></div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="group__error.html#gabe29594edbfb152cf153975b0597ac48">  295</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INVALID_PADDING       ((psa_status_t)17)</span></div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;</div><div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="group__error.html#gaf1fa61f72e9e5b4a848c991bea495767">  301</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_CAPACITY ((psa_status_t)18)</span></div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="group__error.html#gadf22718935657c2c3168c228204085f9">  305</a></span>&#160;<span class="preprocessor">#define PSA_ERROR_INVALID_HANDLE        ((psa_status_t)19)</span></div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga578159487dfc7096cb191b0d2befe628">  315</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__crypto__types.html#ga578159487dfc7096cb191b0d2befe628">psa_key_type_t</a>;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;</div><div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gafce7ab2b54ce97ea5bff73f13a9f3e5b">  321</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_NONE                       ((psa_key_type_t)0x00000000)</span></div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;</div><div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga8dbaed2fdb1ebae8aa127ad3988516f7">  330</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_VENDOR_FLAG                ((psa_key_type_t)0x80000000)</span></div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_MASK              ((psa_key_type_t)0x70000000)</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_SYMMETRIC         ((psa_key_type_t)0x40000000)</span></div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_RAW               ((psa_key_type_t)0x50000000)</span></div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY        ((psa_key_type_t)0x60000000)</span></div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_KEY_PAIR          ((psa_key_type_t)0x70000000)</span></div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_FLAG_PAIR         ((psa_key_type_t)0x10000000)</span></div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;</div><div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gadbe4c086a6562aefe344bc79e51bdfd3">  341</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_VENDOR_DEFINED(type) \</span></div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="preprocessor">    (((type) &amp; PSA_KEY_TYPE_VENDOR_FLAG) != 0)</span></div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;</div><div class="line"><a name="l00348"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaef86ce4e810e1c2c76068ac874bfef54">  348</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_UNSTRUCTURED(type) \</span></div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="preprocessor">    (((type) &amp; PSA_KEY_TYPE_CATEGORY_MASK &amp; ~(psa_key_type_t)0x10000000) == \</span></div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="preprocessor">     PSA_KEY_TYPE_CATEGORY_SYMMETRIC)</span></div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;</div><div class="line"><a name="l00353"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab138ae2ebf2905dfbaf4154db2620939">  353</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ASYMMETRIC(type)                                \</span></div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;<span class="preprocessor">    (((type) &amp; PSA_KEY_TYPE_CATEGORY_MASK                               \</span></div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;<span class="preprocessor">      &amp; ~PSA_KEY_TYPE_CATEGORY_FLAG_PAIR) ==                            \</span></div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;<span class="preprocessor">     PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY)</span></div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac674a0f059bc0cb72b47f0c517b4f45b">  358</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_PUBLIC_KEY(type)                                \</span></div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;<span class="preprocessor">    (((type) &amp; PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY)</span></div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div><div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac14c6d6e1b2b7f4a92a7b757465cff29">  362</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_KEYPAIR(type)                                   \</span></div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="preprocessor">    (((type) &amp; PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_KEY_PAIR)</span></div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;</div><div class="line"><a name="l00374"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf09f1ca1de6a7e7cff0fe516f3f6c91d">  374</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_KEYPAIR_OF_PUBLIC_KEY(type)        \</span></div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;<span class="preprocessor">    ((type) | PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)</span></div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;</div><div class="line"><a name="l00386"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gace08e46dd7cbf642d50d982a25d02bec">  386</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type)        \</span></div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;<span class="preprocessor">    ((type) &amp; ~PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)</span></div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;</div><div class="line"><a name="l00393"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa97f92025533102616b32d571c940d80">  393</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_RAW_DATA                   ((psa_key_type_t)0x50000001)</span></div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;</div><div class="line"><a name="l00403"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga92d989f4ca64abd00f463defd773a6f8">  403</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_HMAC                       ((psa_key_type_t)0x51000000)</span></div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae871b2357b8593f33bfd51abbf93ebb1">  410</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DERIVE                     ((psa_key_type_t)0x52000000)</span></div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div><div class="line"><a name="l00417"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6ee54579dcf278c677eda4bb1a29575e">  417</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_AES                        ((psa_key_type_t)0x40000001)</span></div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;</div><div class="line"><a name="l00428"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga577562bfbbc691c820d55ec308333138">  428</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DES                        ((psa_key_type_t)0x40000002)</span></div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;</div><div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad8e5da742343fd5519f9d8a630c2ed81">  432</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_CAMELLIA                   ((psa_key_type_t)0x40000003)</span></div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae4d46e83f910dcaa126000a8ed03cde9">  438</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ARC4                       ((psa_key_type_t)0x40000004)</span></div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;</div><div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9ba0878f56c8bcd1995ac017a74f513b">  441</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_RSA_PUBLIC_KEY             ((psa_key_type_t)0x60010000)</span></div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;</div><div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga581f50687f5d650456925278948f2799">  443</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_RSA_KEYPAIR                ((psa_key_type_t)0x70010000)</span></div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;</div><div class="line"><a name="l00445"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0e1d8f241228e49c9cadadfb4579ef1a">  445</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_RSA(type)                                       \</span></div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;<span class="preprocessor">    (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) == PSA_KEY_TYPE_RSA_PUBLIC_KEY)</span></div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;</div><div class="line"><a name="l00449"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5e7439c2905136366c3a876e62e5ddfc">  449</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DSA_PUBLIC_KEY             ((psa_key_type_t)0x60020000)</span></div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;</div><div class="line"><a name="l00451"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga011010ee28c20388f3d89fb27088ed62">  451</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_DSA_KEYPAIR                ((psa_key_type_t)0x70020000)</span></div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga273fdfcf23eb0624f8b63d2321cf95c1">  453</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_DSA(type)                                       \</span></div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;<span class="preprocessor">    (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY)</span></div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE        ((psa_key_type_t)0x60030000)</span></div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_KEYPAIR_BASE           ((psa_key_type_t)0x70030000)</span></div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_CURVE_MASK             ((psa_key_type_t)0x0000ffff)</span></div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;</div><div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gadf3ad65d157bf5282849c954bf3f51af">  460</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_KEYPAIR(curve)         \</span></div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;<span class="preprocessor">    (PSA_KEY_TYPE_ECC_KEYPAIR_BASE | (curve))</span></div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;</div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad54c03d3b47020e571a72cd01d978cf2">  463</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve)              \</span></div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;<span class="preprocessor">    (PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve))</span></div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div><div class="line"><a name="l00467"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga88e01fa06b585654689a99bcc06bbe66">  467</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC(type)                                       \</span></div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;<span class="preprocessor">    ((PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) &amp;                        \</span></div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;<span class="preprocessor">      ~PSA_KEY_TYPE_ECC_CURVE_MASK) == PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE)</span></div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;</div><div class="line"><a name="l00471"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga7bf101b671e8cf26f4cb08fcb679db4b">  471</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC_KEYPAIR(type)                               \</span></div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;<span class="preprocessor">    (((type) &amp; ~PSA_KEY_TYPE_ECC_CURVE_MASK) ==                         \</span></div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;<span class="preprocessor">     PSA_KEY_TYPE_ECC_KEYPAIR_BASE)</span></div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;</div><div class="line"><a name="l00475"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5af146a173b0c84d7e737e2fb6a3c0a7">  475</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(type)                            \</span></div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;<span class="preprocessor">    (((type) &amp; ~PSA_KEY_TYPE_ECC_CURVE_MASK) ==                         \</span></div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;<span class="preprocessor">     PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE)</span></div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;</div><div class="line"><a name="l00480"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4e8977c145cce5077c4bce7fec890ad9">  480</a></span>&#160;<span class="keyword">typedef</span> uint16_t <a class="code" href="group__crypto__types.html#ga4e8977c145cce5077c4bce7fec890ad9">psa_ecc_curve_t</a>;</div><div class="line"><a name="l00482"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0c567210e6f80aa8f2aa87efa7a3a3f9">  482</a></span>&#160;<span class="preprocessor">#define PSA_KEY_TYPE_GET_CURVE(type)                             \</span></div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;<span class="preprocessor">    ((psa_ecc_curve_t) (PSA_KEY_TYPE_IS_ECC(type) ?              \</span></div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;<span class="preprocessor">                        ((type) &amp; PSA_KEY_TYPE_ECC_CURVE_MASK) : \</span></div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;<span class="preprocessor">                        0))</span></div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;<span class="comment">/* The encoding of curve identifiers is currently aligned with the</span></div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;<span class="comment"> * TLS Supported Groups Registry (formerly known as the</span></div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="comment"> * TLS EC Named Curve Registry)</span></div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;<span class="comment"> * https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8</span></div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;<span class="comment"> * The values are defined by RFC 8422 and RFC 7027. */</span></div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT163K1         ((psa_ecc_curve_t) 0x0001)</span></div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT163R1         ((psa_ecc_curve_t) 0x0002)</span></div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT163R2         ((psa_ecc_curve_t) 0x0003)</span></div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT193R1         ((psa_ecc_curve_t) 0x0004)</span></div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT193R2         ((psa_ecc_curve_t) 0x0005)</span></div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT233K1         ((psa_ecc_curve_t) 0x0006)</span></div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT233R1         ((psa_ecc_curve_t) 0x0007)</span></div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT239K1         ((psa_ecc_curve_t) 0x0008)</span></div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT283K1         ((psa_ecc_curve_t) 0x0009)</span></div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT283R1         ((psa_ecc_curve_t) 0x000a)</span></div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT409K1         ((psa_ecc_curve_t) 0x000b)</span></div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT409R1         ((psa_ecc_curve_t) 0x000c)</span></div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT571K1         ((psa_ecc_curve_t) 0x000d)</span></div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECT571R1         ((psa_ecc_curve_t) 0x000e)</span></div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP160K1         ((psa_ecc_curve_t) 0x000f)</span></div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP160R1         ((psa_ecc_curve_t) 0x0010)</span></div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP160R2         ((psa_ecc_curve_t) 0x0011)</span></div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP192K1         ((psa_ecc_curve_t) 0x0012)</span></div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP192R1         ((psa_ecc_curve_t) 0x0013)</span></div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP224K1         ((psa_ecc_curve_t) 0x0014)</span></div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP224R1         ((psa_ecc_curve_t) 0x0015)</span></div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP256K1         ((psa_ecc_curve_t) 0x0016)</span></div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP256R1         ((psa_ecc_curve_t) 0x0017)</span></div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP384R1         ((psa_ecc_curve_t) 0x0018)</span></div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_SECP521R1         ((psa_ecc_curve_t) 0x0019)</span></div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P256R1  ((psa_ecc_curve_t) 0x001a)</span></div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P384R1  ((psa_ecc_curve_t) 0x001b)</span></div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P512R1  ((psa_ecc_curve_t) 0x001c)</span></div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_CURVE25519        ((psa_ecc_curve_t) 0x001d)</span></div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;<span class="preprocessor">#define PSA_ECC_CURVE_CURVE448          ((psa_ecc_curve_t) 0x001e)</span></div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;</div><div class="line"><a name="l00541"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacaa366bdeb0413e63e87a667c5457b2e">  541</a></span>&#160;<span class="preprocessor">#define PSA_BLOCK_CIPHER_BLOCK_SIZE(type)            \</span></div><div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;<span class="preprocessor">    (                                                \</span></div><div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_AES ? 16 :            \</span></div><div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_DES ? 8 :             \</span></div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_CAMELLIA ? 16 :       \</span></div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;<span class="preprocessor">        (type) == PSA_KEY_TYPE_ARC4 ? 1 :            \</span></div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;<span class="preprocessor">        0)</span></div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;</div><div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac2e4d47f1300d73c2f829a6d99252d69">  557</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__crypto__types.html#gac2e4d47f1300d73c2f829a6d99252d69">psa_algorithm_t</a>;</div><div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;</div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;<span class="preprocessor">#define PSA_ALG_VENDOR_FLAG                     ((psa_algorithm_t)0x80000000)</span></div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_MASK                   ((psa_algorithm_t)0x7f000000)</span></div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_HASH                   ((psa_algorithm_t)0x01000000)</span></div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_MAC                    ((psa_algorithm_t)0x02000000)</span></div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_CIPHER                 ((psa_algorithm_t)0x04000000)</span></div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_AEAD                   ((psa_algorithm_t)0x06000000)</span></div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_SIGN                   ((psa_algorithm_t)0x10000000)</span></div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION  ((psa_algorithm_t)0x12000000)</span></div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_KEY_AGREEMENT          ((psa_algorithm_t)0x22000000)</span></div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_KEY_DERIVATION         ((psa_algorithm_t)0x30000000)</span></div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;<span class="preprocessor">#define PSA_ALG_CATEGORY_KEY_SELECTION          ((psa_algorithm_t)0x31000000)</span></div><div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;</div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_VENDOR_DEFINED(alg)                                  \</span></div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_VENDOR_FLAG) != 0)</span></div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;</div><div class="line"><a name="l00582"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac9280662bb482590b4b33d1dcd32930f">  582</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_HASH(alg)                                            \</span></div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH)</span></div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;</div><div class="line"><a name="l00593"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaca7aee4c9dde316b3b1a150a26eab776">  593</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_MAC(alg)                                             \</span></div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_MAC)</span></div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;</div><div class="line"><a name="l00604"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1d1a5a402ad89a2e68f12bfb535490eb">  604</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_CIPHER(alg)                                          \</span></div><div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER)</span></div><div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;</div><div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1d44829d60065eaa4ac9a703e7d6abc8">  616</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_AEAD(alg)                                            \</span></div><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_AEAD)</span></div><div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;</div><div class="line"><a name="l00627"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6d490d0904e0698f6c1268a89d72ff31">  627</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_SIGN(alg)                                            \</span></div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_SIGN)</span></div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;</div><div class="line"><a name="l00638"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga41d2ee937d54efd76bd54a97b2ebc08a">  638</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_ASYMMETRIC_ENCRYPTION(alg)                           \</span></div><div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION)</span></div><div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;</div><div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;<span class="preprocessor">#define PSA_ALG_KEY_SELECTION_FLAG              ((psa_algorithm_t)0x01000000)</span></div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;</div><div class="line"><a name="l00650"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga59753742cb06553bd22751bbef472b6f">  650</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_KEY_AGREEMENT(alg)                                   \</span></div><div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK &amp; ~PSA_ALG_KEY_SELECTION_FLAG) ==   \</span></div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;<span class="preprocessor">     PSA_ALG_CATEGORY_KEY_AGREEMENT)</span></div><div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;</div><div class="line"><a name="l00662"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf8b90c648aa53dbd06c236695e300cd0">  662</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_KEY_DERIVATION(alg)                                  \</span></div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_DERIVATION)</span></div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;</div><div class="line"><a name="l00673"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga51b1834ee5e98c6a83c2cfc7699f9077">  673</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_KEY_SELECTION(alg)                                   \</span></div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_SELECTION)</span></div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;</div><div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;<span class="preprocessor">#define PSA_ALG_HASH_MASK                       ((psa_algorithm_t)0x000000ff)</span></div><div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;<span class="preprocessor">#define PSA_ALG_MD2                             ((psa_algorithm_t)0x01000001)</span></div><div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;<span class="preprocessor">#define PSA_ALG_MD4                             ((psa_algorithm_t)0x01000002)</span></div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;<span class="preprocessor">#define PSA_ALG_MD5                             ((psa_algorithm_t)0x01000003)</span></div><div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;<span class="preprocessor">#define PSA_ALG_RIPEMD160                       ((psa_algorithm_t)0x01000004)</span></div><div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_1                           ((psa_algorithm_t)0x01000005)</span></div><div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;</div><div class="line"><a name="l00683"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga25d6a3244d10a7148fe6b026d1979f7b">  683</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_224                         ((psa_algorithm_t)0x01000008)</span></div><div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;</div><div class="line"><a name="l00685"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga619471f978e13cdd0a1e37145e4bf341">  685</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_256                         ((psa_algorithm_t)0x01000009)</span></div><div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;</div><div class="line"><a name="l00687"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga58af64dd9a86a287e8da9ed7739eead4">  687</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_384                         ((psa_algorithm_t)0x0100000a)</span></div><div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;</div><div class="line"><a name="l00689"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gafba3ae409f46d3dd7f37a0910660c3e9">  689</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_512                         ((psa_algorithm_t)0x0100000b)</span></div><div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;</div><div class="line"><a name="l00691"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga3fe2d7c3c80e3186ca78d16a35d5d931">  691</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_512_224                     ((psa_algorithm_t)0x0100000c)</span></div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;</div><div class="line"><a name="l00693"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5910b3964c14e9613e8643a45b09c2d4">  693</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA_512_256                     ((psa_algorithm_t)0x0100000d)</span></div><div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;</div><div class="line"><a name="l00695"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga16f5fe34ccce68c2fada1224c054a999">  695</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_224                        ((psa_algorithm_t)0x01000010)</span></div><div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;</div><div class="line"><a name="l00697"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaace70d9515489bbe3c5e7ac1b7d9155b">  697</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_256                        ((psa_algorithm_t)0x01000011)</span></div><div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;</div><div class="line"><a name="l00699"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab0f079257ea75e2acfe2fc3b38c78cd8">  699</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_384                        ((psa_algorithm_t)0x01000012)</span></div><div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;</div><div class="line"><a name="l00701"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga37e5dbe936dddb155e76f2997de27188">  701</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SHA3_512                        ((psa_algorithm_t)0x01000013)</span></div><div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;</div><div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;<span class="preprocessor">#define PSA_ALG_MAC_SUBCATEGORY_MASK            ((psa_algorithm_t)0x00c00000)</span></div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;<span class="preprocessor">#define PSA_ALG_HMAC_BASE                       ((psa_algorithm_t)0x02800000)</span></div><div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;</div><div class="line"><a name="l00716"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga70f397425684b3efcde1e0e34c28261f">  716</a></span>&#160;<span class="preprocessor">#define PSA_ALG_HMAC(hash_alg)                                  \</span></div><div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;<span class="preprocessor">    (PSA_ALG_HMAC_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;</div><div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;<span class="preprocessor">#define PSA_ALG_HMAC_GET_HASH(hmac_alg)                             \</span></div><div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;<span class="preprocessor">    (PSA_ALG_CATEGORY_HASH | ((hmac_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;</div><div class="line"><a name="l00732"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4a050c3c3cbc6eb96418f18847601c8a">  732</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_HMAC(alg)                                            \</span></div><div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;<span class="preprocessor">    (((alg) &amp; (PSA_ALG_CATEGORY_MASK | PSA_ALG_MAC_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;<span class="preprocessor">     PSA_ALG_HMAC_BASE)</span></div><div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;</div><div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;<span class="comment">/* In the encoding of a MAC algorithm, the bits corresponding to</span></div><div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;<span class="comment"> * PSA_ALG_MAC_TRUNCATION_MASK encode the length to which the MAC is</span></div><div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;<span class="comment"> * truncated. As an exception, the value 0 means the untruncated algorithm,</span></div><div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;<span class="comment"> * whatever its length is. The length is encoded in 6 bits, so it can</span></div><div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;<span class="comment"> * reach up to 63; the largest MAC is 64 bytes so its trivial truncation</span></div><div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;<span class="comment"> * to full length is correctly encoded as 0 and any non-trivial truncation</span></div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;<span class="comment"> * is correctly encoded as a value between 1 and 63. */</span></div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;<span class="preprocessor">#define PSA_ALG_MAC_TRUNCATION_MASK             ((psa_algorithm_t)0x00003f00)</span></div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;<span class="preprocessor">#define PSA_MAC_TRUNCATION_OFFSET 8</span></div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;</div><div class="line"><a name="l00779"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf36137110baf7bb13c5028fd62c64276">  779</a></span>&#160;<span class="preprocessor">#define PSA_ALG_TRUNCATED_MAC(alg, mac_length)                          \</span></div><div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_MAC_TRUNCATION_MASK) |                           \</span></div><div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;<span class="preprocessor">     ((mac_length) &lt;&lt; PSA_MAC_TRUNCATION_OFFSET &amp; PSA_ALG_MAC_TRUNCATION_MASK))</span></div><div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;</div><div class="line"><a name="l00795"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa05a8d99634f3350597ac9284fb70cb1">  795</a></span>&#160;<span class="preprocessor">#define PSA_ALG_FULL_LENGTH_MAC(alg)            \</span></div><div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;<span class="preprocessor">    ((alg) &amp; ~PSA_ALG_MAC_TRUNCATION_MASK)</span></div><div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;</div><div class="line"><a name="l00809"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab03726c4476174e019a08e2a04018ce8">  809</a></span>&#160;<span class="preprocessor">#define PSA_MAC_TRUNCATED_LENGTH(alg)           \</span></div><div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_MAC_TRUNCATION_MASK) &gt;&gt; PSA_MAC_TRUNCATION_OFFSET)</span></div><div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;</div><div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;<span class="preprocessor">#define PSA_ALG_CIPHER_MAC_BASE                 ((psa_algorithm_t)0x02c00000)</span></div><div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;<span class="preprocessor">#define PSA_ALG_CBC_MAC                         ((psa_algorithm_t)0x02c00001)</span></div><div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;<span class="preprocessor">#define PSA_ALG_CMAC                            ((psa_algorithm_t)0x02c00002)</span></div><div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;<span class="preprocessor">#define PSA_ALG_GMAC                            ((psa_algorithm_t)0x02c00003)</span></div><div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;</div><div class="line"><a name="l00825"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae49d1eb601125d65a5c5b252aa45479e">  825</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_BLOCK_CIPHER_MAC(alg)                                \</span></div><div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;<span class="preprocessor">    (((alg) &amp; (PSA_ALG_CATEGORY_MASK | PSA_ALG_MAC_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;<span class="preprocessor">     PSA_ALG_CIPHER_MAC_BASE)</span></div><div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;</div><div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;<span class="preprocessor">#define PSA_ALG_CIPHER_STREAM_FLAG              ((psa_algorithm_t)0x00800000)</span></div><div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;<span class="preprocessor">#define PSA_ALG_CIPHER_FROM_BLOCK_FLAG          ((psa_algorithm_t)0x00400000)</span></div><div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;</div><div class="line"><a name="l00844"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacfec68e0c6175e02e1b2ebc97df383c0">  844</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_STREAM_CIPHER(alg)            \</span></div><div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;<span class="preprocessor">    (((alg) &amp; (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_STREAM_FLAG)) == \</span></div><div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;<span class="preprocessor">        (PSA_ALG_CATEGORY_CIPHER | PSA_ALG_CIPHER_STREAM_FLAG))</span></div><div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;</div><div class="line"><a name="l00850"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab6a5284decb0e5e1b5b8740a41ef3c5e">  850</a></span>&#160;<span class="preprocessor">#define PSA_ALG_ARC4                            ((psa_algorithm_t)0x04800001)</span></div><div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;</div><div class="line"><a name="l00859"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad318309706a769cffdc64e4c7e06b2e9">  859</a></span>&#160;<span class="preprocessor">#define PSA_ALG_CTR                             ((psa_algorithm_t)0x04c00001)</span></div><div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;</div><div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;<span class="preprocessor">#define PSA_ALG_CFB                             ((psa_algorithm_t)0x04c00002)</span></div><div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;</div><div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;<span class="preprocessor">#define PSA_ALG_OFB                             ((psa_algorithm_t)0x04c00003)</span></div><div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;</div><div class="line"><a name="l00871"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa722c0e426a797fd6d99623f59748125">  871</a></span>&#160;<span class="preprocessor">#define PSA_ALG_XTS                             ((psa_algorithm_t)0x044000ff)</span></div><div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;</div><div class="line"><a name="l00880"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacb332d72716958880ee7f97d8365ae66">  880</a></span>&#160;<span class="preprocessor">#define PSA_ALG_CBC_NO_PADDING                  ((psa_algorithm_t)0x04600100)</span></div><div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;</div><div class="line"><a name="l00888"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaef50d2e9716eb6d476046608e4e0c78c">  888</a></span>&#160;<span class="preprocessor">#define PSA_ALG_CBC_PKCS7                       ((psa_algorithm_t)0x04600101)</span></div><div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;</div><div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;<span class="preprocessor">#define PSA_ALG_CCM                             ((psa_algorithm_t)0x06001001)</span></div><div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;<span class="preprocessor">#define PSA_ALG_GCM                             ((psa_algorithm_t)0x06001002)</span></div><div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;</div><div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;<span class="comment">/* In the encoding of a AEAD algorithm, the bits corresponding to</span></div><div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;<span class="comment"> * PSA_ALG_AEAD_TAG_LENGTH_MASK encode the length of the AEAD tag.</span></div><div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;<span class="comment"> * The constants for default lengths follow this encoding.</span></div><div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;<span class="preprocessor">#define PSA_ALG_AEAD_TAG_LENGTH_MASK            ((psa_algorithm_t)0x00003f00)</span></div><div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;<span class="preprocessor">#define PSA_AEAD_TAG_LENGTH_OFFSET 8</span></div><div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;</div><div class="line"><a name="l00918"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa63c520b62ab001d54d28801742fc9db">  918</a></span>&#160;<span class="preprocessor">#define PSA_ALG_AEAD_WITH_TAG_LENGTH(alg, tag_length)                   \</span></div><div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_AEAD_TAG_LENGTH_MASK) |                          \</span></div><div class="line"><a name="l00920"></a><span class="lineno">  920</span>&#160;<span class="preprocessor">     ((tag_length) &lt;&lt; PSA_AEAD_TAG_LENGTH_OFFSET &amp;                      \</span></div><div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;<span class="preprocessor">      PSA_ALG_AEAD_TAG_LENGTH_MASK))</span></div><div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;</div><div class="line"><a name="l00931"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaddea507e062250cda8a29407a9480d2b">  931</a></span>&#160;<span class="preprocessor">#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH(alg)                       \</span></div><div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;<span class="preprocessor">    (                                                                   \</span></div><div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160;<span class="preprocessor">        PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(alg, PSA_ALG_CCM)   \</span></div><div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;<span class="preprocessor">        PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(alg, PSA_ALG_GCM)   \</span></div><div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160;<span class="preprocessor">        0)</span></div><div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;<span class="preprocessor">#define PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(alg, ref) \</span></div><div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;<span class="preprocessor">    PSA_ALG_AEAD_WITH_TAG_LENGTH(alg, 0) == \</span></div><div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;<span class="preprocessor">    PSA_ALG_AEAD_WITH_TAG_LENGTH(ref, 0) ?  \</span></div><div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;<span class="preprocessor">    ref :</span></div><div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;</div><div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN_BASE          ((psa_algorithm_t)0x10020000)</span></div><div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;</div><div class="line"><a name="l00955"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga702ff75385a6ae7d4247033f479439af">  955</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN(hash_alg)                             \</span></div><div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;<span class="preprocessor">    (PSA_ALG_RSA_PKCS1V15_SIGN_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;</div><div class="line"><a name="l00963"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4215e2a78dcf834e9a625927faa2a817">  963</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN_RAW PSA_ALG_RSA_PKCS1V15_SIGN_BASE</span></div><div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg)                               \</span></div><div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PKCS1V15_SIGN_BASE)</span></div><div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160;</div><div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PSS_BASE               ((psa_algorithm_t)0x10030000)</span></div><div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;</div><div class="line"><a name="l00984"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga62152bf4cb4bf6aace5e1be8f143564d">  984</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PSS(hash_alg)                               \</span></div><div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;<span class="preprocessor">    (PSA_ALG_RSA_PSS_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RSA_PSS(alg)                                 \</span></div><div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PSS_BASE)</span></div><div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160;</div><div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;<span class="preprocessor">#define PSA_ALG_DSA_BASE                        ((psa_algorithm_t)0x10040000)</span></div><div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;</div><div class="line"><a name="l01002"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9a68efdddff5ae95f104a1416b12742e"> 1002</a></span>&#160;<span class="preprocessor">#define PSA_ALG_DSA(hash_alg)                             \</span></div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;<span class="preprocessor">    (PSA_ALG_DSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_DSA_BASE          ((psa_algorithm_t)0x10050000)</span></div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;<span class="preprocessor">#define PSA_ALG_DSA_DETERMINISTIC_FLAG          ((psa_algorithm_t)0x00010000)</span></div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_DSA(hash_alg)                             \</span></div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;<span class="preprocessor">    (PSA_ALG_DETERMINISTIC_DSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_DSA(alg)                                             \</span></div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK &amp; ~PSA_ALG_DSA_DETERMINISTIC_FLAG) ==  \</span></div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;<span class="preprocessor">     PSA_ALG_DSA_BASE)</span></div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;<span class="preprocessor">#define PSA_ALG_DSA_IS_DETERMINISTIC(alg)               \</span></div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0)</span></div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_DETERMINISTIC_DSA(alg)                       \</span></div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_DSA(alg) &amp;&amp; PSA_ALG_DSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RANDOMIZED_DSA(alg)                          \</span></div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_DSA(alg) &amp;&amp; !PSA_ALG_DSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;</div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA_BASE                      ((psa_algorithm_t)0x10060000)</span></div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;</div><div class="line"><a name="l01037"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga7e3ce9f514a227d5ba5d8318870452e3"> 1037</a></span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA(hash_alg)                                 \</span></div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;<span class="preprocessor">    (PSA_ALG_ECDSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;</div><div class="line"><a name="l01048"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga51d6b6044a62e33cae0cf64bfc3b22a4"> 1048</a></span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA_ANY PSA_ALG_ECDSA_BASE</span></div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_ECDSA_BASE        ((psa_algorithm_t)0x10070000)</span></div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;</div><div class="line"><a name="l01070"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga11da566bcd341661c8de921e2ca5ed03"> 1070</a></span>&#160;<span class="preprocessor">#define PSA_ALG_DETERMINISTIC_ECDSA(hash_alg)                           \</span></div><div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;<span class="preprocessor">    (PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_ECDSA(alg)                                           \</span></div><div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK &amp; ~PSA_ALG_DSA_DETERMINISTIC_FLAG) ==  \</span></div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;<span class="preprocessor">     PSA_ALG_ECDSA_BASE)</span></div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;<span class="preprocessor">#define PSA_ALG_ECDSA_IS_DETERMINISTIC(alg)             \</span></div><div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0)</span></div><div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_DETERMINISTIC_ECDSA(alg)                             \</span></div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_ECDSA(alg) &amp;&amp; PSA_ALG_ECDSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RANDOMIZED_ECDSA(alg)                                \</span></div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_ECDSA(alg) &amp;&amp; !PSA_ALG_ECDSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;</div><div class="line"><a name="l01100"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga24cf6d7bcd2b9aeeeff86f07b6c674e3"> 1100</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SIGN_GET_HASH(alg)                                     \</span></div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) ||   \</span></div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160;<span class="preprocessor">     PSA_ALG_IS_DSA(alg) || PSA_ALG_IS_ECDSA(alg) ?                    \</span></div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160;<span class="preprocessor">     ((alg) &amp; PSA_ALG_HASH_MASK) == 0 ? </span><span class="comment">/*&quot;raw&quot; algorithm*/</span><span class="preprocessor"> 0 :        \</span></div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;<span class="preprocessor">     ((alg) &amp; PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH :             \</span></div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160;<span class="preprocessor">     0)</span></div><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;</div><div class="line"><a name="l01109"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4c540d3abe43fb9abcb94f2bc51acef9"> 1109</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_CRYPT              ((psa_algorithm_t)0x12020000)</span></div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;</div><div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_OAEP_BASE                   ((psa_algorithm_t)0x12030000)</span></div><div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;</div><div class="line"><a name="l01126"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa1235dc3fdd9839c6c1b1a9857344c76"> 1126</a></span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_OAEP(hash_alg)                              \</span></div><div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>&#160;<span class="preprocessor">    (PSA_ALG_RSA_OAEP_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>&#160;<span class="preprocessor">#define PSA_ALG_IS_RSA_OAEP(alg)                                \</span></div><div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_OAEP_BASE)</span></div><div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;<span class="preprocessor">#define PSA_ALG_RSA_OAEP_GET_HASH(alg)                          \</span></div><div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;<span class="preprocessor">    (PSA_ALG_IS_RSA_OAEP(alg) ?                                 \</span></div><div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;<span class="preprocessor">     ((alg) &amp; PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH :      \</span></div><div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;<span class="preprocessor">     0)</span></div><div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;</div><div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;<span class="preprocessor">#define PSA_ALG_HKDF_BASE                       ((psa_algorithm_t)0x30000100)</span></div><div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;</div><div class="line"><a name="l01147"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga32a888fb360e6e25cab8a343772c4a82"> 1147</a></span>&#160;<span class="preprocessor">#define PSA_ALG_HKDF(hash_alg)                                  \</span></div><div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160;<span class="preprocessor">    (PSA_ALG_HKDF_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01149"></a><span class="lineno"> 1149</span>&#160;</div><div class="line"><a name="l01160"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1979d0a76fcee6164cf2e65960f38db2"> 1160</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_HKDF(alg)                            \</span></div><div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_HKDF_BASE)</span></div><div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;<span class="preprocessor">#define PSA_ALG_HKDF_GET_HASH(hkdf_alg)                         \</span></div><div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160;<span class="preprocessor">    (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160;</div><div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160;<span class="preprocessor">#define PSA_ALG_TLS12_PRF_BASE                     ((psa_algorithm_t)0x30000200)</span></div><div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160;</div><div class="line"><a name="l01188"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6d5623c2ccda1d4a84e34351af8382d5"> 1188</a></span>&#160;<span class="preprocessor">#define PSA_ALG_TLS12_PRF(hash_alg)                                  \</span></div><div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;<span class="preprocessor">    (PSA_ALG_TLS12_PRF_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160;</div><div class="line"><a name="l01199"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa3c18890c50222e5219f40ade8927e66"> 1199</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_TLS12_PRF(alg)                                    \</span></div><div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_TLS12_PRF_BASE)</span></div><div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>&#160;<span class="preprocessor">#define PSA_ALG_TLS12_PRF_GET_HASH(hkdf_alg)                         \</span></div><div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>&#160;<span class="preprocessor">    (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>&#160;</div><div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>&#160;<span class="preprocessor">#define PSA_ALG_TLS12_PSK_TO_MS_BASE ((psa_algorithm_t)0x30000300)</span></div><div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>&#160;</div><div class="line"><a name="l01228"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga039ec797f15d1635d9b2e09a611f8a68"> 1228</a></span>&#160;<span class="preprocessor">#define PSA_ALG_TLS12_PSK_TO_MS(hash_alg)                                  \</span></div><div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160;<span class="preprocessor">    (PSA_ALG_TLS12_PSK_TO_MS_BASE | ((hash_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;</div><div class="line"><a name="l01239"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab25ecc074a93fd11069bedfbba5a287b"> 1239</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_TLS12_PSK_TO_MS(alg)                                    \</span></div><div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>&#160;<span class="preprocessor">    (((alg) &amp; ~PSA_ALG_HASH_MASK) == PSA_ALG_TLS12_PSK_TO_MS_BASE)</span></div><div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>&#160;<span class="preprocessor">#define PSA_ALG_TLS12_PSK_TO_MS_GET_HASH(hkdf_alg)                         \</span></div><div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>&#160;<span class="preprocessor">    (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) &amp; PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160;</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;<span class="preprocessor">#define PSA_ALG_KEY_DERIVATION_MASK             ((psa_algorithm_t)0x010fffff)</span></div><div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160;</div><div class="line"><a name="l01256"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacbbcb60abf1714722f50f80ce9c21602"> 1256</a></span>&#160;<span class="preprocessor">#define PSA_ALG_SELECT_RAW                      ((psa_algorithm_t)0x31000001)</span></div><div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160;</div><div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;<span class="preprocessor">#define PSA_ALG_KEY_AGREEMENT_GET_KDF(alg)                              \</span></div><div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>&#160;<span class="preprocessor">    (((alg) &amp; PSA_ALG_KEY_DERIVATION_MASK) | PSA_ALG_CATEGORY_KEY_DERIVATION)</span></div><div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>&#160;</div><div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>&#160;<span class="preprocessor">#define PSA_ALG_KEY_AGREEMENT_GET_BASE(alg)                              \</span></div><div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>&#160;<span class="preprocessor">    ((alg) &amp; ~PSA_ALG_KEY_DERIVATION_MASK)</span></div><div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>&#160;</div><div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>&#160;<span class="preprocessor">#define PSA_ALG_FFDH_BASE                       ((psa_algorithm_t)0x22100000)</span></div><div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160;</div><div class="line"><a name="l01287"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga21037568ad0b2e97d76dfc700b6b4483"> 1287</a></span>&#160;<span class="preprocessor">#define PSA_ALG_FFDH(kdf_alg) \</span></div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160;<span class="preprocessor">    (PSA_ALG_FFDH_BASE | ((kdf_alg) &amp; PSA_ALG_KEY_DERIVATION_MASK))</span></div><div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>&#160;</div><div class="line"><a name="l01300"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa3cf76164cd9375af4fb8a291078a19e"> 1300</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_FFDH(alg) \</span></div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;<span class="preprocessor">    (PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) == PSA_ALG_FFDH_BASE)</span></div><div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;</div><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160;<span class="preprocessor">#define PSA_ALG_ECDH_BASE                       ((psa_algorithm_t)0x22200000)</span></div><div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>&#160;</div><div class="line"><a name="l01343"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga974b73fccc5a9142256d8ce3092dff7f"> 1343</a></span>&#160;<span class="preprocessor">#define PSA_ALG_ECDH(kdf_alg) \</span></div><div class="line"><a name="l01344"></a><span class="lineno"> 1344</span>&#160;<span class="preprocessor">    (PSA_ALG_ECDH_BASE | ((kdf_alg) &amp; PSA_ALG_KEY_DERIVATION_MASK))</span></div><div class="line"><a name="l01345"></a><span class="lineno"> 1345</span>&#160;</div><div class="line"><a name="l01358"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9d9b6533d2a6bea7bac7ae01facb820d"> 1358</a></span>&#160;<span class="preprocessor">#define PSA_ALG_IS_ECDH(alg) \</span></div><div class="line"><a name="l01359"></a><span class="lineno"> 1359</span>&#160;<span class="preprocessor">    (PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) == PSA_ALG_ECDH_BASE)</span></div><div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>&#160;</div><div class="line"><a name="l01369"></a><span class="lineno"><a class="line" href="group__key__lifetimes.html#ga6821ff6dd39dc2bc370ded760ad8b0cf"> 1369</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__key__lifetimes.html#ga6821ff6dd39dc2bc370ded760ad8b0cf">psa_key_lifetime_t</a>;</div><div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>&#160;</div><div class="line"><a name="l01373"></a><span class="lineno"><a class="line" href="group__key__lifetimes.html#ga11e986351c65bd3dc3c0fe2cd9926e4b"> 1373</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__key__lifetimes.html#ga11e986351c65bd3dc3c0fe2cd9926e4b">psa_key_id_t</a>;</div><div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>&#160;</div><div class="line"><a name="l01378"></a><span class="lineno"><a class="line" href="group__key__lifetimes.html#ga8b438870ba69489b685730d346455108"> 1378</a></span>&#160;<span class="preprocessor">#define PSA_KEY_LIFETIME_VOLATILE               ((psa_key_lifetime_t)0x00000000)</span></div><div class="line"><a name="l01379"></a><span class="lineno"> 1379</span>&#160;</div><div class="line"><a name="l01392"></a><span class="lineno"><a class="line" href="group__key__lifetimes.html#ga3713a01c5fcd5f7eae46ff22ceaf6d02"> 1392</a></span>&#160;<span class="preprocessor">#define PSA_KEY_LIFETIME_PERSISTENT             ((psa_key_lifetime_t)0x00000001)</span></div><div class="line"><a name="l01393"></a><span class="lineno"> 1393</span>&#160;</div><div class="line"><a name="l01401"></a><span class="lineno"><a class="line" href="group__policy.html#ga7bb9de71337e0e98de843aa7f9b55f25"> 1401</a></span>&#160;<span class="keyword">typedef</span> uint32_t <a class="code" href="group__policy.html#ga7bb9de71337e0e98de843aa7f9b55f25">psa_key_usage_t</a>;</div><div class="line"><a name="l01402"></a><span class="lineno"> 1402</span>&#160;</div><div class="line"><a name="l01414"></a><span class="lineno"><a class="line" href="group__policy.html#ga7dddccdd1303176e87a4d20c87b589ed"> 1414</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_EXPORT                    ((psa_key_usage_t)0x00000001)</span></div><div class="line"><a name="l01415"></a><span class="lineno"> 1415</span>&#160;</div><div class="line"><a name="l01425"></a><span class="lineno"><a class="line" href="group__policy.html#ga75153b296d045d529d97203a6a995dad"> 1425</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_ENCRYPT                   ((psa_key_usage_t)0x00000100)</span></div><div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>&#160;</div><div class="line"><a name="l01436"></a><span class="lineno"><a class="line" href="group__policy.html#gac3f2d2e5983db1edde9f142ca9bf8e6a"> 1436</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_DECRYPT                   ((psa_key_usage_t)0x00000200)</span></div><div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>&#160;</div><div class="line"><a name="l01446"></a><span class="lineno"><a class="line" href="group__policy.html#ga99b9f456cf59efc4b5579465407aef5a"> 1446</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_SIGN                      ((psa_key_usage_t)0x00000400)</span></div><div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>&#160;</div><div class="line"><a name="l01456"></a><span class="lineno"><a class="line" href="group__policy.html#ga39b54ffd5958b69634607924fa53cea6"> 1456</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_VERIFY                    ((psa_key_usage_t)0x00000800)</span></div><div class="line"><a name="l01457"></a><span class="lineno"> 1457</span>&#160;</div><div class="line"><a name="l01460"></a><span class="lineno"><a class="line" href="group__policy.html#gaf19022acc5ef23cf12477f632b48a0b2"> 1460</a></span>&#160;<span class="preprocessor">#define PSA_KEY_USAGE_DERIVE                    ((psa_key_usage_t)0x00001000)</span></div><div class="line"><a name="l01461"></a><span class="lineno"> 1461</span>&#160;</div><div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PSA_CRYPTO_ENUM_H */</span><span class="preprocessor"></span></div><div class="ttc" id="group__crypto__types_html_ga4e8977c145cce5077c4bce7fec890ad9"><div class="ttname"><a href="group__crypto__types.html#ga4e8977c145cce5077c4bce7fec890ad9">psa_ecc_curve_t</a></div><div class="ttdeci">uint16_t psa_ecc_curve_t</div><div class="ttdef"><b>Definition:</b> crypto_enum.h:480</div></div>
+<div class="ttc" id="group__key__lifetimes_html_ga11e986351c65bd3dc3c0fe2cd9926e4b"><div class="ttname"><a href="group__key__lifetimes.html#ga11e986351c65bd3dc3c0fe2cd9926e4b">psa_key_id_t</a></div><div class="ttdeci">uint32_t psa_key_id_t</div><div class="ttdef"><b>Definition:</b> crypto_enum.h:1373</div></div>
+<div class="ttc" id="group__crypto__types_html_gac2e4d47f1300d73c2f829a6d99252d69"><div class="ttname"><a href="group__crypto__types.html#gac2e4d47f1300d73c2f829a6d99252d69">psa_algorithm_t</a></div><div class="ttdeci">uint32_t psa_algorithm_t</div><div class="ttdoc">Encoding of a cryptographic algorithm. </div><div class="ttdef"><b>Definition:</b> crypto_enum.h:557</div></div>
+<div class="ttc" id="group__policy_html_ga7bb9de71337e0e98de843aa7f9b55f25"><div class="ttname"><a href="group__policy.html#ga7bb9de71337e0e98de843aa7f9b55f25">psa_key_usage_t</a></div><div class="ttdeci">uint32_t psa_key_usage_t</div><div class="ttdoc">Encoding of permitted usage on a key. </div><div class="ttdef"><b>Definition:</b> crypto_enum.h:1401</div></div>
+<div class="ttc" id="group__crypto__types_html_ga578159487dfc7096cb191b0d2befe628"><div class="ttname"><a href="group__crypto__types.html#ga578159487dfc7096cb191b0d2befe628">psa_key_type_t</a></div><div class="ttdeci">uint32_t psa_key_type_t</div><div class="ttdoc">Encoding of a key type. </div><div class="ttdef"><b>Definition:</b> crypto_enum.h:315</div></div>
+<div class="ttc" id="group__key__lifetimes_html_ga6821ff6dd39dc2bc370ded760ad8b0cf"><div class="ttname"><a href="group__key__lifetimes.html#ga6821ff6dd39dc2bc370ded760ad8b0cf">psa_key_lifetime_t</a></div><div class="ttdeci">uint32_t psa_key_lifetime_t</div><div class="ttdef"><b>Definition:</b> crypto_enum.h:1369</div></div>
+<div class="ttc" id="group__error_html_ga05676e70ba5c6a7565aff3c36677c1f9"><div class="ttname"><a href="group__error.html#ga05676e70ba5c6a7565aff3c36677c1f9">psa_status_t</a></div><div class="ttdeci">int32_t psa_status_t</div><div class="ttdoc">Function return status. </div><div class="ttdef"><b>Definition:</b> crypto_enum.h:66</div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>