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

Exposed random sources #275

Merged
merged 2 commits into from
Jan 12, 2024
Merged

Exposed random sources #275

merged 2 commits into from
Jan 12, 2024

Conversation

balena
Copy link

@balena balena commented Oct 2, 2023

Exposed the random sources, so that users can customize them according to their needs. The rand.Reader is used by default if the user does not specify a random source while creating the local party. At keygen the random sources are separated between "partial key random source" and regular random source, aiming to provide a deterministic random source when it's the case. Custom random sources are required when the app utilizes multiple entropy sources, frequently unsuitable to be set at the global rand.Reader.

In order to set random sources, do:

params := tss.NewParameters(...)
params.SetRand(rand)
params.SetPartialKeyRand(partialKeyRand)

…eir needs.

Signed-off-by: Guilherme Balena Versiani <guibv@mailbox.org>
ZhAnGeek
ZhAnGeek previously approved these changes Jan 10, 2024
@ZhAnGeek ZhAnGeek merged commit 87f7e12 into bnb-chain:master Jan 12, 2024
1 check passed
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