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

Let the entropy module be optional #4525

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

randombit
Copy link
Owner

It was previously required by the rng module, but this isn't really necessary, especially for anyone who is just using the system RNG. (And/or NIST DRBGs seeded with the system RNG.)

@randombit randombit force-pushed the jack/entropy-is-optional branch from 230fbbd to 7c0d596 Compare January 3, 2025 15:49
@coveralls
Copy link

coveralls commented Jan 3, 2025

Coverage Status

coverage: 91.269% (+0.001%) from 91.268%
when pulling ccc4b27 on jack/entropy-is-optional
into d5948a5 on master.

Comment on lines 23 to 24
class Entropy_Sources;

Copy link
Collaborator

@reneme reneme Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relates to lines 68 to 72 where Entropy_Sources is actually used if Botan doesn't have the system rng enabled. Probably, this needs another ifdef.

Copy link
Owner Author

@randombit randombit Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't even required at all - removed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you push all changes here? If I configure without entropy and system_rng botan fails to build with:

src/lib/rng/auto_rng/auto_rng.cpp:68:22: error: incomplete type 'Botan::Entropy_Sources' named in nested name specifier
   68 |       AutoSeeded_RNG(Entropy_Sources::global_sources(), reseed_interval)
      |                      ^~~~~~~~~~~~~~~~~
build/include/public/botan/rng.h:26:7: note: forward declaration of 'Botan::Entropy_Sources'
   26 | class Entropy_Sources;
      |       ^

@randombit randombit force-pushed the jack/entropy-is-optional branch from ccc4b27 to aa9b79b Compare January 9, 2025 12:43
@randombit randombit requested a review from reneme January 9, 2025 12:46
It was previously required by the rng module, but this isn't really
necessary, especially for anyone who is just using the system RNG.
(And/or NIST DRBGs seeded with the system RNG.)
Copy link
Collaborator

@reneme reneme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment about auto_rng.cpp

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.

3 participants