-
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
Should crypto RNGs implement serialization? #31
Comments
A few thoughts:
|
I don't think XorShift is not very good and may well be removed. Hopefully we'll add some alternatives. ISAAC has two significant drawbacks: (1) large memory footprint and (2) while there appear to be no known attacks, it's not exactly a "proven" CSPRNG. Personally I'm in favour of just implementing for all PRNGs (including CSPRNGs). |
I don't buy the security argument neither. A user of a library has access the memory anyway if I'm informed correctly. What would the attack vector here? The internal state should be shielded against external processes, I agree. But I don't see any connection to implementing Can somebody explain to me please, how implementing that trait would affect the security at all? Seriously interested. Maybe I'm missing something. |
As far as I know the only possibility is that the host process serializes state which happens to get stored somewhere insecure. The thing is if serialisation is required, a key has to be stored somewhere anyway — unless fresh random numbers are sufficient, which is why it's been suggested that |
Well, we now have serialisation implemented for non-crypto RNGs. I guess that will do for now; if not someone should open an issue in the main |
In #13 (see here) @pitdicker expresses his reservations about CSPRNGs revealing their internal state easily via serialization. I point out that APIs can't provide memory protection anyway.
Anyone else have an opinion?
My thoughts:
reinterpret_cast
), so lack of serialization isn't much in the way of securityThe text was updated successfully, but these errors were encountered: