Conversation
…ms consume randomness
…hecks the security_strength of the RNG it was handed.
|
@officialfrancismendoza Does b95fed9 address your first comment here? |
|
A note on this change to traits.rs: OLD fn add_seed_keymaterial(
&mut self,
additional_seed: impl KeyMaterialTrait,NEW fn add_seed_keymaterial(
&mut self,
additional_seed: &dyn KeyMaterialTrait,It was nice that this was a move and consumed the |
@ounsworth yes, this addresses my first comment functionally. However (nitpick), I don’t see a regression test specifically where encaps_from_rng() rejects an insufficient-strength RNG; the tests added seem focused on keygen. Did we want to add that just in case? If not, everything else looks good. |
|
@officialfrancismendoza Oh that's not a nitpick, that's a great catch! Thanks for double-checking my work carefully! |
|
@ounsworth looks good. Just for the record: I made sure to push upstream to source (David's bare metal server), as changes on this public mirror are overwritten on a regular interval. Since that's now reflected in 0.1.2alpha, approving this feature branch. |
officialfrancismendoza
left a comment
There was a problem hiding this comment.
Approved and squash-merged to 0.1.2alpha on source (to reflect on the public mirror here). LGTM!
Things that require randomness can now be handed an instance of
&mut dyn RNG, including allowing users of the library to impl their own RNG and use it, for example, as the entropy source for an ML-DSA keygen.