[Cryptech-Commits] [user/ln5/stm32-avalanche-noise] 04/05: [entropy] Raise USB baud rate to match application 'cc20rng'

git at cryptech.is git at cryptech.is
Sun Jan 26 09:37:10 UTC 2020


This is an automated email from the git hooks/post-receive script.

linus at nordberg.se pushed a commit to branch master
in repository user/ln5/stm32-avalanche-noise.

commit abfbb7b7a3c1e14873c898082acd2b22db23e9a9
Author: Linus Nordberg <linus at nordberg.se>
AuthorDate: Thu Jan 23 13:09:53 2020 +0100

    [entropy] Raise USB baud rate to match application 'cc20rng'
    
    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.
---
 src/entropy/stm_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/entropy/stm_init.c b/src/entropy/stm_init.c
index 5f69760..fc8b84f 100644
--- a/src/entropy/stm_init.c
+++ b/src/entropy/stm_init.c
@@ -50,7 +50,7 @@
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
 
-#define UART1_BAUD_RATE 460800
+#define UART1_BAUD_RATE 921600
 #define UART2_BAUD_RATE 115200
 
 



More information about the Commits mailing list