jedisct1 / libhydrogen

A lightweight, secure, easy-to-use crypto library suitable for constrained environments.
https://libhydrogen.org
Other
593 stars 88 forks source link

nRF52 without softdevice #91

Open wombatsoftwareguild opened 4 years ago

wombatsoftwareguild commented 4 years ago

There are plenty of uses for libhydrogen on an nRF52 when the softdevice is not present or not enabled. There is a separate nRF5 SDK set of API calls for the random number generator when the softdevice APIs are not availaible. (I'm not sure if one can use these APIs when the softdevice is enabled -- it's tough to sort through the Nordic documentation.)

Request modifying impl/random.h to use the alternate random API if SOFTDEVICE_PRESENT or sd_softdevice_is_enabled() indicates the softdevice APIs are not available.

wombatsoftwareguild commented 4 years ago

Actually nrf_sdh_is_enabled() might be a better choice for checking which API to use.

jedisct1 commented 4 years ago

Go for it :)

wombatsoftwareguild commented 4 years ago

Just tried to create a tracking branch on git@github.com:jedisct1/libhydrogen.git but got permission denied. Odd, because at least briefly I though GitHub listed me as a collaborator.

Do you prefer a PR or emailed diffs?

=====

On Apr 15, 2020, at 3:45 PM, Frank Denis notifications@github.com wrote:

Go for it :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jedisct1/libhydrogen/issues/91#issuecomment-614316756, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH7BIGXYQKL36TKCINCWBDRMY2IHANCNFSM4MI4JZNA.