mimoo / disco-c

A tiny C cryptographic library to encrypt sessions, authenticate messages, sign, hash, etc. based only on SHA-3 and Curve25519
https://embeddeddisco.com/
Apache License 2.0
65 stars 3 forks source link

RISC-V: fixes #22

Closed kriskwiatkowski closed 5 years ago

kriskwiatkowski commented 5 years ago

Two small commits to enable RISC-V builds

kriskwiatkowski commented 5 years ago

Other than that, this library currently compiles for RISC-V but seems there are 2 problems:

I 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

mimoo commented 5 years ago

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