Closed zanebeckwith closed 6 years ago
@drbild I shortened the names, and moved the pool-related stuff into a separate file, under common/internal-utilities
.
Let me know what you think.
Looks like the README needs the ecdaa_randomness_func_t
to ecdaa_rand_func
change too.
Also, should the pool stuff become ecdaa_rand_pool
rather than ecdaa_randomness_pool
, etc?
Rargh, good catch on the names.
Alright, now, fixed. Sorry.
This removes the
ecdaa_prng
user-space cryptographically-secure random number generator (which was just a wrapper around AMCL's csprng), in favor of taking a function-pointer from the user that gives us random numbers directly. The intention (and what is illustrated in the examples) is that this function will use the system's source of randomness (e.g.getrandom
on Linux, or just/dev/urandom
).This is done for two reasons:
randombytes_buf
function, which is just a cross-platform wrapper around system-provided sources of randomness. Now, we suggest thatrandombytes_buf
is a good choice, but we don't require it and instead use our own (stripped-down, fewer-platform-supporting) implementation ofrandombytes_buf
in the examples.Fixes #96 Also, because we no longer use
randombytes_buf
in our tests, and thus no longer check that the system's csprng has been properly seeded (we have a warning about this in the README), we shouldn't get the intermittent errors in travis-ci that we had before. So, this Fixes #88.