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

Nonce generation uses insecure random #24

Closed
chethega opened this issue Aug 18, 2019 · 2 comments · Fixed by #34
Closed

Nonce generation uses insecure random #24

chethega opened this issue Aug 18, 2019 · 2 comments · Fixed by #34

Comments

@chethega
Copy link

Consider this line.

This generates a nonce using the default random, which is Mersenne Twister. MT is not a CSPRNG, i.e. the internal state and hence all past and future random numbers can be extracted from a few random numbers from the stream.

The nonce generation should use a secure random instead. For example, const CSPRNG = Random.RandomDevice() and randstring(CSPRNG, length) would do the job.

Cf general discussion (here)[https://github.com/JuliaLang/julia/issues/32954].

@randyzwitch
Copy link
Owner

If this is important to you, I'm happy to accept a PR

@chethega
Copy link
Author

It's not important to me personally, since I don't use OAuth.jl. But it does impact the security of all your users against replay attacks.

I'll ping you when julialang has settled on an official recommendation. I am guessing that the amount of affected users and the number of real-world attackers are small enough that this can wait until then, but you are in a better position to judge that.

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 a pull request may close this issue.

2 participants