|
|
|
@ -151,6 +151,7 @@ void collect_hw_entropy(void)
|
|
|
|
|
uint8_t entropy[FLASH_OTP_BLOCK_SIZE];
|
|
|
|
|
random_buffer(entropy, FLASH_OTP_BLOCK_SIZE);
|
|
|
|
|
ensure(flash_otp_write(FLASH_OTP_BLOCK_RANDOMNESS, 0, entropy, FLASH_OTP_BLOCK_SIZE), NULL);
|
|
|
|
|
ensure(flash_otp_lock(FLASH_OTP_BLOCK_RANDOMNESS), NULL);
|
|
|
|
|
}
|
|
|
|
|
// collect entropy from OTP randomness block
|
|
|
|
|
ensure(flash_otp_read(FLASH_OTP_BLOCK_RANDOMNESS, 0, HW_ENTROPY_DATA + 12, FLASH_OTP_BLOCK_SIZE), NULL);
|
|
|
|
|