Mbed OS Reference
Loading...
Searching...
No Matches
tfm_plat_boot_seed.h File Reference

Boot seed is used by a validating entity to ensure multiple reports were generated in the same boot session. More...

#include <stdint.h>
#include "tfm_plat_defs.h"

Go to the source code of this file.

Macros

#define BOOT_SEED_SIZE   (32u)
 Size of boot seed in bytes. More...
 

Functions

enum tfm_plat_err_t tfm_plat_get_boot_seed (uint32_t size, uint8_t *buf)
 Gets the boot seed, which is a constant random number during a boot cycle. More...
 

Detailed Description

Boot seed is used by a validating entity to ensure multiple reports were generated in the same boot session.

Boot seed is a random number, generated only once during a boot cycle and its value is constant in the same cycle. Size recommendation is 256-bit to meet the statistically improbable property. Boot seed can be generated by secure boot loader an included to the measured boot state or can be generated by PRoT SW.

Definition in file tfm_plat_boot_seed.h.

Macro Definition Documentation

◆ BOOT_SEED_SIZE

#define BOOT_SEED_SIZE   (32u)

Size of boot seed in bytes.

Note
The interfaces defined in this file must be implemented for each SoC.

Definition at line 38 of file tfm_plat_boot_seed.h.

Function Documentation

◆ tfm_plat_get_boot_seed()

enum tfm_plat_err_t tfm_plat_get_boot_seed ( uint32_t  size,
uint8_t *  buf 
)

Gets the boot seed, which is a constant random number during a boot cycle.

Parameters
[in]sizeThe required size of boot seed in bytes
[out]bufPointer to the buffer to store boot seed
Returns
TFM_PLAT_ERR_SUCCESS if the value is generated correctly. Otherwise, it returns TFM_PLAT_ERR_SYSTEM_ERR.