Replace rand with getrandom and KeysManager entropy in non-test…#800
Replace rand with getrandom and KeysManager entropy in non-test…#800TheBlueMatt wants to merge 1 commit intolightningdevkit:mainfrom
rand with getrandom and KeysManager entropy in non-test…#800Conversation
… code `rand` is basically just a way to wrap `getrandom` with a chacha stream plus a bag of unrelated random utilities. Given we already have a way to wrap `getrandom` with a chacha stream, there's no point in relying on `rand` for it, so we simply drop it here. Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
👋 Hi! Please choose at least one reviewer by assigning them on the right bar. |
tnull
left a comment
There was a problem hiding this comment.
Hmm, so I'm not entirely convinced this change is worth the loss of convenience, as it won't allow us to drop rand/rand_core from our dependency tree anyways (as crates like bip39 etc are using it anyways).
So not sure if we gain much by restricting ourselves, and ofc. we risk messing something up?
|
IMO in the long-term we should move towards |
… code
randis basically just a way to wrapgetrandomwith a chacha stream plus a bag of unrelated random utilities. Given we already have a way to wrapgetrandomwith a chacha stream, there's no point in relying onrandfor it, so we simply drop it here.Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com