aboutsummaryrefslogtreecommitdiff
path: root/src/cc20rng/main.h
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2019-12-18 23:36:25 +0100
committerLinus Nordberg <linus@nordberg.se>2019-12-18 23:36:25 +0100
commite47310c3d5ef6fc10e60562d2d88da0927bc1fce (patch)
treee5120a2cbfb18deeca95c6670dfd3216745d4d8c /src/cc20rng/main.h
parentbef34ab8ac602d36d86b4a3f3013b89e3e2e5402 (diff)
WIP Revamp ChaCha20 seedingln/cc20rng-revamp
- 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
Diffstat (limited to 'src/cc20rng/main.h')
-rw-r--r--src/cc20rng/main.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/cc20rng/main.h b/src/cc20rng/main.h
deleted file mode 100644
index 902ecf4..0000000
--- a/src/cc20rng/main.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef __MAIN_H
-#define __MAIN_H
-
-#endif /* __MAIN_H */