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

Remove randombytes.c and add notrandombytes.c #261

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

mkannwischer
Copy link
Contributor

@mkannwischer mkannwischer commented Oct 28, 2024

This removes our current randombytes() implementation and replaces it with a deterministic randombytes() based on surf (https://cr.yp.to/hash.html#surf).

Resolves #260.

As per pq-code-package/tsc#86, the consensus of the PQCP TCP is that a secure implementation of randombytes() should be provided by the software consuming code from the PQCP.

For testing, we should use a deterministic randombytes() that no one is going to put into a production system. I propose to use the popular implementation by Daniel J. Bernstein based on surf (https://cr.yp.to/hash.html#surf).
This implementation is clearly not secure which hopefully decreases the risk of someone just taking it.

I called it notrandombytes.c and moved it into the test folder to decrease the risk of misuse.

@mkannwischer mkannwischer force-pushed the randombytes branch 2 times, most recently from 940e262 to b874aa8 Compare October 28, 2024 03:25
@mkannwischer mkannwischer force-pushed the randombytes branch 2 times, most recently from 17aa104 to 5ea0335 Compare October 28, 2024 05:42
This removes our current randombytes() implementation and replaces it with a deterministic randombytes() based on surf (https://cr.yp.to/hash.html#surf).

Resolves #260.

As per pq-code-package/tsc#86, the consensus of the PQCP TCP is that a secure implementation of randombytes() should be provided by the software consuming code from the PQCP.

For testing, we should use a deterministic randombytes() that no one is going to put into a production system. I propose to use the popular implementation by Daniel J. Bernstein based on surf (https://cr.yp.to/hash.html#surf).
This implementation is clearly not secure which hopefully decreases the risk of someone just taking it.

I called it notrandombytes.c and moved it into the test folder to decrease the risk of misuse.

Signed-off-by: Matthias J. Kannwischer <[email protected]>
@hanno-becker hanno-becker merged commit 634b559 into main Oct 28, 2024
17 checks passed
@hanno-becker hanno-becker deleted the randombytes branch October 28, 2024 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove randombytes
2 participants