This is an archive of the discontinued LLVM Phabricator instance.

[scudo] PRNG makeover
AbandonedPublic

Authored by cryptoad on Jun 22 2017, 9:54 AM.

Details

Reviewers
alekseyshl
kcc
Summary

This follows the addition of GetRandom with D34412. We remove our
/dev/urandom code and use the new function. Additionally, change the PRNG for
a slightly faster version. One of the issues with the old code is that we have
64 full bits of randomness per next, using only 8 of those for the Salt and
discarding the rest. So we add a cached u64 in the PRNG that can serve up to
8 u8 before having to call the next function again.

Event Timeline

cryptoad created this revision.Jun 22 2017, 9:54 AM
cryptoad abandoned this revision.Jun 27 2017, 1:55 PM

Abandoning for now, this seems to have a non negligible performance impact.
I will revisit this when things settle on other fronts.