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

Is the codebase re-seeding on every random tensor generation (if so, can I control the reseeding period)? #143

Open
kwmaeng91 opened this issue Dec 3, 2024 · 0 comments

Comments

@kwmaeng91
Copy link

kwmaeng91 commented Dec 3, 2024

Dear experts,

From what I understood, this codebase samples a random number from /dev/urandom each time when generating a new random tensor, and uses it as a seed to generate the rest of the random tensor
(I got the idea from here: #43 (comment)).

I am confused about this behavior for two reasons:

  1. If AES-CTR is CSPRNG, my understanding is that it does not need to be reseeded. Why is it reseeding on every tensor generation?
  2. If my understanding is correct, the reseeding period seems arbitrary. If I generate a huge random tensor, a lot of random numbers will be generated from a single 128-bit value from /dev/urandom. If I generate multiple small tensors, /dev/urandom will be sampled very frequently. Can I control the reseeding frequency?

Please let me know if I am mistaken in any ways. My understanding of how this codebase works (and/or how CSPRNG works) might be incorrect.

Thank you!

@kwmaeng91 kwmaeng91 changed the title Can I control how frequently I re-seed the AES128 keys? Is the codebase re-seeding on every random tensor generation (if so, can I control the reseeding period)? Dec 3, 2024
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

No branches or pull requests

1 participant