-
Notifications
You must be signed in to change notification settings - Fork 0
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
Investigate use of Math.random for permission tokens #34
Comments
Hey - sorry for not taking a look at this earlier. Here's my understanding of what the flow is:
Is this correct? If so, I think the quality of the randomness is unlikely to be a significant issue - we're trusting the channel in either case. Also, FWIW there's still movement on the related Firefox issue (https://bugzilla.mozilla.org/show_bug.cgi?id=842818#c60) - that is, we should hopefully get proper crypto in webworkers in the not-too-distant future. |
Generally, security advice we got from reviews was never use Math.random. On Fri, 6 Nov 2015 at 13:24 soycode [email protected] wrote:
|
The crypto random doesn't require message passing, just requires rather ugly filling in Firefox webworkers. I think it has stabilized a bit since @dborkan filed this issue so we could still give it a go. I agree that Math.random is basically always bad to depend on for anything security related, but from the flow as I understand it I don't think we are really depending on the randomness for security qualities here and just for uniqueness (the security is basically "trust Firebase"). That said, if I'm misunderstanding the flow (e.g. if we are expecting Alice/Bob to use a sidechannel for this token) then the randomness may be security sensitive, in which case yes we need to figure out using |
Understood. Security team's argument wasn't about our previous usage of it On Fri, 6 Nov 2015 at 14:14 soycode [email protected] wrote:
|
Fair point - if we want to make it a general code style/health guideline I'd support that. I'll see how simple/reliable our fill can be, and hopefully the Firefox issue will be resolved in the not-too-distant future as well. |
As of #33 we are using Math.random to generate permission tokens. We need to see if this is secure enough, or if we should move to the crypto library.
The text was updated successfully, but these errors were encountered: