MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClPsaDriver_Oracle.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2022-2023 NXP */
3/* */
4/* SPDX-License-Identifier: BSD-3-Clause */
5/* */
6/* Redistribution and use in source and binary forms, with or without */
7/* modification, are permitted provided that the following conditions are */
8/* met: */
9/* */
10/* 1. Redistributions of source code must retain the above copyright */
11/* notice, this list of conditions and the following disclaimer. */
12/* */
13/* 2. Redistributions in binary form must reproduce the above copyright */
14/* notice, this list of conditions and the following disclaimer in the */
15/* documentation and/or other materials provided with the distribution. */
16/* */
17/* 3. Neither the name of the copyright holder nor the names of its */
18/* contributors may be used to endorse or promote products derived from */
19/* this software without specific prior written permission. */
20/* */
21/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS */
22/* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */
23/* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A */
24/* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
25/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
26/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
27/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR */
28/* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
29/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
30/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
31/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
32/*--------------------------------------------------------------------------*/
33
36
37#ifndef MCUXCLPSADRIVERORACLE_H_
38#define MCUXCLPSADRIVERORACLE_H_
39
40#include <common.h>
41#include <psa/crypto.h>
42#include <mcuxClKey.h>
43#include <mcuxClConfig.h> // Exported features flags header
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49
56
57// GENERAL NOTE
58// do not use mcuxClKey_setKeyproperties on any of these keys as it will overwrite pAuxData
59
73 uint8_t *data,
74 size_t data_size,
75 size_t *data_length,
76 bool internal_representation);
77
116
129
143
156
169
181
208 const uint8_t *data,
209 size_t data_length,
210 size_t *key_buffer_length,
211 size_t *bits);
212
232MCUX_CSSL_ANALYSIS_START_PATTERN_DESCRIPTIVE_IDENTIFIER()
233psa_status_t mcuxClPsaDriver_Oracle_GetKeyBufferSizeFromKeyData(const psa_key_attributes_t *attributes,
234 const uint8_t *data,
235 size_t data_length,
236 size_t *key_buffer_length);
237MCUX_CSSL_ANALYSIS_STOP_PATTERN_DESCRIPTIVE_IDENTIFIER()
238
249MCUX_CSSL_ANALYSIS_START_PATTERN_DESCRIPTIVE_IDENTIFIER()
250psa_status_t mcuxClPsaDriver_Oracle_GetBuiltinKeyBufferSize(mbedtls_svc_key_id_t key_id, size_t *key_buffer_size);
251MCUX_CSSL_ANALYSIS_STOP_PATTERN_DESCRIPTIVE_IDENTIFIER()
252
265MCUX_CSSL_ANALYSIS_START_PATTERN_DESCRIPTIVE_IDENTIFIER()
266psa_status_t mcuxClPsaDriver_Oracle_GetBuiltinKeyBuffer(psa_key_attributes_t *attributes,
267 uint8_t *key_buffer,
268 size_t key_buffer_size,
269 size_t *key_buffer_length);
270MCUX_CSSL_ANALYSIS_STOP_PATTERN_DESCRIPTIVE_IDENTIFIER()
271
272 /* mcuxClPsaDriver_Oracle */
276
277#ifdef __cplusplus
278} /* extern "C" */
279#endif
280
281#endif /* MCUXCLPSADRIVERORACLE_H_ */
static const uint8_t data[]
Example data buffer.
Definition mcuxClCrc_Crc16_example.c:55
Top-level include file for the mcuxClKey component.
struct mcuxClKey_Descriptor mcuxClKey_Descriptor_t
Key descriptor type.
Definition mcuxClKey_Types.h:101
psa_status_t mcuxClPsaDriver_Oracle_GetBuiltinKeyBufferSize(mbedtls_svc_key_id_t key_id, size_t *key_buffer_size)
Oracle function for making keys that are installed upon boot in S50 and keys derived from those (buil...
psa_status_t mcuxClPsaDriver_Oracle_SuspendKey(mcuxClKey_Descriptor_t *pKey)
Oracle function for 'suspending' a key.
psa_status_t mcuxClPsaDriver_Oracle_GetKeyBufferSizeFromKeyData(const psa_key_attributes_t *attributes, const uint8_t *data, size_t data_length, size_t *key_buffer_length)
Oracle function for determine the size required for a key buffer from the data supplied when importin...
psa_status_t mcuxClPsaDriver_Oracle_StoreKey(mcuxClKey_Descriptor_t *pKey)
Oracle function for saving a key.
psa_status_t mcuxClPsaDriver_Oracle_UnloadKey(mcuxClKey_Descriptor_t *pKey)
Oracle function for 'unloading' a previously loaded key.
psa_status_t mcuxClPsaDriver_Oracle_ImportKey(mcuxClKey_Descriptor_t *pKey, const uint8_t *data, size_t data_length, size_t *key_buffer_length, size_t *bits)
Oracle function for executing S50 specific activities when the import of key is done the PSA library ...
psa_status_t mcuxClPsaDriver_Oracle_ResumeKey(mcuxClKey_Descriptor_t *pKey)
Oracle function for 'resuming' a previously 'suspended' key.
psa_status_t mcuxClPsaDriver_Oracle_LoadKey(mcuxClKey_Descriptor_t *pKey)
Oracle function for loading a key.
psa_status_t mcuxClPsaDriver_Oracle_ExportPublicKey(mcuxClKey_Descriptor_t *pKey, uint8_t *data, size_t data_size, size_t *data_length, bool internal_representation)
Oracle function for exporting of the public key created in ELS during KEY_GEN command.
psa_status_t mcuxClPsaDriver_Oracle_ReserveKey(mcuxClKey_Descriptor_t *pKey)
Oracle function for allocating storage for a key that will be created by the psa driver.
psa_status_t mcuxClPsaDriver_Oracle_GetBuiltinKeyBuffer(psa_key_attributes_t *attributes, uint8_t *key_buffer, size_t key_buffer_size, size_t *key_buffer_length)
Oracle function for making keys that are installed upon boot in S50 and keys derived from those (buil...