SRAM PUF

SRAM based physically unclonable function (PUF) More...

Detailed Description

SRAM based physically unclonable function (PUF)

Warning
This feature is experimental!

Files

file  puf_sram.h
 

Macros

#define SEED_RAM_LEN   (2048 / sizeof(uint32_t))
 SRAM length considered for seeding.
 
#define PUF_SRAM_MARKER   (0xad3021ff)
 SRAM marker to detect reboot without power-off. More...
 

Functions

void puf_sram_init (const uint8_t *ram, size_t len)
 checks source of reboot by puf_sram_softreset and conditionally calls puf_sram_generate More...
 
void puf_sram_generate (const uint8_t *ram, size_t len)
 builds hash from SEED_RAM_LEN bytes uninitialized SRAM, writes it to the global variable puf_sram_seed and returns the value More...
 
bool puf_sram_softreset (void)
 checks for a memory marker to determine whether memory contains old data. More...
 

Variables

uint32_t puf_sram_seed
 Global seed variable, allocated in puf_sram.c.
 
uint32_t puf_sram_state
 Global seed state, allocated in puf_sram.c 0 means seed was generated from SRAM pattern, 1 means missing power cycle detected, 2 means power cycle detected. More...
 

Macro Definition Documentation

◆ PUF_SRAM_MARKER

#define PUF_SRAM_MARKER   (0xad3021ff)

SRAM marker to detect reboot without power-off.

Source: https://www.random.org/bytes/

Definition at line 43 of file puf_sram.h.

Function Documentation

◆ puf_sram_generate()

void puf_sram_generate ( const uint8_t *  ram,
size_t  len 
)

builds hash from SEED_RAM_LEN bytes uninitialized SRAM, writes it to the global variable puf_sram_seed and returns the value

Parameters
[in]rampointer to SRAM memory
[in]lenlength of the memroy to consider

◆ puf_sram_init()

void puf_sram_init ( const uint8_t *  ram,
size_t  len 
)

checks source of reboot by puf_sram_softreset and conditionally calls puf_sram_generate

Parameters
[in]rampointer to SRAM memory
[in]lenlength of the memroy to consider

◆ puf_sram_softreset()

bool puf_sram_softreset ( void  )

checks for a memory marker to determine whether memory contains old data.

Otherwise it assumes a reboot from power down mode

Returns
0 when reset with power cycle was detected
1 when reset without power cycle was detected

Variable Documentation

◆ puf_sram_state

uint32_t puf_sram_state

Global seed state, allocated in puf_sram.c 0 means seed was generated from SRAM pattern, 1 means missing power cycle detected, 2 means power cycle detected.

The state will most likely be overwritten with 0 in the next steps