Argyle-Software / dilithium

A post-quantum cryptographic signature scheme
Apache License 2.0
66 stars 23 forks source link

no_std compatibility #10

Open francescomedina opened 1 year ago

francescomedina commented 1 year ago

I'm trying to use the library with an ARM Cortex M4 and I'm having problems with the dilithium library's getrandom crate because the error message says: the thumbv7em-none-eabi target may not support the standard library

Since the embedded systems compatibility is not specified in the Readme, I wanted to kindly ask if the library is designed to work in a no_std environment?

Thanks

mberry commented 1 year ago

Yes, moving towards a portable RNG setup as mentioned in #2 that can remove the rand dependency. Will still need the RngCore and CryptoRng traits from rand_core. Essentially mirroring what exists in the Kyber library here:

https://github.com/Argyle-Software/kyber/blob/1f282d1b8a5708b73b8689bb8d52c6ca965b052b/src/rng.rs#L1-L9

After that, no_std support is simple enough to implement.