Closed kriskwiatkowski closed 5 years ago
Other than that, this library currently compiles for RISC-V but seems there are 2 problems:
test_N
aborts - needs investigationI wonder if it makes sense to add DRBG as small devices may have crappy/slow PRNG. Hardware PRNG would be used only to initialize DRBG (and reseeding) which maybe could improve random generation. This would obviously increase code size, so must be opt-in/opt-out option selected at compile time
RISC-V ongoing work here: https://github.com/henrydcase/riscv-sandbox/tree/disco/disco
Hey @henrydcase
Awesome thanks for the PR!
for DRBG you have this: https://github.com/mimoo/disco-c/blob/master/lib/disco_symmetric.h#L53
Two small commits to enable RISC-V builds
disco_generateKeyPair
can't be declaredinline
as compiler may decide not to inline it (see C99 6.7.4 for complicated explanation ). I was getting following errors when compiling for RISC-V/32As signed values are compared to unsigned values compiler may produce warnings, which fails a build if compiling with
-Wextra -pedantic