Gilles Peskine | 89f0a53 | 2019-01-31 11:47:57 +0100 | [diff] [blame^] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.11"/> |
| 7 | <title>Platform Security Architecture — cryptography and keystore interface: psa/crypto_values.h Source File</title> |
| 8 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 9 | <script type="text/javascript" src="jquery.js"></script> |
| 10 | <script type="text/javascript" src="dynsections.js"></script> |
| 11 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 12 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 13 | <script type="text/javascript" src="search/search.js"></script> |
| 14 | <script type="text/javascript"> |
| 15 | $(document).ready(function() { init_search(); }); |
| 16 | </script> |
| 17 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 18 | </head> |
| 19 | <body> |
| 20 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 21 | <div id="titlearea"> |
| 22 | <table cellspacing="0" cellpadding="0"> |
| 23 | <tbody> |
| 24 | <tr style="height: 56px;"> |
| 25 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 26 | <div id="projectname">Platform Security Architecture — cryptography and keystore interface |
| 27 |  <span id="projectnumber">beta 1 — 2019-01-21</span> |
| 28 | </div> |
| 29 | </td> |
| 30 | </tr> |
| 31 | </tbody> |
| 32 | </table> |
| 33 | </div> |
| 34 | <!-- end header part --> |
| 35 | <!-- Generated by Doxygen 1.8.11 --> |
| 36 | <script type="text/javascript"> |
| 37 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 38 | </script> |
| 39 | <div id="navrow1" class="tabs"> |
| 40 | <ul class="tablist"> |
| 41 | <li><a href="index.html"><span>Main Page</span></a></li> |
| 42 | <li><a href="modules.html"><span>Modules</span></a></li> |
| 43 | <li><a href="annotated.html"><span>Classes</span></a></li> |
| 44 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
| 45 | <li> |
| 46 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 47 | <span class="left"> |
| 48 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 49 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 50 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 51 | alt=""/> |
| 52 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 53 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 54 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 55 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 56 | </span><span class="right"> |
| 57 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 58 | </span> |
| 59 | </div> |
| 60 | </li> |
| 61 | </ul> |
| 62 | </div> |
| 63 | <div id="navrow2" class="tabs2"> |
| 64 | <ul class="tablist"> |
| 65 | <li><a href="files.html"><span>File List</span></a></li> |
| 66 | <li><a href="globals.html"><span>File Members</span></a></li> |
| 67 | </ul> |
| 68 | </div> |
| 69 | <!-- window showing the filter options --> |
| 70 | <div id="MSearchSelectWindow" |
| 71 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 72 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 73 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 74 | </div> |
| 75 | |
| 76 | <!-- iframe showing the search results (closed by default) --> |
| 77 | <div id="MSearchResultsWindow"> |
| 78 | <iframe src="javascript:void(0)" frameborder="0" |
| 79 | name="MSearchResults" id="MSearchResults"> |
| 80 | </iframe> |
| 81 | </div> |
| 82 | |
| 83 | <div id="nav-path" class="navpath"> |
| 84 | <ul> |
| 85 | <li class="navelem"><a class="el" href="dir_7dae9cfde651cd3cb034485ce5e391b9.html">psa</a></li> </ul> |
| 86 | </div> |
| 87 | </div><!-- top --> |
| 88 | <div class="header"> |
| 89 | <div class="headertitle"> |
| 90 | <div class="title">crypto_values.h</div> </div> |
| 91 | </div><!--header--> |
| 92 | <div class="contents"> |
| 93 | <a href="crypto__values_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> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">/*</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <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> <span class="comment"> * SPDX-License-Identifier: Apache-2.0</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> *</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License"); you may</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <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> <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> <span class="comment"> *</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <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> <span class="comment"> *</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <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> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <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> <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> <span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> *</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <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> <span class="comment"> */</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#ifndef PSA_CRYPTO_VALUES_H</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#define PSA_CRYPTO_VALUES_H</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#if !defined(PSA_SUCCESS)</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">/* If PSA_SUCCESS is defined, assume that PSA crypto is being used</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> * together with PSA IPC, which also defines the identifier</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment"> * PSA_SUCCESS. We must not define PSA_SUCCESS ourselves in that case;</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment"> * the other error code names don't clash. This is a temporary hack</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"> * until we unify error reporting in PSA IPC and PSA crypto.</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"> *</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"> * Note that psa_defs.h must be included before this header!</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> */</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="group__error.html#ga4cc859e2c66ca381c7418db3527a65e1"> 53</a></span> <span class="preprocessor">#define PSA_SUCCESS ((psa_status_t)0)</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#endif </span><span class="comment">/* !defined(PSA_SUCCESS) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="group__error.html#ga24d5fdcdd759f846f79d9e581c63a83f"> 61</a></span> <span class="preprocessor">#define PSA_ERROR_UNKNOWN_ERROR ((psa_status_t)1)</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="group__error.html#ga1dcc6d130633ed5db8942257581b55dd"> 70</a></span> <span class="preprocessor">#define PSA_ERROR_NOT_SUPPORTED ((psa_status_t)2)</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="group__error.html#ga4d1b8dd8526177a15a210b7afc1accb1"> 83</a></span> <span class="preprocessor">#define PSA_ERROR_NOT_PERMITTED ((psa_status_t)3)</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="group__error.html#ga695025f4ec11249aee7ea3d0f65e01c8"> 95</a></span> <span class="preprocessor">#define PSA_ERROR_BUFFER_TOO_SMALL ((psa_status_t)4)</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="group__error.html#gac2fee3a51249fbea45360aaa911f3e58"> 103</a></span> <span class="preprocessor">#define PSA_ERROR_OCCUPIED_SLOT ((psa_status_t)5)</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="group__error.html#gaba00e3e6ceb2b12965a81e5ac02ae040"> 111</a></span> <span class="preprocessor">#define PSA_ERROR_EMPTY_SLOT ((psa_status_t)6)</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="group__error.html#ga933d40fa2a591004f2e93aa91e11db84"> 123</a></span> <span class="preprocessor">#define PSA_ERROR_BAD_STATE ((psa_status_t)7)</span></div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="group__error.html#ga798df25a505ebf931f7bec1f80f1f85f"> 139</a></span> <span class="preprocessor">#define PSA_ERROR_INVALID_ARGUMENT ((psa_status_t)8)</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="group__error.html#ga91b2ad8a867517a2651f1b076c5216e5"> 145</a></span> <span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_MEMORY ((psa_status_t)9)</span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="group__error.html#ga897a45eb206a6f6b7be7ffbe36f0d766"> 154</a></span> <span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_STORAGE ((psa_status_t)10)</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="group__error.html#ga5cdb6948371d49e916106249020ea3f7"> 171</a></span> <span class="preprocessor">#define PSA_ERROR_COMMUNICATION_FAILURE ((psa_status_t)11)</span></div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="group__error.html#gadd169a1af2707862b95fb9df91dfc37d"> 196</a></span> <span class="preprocessor">#define PSA_ERROR_STORAGE_FAILURE ((psa_status_t)12)</span></div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="group__error.html#ga08b10e70fa5ff0b05c631d9f8f6b2c6b"> 202</a></span> <span class="preprocessor">#define PSA_ERROR_HARDWARE_FAILURE ((psa_status_t)13)</span></div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="group__error.html#ga2c5dda1485cb54f2385cb9c1279a7004"> 233</a></span> <span class="preprocessor">#define PSA_ERROR_TAMPERING_DETECTED ((psa_status_t)14)</span></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> </div><div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="group__error.html#ga4deb59fec02297ec5d8b42178323f675"> 252</a></span> <span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_ENTROPY ((psa_status_t)15)</span></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div><div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="group__error.html#ga35927f755d232c4766de600f2c49e9f2"> 262</a></span> <span class="preprocessor">#define PSA_ERROR_INVALID_SIGNATURE ((psa_status_t)16)</span></div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span> </div><div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="group__error.html#gabe29594edbfb152cf153975b0597ac48"> 278</a></span> <span class="preprocessor">#define PSA_ERROR_INVALID_PADDING ((psa_status_t)17)</span></div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span> </div><div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="group__error.html#gaf1fa61f72e9e5b4a848c991bea495767"> 284</a></span> <span class="preprocessor">#define PSA_ERROR_INSUFFICIENT_CAPACITY ((psa_status_t)18)</span></div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span> </div><div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="group__error.html#gadf22718935657c2c3168c228204085f9"> 288</a></span> <span class="preprocessor">#define PSA_ERROR_INVALID_HANDLE ((psa_status_t)19)</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span> </div><div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gafce7ab2b54ce97ea5bff73f13a9f3e5b"> 300</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_NONE ((psa_key_type_t)0x00000000)</span></div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span> </div><div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga8dbaed2fdb1ebae8aa127ad3988516f7"> 309</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_VENDOR_FLAG ((psa_key_type_t)0x80000000)</span></div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span> </div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span> <span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_MASK ((psa_key_type_t)0x70000000)</span></div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span> <span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_SYMMETRIC ((psa_key_type_t)0x40000000)</span></div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span> <span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_RAW ((psa_key_type_t)0x50000000)</span></div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span> <span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY ((psa_key_type_t)0x60000000)</span></div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> <span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_KEY_PAIR ((psa_key_type_t)0x70000000)</span></div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span> </div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span> <span class="preprocessor">#define PSA_KEY_TYPE_CATEGORY_FLAG_PAIR ((psa_key_type_t)0x10000000)</span></div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span> </div><div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gadbe4c086a6562aefe344bc79e51bdfd3"> 320</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_VENDOR_DEFINED(type) \</span></div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span> <span class="preprocessor"> (((type) & PSA_KEY_TYPE_VENDOR_FLAG) != 0)</span></div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span> </div><div class="line"><a name="l00327"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaef86ce4e810e1c2c76068ac874bfef54"> 327</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_UNSTRUCTURED(type) \</span></div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span> <span class="preprocessor"> (((type) & PSA_KEY_TYPE_CATEGORY_MASK & ~(psa_key_type_t)0x10000000) == \</span></div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span> <span class="preprocessor"> PSA_KEY_TYPE_CATEGORY_SYMMETRIC)</span></div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> </div><div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab138ae2ebf2905dfbaf4154db2620939"> 332</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_ASYMMETRIC(type) \</span></div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span> <span class="preprocessor"> (((type) & PSA_KEY_TYPE_CATEGORY_MASK \</span></div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span> <span class="preprocessor"> & ~PSA_KEY_TYPE_CATEGORY_FLAG_PAIR) == \</span></div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span> <span class="preprocessor"> PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY)</span></div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span> </div><div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac674a0f059bc0cb72b47f0c517b4f45b"> 337</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_PUBLIC_KEY(type) \</span></div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> <span class="preprocessor"> (((type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY)</span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> </div><div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac14c6d6e1b2b7f4a92a7b757465cff29"> 341</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_KEYPAIR(type) \</span></div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span> <span class="preprocessor"> (((type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_KEY_PAIR)</span></div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span> </div><div class="line"><a name="l00353"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf09f1ca1de6a7e7cff0fe516f3f6c91d"> 353</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_KEYPAIR_OF_PUBLIC_KEY(type) \</span></div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span> <span class="preprocessor"> ((type) | PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)</span></div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span> </div><div class="line"><a name="l00365"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gace08e46dd7cbf642d50d982a25d02bec"> 365</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) \</span></div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span> <span class="preprocessor"> ((type) & ~PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)</span></div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span> </div><div class="line"><a name="l00372"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa97f92025533102616b32d571c940d80"> 372</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_RAW_DATA ((psa_key_type_t)0x50000001)</span></div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span> </div><div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga92d989f4ca64abd00f463defd773a6f8"> 382</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_HMAC ((psa_key_type_t)0x51000000)</span></div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span> </div><div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae871b2357b8593f33bfd51abbf93ebb1"> 389</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_DERIVE ((psa_key_type_t)0x52000000)</span></div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span> </div><div class="line"><a name="l00396"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6ee54579dcf278c677eda4bb1a29575e"> 396</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_AES ((psa_key_type_t)0x40000001)</span></div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span> </div><div class="line"><a name="l00407"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga577562bfbbc691c820d55ec308333138"> 407</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_DES ((psa_key_type_t)0x40000002)</span></div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span> </div><div class="line"><a name="l00411"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad8e5da742343fd5519f9d8a630c2ed81"> 411</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_CAMELLIA ((psa_key_type_t)0x40000003)</span></div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span> </div><div class="line"><a name="l00417"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae4d46e83f910dcaa126000a8ed03cde9"> 417</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_ARC4 ((psa_key_type_t)0x40000004)</span></div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span> </div><div class="line"><a name="l00420"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9ba0878f56c8bcd1995ac017a74f513b"> 420</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_RSA_PUBLIC_KEY ((psa_key_type_t)0x60010000)</span></div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span> </div><div class="line"><a name="l00422"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga581f50687f5d650456925278948f2799"> 422</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_RSA_KEYPAIR ((psa_key_type_t)0x70010000)</span></div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span> </div><div class="line"><a name="l00424"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0e1d8f241228e49c9cadadfb4579ef1a"> 424</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_RSA(type) \</span></div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span> <span class="preprocessor"> (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) == PSA_KEY_TYPE_RSA_PUBLIC_KEY)</span></div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> </div><div class="line"><a name="l00428"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5e7439c2905136366c3a876e62e5ddfc"> 428</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_DSA_PUBLIC_KEY ((psa_key_type_t)0x60020000)</span></div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span> </div><div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga011010ee28c20388f3d89fb27088ed62"> 430</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_DSA_KEYPAIR ((psa_key_type_t)0x70020000)</span></div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span> </div><div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga273fdfcf23eb0624f8b63d2321cf95c1"> 432</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_DSA(type) \</span></div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span> <span class="preprocessor"> (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY)</span></div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span> </div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span> <span class="preprocessor">#define PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE ((psa_key_type_t)0x60030000)</span></div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span> <span class="preprocessor">#define PSA_KEY_TYPE_ECC_KEYPAIR_BASE ((psa_key_type_t)0x70030000)</span></div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> <span class="preprocessor">#define PSA_KEY_TYPE_ECC_CURVE_MASK ((psa_key_type_t)0x0000ffff)</span></div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span> </div><div class="line"><a name="l00439"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gadf3ad65d157bf5282849c954bf3f51af"> 439</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_ECC_KEYPAIR(curve) \</span></div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span> <span class="preprocessor"> (PSA_KEY_TYPE_ECC_KEYPAIR_BASE | (curve))</span></div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span> </div><div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad54c03d3b47020e571a72cd01d978cf2"> 442</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve) \</span></div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span> <span class="preprocessor"> (PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve))</span></div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span> </div><div class="line"><a name="l00446"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga88e01fa06b585654689a99bcc06bbe66"> 446</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC(type) \</span></div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span> <span class="preprocessor"> ((PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) & \</span></div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span> <span class="preprocessor"> ~PSA_KEY_TYPE_ECC_CURVE_MASK) == PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE)</span></div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span> </div><div class="line"><a name="l00450"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga7bf101b671e8cf26f4cb08fcb679db4b"> 450</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC_KEYPAIR(type) \</span></div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span> <span class="preprocessor"> (((type) & ~PSA_KEY_TYPE_ECC_CURVE_MASK) == \</span></div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span> <span class="preprocessor"> PSA_KEY_TYPE_ECC_KEYPAIR_BASE)</span></div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span> </div><div class="line"><a name="l00454"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5af146a173b0c84d7e737e2fb6a3c0a7"> 454</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(type) \</span></div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="preprocessor"> (((type) & ~PSA_KEY_TYPE_ECC_CURVE_MASK) == \</span></div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span> <span class="preprocessor"> PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE)</span></div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span> </div><div class="line"><a name="l00459"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0c567210e6f80aa8f2aa87efa7a3a3f9"> 459</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_GET_CURVE(type) \</span></div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span> <span class="preprocessor"> ((psa_ecc_curve_t) (PSA_KEY_TYPE_IS_ECC(type) ? \</span></div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span> <span class="preprocessor"> ((type) & PSA_KEY_TYPE_ECC_CURVE_MASK) : \</span></div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span> <span class="preprocessor"> 0))</span></div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span> </div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span> <span class="comment">/* The encoding of curve identifiers is currently aligned with the</span></div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span> <span class="comment"> * TLS Supported Groups Registry (formerly known as the</span></div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span> <span class="comment"> * TLS EC Named Curve Registry)</span></div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span> <span class="comment"> * https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8</span></div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span> <span class="comment"> * The values are defined by RFC 8422 and RFC 7027. */</span></div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT163K1 ((psa_ecc_curve_t) 0x0001)</span></div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT163R1 ((psa_ecc_curve_t) 0x0002)</span></div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT163R2 ((psa_ecc_curve_t) 0x0003)</span></div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT193R1 ((psa_ecc_curve_t) 0x0004)</span></div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT193R2 ((psa_ecc_curve_t) 0x0005)</span></div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT233K1 ((psa_ecc_curve_t) 0x0006)</span></div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT233R1 ((psa_ecc_curve_t) 0x0007)</span></div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT239K1 ((psa_ecc_curve_t) 0x0008)</span></div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT283K1 ((psa_ecc_curve_t) 0x0009)</span></div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT283R1 ((psa_ecc_curve_t) 0x000a)</span></div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT409K1 ((psa_ecc_curve_t) 0x000b)</span></div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT409R1 ((psa_ecc_curve_t) 0x000c)</span></div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT571K1 ((psa_ecc_curve_t) 0x000d)</span></div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECT571R1 ((psa_ecc_curve_t) 0x000e)</span></div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP160K1 ((psa_ecc_curve_t) 0x000f)</span></div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP160R1 ((psa_ecc_curve_t) 0x0010)</span></div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP160R2 ((psa_ecc_curve_t) 0x0011)</span></div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP192K1 ((psa_ecc_curve_t) 0x0012)</span></div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP192R1 ((psa_ecc_curve_t) 0x0013)</span></div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP224K1 ((psa_ecc_curve_t) 0x0014)</span></div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP224R1 ((psa_ecc_curve_t) 0x0015)</span></div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP256K1 ((psa_ecc_curve_t) 0x0016)</span></div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP256R1 ((psa_ecc_curve_t) 0x0017)</span></div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP384R1 ((psa_ecc_curve_t) 0x0018)</span></div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span> <span class="preprocessor">#define PSA_ECC_CURVE_SECP521R1 ((psa_ecc_curve_t) 0x0019)</span></div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span> <span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P256R1 ((psa_ecc_curve_t) 0x001a)</span></div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span> <span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P384R1 ((psa_ecc_curve_t) 0x001b)</span></div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span> <span class="preprocessor">#define PSA_ECC_CURVE_BRAINPOOL_P512R1 ((psa_ecc_curve_t) 0x001c)</span></div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span> <span class="preprocessor">#define PSA_ECC_CURVE_CURVE25519 ((psa_ecc_curve_t) 0x001d)</span></div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span> <span class="preprocessor">#define PSA_ECC_CURVE_CURVE448 ((psa_ecc_curve_t) 0x001e)</span></div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span> </div><div class="line"><a name="l00501"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga325a340d7c72d99d3a678eb210bf6e0a"> 501</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_DH_PUBLIC_KEY ((psa_key_type_t)0x60040000)</span></div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span> </div><div class="line"><a name="l00503"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga39b63c6b97a62a316c0660bf72b2fdd5"> 503</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_DH_KEYPAIR ((psa_key_type_t)0x70040000)</span></div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span> </div><div class="line"><a name="l00506"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga248ae35c0e2becaebbf479fc1c3a3b0e"> 506</a></span> <span class="preprocessor">#define PSA_KEY_TYPE_IS_DH(type) \</span></div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span> <span class="preprocessor"> (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) == PSA_KEY_TYPE_DH_PUBLIC_KEY)</span></div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span> </div><div class="line"><a name="l00527"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacaa366bdeb0413e63e87a667c5457b2e"> 527</a></span> <span class="preprocessor">#define PSA_BLOCK_CIPHER_BLOCK_SIZE(type) \</span></div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span> <span class="preprocessor"> ( \</span></div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span> <span class="preprocessor"> (type) == PSA_KEY_TYPE_AES ? 16 : \</span></div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span> <span class="preprocessor"> (type) == PSA_KEY_TYPE_DES ? 8 : \</span></div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span> <span class="preprocessor"> (type) == PSA_KEY_TYPE_CAMELLIA ? 16 : \</span></div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span> <span class="preprocessor"> (type) == PSA_KEY_TYPE_ARC4 ? 1 : \</span></div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span> <span class="preprocessor"> 0)</span></div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span> </div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span> <span class="preprocessor">#define PSA_ALG_VENDOR_FLAG ((psa_algorithm_t)0x80000000)</span></div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_MASK ((psa_algorithm_t)0x7f000000)</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_HASH ((psa_algorithm_t)0x01000000)</span></div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_MAC ((psa_algorithm_t)0x02000000)</span></div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_CIPHER ((psa_algorithm_t)0x04000000)</span></div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_AEAD ((psa_algorithm_t)0x06000000)</span></div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_SIGN ((psa_algorithm_t)0x10000000)</span></div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION ((psa_algorithm_t)0x12000000)</span></div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_KEY_DERIVATION ((psa_algorithm_t)0x20000000)</span></div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span> <span class="preprocessor">#define PSA_ALG_CATEGORY_KEY_AGREEMENT ((psa_algorithm_t)0x30000000)</span></div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span> </div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span> <span class="preprocessor">#define PSA_ALG_IS_VENDOR_DEFINED(alg) \</span></div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span> <span class="preprocessor"> (((alg) & PSA_ALG_VENDOR_FLAG) != 0)</span></div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span> </div><div class="line"><a name="l00557"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gac9280662bb482590b4b33d1dcd32930f"> 557</a></span> <span class="preprocessor">#define PSA_ALG_IS_HASH(alg) \</span></div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH)</span></div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span> </div><div class="line"><a name="l00568"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaca7aee4c9dde316b3b1a150a26eab776"> 568</a></span> <span class="preprocessor">#define PSA_ALG_IS_MAC(alg) \</span></div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_MAC)</span></div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span> </div><div class="line"><a name="l00579"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1d1a5a402ad89a2e68f12bfb535490eb"> 579</a></span> <span class="preprocessor">#define PSA_ALG_IS_CIPHER(alg) \</span></div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER)</span></div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span> </div><div class="line"><a name="l00591"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1d44829d60065eaa4ac9a703e7d6abc8"> 591</a></span> <span class="preprocessor">#define PSA_ALG_IS_AEAD(alg) \</span></div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_AEAD)</span></div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span> </div><div class="line"><a name="l00602"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6d490d0904e0698f6c1268a89d72ff31"> 602</a></span> <span class="preprocessor">#define PSA_ALG_IS_SIGN(alg) \</span></div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_SIGN)</span></div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span> </div><div class="line"><a name="l00613"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga41d2ee937d54efd76bd54a97b2ebc08a"> 613</a></span> <span class="preprocessor">#define PSA_ALG_IS_ASYMMETRIC_ENCRYPTION(alg) \</span></div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION)</span></div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span> </div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span> <span class="preprocessor">#define PSA_ALG_KEY_SELECTION_FLAG ((psa_algorithm_t)0x01000000)</span></div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span> </div><div class="line"><a name="l00625"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga59753742cb06553bd22751bbef472b6f"> 625</a></span> <span class="preprocessor">#define PSA_ALG_IS_KEY_AGREEMENT(alg) \</span></div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK & ~PSA_ALG_KEY_SELECTION_FLAG) == \</span></div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span> <span class="preprocessor"> PSA_ALG_CATEGORY_KEY_AGREEMENT)</span></div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span> </div><div class="line"><a name="l00637"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf8b90c648aa53dbd06c236695e300cd0"> 637</a></span> <span class="preprocessor">#define PSA_ALG_IS_KEY_DERIVATION(alg) \</span></div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_DERIVATION)</span></div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span> </div><div class="line"><a name="l00648"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga51b1834ee5e98c6a83c2cfc7699f9077"> 648</a></span> <span class="preprocessor">#define PSA_ALG_IS_KEY_SELECTION(alg) \</span></div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span> <span class="preprocessor"> (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_SELECTION)</span></div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span> </div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span> <span class="preprocessor">#define PSA_ALG_HASH_MASK ((psa_algorithm_t)0x000000ff)</span></div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span> </div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span> <span class="preprocessor">#define PSA_ALG_MD2 ((psa_algorithm_t)0x01000001)</span></div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span> <span class="preprocessor">#define PSA_ALG_MD4 ((psa_algorithm_t)0x01000002)</span></div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span> <span class="preprocessor">#define PSA_ALG_MD5 ((psa_algorithm_t)0x01000003)</span></div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span> <span class="preprocessor">#define PSA_ALG_RIPEMD160 ((psa_algorithm_t)0x01000004)</span></div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span> <span class="preprocessor">#define PSA_ALG_SHA_1 ((psa_algorithm_t)0x01000005)</span></div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span> </div><div class="line"><a name="l00659"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga25d6a3244d10a7148fe6b026d1979f7b"> 659</a></span> <span class="preprocessor">#define PSA_ALG_SHA_224 ((psa_algorithm_t)0x01000008)</span></div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span> </div><div class="line"><a name="l00661"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga619471f978e13cdd0a1e37145e4bf341"> 661</a></span> <span class="preprocessor">#define PSA_ALG_SHA_256 ((psa_algorithm_t)0x01000009)</span></div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span> </div><div class="line"><a name="l00663"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga58af64dd9a86a287e8da9ed7739eead4"> 663</a></span> <span class="preprocessor">#define PSA_ALG_SHA_384 ((psa_algorithm_t)0x0100000a)</span></div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span> </div><div class="line"><a name="l00665"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gafba3ae409f46d3dd7f37a0910660c3e9"> 665</a></span> <span class="preprocessor">#define PSA_ALG_SHA_512 ((psa_algorithm_t)0x0100000b)</span></div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span> </div><div class="line"><a name="l00667"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga3fe2d7c3c80e3186ca78d16a35d5d931"> 667</a></span> <span class="preprocessor">#define PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0100000c)</span></div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span> </div><div class="line"><a name="l00669"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga5910b3964c14e9613e8643a45b09c2d4"> 669</a></span> <span class="preprocessor">#define PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0100000d)</span></div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span> </div><div class="line"><a name="l00671"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga16f5fe34ccce68c2fada1224c054a999"> 671</a></span> <span class="preprocessor">#define PSA_ALG_SHA3_224 ((psa_algorithm_t)0x01000010)</span></div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span> </div><div class="line"><a name="l00673"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaace70d9515489bbe3c5e7ac1b7d9155b"> 673</a></span> <span class="preprocessor">#define PSA_ALG_SHA3_256 ((psa_algorithm_t)0x01000011)</span></div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span> </div><div class="line"><a name="l00675"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab0f079257ea75e2acfe2fc3b38c78cd8"> 675</a></span> <span class="preprocessor">#define PSA_ALG_SHA3_384 ((psa_algorithm_t)0x01000012)</span></div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span> </div><div class="line"><a name="l00677"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga37e5dbe936dddb155e76f2997de27188"> 677</a></span> <span class="preprocessor">#define PSA_ALG_SHA3_512 ((psa_algorithm_t)0x01000013)</span></div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span> </div><div class="line"><a name="l00712"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa1288ea8bd397a8a3f5e19e94110f2e4"> 712</a></span> <span class="preprocessor">#define PSA_ALG_ANY_HASH ((psa_algorithm_t)0x010000ff)</span></div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span> </div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span> <span class="preprocessor">#define PSA_ALG_MAC_SUBCATEGORY_MASK ((psa_algorithm_t)0x00c00000)</span></div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span> <span class="preprocessor">#define PSA_ALG_HMAC_BASE ((psa_algorithm_t)0x02800000)</span></div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span> </div><div class="line"><a name="l00727"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga70f397425684b3efcde1e0e34c28261f"> 727</a></span> <span class="preprocessor">#define PSA_ALG_HMAC(hash_alg) \</span></div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span> <span class="preprocessor"> (PSA_ALG_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span> </div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span> <span class="preprocessor">#define PSA_ALG_HMAC_GET_HASH(hmac_alg) \</span></div><div class="line"><a name="l00731"></a><span class="lineno"> 731</span> <span class="preprocessor"> (PSA_ALG_CATEGORY_HASH | ((hmac_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00732"></a><span class="lineno"> 732</span> </div><div class="line"><a name="l00743"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4a050c3c3cbc6eb96418f18847601c8a"> 743</a></span> <span class="preprocessor">#define PSA_ALG_IS_HMAC(alg) \</span></div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span> <span class="preprocessor"> (((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_MAC_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00745"></a><span class="lineno"> 745</span> <span class="preprocessor"> PSA_ALG_HMAC_BASE)</span></div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span> </div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span> <span class="comment">/* In the encoding of a MAC algorithm, the bits corresponding to</span></div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span> <span class="comment"> * PSA_ALG_MAC_TRUNCATION_MASK encode the length to which the MAC is</span></div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span> <span class="comment"> * truncated. As an exception, the value 0 means the untruncated algorithm,</span></div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span> <span class="comment"> * whatever its length is. The length is encoded in 6 bits, so it can</span></div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span> <span class="comment"> * reach up to 63; the largest MAC is 64 bytes so its trivial truncation</span></div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span> <span class="comment"> * to full length is correctly encoded as 0 and any non-trivial truncation</span></div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span> <span class="comment"> * is correctly encoded as a value between 1 and 63. */</span></div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span> <span class="preprocessor">#define PSA_ALG_MAC_TRUNCATION_MASK ((psa_algorithm_t)0x00003f00)</span></div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span> <span class="preprocessor">#define PSA_MAC_TRUNCATION_OFFSET 8</span></div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span> </div><div class="line"><a name="l00790"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaf36137110baf7bb13c5028fd62c64276"> 790</a></span> <span class="preprocessor">#define PSA_ALG_TRUNCATED_MAC(alg, mac_length) \</span></div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_MAC_TRUNCATION_MASK) | \</span></div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span> <span class="preprocessor"> ((mac_length) << PSA_MAC_TRUNCATION_OFFSET & PSA_ALG_MAC_TRUNCATION_MASK))</span></div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span> </div><div class="line"><a name="l00806"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa05a8d99634f3350597ac9284fb70cb1"> 806</a></span> <span class="preprocessor">#define PSA_ALG_FULL_LENGTH_MAC(alg) \</span></div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span> <span class="preprocessor"> ((alg) & ~PSA_ALG_MAC_TRUNCATION_MASK)</span></div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span> </div><div class="line"><a name="l00820"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab03726c4476174e019a08e2a04018ce8"> 820</a></span> <span class="preprocessor">#define PSA_MAC_TRUNCATED_LENGTH(alg) \</span></div><div class="line"><a name="l00821"></a><span class="lineno"> 821</span> <span class="preprocessor"> (((alg) & PSA_ALG_MAC_TRUNCATION_MASK) >> PSA_MAC_TRUNCATION_OFFSET)</span></div><div class="line"><a name="l00822"></a><span class="lineno"> 822</span> </div><div class="line"><a name="l00823"></a><span class="lineno"> 823</span> <span class="preprocessor">#define PSA_ALG_CIPHER_MAC_BASE ((psa_algorithm_t)0x02c00000)</span></div><div class="line"><a name="l00824"></a><span class="lineno"> 824</span> <span class="preprocessor">#define PSA_ALG_CBC_MAC ((psa_algorithm_t)0x02c00001)</span></div><div class="line"><a name="l00825"></a><span class="lineno"> 825</span> <span class="preprocessor">#define PSA_ALG_CMAC ((psa_algorithm_t)0x02c00002)</span></div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span> <span class="preprocessor">#define PSA_ALG_GMAC ((psa_algorithm_t)0x02c00003)</span></div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span> </div><div class="line"><a name="l00836"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gae49d1eb601125d65a5c5b252aa45479e"> 836</a></span> <span class="preprocessor">#define PSA_ALG_IS_BLOCK_CIPHER_MAC(alg) \</span></div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span> <span class="preprocessor"> (((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_MAC_SUBCATEGORY_MASK)) == \</span></div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span> <span class="preprocessor"> PSA_ALG_CIPHER_MAC_BASE)</span></div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span> </div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span> <span class="preprocessor">#define PSA_ALG_CIPHER_STREAM_FLAG ((psa_algorithm_t)0x00800000)</span></div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span> <span class="preprocessor">#define PSA_ALG_CIPHER_FROM_BLOCK_FLAG ((psa_algorithm_t)0x00400000)</span></div><div class="line"><a name="l00842"></a><span class="lineno"> 842</span> </div><div class="line"><a name="l00855"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacfec68e0c6175e02e1b2ebc97df383c0"> 855</a></span> <span class="preprocessor">#define PSA_ALG_IS_STREAM_CIPHER(alg) \</span></div><div class="line"><a name="l00856"></a><span class="lineno"> 856</span> <span class="preprocessor"> (((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_STREAM_FLAG)) == \</span></div><div class="line"><a name="l00857"></a><span class="lineno"> 857</span> <span class="preprocessor"> (PSA_ALG_CATEGORY_CIPHER | PSA_ALG_CIPHER_STREAM_FLAG))</span></div><div class="line"><a name="l00858"></a><span class="lineno"> 858</span> </div><div class="line"><a name="l00861"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab6a5284decb0e5e1b5b8740a41ef3c5e"> 861</a></span> <span class="preprocessor">#define PSA_ALG_ARC4 ((psa_algorithm_t)0x04800001)</span></div><div class="line"><a name="l00862"></a><span class="lineno"> 862</span> </div><div class="line"><a name="l00870"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad318309706a769cffdc64e4c7e06b2e9"> 870</a></span> <span class="preprocessor">#define PSA_ALG_CTR ((psa_algorithm_t)0x04c00001)</span></div><div class="line"><a name="l00871"></a><span class="lineno"> 871</span> </div><div class="line"><a name="l00872"></a><span class="lineno"> 872</span> <span class="preprocessor">#define PSA_ALG_CFB ((psa_algorithm_t)0x04c00002)</span></div><div class="line"><a name="l00873"></a><span class="lineno"> 873</span> </div><div class="line"><a name="l00874"></a><span class="lineno"> 874</span> <span class="preprocessor">#define PSA_ALG_OFB ((psa_algorithm_t)0x04c00003)</span></div><div class="line"><a name="l00875"></a><span class="lineno"> 875</span> </div><div class="line"><a name="l00882"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa722c0e426a797fd6d99623f59748125"> 882</a></span> <span class="preprocessor">#define PSA_ALG_XTS ((psa_algorithm_t)0x044000ff)</span></div><div class="line"><a name="l00883"></a><span class="lineno"> 883</span> </div><div class="line"><a name="l00891"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacb332d72716958880ee7f97d8365ae66"> 891</a></span> <span class="preprocessor">#define PSA_ALG_CBC_NO_PADDING ((psa_algorithm_t)0x04600100)</span></div><div class="line"><a name="l00892"></a><span class="lineno"> 892</span> </div><div class="line"><a name="l00899"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaef50d2e9716eb6d476046608e4e0c78c"> 899</a></span> <span class="preprocessor">#define PSA_ALG_CBC_PKCS7 ((psa_algorithm_t)0x04600101)</span></div><div class="line"><a name="l00900"></a><span class="lineno"> 900</span> </div><div class="line"><a name="l00901"></a><span class="lineno"> 901</span> <span class="preprocessor">#define PSA_ALG_CCM ((psa_algorithm_t)0x06001001)</span></div><div class="line"><a name="l00902"></a><span class="lineno"> 902</span> <span class="preprocessor">#define PSA_ALG_GCM ((psa_algorithm_t)0x06001002)</span></div><div class="line"><a name="l00903"></a><span class="lineno"> 903</span> </div><div class="line"><a name="l00904"></a><span class="lineno"> 904</span> <span class="comment">/* In the encoding of a AEAD algorithm, the bits corresponding to</span></div><div class="line"><a name="l00905"></a><span class="lineno"> 905</span> <span class="comment"> * PSA_ALG_AEAD_TAG_LENGTH_MASK encode the length of the AEAD tag.</span></div><div class="line"><a name="l00906"></a><span class="lineno"> 906</span> <span class="comment"> * The constants for default lengths follow this encoding.</span></div><div class="line"><a name="l00907"></a><span class="lineno"> 907</span> <span class="comment"> */</span></div><div class="line"><a name="l00908"></a><span class="lineno"> 908</span> <span class="preprocessor">#define PSA_ALG_AEAD_TAG_LENGTH_MASK ((psa_algorithm_t)0x00003f00)</span></div><div class="line"><a name="l00909"></a><span class="lineno"> 909</span> <span class="preprocessor">#define PSA_AEAD_TAG_LENGTH_OFFSET 8</span></div><div class="line"><a name="l00910"></a><span class="lineno"> 910</span> </div><div class="line"><a name="l00929"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa63c520b62ab001d54d28801742fc9db"> 929</a></span> <span class="preprocessor">#define PSA_ALG_AEAD_WITH_TAG_LENGTH(alg, tag_length) \</span></div><div class="line"><a name="l00930"></a><span class="lineno"> 930</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_AEAD_TAG_LENGTH_MASK) | \</span></div><div class="line"><a name="l00931"></a><span class="lineno"> 931</span> <span class="preprocessor"> ((tag_length) << PSA_AEAD_TAG_LENGTH_OFFSET & \</span></div><div class="line"><a name="l00932"></a><span class="lineno"> 932</span> <span class="preprocessor"> PSA_ALG_AEAD_TAG_LENGTH_MASK))</span></div><div class="line"><a name="l00933"></a><span class="lineno"> 933</span> </div><div class="line"><a name="l00942"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaddea507e062250cda8a29407a9480d2b"> 942</a></span> <span class="preprocessor">#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH(alg) \</span></div><div class="line"><a name="l00943"></a><span class="lineno"> 943</span> <span class="preprocessor"> ( \</span></div><div class="line"><a name="l00944"></a><span class="lineno"> 944</span> <span class="preprocessor"> PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(alg, PSA_ALG_CCM) \</span></div><div class="line"><a name="l00945"></a><span class="lineno"> 945</span> <span class="preprocessor"> PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(alg, PSA_ALG_GCM) \</span></div><div class="line"><a name="l00946"></a><span class="lineno"> 946</span> <span class="preprocessor"> 0)</span></div><div class="line"><a name="l00947"></a><span class="lineno"> 947</span> <span class="preprocessor">#define PSA__ALG_AEAD_WITH_DEFAULT_TAG_LENGTH__CASE(alg, ref) \</span></div><div class="line"><a name="l00948"></a><span class="lineno"> 948</span> <span class="preprocessor"> PSA_ALG_AEAD_WITH_TAG_LENGTH(alg, 0) == \</span></div><div class="line"><a name="l00949"></a><span class="lineno"> 949</span> <span class="preprocessor"> PSA_ALG_AEAD_WITH_TAG_LENGTH(ref, 0) ? \</span></div><div class="line"><a name="l00950"></a><span class="lineno"> 950</span> <span class="preprocessor"> ref :</span></div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span> </div><div class="line"><a name="l00952"></a><span class="lineno"> 952</span> <span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN_BASE ((psa_algorithm_t)0x10020000)</span></div><div class="line"><a name="l00953"></a><span class="lineno"> 953</span> </div><div class="line"><a name="l00968"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga702ff75385a6ae7d4247033f479439af"> 968</a></span> <span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN(hash_alg) \</span></div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span> <span class="preprocessor"> (PSA_ALG_RSA_PKCS1V15_SIGN_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span> </div><div class="line"><a name="l00976"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4215e2a78dcf834e9a625927faa2a817"> 976</a></span> <span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_SIGN_RAW PSA_ALG_RSA_PKCS1V15_SIGN_BASE</span></div><div class="line"><a name="l00977"></a><span class="lineno"> 977</span> <span class="preprocessor">#define PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) \</span></div><div class="line"><a name="l00978"></a><span class="lineno"> 978</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PKCS1V15_SIGN_BASE)</span></div><div class="line"><a name="l00979"></a><span class="lineno"> 979</span> </div><div class="line"><a name="l00980"></a><span class="lineno"> 980</span> <span class="preprocessor">#define PSA_ALG_RSA_PSS_BASE ((psa_algorithm_t)0x10030000)</span></div><div class="line"><a name="l00981"></a><span class="lineno"> 981</span> </div><div class="line"><a name="l00999"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga62152bf4cb4bf6aace5e1be8f143564d"> 999</a></span> <span class="preprocessor">#define PSA_ALG_RSA_PSS(hash_alg) \</span></div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span> <span class="preprocessor"> (PSA_ALG_RSA_PSS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span> <span class="preprocessor">#define PSA_ALG_IS_RSA_PSS(alg) \</span></div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PSS_BASE)</span></div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span> </div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span> <span class="preprocessor">#define PSA_ALG_DSA_BASE ((psa_algorithm_t)0x10040000)</span></div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span> </div><div class="line"><a name="l01019"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9a68efdddff5ae95f104a1416b12742e"> 1019</a></span> <span class="preprocessor">#define PSA_ALG_DSA(hash_alg) \</span></div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span> <span class="preprocessor"> (PSA_ALG_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span> <span class="preprocessor">#define PSA_ALG_DETERMINISTIC_DSA_BASE ((psa_algorithm_t)0x10050000)</span></div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span> <span class="preprocessor">#define PSA_ALG_DSA_DETERMINISTIC_FLAG ((psa_algorithm_t)0x00010000)</span></div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span> <span class="preprocessor">#define PSA_ALG_DETERMINISTIC_DSA(hash_alg) \</span></div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span> <span class="preprocessor"> (PSA_ALG_DETERMINISTIC_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span> <span class="preprocessor">#define PSA_ALG_IS_DSA(alg) \</span></div><div class="line"><a name="l01026"></a><span class="lineno"> 1026</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK & ~PSA_ALG_DSA_DETERMINISTIC_FLAG) == \</span></div><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span> <span class="preprocessor"> PSA_ALG_DSA_BASE)</span></div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span> <span class="preprocessor">#define PSA_ALG_DSA_IS_DETERMINISTIC(alg) \</span></div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span> <span class="preprocessor"> (((alg) & PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0)</span></div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span> <span class="preprocessor">#define PSA_ALG_IS_DETERMINISTIC_DSA(alg) \</span></div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span> <span class="preprocessor"> (PSA_ALG_IS_DSA(alg) && PSA_ALG_DSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span> <span class="preprocessor">#define PSA_ALG_IS_RANDOMIZED_DSA(alg) \</span></div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span> <span class="preprocessor"> (PSA_ALG_IS_DSA(alg) && !PSA_ALG_DSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span> </div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span> <span class="preprocessor">#define PSA_ALG_ECDSA_BASE ((psa_algorithm_t)0x10060000)</span></div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span> </div><div class="line"><a name="l01056"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga7e3ce9f514a227d5ba5d8318870452e3"> 1056</a></span> <span class="preprocessor">#define PSA_ALG_ECDSA(hash_alg) \</span></div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span> <span class="preprocessor"> (PSA_ALG_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span> </div><div class="line"><a name="l01067"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga51d6b6044a62e33cae0cf64bfc3b22a4"> 1067</a></span> <span class="preprocessor">#define PSA_ALG_ECDSA_ANY PSA_ALG_ECDSA_BASE</span></div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span> <span class="preprocessor">#define PSA_ALG_DETERMINISTIC_ECDSA_BASE ((psa_algorithm_t)0x10070000)</span></div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span> </div><div class="line"><a name="l01091"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga11da566bcd341661c8de921e2ca5ed03"> 1091</a></span> <span class="preprocessor">#define PSA_ALG_DETERMINISTIC_ECDSA(hash_alg) \</span></div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span> <span class="preprocessor"> (PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span> <span class="preprocessor">#define PSA_ALG_IS_ECDSA(alg) \</span></div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK & ~PSA_ALG_DSA_DETERMINISTIC_FLAG) == \</span></div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span> <span class="preprocessor"> PSA_ALG_ECDSA_BASE)</span></div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span> <span class="preprocessor">#define PSA_ALG_ECDSA_IS_DETERMINISTIC(alg) \</span></div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span> <span class="preprocessor"> (((alg) & PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0)</span></div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span> <span class="preprocessor">#define PSA_ALG_IS_DETERMINISTIC_ECDSA(alg) \</span></div><div class="line"><a name="l01099"></a><span class="lineno"> 1099</span> <span class="preprocessor"> (PSA_ALG_IS_ECDSA(alg) && PSA_ALG_ECDSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01100"></a><span class="lineno"> 1100</span> <span class="preprocessor">#define PSA_ALG_IS_RANDOMIZED_ECDSA(alg) \</span></div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span> <span class="preprocessor"> (PSA_ALG_IS_ECDSA(alg) && !PSA_ALG_ECDSA_IS_DETERMINISTIC(alg))</span></div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span> </div><div class="line"><a name="l01116"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gad8a8ea0536975363b66410cdeafe38b6"> 1116</a></span> <span class="preprocessor">#define PSA_ALG_IS_HASH_AND_SIGN(alg) \</span></div><div class="line"><a name="l01117"></a><span class="lineno"> 1117</span> <span class="preprocessor"> (PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) || \</span></div><div class="line"><a name="l01118"></a><span class="lineno"> 1118</span> <span class="preprocessor"> PSA_ALG_IS_DSA(alg) || PSA_ALG_IS_ECDSA(alg))</span></div><div class="line"><a name="l01119"></a><span class="lineno"> 1119</span> </div><div class="line"><a name="l01138"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga24cf6d7bcd2b9aeeeff86f07b6c674e3"> 1138</a></span> <span class="preprocessor">#define PSA_ALG_SIGN_GET_HASH(alg) \</span></div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span> <span class="preprocessor"> (PSA_ALG_IS_HASH_AND_SIGN(alg) ? \</span></div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span> <span class="preprocessor"> ((alg) & PSA_ALG_HASH_MASK) == 0 ? </span><span class="comment">/*"raw" algorithm*/</span><span class="preprocessor"> 0 : \</span></div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span> <span class="preprocessor"> ((alg) & PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH : \</span></div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span> <span class="preprocessor"> 0)</span></div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span> </div><div class="line"><a name="l01146"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga4c540d3abe43fb9abcb94f2bc51acef9"> 1146</a></span> <span class="preprocessor">#define PSA_ALG_RSA_PKCS1V15_CRYPT ((psa_algorithm_t)0x12020000)</span></div><div class="line"><a name="l01147"></a><span class="lineno"> 1147</span> </div><div class="line"><a name="l01148"></a><span class="lineno"> 1148</span> <span class="preprocessor">#define PSA_ALG_RSA_OAEP_BASE ((psa_algorithm_t)0x12030000)</span></div><div class="line"><a name="l01149"></a><span class="lineno"> 1149</span> </div><div class="line"><a name="l01163"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa1235dc3fdd9839c6c1b1a9857344c76"> 1163</a></span> <span class="preprocessor">#define PSA_ALG_RSA_OAEP(hash_alg) \</span></div><div class="line"><a name="l01164"></a><span class="lineno"> 1164</span> <span class="preprocessor"> (PSA_ALG_RSA_OAEP_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01165"></a><span class="lineno"> 1165</span> <span class="preprocessor">#define PSA_ALG_IS_RSA_OAEP(alg) \</span></div><div class="line"><a name="l01166"></a><span class="lineno"> 1166</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_OAEP_BASE)</span></div><div class="line"><a name="l01167"></a><span class="lineno"> 1167</span> <span class="preprocessor">#define PSA_ALG_RSA_OAEP_GET_HASH(alg) \</span></div><div class="line"><a name="l01168"></a><span class="lineno"> 1168</span> <span class="preprocessor"> (PSA_ALG_IS_RSA_OAEP(alg) ? \</span></div><div class="line"><a name="l01169"></a><span class="lineno"> 1169</span> <span class="preprocessor"> ((alg) & PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH : \</span></div><div class="line"><a name="l01170"></a><span class="lineno"> 1170</span> <span class="preprocessor"> 0)</span></div><div class="line"><a name="l01171"></a><span class="lineno"> 1171</span> </div><div class="line"><a name="l01172"></a><span class="lineno"> 1172</span> <span class="preprocessor">#define PSA_ALG_HKDF_BASE ((psa_algorithm_t)0x20000100)</span></div><div class="line"><a name="l01173"></a><span class="lineno"> 1173</span> </div><div class="line"><a name="l01193"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga32a888fb360e6e25cab8a343772c4a82"> 1193</a></span> <span class="preprocessor">#define PSA_ALG_HKDF(hash_alg) \</span></div><div class="line"><a name="l01194"></a><span class="lineno"> 1194</span> <span class="preprocessor"> (PSA_ALG_HKDF_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01195"></a><span class="lineno"> 1195</span> </div><div class="line"><a name="l01206"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga1979d0a76fcee6164cf2e65960f38db2"> 1206</a></span> <span class="preprocessor">#define PSA_ALG_IS_HKDF(alg) \</span></div><div class="line"><a name="l01207"></a><span class="lineno"> 1207</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_HKDF_BASE)</span></div><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span> <span class="preprocessor">#define PSA_ALG_HKDF_GET_HASH(hkdf_alg) \</span></div><div class="line"><a name="l01209"></a><span class="lineno"> 1209</span> <span class="preprocessor"> (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01210"></a><span class="lineno"> 1210</span> </div><div class="line"><a name="l01211"></a><span class="lineno"> 1211</span> <span class="preprocessor">#define PSA_ALG_TLS12_PRF_BASE ((psa_algorithm_t)0x20000200)</span></div><div class="line"><a name="l01212"></a><span class="lineno"> 1212</span> </div><div class="line"><a name="l01234"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga6d5623c2ccda1d4a84e34351af8382d5"> 1234</a></span> <span class="preprocessor">#define PSA_ALG_TLS12_PRF(hash_alg) \</span></div><div class="line"><a name="l01235"></a><span class="lineno"> 1235</span> <span class="preprocessor"> (PSA_ALG_TLS12_PRF_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01236"></a><span class="lineno"> 1236</span> </div><div class="line"><a name="l01245"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa3c18890c50222e5219f40ade8927e66"> 1245</a></span> <span class="preprocessor">#define PSA_ALG_IS_TLS12_PRF(alg) \</span></div><div class="line"><a name="l01246"></a><span class="lineno"> 1246</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_TLS12_PRF_BASE)</span></div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span> <span class="preprocessor">#define PSA_ALG_TLS12_PRF_GET_HASH(hkdf_alg) \</span></div><div class="line"><a name="l01248"></a><span class="lineno"> 1248</span> <span class="preprocessor"> (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01249"></a><span class="lineno"> 1249</span> </div><div class="line"><a name="l01250"></a><span class="lineno"> 1250</span> <span class="preprocessor">#define PSA_ALG_TLS12_PSK_TO_MS_BASE ((psa_algorithm_t)0x20000300)</span></div><div class="line"><a name="l01251"></a><span class="lineno"> 1251</span> </div><div class="line"><a name="l01274"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga039ec797f15d1635d9b2e09a611f8a68"> 1274</a></span> <span class="preprocessor">#define PSA_ALG_TLS12_PSK_TO_MS(hash_alg) \</span></div><div class="line"><a name="l01275"></a><span class="lineno"> 1275</span> <span class="preprocessor"> (PSA_ALG_TLS12_PSK_TO_MS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01276"></a><span class="lineno"> 1276</span> </div><div class="line"><a name="l01285"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab25ecc074a93fd11069bedfbba5a287b"> 1285</a></span> <span class="preprocessor">#define PSA_ALG_IS_TLS12_PSK_TO_MS(alg) \</span></div><div class="line"><a name="l01286"></a><span class="lineno"> 1286</span> <span class="preprocessor"> (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_TLS12_PSK_TO_MS_BASE)</span></div><div class="line"><a name="l01287"></a><span class="lineno"> 1287</span> <span class="preprocessor">#define PSA_ALG_TLS12_PSK_TO_MS_GET_HASH(hkdf_alg) \</span></div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span> <span class="preprocessor"> (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) & PSA_ALG_HASH_MASK))</span></div><div class="line"><a name="l01289"></a><span class="lineno"> 1289</span> </div><div class="line"><a name="l01290"></a><span class="lineno"> 1290</span> <span class="preprocessor">#define PSA_ALG_KEY_DERIVATION_MASK ((psa_algorithm_t)0x080fffff)</span></div><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span> <span class="preprocessor">#define PSA_ALG_KEY_AGREEMENT_MASK ((psa_algorithm_t)0x10f00000)</span></div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span> </div><div class="line"><a name="l01307"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga78bb81cffb87a635c247725eeb2a2682"> 1307</a></span> <span class="preprocessor">#define PSA_ALG_KEY_AGREEMENT(ka_alg, kdf_alg) \</span></div><div class="line"><a name="l01308"></a><span class="lineno"> 1308</span> <span class="preprocessor"> ((ka_alg) | (kdf_alg))</span></div><div class="line"><a name="l01309"></a><span class="lineno"> 1309</span> </div><div class="line"><a name="l01310"></a><span class="lineno"> 1310</span> <span class="preprocessor">#define PSA_ALG_KEY_AGREEMENT_GET_KDF(alg) \</span></div><div class="line"><a name="l01311"></a><span class="lineno"> 1311</span> <span class="preprocessor"> (((alg) & PSA_ALG_KEY_DERIVATION_MASK) | PSA_ALG_CATEGORY_KEY_DERIVATION)</span></div><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span> </div><div class="line"><a name="l01313"></a><span class="lineno"> 1313</span> <span class="preprocessor">#define PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) \</span></div><div class="line"><a name="l01314"></a><span class="lineno"> 1314</span> <span class="preprocessor"> (((alg) & PSA_ALG_KEY_AGREEMENT_MASK) | PSA_ALG_CATEGORY_KEY_AGREEMENT)</span></div><div class="line"><a name="l01315"></a><span class="lineno"> 1315</span> </div><div class="line"><a name="l01316"></a><span class="lineno"> 1316</span> <span class="preprocessor">#define PSA_ALG_IS_RAW_KEY_AGREEMENT(alg) \</span></div><div class="line"><a name="l01317"></a><span class="lineno"> 1317</span> <span class="preprocessor"> (PSA_ALG_KEY_AGREEMENT_GET_KDF(alg) == PSA_ALG_CATEGORY_KEY_DERIVATION)</span></div><div class="line"><a name="l01318"></a><span class="lineno"> 1318</span> </div><div class="line"><a name="l01319"></a><span class="lineno"> 1319</span> <span class="preprocessor">#define PSA_ALG_IS_KEY_DERIVATION_OR_AGREEMENT(alg) \</span></div><div class="line"><a name="l01320"></a><span class="lineno"> 1320</span> <span class="preprocessor"> ((PSA_ALG_IS_KEY_DERIVATION(alg) || PSA_ALG_IS_KEY_AGREEMENT(alg)))</span></div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span> </div><div class="line"><a name="l01330"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga0ebbb6f93a05b6511e6f108ffd2d1eb4"> 1330</a></span> <span class="preprocessor">#define PSA_ALG_FFDH ((psa_algorithm_t)0x30100000)</span></div><div class="line"><a name="l01331"></a><span class="lineno"> 1331</span> </div><div class="line"><a name="l01343"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gaa3cf76164cd9375af4fb8a291078a19e"> 1343</a></span> <span class="preprocessor">#define PSA_ALG_IS_FFDH(alg) \</span></div><div class="line"><a name="l01344"></a><span class="lineno"> 1344</span> <span class="preprocessor"> (PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) == PSA_ALG_FFDH)</span></div><div class="line"><a name="l01345"></a><span class="lineno"> 1345</span> </div><div class="line"><a name="l01371"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gab2dbcf71b63785e7dd7b54a100edee43"> 1371</a></span> <span class="preprocessor">#define PSA_ALG_ECDH ((psa_algorithm_t)0x30200000)</span></div><div class="line"><a name="l01372"></a><span class="lineno"> 1372</span> </div><div class="line"><a name="l01386"></a><span class="lineno"><a class="line" href="group__crypto__types.html#ga9d9b6533d2a6bea7bac7ae01facb820d"> 1386</a></span> <span class="preprocessor">#define PSA_ALG_IS_ECDH(alg) \</span></div><div class="line"><a name="l01387"></a><span class="lineno"> 1387</span> <span class="preprocessor"> (PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) == PSA_ALG_ECDH)</span></div><div class="line"><a name="l01388"></a><span class="lineno"> 1388</span> </div><div class="line"><a name="l01402"></a><span class="lineno"> 1402</span> <span class="preprocessor">#define PSA_ALG_IS_WILDCARD(alg) \</span></div><div class="line"><a name="l01403"></a><span class="lineno"> 1403</span> <span class="preprocessor"> (PSA_ALG_IS_HASH_AND_SIGN(alg) ? \</span></div><div class="line"><a name="l01404"></a><span class="lineno"> 1404</span> <span class="preprocessor"> PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_ANY_HASH : \</span></div><div class="line"><a name="l01405"></a><span class="lineno"> 1405</span> <span class="preprocessor"> (alg) == PSA_ALG_ANY_HASH)</span></div><div class="line"><a name="l01406"></a><span class="lineno"> 1406</span> </div><div class="line"><a name="l01420"></a><span class="lineno"><a class="line" href="group__crypto__types.html#gacf83d7430e82b97cecb8b26ca6fa1426"> 1420</a></span> <span class="preprocessor">#define PSA_ALG_IS_WILDCARD(alg) \</span></div><div class="line"><a name="l01421"></a><span class="lineno"> 1421</span> <span class="preprocessor"> (PSA_ALG_IS_HASH_AND_SIGN(alg) ? \</span></div><div class="line"><a name="l01422"></a><span class="lineno"> 1422</span> <span class="preprocessor"> PSA_ALG_SIGN_GET_HASH(alg) == PSA_ALG_ANY_HASH : \</span></div><div class="line"><a name="l01423"></a><span class="lineno"> 1423</span> <span class="preprocessor"> (alg) == PSA_ALG_ANY_HASH)</span></div><div class="line"><a name="l01424"></a><span class="lineno"> 1424</span> </div><div class="line"><a name="l01434"></a><span class="lineno"><a class="line" href="group__key__lifetimes.html#ga8b438870ba69489b685730d346455108"> 1434</a></span> <span class="preprocessor">#define PSA_KEY_LIFETIME_VOLATILE ((psa_key_lifetime_t)0x00000000)</span></div><div class="line"><a name="l01435"></a><span class="lineno"> 1435</span> </div><div class="line"><a name="l01448"></a><span class="lineno"><a class="line" href="group__key__lifetimes.html#ga3713a01c5fcd5f7eae46ff22ceaf6d02"> 1448</a></span> <span class="preprocessor">#define PSA_KEY_LIFETIME_PERSISTENT ((psa_key_lifetime_t)0x00000001)</span></div><div class="line"><a name="l01449"></a><span class="lineno"> 1449</span> </div><div class="line"><a name="l01467"></a><span class="lineno"><a class="line" href="group__policy.html#ga7dddccdd1303176e87a4d20c87b589ed"> 1467</a></span> <span class="preprocessor">#define PSA_KEY_USAGE_EXPORT ((psa_key_usage_t)0x00000001)</span></div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span> </div><div class="line"><a name="l01478"></a><span class="lineno"><a class="line" href="group__policy.html#ga75153b296d045d529d97203a6a995dad"> 1478</a></span> <span class="preprocessor">#define PSA_KEY_USAGE_ENCRYPT ((psa_key_usage_t)0x00000100)</span></div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span> </div><div class="line"><a name="l01489"></a><span class="lineno"><a class="line" href="group__policy.html#gac3f2d2e5983db1edde9f142ca9bf8e6a"> 1489</a></span> <span class="preprocessor">#define PSA_KEY_USAGE_DECRYPT ((psa_key_usage_t)0x00000200)</span></div><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span> </div><div class="line"><a name="l01499"></a><span class="lineno"><a class="line" href="group__policy.html#ga99b9f456cf59efc4b5579465407aef5a"> 1499</a></span> <span class="preprocessor">#define PSA_KEY_USAGE_SIGN ((psa_key_usage_t)0x00000400)</span></div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span> </div><div class="line"><a name="l01509"></a><span class="lineno"><a class="line" href="group__policy.html#ga39b54ffd5958b69634607924fa53cea6"> 1509</a></span> <span class="preprocessor">#define PSA_KEY_USAGE_VERIFY ((psa_key_usage_t)0x00000800)</span></div><div class="line"><a name="l01510"></a><span class="lineno"> 1510</span> </div><div class="line"><a name="l01513"></a><span class="lineno"><a class="line" href="group__policy.html#gaf19022acc5ef23cf12477f632b48a0b2"> 1513</a></span> <span class="preprocessor">#define PSA_KEY_USAGE_DERIVE ((psa_key_usage_t)0x00001000)</span></div><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span> </div><div class="line"><a name="l01525"></a><span class="lineno"><a class="line" href="group__derivation.html#ga90a1995a41e26ed5ca30d2d4641d1168"> 1525</a></span> <span class="preprocessor">#define PSA_KDF_STEP_SECRET ((psa_key_derivation_step_t)0x0101)</span></div><div class="line"><a name="l01526"></a><span class="lineno"> 1526</span> </div><div class="line"><a name="l01531"></a><span class="lineno"><a class="line" href="group__derivation.html#ga9f4da10191bcb690b88756ed8470b03c"> 1531</a></span> <span class="preprocessor">#define PSA_KDF_STEP_LABEL ((psa_key_derivation_step_t)0x0201)</span></div><div class="line"><a name="l01532"></a><span class="lineno"> 1532</span> </div><div class="line"><a name="l01537"></a><span class="lineno"><a class="line" href="group__derivation.html#ga384777dac55791d8f3a1af72c847b327"> 1537</a></span> <span class="preprocessor">#define PSA_KDF_STEP_SALT ((psa_key_derivation_step_t)0x0202)</span></div><div class="line"><a name="l01538"></a><span class="lineno"> 1538</span> </div><div class="line"><a name="l01543"></a><span class="lineno"><a class="line" href="group__derivation.html#ga836afe760bbda3dafc6c29631560b1a0"> 1543</a></span> <span class="preprocessor">#define PSA_KDF_STEP_INFO ((psa_key_derivation_step_t)0x0203)</span></div><div class="line"><a name="l01544"></a><span class="lineno"> 1544</span> </div><div class="line"><a name="l01547"></a><span class="lineno"> 1547</span> <span class="preprocessor">#endif </span><span class="comment">/* PSA_CRYPTO_VALUES_H */</span><span class="preprocessor"></span></div></div><!-- fragment --></div><!-- contents --> |
| 94 | <!-- start footer part --> |
| 95 | <hr class="footer"/><address class="footer"><small> |
| 96 | Generated by  <a href="http://www.doxygen.org/index.html"> |
| 97 | <img class="footer" src="doxygen.png" alt="doxygen"/> |
| 98 | </a> 1.8.11 |
| 99 | </small></address> |
| 100 | </body> |
| 101 | </html> |