Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable custom RNG implementations #40

Merged
merged 4 commits into from
Aug 31, 2022
Merged

Conversation

sirkrypt0
Copy link
Contributor

@sirkrypt0 sirkrypt0 commented Aug 31, 2022

Similar to how custom crypto implementations can be used, this enables users to overwrite the RNG function.

Closes #41

Previously, we used the wrong format strings for displaying
the amount of clock cycles and nanoseconds.
include/random.h Outdated Show resolved Hide resolved
@sirkrypt0 sirkrypt0 force-pushed the feature/enable-custom-rng branch from 74bff97 to 969dd9f Compare August 31, 2022 09:57
include/random.h Outdated Show resolved Hide resolved
src/random.c Show resolved Hide resolved
src/random.c Show resolved Hide resolved
@sirkrypt0 sirkrypt0 force-pushed the feature/enable-custom-rng branch from 969dd9f to 460c531 Compare August 31, 2022 14:15
src/random.c Show resolved Hide resolved
src/dev.c Show resolved Hide resolved
Previously, the RNG implementation was provided by us, with
no way to overwrite it. Similar to the cryptographic algorithms,
users can now overwrite the RNG implementation by setting
USE_SOFTWARE_RNG to false and setting the fido_get_random function
in random.h accordingly.
This is especially useful when using a board that provides a hardware
RNG.
@sirkrypt0 sirkrypt0 force-pushed the feature/enable-custom-rng branch from 603d6e7 to ecf80f2 Compare August 31, 2022 16:57
@sirkrypt0 sirkrypt0 merged commit 2900dd8 into main Aug 31, 2022
@sirkrypt0 sirkrypt0 deleted the feature/enable-custom-rng branch August 31, 2022 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to overwrite RNG implementation
3 participants