Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FXAS21002 FXOS8700Q
pal_rot.h File Reference
PAL ROT. This file contains the ROT (root of trust) API. More...
Go to the source code of this file.
Typedefs | |
typedef enum palDeviceKeyType | palDevKeyType_t |
Device key types supported in PAL. | |
Enumerations | |
enum | palDeviceKeyType { , palOsStorageSignatureKey128Bit = 1, palOsStorageHmacSha256 = 2 } |
Device key types supported in PAL. More... | |
Functions | |
palStatus_t | pal_osGetDeviceKey (palDevKeyType_t keyType, uint8_t *key, size_t keyLenBytes) |
palStatus_t | pal_osSetRoT (uint8_t *key, size_t keyLenBytes) |
Detailed Description
PAL ROT. This file contains the ROT (root of trust) API.
Definition in file pal_rot.h.
Typedef Documentation
typedef enum palDeviceKeyType palDevKeyType_t |
Device key types supported in PAL.
Enumeration Type Documentation
enum palDeviceKeyType |
Function Documentation
palStatus_t pal_osGetDeviceKey | ( | palDevKeyType_t | keyType, |
uint8_t * | key, | ||
size_t | keyLenBytes | ||
) |
Return a device unique key derived from the root of trust.
- Parameters:
-
[in] keyType The type of key to derive. [in,out] key A 128-bit OR 256-bit buffer to hold the derived key, size is defined according to the `keyType`. [in] keyLenBytes The size of buffer to hold the 128-bit OR 256-bit key.
- Returns:
- PAL_SUCCESS in case of success and one of the following error codes in case of failure:
PAL_ERR_GET_DEV_KEY - an error in key derivation.
PAL_ERR_INVALID_ARGUMENT - invalid parameter.
palStatus_t pal_osSetRoT | ( | uint8_t * | key, |
size_t | keyLenBytes | ||
) |
Sets a root of trust key. The size of the key must be 16 bytes. This function is not implemented for HW RoT configuration.
- Parameters:
-
[in] key A 16 bytes buffer with a root of trust key to set. [in] keyLenBytes The size of the buffer must be 16 bytes.
- Returns:
- PAL_SUCCESS in case of success and one of the following error codes in case of failure:
PAL_ERR_ITEM_EXIST - RoT key already exists.
PAL_ERR_INVALID_ARGUMENT - invalid parameter.
PAL_ERR_GENERIC_FAILURE - set operation failed.
PAL_ERR_NOT_IMPLEMENTED - the function is not implemented for current configuration.
Generated on Tue Jul 12 2022 20:21:04 by
