-
Notifications
You must be signed in to change notification settings - Fork 2
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
Seeding routine and second call to isaac() #1
Comments
Hi Mike, I haven't uploaded the package to PyPI (the Python Package Index) yet. I'm waiting for more feedback and reviews to do so. Can you take a look at the If you really want to install the package, clone the repository, cd into the pyisaac directory and run Thank you for your time! |
The recommended way of seeding ISAAC is to write the seed value over and over until it fills the internal arrays, rather than initializing with zeroes and writing the seed value once; and calling isaac() twice is a way to work around a potential security flaw someone discovered with some of the starting states. Basically if you don't call it twice there are some seed values that are within the realm of possibility of brute-forcing to recover the seed, which would break the cryptographic security. |
By the way, here's an interface for the RNG you may find useful:
(randcnt is initialized to 256 * sizeof(me->rsl[0]) at the end of set_seed, after calling isaac() once or twice) It isn't perfect (if there are three bytes of random bits remaining in the randrsl array and you request a uint32, it calls isaac and reads four bytes from the new set of data, rather than using those three bytes and only needing one more), but the logic for the random floats and doubles was tested carefully and that's usually hard to get right. |
Great stuff! Thank you. I will commit within the week. |
The seed value is copied over and over until it fills the internal array.
The first step in the Use section says to do this:
I checked Google to figure out what pip is, and successfully installed it, but it of course just says it couldn't find any packages named pyisaac:
It didn't seem to matter which directory I cd'd into. Are these directions accurate?
The text was updated successfully, but these errors were encountered: