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

Added RNG support for non-Linux/BSD systems #9

Closed
wants to merge 1 commit into from
Closed

Added RNG support for non-Linux/BSD systems #9

wants to merge 1 commit into from

Conversation

flurreh
Copy link

@flurreh flurreh commented Mar 25, 2014

As stated in issue #4, the CPRNG cannot seed automatically on non-Linux/BSD systems, as there's no /dev/random nor /dev/urandom.
I fixed this by using rand() in case of no random device being available.

@flurreh
Copy link
Author

flurreh commented Mar 25, 2014

Please discard this pull request.. I've forgotten to change __rdtsc to time() or std::chrono, which will lead to issues using any other compiler than MSVC. I will change this and create a new pull request as soon as I arrived home. I will change it to either time() or std::chrono, I just need to know whether it's alright to use C++11 functions in this project.

@flurreh flurreh closed this Mar 25, 2014
@cryptopathe
Copy link
Collaborator

We need a cryptographically strong PRNG, and unfortunately, rand() and the like are not cryptographically secure.

@cryptopathe cryptopathe reopened this Mar 25, 2014
@flurreh
Copy link
Author

flurreh commented Mar 25, 2014

Alright, that's reasonable. At home I have a class which I've used before, it should meet your requirements. As soon as I arrived there, I will work on implementing it! :)

@pyknite
Copy link
Collaborator

pyknite commented Mar 25, 2014

@flurreh I just did it (and also the flags problem #5 ) ! Waiting for approval from @cryptopathe

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.

3 participants