| |
| <!DOCTYPE html> |
| |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta charset="utf-8" /> |
| <title>9.1. Key attributes — PSA Crypto API 1.0.1 documentation</title> |
| <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" /> |
| <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> |
| <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> |
| <script type="text/javascript" src="../../_static/jquery.js"></script> |
| <script type="text/javascript" src="../../_static/underscore.js"></script> |
| <script type="text/javascript" src="../../_static/doctools.js"></script> |
| <script type="text/javascript" src="../../_static/language_data.js"></script> |
| <link rel="author" title="About these documents" href="../../about.html" /> |
| <link rel="index" title="Index" href="../../genindex.html" /> |
| <link rel="search" title="Search" href="../../search.html" /> |
| <link rel="next" title="9.2. Key types" href="types.html" /> |
| <link rel="prev" title="9. Key management reference" href="index.html" /> |
| |
| <link rel="stylesheet" href="../../_static/custom.css" type="text/css" /> |
| |
| |
| <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> |
| |
| </head><body> |
| |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| |
| |
| <div class="body" role="main"> |
| |
| <div class="section" id="key-attributes"> |
| <span id="id1"></span><h1>9.1. Key attributes</h1> |
| <p>Key attributes are managed in a <a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_attributes_t</span></code></a> object. These are used when a key is created, after which the key attributes are fixed. Attributes of an existing key can be queried using <a class="reference internal" href="#c.psa_get_key_attributes" title="psa_get_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_get_key_attributes()</span></code></a>.</p> |
| <p>Description of the individual attributes is found in the following sections:</p> |
| <ul class="simple"> |
| <li><p><a class="reference internal" href="types.html#key-types"><span class="secref">Key types</span></a></p></li> |
| <li><p><a class="reference internal" href="ids.html#key-identifiers"><span class="secref">Key identifiers</span></a></p></li> |
| <li><p><a class="reference internal" href="lifetimes.html#key-lifetimes"><span class="secref">Key lifetimes</span></a></p></li> |
| <li><p><a class="reference internal" href="policy.html#key-policy"><span class="secref">Key policies</span></a></p></li> |
| </ul> |
| <div class="section" id="managing-key-attributes"> |
| <h2>9.1.1. Managing key attributes</h2> |
| <div class="section" id="psa_key_attributes_t"> |
| <span id="c.psa_key_attributes_t"></span><h3><code class="docutils literal notranslate"><span class="pre">psa_key_attributes_t</span></code> (type)</h3> |
| <p>The type of an object containing key attributes.</p> |
| <pre class="literal-block">typedef <em><a class="reference internal" href="../../overview/implementation.html#implementation-defined-type"><span class="std std-ref">/* implementation-defined type */</span></a></em> <a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a>;</pre> |
| <p>This is the object that represents the metadata of a key object. Metadata that can be stored in attributes includes:</p> |
| <ul class="simple"> |
| <li><p>The location of the key in storage, indicated by its key identifier and its lifetime.</p></li> |
| <li><p>The key’s policy, comprising usage flags and a specification of the permitted algorithm(s).</p></li> |
| <li><p>Information about the key itself: the key type and its size.</p></li> |
| <li><p>Implementations can define additional attributes.</p></li> |
| </ul> |
| <p>The actual key material is not considered an attribute of a key. Key attributes do not contain information that is generally considered highly confidential.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>Implementations are recommended to define the attribute object as a simple data structure, with fields corresponding to the individual key attributes. In such an implementation, each function <code class="docutils literal notranslate"><span class="pre">psa_set_key_xxx()</span></code> sets a field and the corresponding function <code class="docutils literal notranslate"><span class="pre">psa_get_key_xxx()</span></code> retrieves the value of the field.</p> |
| <p>An implementations can report attribute values that are equivalent to the original one, but have a different encoding. For example, an implementation can use a more compact representation for types where many bit-patterns are invalid or not supported, and store all values that it does not support as a special marker value. In such an implementation, after setting an invalid value, the corresponding get function returns an invalid value which might not be the one that was originally stored.</p> |
| </div> |
| <p>This is an implementation-defined type. Applications that make assumptions about the content of this object will result in in implementation-specific behavior, and are non-portable.</p> |
| <p>An attribute object can contain references to auxiliary resources, for example pointers to allocated memory or indirect references to pre-calculated values. In order to free such resources, the application must call <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_reset_key_attributes()</span></code></a>. As an exception, calling <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_reset_key_attributes()</span></code></a> on an attribute object is optional if the object has only been modified by the following functions since it was initialized or last reset with <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_reset_key_attributes()</span></code></a>:</p> |
| <ul class="simple"> |
| <li><p><a class="reference internal" href="ids.html#c.psa_set_key_id" title="psa_set_key_id"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_id()</span></code></a></p></li> |
| <li><p><a class="reference internal" href="lifetimes.html#c.psa_set_key_lifetime" title="psa_set_key_lifetime"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_lifetime()</span></code></a></p></li> |
| <li><p><a class="reference internal" href="types.html#c.psa_set_key_type" title="psa_set_key_type"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_type()</span></code></a></p></li> |
| <li><p><a class="reference internal" href="types.html#c.psa_set_key_bits" title="psa_set_key_bits"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_bits()</span></code></a></p></li> |
| <li><p><a class="reference internal" href="policy.html#c.psa_set_key_usage_flags" title="psa_set_key_usage_flags"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_usage_flags()</span></code></a></p></li> |
| <li><p><a class="reference internal" href="policy.html#c.psa_set_key_algorithm" title="psa_set_key_algorithm"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_algorithm()</span></code></a></p></li> |
| </ul> |
| <p>Before calling any function on a key attribute object, the application must initialize it by any of the following means:</p> |
| <ul> |
| <li><p>Set the object to all-bits-zero, for example:</p> |
| <pre class="literal-block"><a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a> attributes; |
| memset(&attributes, 0, sizeof(attributes));</pre> |
| </li> |
| <li><p>Initialize the object to logical zero values by declaring the object as static or global without an explicit initializer, for example:</p> |
| <pre class="literal-block">static <a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a> attributes;</pre> |
| </li> |
| <li><p>Initialize the object to the initializer <a class="reference internal" href="#c.PSA_KEY_ATTRIBUTES_INIT" title="PSA_KEY_ATTRIBUTES_INIT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_ATTRIBUTES_INIT</span></code></a>, for example:</p> |
| <pre class="literal-block"><a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a> attributes = <a class="reference internal" href="#c.PSA_KEY_ATTRIBUTES_INIT" title="PSA_KEY_ATTRIBUTES_INIT">PSA_KEY_ATTRIBUTES_INIT</a>;</pre> |
| </li> |
| <li><p>Assign the result of the function <a class="reference internal" href="#c.psa_key_attributes_init" title="psa_key_attributes_init"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_attributes_init()</span></code></a> to the object, for example:</p> |
| <pre class="literal-block"><a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a> attributes; |
| attributes = <a class="reference internal" href="#c.psa_key_attributes_init" title="psa_key_attributes_init">psa_key_attributes_init</a>();</pre> |
| </li> |
| </ul> |
| <p>A freshly initialized attribute object contains the following values:</p> |
| <table class="colwidths-auto docutils align-left"> |
| <thead> |
| <tr class="row-odd"><th class="head"><p>Attribute</p></th> |
| <th class="head"><p>Value</p></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="row-even"><td><p>lifetime</p></td> |
| <td><p><a class="reference internal" href="lifetimes.html#c.PSA_KEY_LIFETIME_VOLATILE" title="PSA_KEY_LIFETIME_VOLATILE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_LIFETIME_VOLATILE</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p>key identifier</p></td> |
| <td><p><a class="reference internal" href="ids.html#c.PSA_KEY_ID_NULL" title="PSA_KEY_ID_NULL"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_ID_NULL</span></code></a> - which is not a valid key identifier.</p></td> |
| </tr> |
| <tr class="row-even"><td><p>type</p></td> |
| <td><p><a class="reference internal" href="types.html#c.PSA_KEY_TYPE_NONE" title="PSA_KEY_TYPE_NONE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_KEY_TYPE_NONE</span></code></a> - meaning that the type is unspecified.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p>key size</p></td> |
| <td><p><code class="docutils literal notranslate"><span class="pre">0</span></code> - meaning that the size is unspecified.</p></td> |
| </tr> |
| <tr class="row-even"><td><p>usage flags</p></td> |
| <td><p><code class="docutils literal notranslate"><span class="pre">0</span></code> - which allows no usage except exporting a public key.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p>algorithm</p></td> |
| <td><p><a class="reference internal" href="../ops/algorithms.html#c.PSA_ALG_NONE" title="PSA_ALG_NONE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ALG_NONE</span></code></a> - which does not allow cryptographic usage, but allows exporting.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| <p class="rubric">Usage</p> |
| <p>A typical sequence to create a key is as follows:</p> |
| <ol class="arabic simple"> |
| <li><p>Create and initialize an attribute object.</p></li> |
| <li><p>If the key is persistent, call <a class="reference internal" href="ids.html#c.psa_set_key_id" title="psa_set_key_id"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_id()</span></code></a>. Also call <a class="reference internal" href="lifetimes.html#c.psa_set_key_lifetime" title="psa_set_key_lifetime"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_lifetime()</span></code></a> to place the key in a non-default location.</p></li> |
| <li><p>Set the key policy with <a class="reference internal" href="policy.html#c.psa_set_key_usage_flags" title="psa_set_key_usage_flags"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_usage_flags()</span></code></a> and <a class="reference internal" href="policy.html#c.psa_set_key_algorithm" title="psa_set_key_algorithm"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_algorithm()</span></code></a>.</p></li> |
| <li><p>Set the key type with <a class="reference internal" href="types.html#c.psa_set_key_type" title="psa_set_key_type"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_type()</span></code></a>. Skip this step if copying an existing key with <a class="reference internal" href="management.html#c.psa_copy_key" title="psa_copy_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_copy_key()</span></code></a>.</p></li> |
| <li><p>When generating a random key with <a class="reference internal" href="management.html#c.psa_generate_key" title="psa_generate_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_generate_key()</span></code></a> or deriving a key with <a class="reference internal" href="../ops/kdf.html#c.psa_key_derivation_output_key" title="psa_key_derivation_output_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_output_key()</span></code></a>, set the desired key size with <a class="reference internal" href="types.html#c.psa_set_key_bits" title="psa_set_key_bits"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_set_key_bits()</span></code></a>.</p></li> |
| <li><p>Call a key creation function: <a class="reference internal" href="management.html#c.psa_import_key" title="psa_import_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_import_key()</span></code></a>, <a class="reference internal" href="management.html#c.psa_generate_key" title="psa_generate_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_generate_key()</span></code></a>, <a class="reference internal" href="../ops/kdf.html#c.psa_key_derivation_output_key" title="psa_key_derivation_output_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_key_derivation_output_key()</span></code></a> or <a class="reference internal" href="management.html#c.psa_copy_key" title="psa_copy_key"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_copy_key()</span></code></a>. This function reads the attribute object, creates a key with these attributes, and outputs an identifier for the newly created key.</p></li> |
| <li><p>Optionally call <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_reset_key_attributes()</span></code></a>, now that the attribute object is no longer needed. Currently this call is not required as the attributes defined in this specification do not require additional resources beyond the object itself.</p></li> |
| </ol> |
| <p>A typical sequence to query a key’s attributes is as follows:</p> |
| <ol class="arabic simple"> |
| <li><p>Call <a class="reference internal" href="#c.psa_get_key_attributes" title="psa_get_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_get_key_attributes()</span></code></a>.</p></li> |
| <li><p>Call <code class="docutils literal notranslate"><span class="pre">psa_get_key_xxx()</span></code> functions to retrieve the required attribute(s).</p></li> |
| <li><p>Call <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_reset_key_attributes()</span></code></a> to free any resources that can be used by the attribute object.</p></li> |
| </ol> |
| <p>Once a key has been created, it is impossible to change its attributes.</p> |
| </div> |
| <div class="section" id="PSA_KEY_ATTRIBUTES_INIT"> |
| <span id="c.PSA_KEY_ATTRIBUTES_INIT"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_KEY_ATTRIBUTES_INIT</span></code> (macro)</h3> |
| <p>This macro returns a suitable initializer for a key attribute object of type <a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_attributes_t</span></code></a>.</p> |
| <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_KEY_ATTRIBUTES_INIT" title="PSA_KEY_ATTRIBUTES_INIT">PSA_KEY_ATTRIBUTES_INIT</a> <em><a class="reference internal" href="../../overview/implementation.html#implementation-defined-value"><span class="std std-ref">/* implementation-defined value */</span></a></em></pre> |
| </div> |
| <div class="section" id="psa_key_attributes_init"> |
| <span id="c.psa_key_attributes_init"></span><h3><code class="docutils literal notranslate"><span class="pre">psa_key_attributes_init</span></code> (function)</h3> |
| <p>Return an initial value for a key attribute object.</p> |
| <pre class="literal-block"><a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a> <a class="reference internal" href="#c.psa_key_attributes_init" title="psa_key_attributes_init">psa_key_attributes_init</a>(void);</pre> |
| <p class="rubric">Returns: <a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t"><code class="docutils literal notranslate"><span class="pre">psa_key_attributes_t</span></code></a></p> |
| </div> |
| <div class="section" id="psa_get_key_attributes"> |
| <span id="c.psa_get_key_attributes"></span><h3><code class="docutils literal notranslate"><span class="pre">psa_get_key_attributes</span></code> (function)</h3> |
| <p>Retrieve the attributes of a key.</p> |
| <pre class="literal-block"><a class="reference internal" href="../library/status.html#c.psa_status_t" title="psa_status_t">psa_status_t</a> <a class="reference internal" href="#c.psa_get_key_attributes" title="psa_get_key_attributes">psa_get_key_attributes</a>(<a class="reference internal" href="ids.html#c.psa_key_id_t" title="psa_key_id_t">psa_key_id_t</a> key, |
| <a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a> * attributes);</pre> |
| <p class="rubric">Parameters</p> |
| <dl class="simple"> |
| <dt> <code class="docutils literal notranslate"><span class="pre">key</span></code></dt><dd><p>Identifier of the key to query.</p> |
| </dd> |
| <dt> <code class="docutils literal notranslate"><span class="pre">attributes</span></code></dt><dd><p>On entry, <code class="docutils literal notranslate"><span class="pre">*attributes</span></code> must be in a valid state. On successful return, it contains the attributes of the key. On failure, it is equivalent to a freshly-initialized attribute object.</p> |
| </dd> |
| </dl> |
| <p class="rubric">Returns: <a class="reference internal" href="../library/status.html#c.psa_status_t" title="psa_status_t"><code class="docutils literal notranslate"><span class="pre">psa_status_t</span></code></a></p> |
| <dl class="simple"> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_SUCCESS" title="PSA_SUCCESS"><code class="docutils literal notranslate"><span class="pre">PSA_SUCCESS</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INVALID_HANDLE" title="PSA_ERROR_INVALID_HANDLE"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_HANDLE</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_INSUFFICIENT_MEMORY" title="PSA_ERROR_INSUFFICIENT_MEMORY"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_MEMORY</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_DATA_INVALID" title="PSA_ERROR_DATA_INVALID"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_INVALID</span></code></a></dt><dd></dd> |
| <dt> <a class="reference internal" href="../library/status.html#c.PSA_ERROR_BAD_STATE" title="PSA_ERROR_BAD_STATE"><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_BAD_STATE</span></code></a></dt><dd><p>The library has not been previously initialized by <a class="reference internal" href="../library/library.html#c.psa_crypto_init" title="psa_crypto_init"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_crypto_init()</span></code></a>. It is implementation-dependent whether a failure to initialize results in this error code.</p> |
| </dd> |
| </dl> |
| <p class="rubric">Description</p> |
| <p>This function first resets the attribute object as with <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_reset_key_attributes()</span></code></a>. It then copies the attributes of the given key into the given attribute object.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This function clears any previous content from the attribute object and therefore expects it to be in a valid state. In particular, if this function is called on a newly allocated attribute object, the attribute object must be initialized before calling this function.</p> |
| </div> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This function might allocate memory or other resources. Once this function has been called on an attribute object, <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_reset_key_attributes()</span></code></a> must be called to free these resources.</p> |
| </div> |
| </div> |
| <div class="section" id="psa_reset_key_attributes"> |
| <span id="c.psa_reset_key_attributes"></span><h3><code class="docutils literal notranslate"><span class="pre">psa_reset_key_attributes</span></code> (function)</h3> |
| <p>Reset a key attribute object to a freshly initialized state.</p> |
| <pre class="literal-block">void <a class="reference internal" href="#c.psa_reset_key_attributes" title="psa_reset_key_attributes">psa_reset_key_attributes</a>(<a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t">psa_key_attributes_t</a> * attributes);</pre> |
| <p class="rubric">Parameters</p> |
| <dl class="simple"> |
| <dt> <code class="docutils literal notranslate"><span class="pre">attributes</span></code></dt><dd><p>The attribute object to reset.</p> |
| </dd> |
| </dl> |
| <p class="rubric">Returns: <code class="docutils literal notranslate"><span class="pre">void</span></code></p> |
| <p class="rubric">Description</p> |
| <p>The attribute object must be initialized as described in the documentation of the type <a class="reference internal" href="#c.psa_key_attributes_t" title="psa_key_attributes_t"><code class="xref any c c-type docutils literal notranslate"><span class="pre">psa_key_attributes_t</span></code></a> before calling this function. Once the object has been initialized, this function can be called at any time.</p> |
| <p>This function frees any auxiliary resources that the object might contain.</p> |
| </div> |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| </div> |
| <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
| <div class="sphinxsidebarwrapper"><h3><a href="../../index.html"><b>PSA Crypto API</b></a></h3> |
| IHI 0086<br/> |
| Non-confidential<br/> |
| Version 1.0.1 |
| <span style="color: red; font-weight: bold;"></span> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../about.html">About this document</a></li> |
| </ul> |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/intro.html">1. Introduction</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/goals.html">2. Design goals</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/functionality.html">3. Functionality overview</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/sample-arch.html">4. Sample architectures</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/conventions.html">5. Library conventions</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/implementation.html">6. Implementation considerations</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../overview/usage.html">7. Usage considerations</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../library/index.html">8. Library management reference</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="index.html">9. Key management reference</a><ul class="current"> |
| <li class="toctree-l2 current"><a class="current reference internal" href="#">9.1. Key attributes</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#managing-key-attributes">9.1.1. Managing key attributes</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="types.html">9.2. Key types</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="lifetimes.html">9.3. Key lifetimes</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="ids.html">9.4. Key identifiers</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="policy.html">9.5. Key policies</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="management.html">9.6. Key management functions</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../ops/index.html">10. Cryptographic operation reference</a></li> |
| </ul> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/example_header.html">Example header file</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/specdef_values.html">Example macro implementations</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../appendix/history.html">Changes to the API</a></li> |
| </ul> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../psa_c-identifiers.html">Index of API elements</a></li> |
| </ul> |
| <div id="searchbox" style="display: none" role="search"> |
| <h3 id="searchlabel">Quick search</h3> |
| <div class="searchformwrapper"> |
| <form class="search" action="../../search.html" method="get"> |
| <input type="text" name="q" aria-labelledby="searchlabel" /> |
| <input type="submit" value="Go" /> |
| </form> |
| </div> |
| </div> |
| <script type="text/javascript">$('#searchbox').show(0);</script> |
| </div> |
| </div> |
| <div class="clearer"></div> |
| </div> |
| <div class="footer"> |
| © 2018-2020, Arm Limited or its affiliates. All rights reserved. |
| |
| | |
| Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a> |
| & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a> |
| |
| </div> |
| |
| |
| |
| |
| </body> |
| </html> |