SRAM PUF¶
SRAM based physically unclonable function (PUF)
-
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.
The state will most likely be overwritten with 0 in the next steps
-
void
puf_sram_init
(const uint8_t * ram,msp430_types.h::size_t
len)¶ checks source of reboot by
puf_sram_softreset
and conditionally callspuf_sram_generate
Parameters
ram: pointer to SRAM memory len: length of the memroy to consider
-
void
puf_sram_generate
(const uint8_t * ram,msp430_types.h::size_t
len)¶ builds hash from
SEED_RAM_LEN
bytes uninitialized SRAM, writes it to the global variablepuf_sram_seed
and returns the valueParameters
ram: pointer to SRAM memory len: length of the memroy to consider
-
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
Return values
- 0 when reset with power cycle was detected
- 1 when reset without power cycle was detected
-
SEED_RAM_LEN
¶ SRAM length considered for seeding.
1
(2048 / sizeof(uint32_t))
-
PUF_SRAM_MARKER
¶ SRAM marker to detect reboot without power-off.
1
(0xad3021ff)
Source: https://www.random.org/bytes/