- Changed entropy accumulator to have per-source thresholds

This commit is contained in:
Paul Bakker 2011-12-10 17:02:19 +00:00
parent 5cb9db4c5b
commit bd4a9d0cda
3 changed files with 52 additions and 18 deletions

View file

@ -35,6 +35,13 @@
extern "C" {
#endif
/*
* Default thresholds for built-in sources
*/
#define ENTROPY_MIN_PLATFORM 128 /**< Minimum for platform source */
#define ENTROPY_MIN_HAVEGE 128 /**< Minimum for HAVEGE */
#define ENTROPY_MIN_HARDCLOCK 32 /**< Minimum for hardclock() */
#if !defined(POLARSSL_NO_PLATFORM_ENTROPY)
/**
* \brief Platform-specific entropy poll callback