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

Reorganise reseeding #1941

Open
wants to merge 4 commits into
base: randomness_generation
Choose a base branch
from

Conversation

torben-hansen
Copy link
Contributor

@torben-hansen torben-hansen commented Oct 22, 2024

Call-outs:

To avoid synchronisation issues for codepoints that reads/mutates the ctr-drbg state in #1919, we must reorganise the reseed logic. This decouples the code that reads/mutates the ctr-drbg state and the code that gathers entropy. The latter is not an issue. The former will later be wrapped as critical code needing synchronisation as part of the global zeroisation.

Testing:

Added new tests that verifies we can predict the time of reseeding based on the configured reseed bound.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.56%. Comparing base (ccb97ef) to head (8a0ce84).

Additional details and impacted files
@@                    Coverage Diff                    @@
##           randomness_generation    #1941      +/-   ##
=========================================================
+ Coverage                  78.46%   78.56%   +0.10%     
=========================================================
  Files                        585      585              
  Lines                      97061    98007     +946     
  Branches                   13920    13921       +1     
=========================================================
+ Hits                       76160    77003     +843     
- Misses                     20282    20384     +102     
- Partials                     619      620       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@torben-hansen torben-hansen changed the title Restrict RAND_bytes request length and reorganise reseeding Reorganise reseeding Oct 23, 2024
@torben-hansen torben-hansen marked this pull request as ready for review October 23, 2024 22:21
@torben-hansen torben-hansen requested a review from a team as a code owner October 23, 2024 22:21
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.

2 participants