aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-01-23Revert "Add version and application info to ELF file"HEADcc20rng-1.0.0base-1.0.0masterLinus Nordberg
Adding symbols to an ELF file doesn't solve the problem we're trying to solve. We want to be able to identify which application is running on a board when we don't know what ELF file has been loaded in flash. A checksum over the contens of the flash memory seems less dumb. This reverts commit 49d39287252bf0bd2b3fd75e86d07616b56c7fd2.
2020-01-23[entropy] Raise USB baud rate to match application 'cc20rng'Linus Nordberg
Using different baud rates for the two otherwise compatible applications risk confusing users of both applications. An espeicially unlucky case is setting host side to 460800 while reading from a board set to 921600 -- the stream will look random while it's actually pretty bad. Raising 'entropy' rather than lowering 'cc20rng' is motivated by the fact that cc20rng saturates 460800 baud(*) with its ~75 kB/s output. (*) 460800 baud should be 57.6 kB/s or 51.2 kB/s, depending on whether or not the stop bit is counted towards the baud rate. I would suppose it is.
2020-01-21Merge branch 'ln/cc20rng-revamp' into ln/develLinus Nordberg
2020-01-21[cc20rng] Revamping the ChaCha20 seedingLinus Nordberg
- 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
2020-01-21[cc20rng] Code formatting changesLinus Nordberg
Keep indentation level 2 in main.c to minimise changes.
2020-01-21Add version and application info to ELF fileLinus Nordberg
2019-12-18Don't find | rm for target 'clean'Linus Nordberg
That's too destructive (and also it doesn't work well with .~/).
2019-12-16Make local functions staticLinus Nordberg
2016-11-21add RNG using ChaCha20 as CSPRNGFredrik Thulin
2015-06-28Enable dual USART output functionality.Fredrik Thulin
In other words, enable the USART connected to the serial port on the Raspberry Pi GPIO header. Sending a newline to either USART directs the generated entropy to that USART.
2015-06-28Remove trailing whitespace and DOS line endings.Fredrik Thulin
2015-01-15initFredrik Thulin