libtomcrypt icon indicating copy to clipboard operation
libtomcrypt copied to clipboard

Wishlist: Use getentropy() in rng_get_bytes.c if available

Open oittaa opened this issue 2 years ago • 0 comments

Prerequisites

  • [x] Checked the developer manual
  • [x] Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=repo%3Alibtom%2Flibtomcrypt
  • [x] Checked that your issue isn't related to TomsFastMath's limitation that PK operations can by default only be done with max. 2048bit keys

Description

It would be great if you supported getentropy() in https://github.com/libtom/libtomcrypt/blob/develop/src/prngs/rng_get_bytes.c

It's found at least in modern Linux, OpenBSD, and FreeBSD based operating systems. It blocks reads until the random pool is initialized and after that "it just works" without complicated error checks. Thanks for the great library!

oittaa avatar Apr 10 '22 12:04 oittaa