From e47310c3d5ef6fc10e60562d2d88da0927bc1fce Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 18 Dec 2019 23:36:25 +0100 Subject: WIP Revamp ChaCha20 seeding - chacha20_prng_block() uses counter in the state struct - chacha20_setup() replaces chacha20_prng_reseed() and fills the whole state struct, fixing a bug where only half of the key was being set; as a result of 'counter' being set, a state struct filled with entropy from the TRNG makes reseeding occur after a random number of rounds instead of after a fixed 2^32-1 rounds - decrementing of the block counter is done in chacha20_prng_block() - chacha output is copied to buf _after_ the interrupt driven transmission of buf to UART has finished, to stop the race between reading and refilling of buf --- src/cc20rng/stm32f4xx_it.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/cc20rng/stm32f4xx_it.h') diff --git a/src/cc20rng/stm32f4xx_it.h b/src/cc20rng/stm32f4xx_it.h index 04c5a36..6edba3c 100644 --- a/src/cc20rng/stm32f4xx_it.h +++ b/src/cc20rng/stm32f4xx_it.h @@ -44,8 +44,6 @@ #endif /* Includes ------------------------------------------------------------------*/ -#include "main.h" - /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ -- cgit v1.2.3