00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #ifndef MBEDTLS_ENTROPY_POLL_H
00052 #define MBEDTLS_ENTROPY_POLL_H
00053
00054 #if !defined(MBEDTLS_CONFIG_FILE)
00055 #include "config.h"
00056 #else
00057 #include MBEDTLS_CONFIG_FILE
00058 #endif
00059
00060 #include <stddef.h>
00061
00062 #ifdef __cplusplus
00063 extern "C" {
00064 #endif
00065
00066
00067
00068
00069 #define MBEDTLS_ENTROPY_MIN_PLATFORM 32
00070 #define MBEDTLS_ENTROPY_MIN_HAVEGE 32
00071 #define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4
00072 #if !defined(MBEDTLS_ENTROPY_MIN_HARDWARE)
00073 #define MBEDTLS_ENTROPY_MIN_HARDWARE 32
00074 #endif
00075
00079 #if defined(MBEDTLS_TEST_NULL_ENTROPY)
00080 int mbedtls_null_entropy_poll( void *data,
00081 unsigned char *output, size_t len, size_t *olen );
00082 #endif
00083
00084 #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
00085
00088 int mbedtls_platform_entropy_poll( void *data,
00089 unsigned char *output, size_t len, size_t *olen );
00090 #endif
00091
00092 #if defined(MBEDTLS_HAVEGE_C)
00093
00098 int mbedtls_havege_poll( void *data,
00099 unsigned char *output, size_t len, size_t *olen );
00100 #endif
00101
00102 #if defined(MBEDTLS_TIMING_C)
00103
00106 int mbedtls_hardclock_poll( void *data,
00107 unsigned char *output, size_t len, size_t *olen );
00108 #endif
00109
00110 #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
00111
00119 int mbedtls_hardware_poll( void *data,
00120 unsigned char *output, size_t len, size_t *olen );
00121 #endif
00122
00123 #if defined(MBEDTLS_ENTROPY_NV_SEED)
00124
00129 int mbedtls_nv_seed_poll( void *data,
00130 unsigned char *output, size_t len, size_t *olen );
00131 #endif
00132
00133 #ifdef __cplusplus
00134 }
00135 #endif
00136
00137 #endif