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

Add DRBG/CSPRNG functionality #46

Open
secworks opened this issue May 15, 2024 · 0 comments
Open

Add DRBG/CSPRNG functionality #46

secworks opened this issue May 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@secworks
Copy link

secworks commented May 15, 2024

Currently the Tkey sports a TRNG. There is also an app, The Tkey random generator that implements a proper Digital Bit Random Generator (DRBG), also known as a Secure Random Number Generator (CSPRNG). Basically an implementation of Hash-DRBG using the Blake2s hash function.

We want to help app developers to not shoot themselves in the foot. One potential foot gun is using the TRNG directly for deriving things related to security - keys for example. In a future when we have more resources, I would love to move a DRBG-functionality into the HW (similar to what we did in the Cryptech HSM project).

But just adding the functionality of the RNG app into tkey-libs would make it much easier for app developers to do the right thing. This would also improve RND capacity for the apps (since most RND will be generated by the DRBG, not the TRNG).

One could also look at the secure RNG added to the Go std lib for inspiration. The point is, we should provide functions to do this. One issue may be how RNG context is to be handled. Should the lib create an internal context, or should the app create a context (by calling a drbg_init() function for example)?

@SallSim SallSim added the enhancement New feature or request label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants