jirka-h / haveged

Entropy daemon ![Continuous Integration](https://github.com/jirka-h/haveged/workflows/Continuous%20Integration/badge.svg)
GNU General Public License v3.0
273 stars 34 forks source link

Round bits up and target full pool size #70

Closed zx2c4 closed 2 years ago

zx2c4 commented 2 years ago

Rather than rounding bits down, round them up. Otherwise 249 bits full in a 256 bit pool won't ever get filled up with the additional 7 bits. In addition, target a full pool rather than a half pool, since a full pool is sometimes required.

CC @jmberg

jirka-h commented 2 years ago

Hi Jason,

thanks for the MR. It definitively makes sense. Merging.

Jirka

zx2c4 commented 2 years ago

Thanks. @jirka-h you may want to do a release soon, so that it can make its way into distros before 5.18 is released, which uses a 256 bit pool more likely to hit this edgecase.

jirka-h commented 2 years ago

Thanks for the heads-up! I have just released new version:-)