1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 21:48:13 +00:00
Commit Graph

20 Commits

Author SHA1 Message Date
Tomas Susanka
c34e8ab3bd
rand: add a reseed function to be used in tests 2019-01-02 14:36:02 +01:00
Pavol Rusnak
b9e8adc160
rand: fix typo 2018-12-18 12:08:49 +01:00
Tomas Susanka
54727e6650 rand: switch to 'Numerical Recipes' constants and remove random8 to increase period 2018-12-18 12:02:24 +01:00
andrew
c5227fdb96
rand.c: for testing purposes seed the pseudorandom number generator with 0
instead of the current time.

This is needed to ensure identical pseudorandom outputs when running tests.
2018-12-06 12:54:02 +01:00
Jochen Hoenicke
009850f6c9 Fixed undefined behavior
This fixes a shift by 32 and shifts on signed integer that overflow.
2018-03-27 15:04:55 +02:00
Pavol Rusnak
2e528be1e9
add warning message to rand.c 2018-01-21 23:38:32 +01:00
Pavol Rusnak
72841c4fa1
declare random_buffer as weak symbol 2018-01-15 18:28:02 +01:00
Pavol Rusnak
46fa586b12
further work on making rand.{c,h} more global 2018-01-13 15:07:19 +01:00
Peter D. Gray
65e976d70c rand.c: platform depedenant code can be removed using CPP flag 2018-01-13 14:52:42 +01:00
Pavol Rusnak
3556c74740
fix build on _WIN32 2015-12-14 22:50:28 +01:00
Pavol Rusnak
00954da5fe fix /dev/urandom problem 2015-05-04 19:53:06 +02:00
Pavol Rusnak
ffedf8a4d0 suppress warning when debug is disabled 2015-05-04 19:40:15 +02:00
Pavol Rusnak
196cabe012 import random_uniform and random_permute functions from TREZOR codebase 2015-03-30 17:45:34 +02:00
Dustin Laurence
ce67a85d39 Add finalize_rand() to prove we have no leaks 2015-01-23 06:05:38 -08:00
Dustin Laurence
661751ab4b Add finalize_rand() 2015-01-23 06:05:25 -08:00
Dustin Laurence
3329b6b6aa Test fread return value 2014-07-16 08:06:15 -05:00
Pavol Rusnak
612f5ab050 fix copyright headers 2014-05-22 20:54:58 +02:00
Pavol Rusnak
e827517591 add mnemonic_check function 2014-03-12 20:45:51 +01:00
Pavol Rusnak
4593b3f636 use /dev/urandom in example 2013-08-21 20:26:00 +02:00
Pavol Rusnak
ccbc219b29 import sources 2013-08-17 14:20:15 +02:00