Mbed TLS v2.28.9
Loading...
Searching...
No Matches
entropy_poll.h
Go to the documentation of this file.
1
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 */
10#ifndef MBEDTLS_ENTROPY_POLL_H
11#define MBEDTLS_ENTROPY_POLL_H
12
13#if !defined(MBEDTLS_CONFIG_FILE)
14#include "mbedtls/config.h"
15#else
16#include MBEDTLS_CONFIG_FILE
17#endif
18
19#include <stddef.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/*
26 * Default thresholds for built-in sources, in bytes
27 */
28#define MBEDTLS_ENTROPY_MIN_PLATFORM 32
29#define MBEDTLS_ENTROPY_MIN_HAVEGE 32
30#define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4
31#if !defined(MBEDTLS_ENTROPY_MIN_HARDWARE)
32#define MBEDTLS_ENTROPY_MIN_HARDWARE 32
33#endif
34
38#if defined(MBEDTLS_TEST_NULL_ENTROPY)
39int mbedtls_null_entropy_poll(void *data,
40 unsigned char *output, size_t len, size_t *olen);
41#endif
42
43#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
48 unsigned char *output, size_t len, size_t *olen);
49#endif
50
51#if defined(MBEDTLS_HAVEGE_C)
57int mbedtls_havege_poll(void *data,
58 unsigned char *output, size_t len, size_t *olen);
59#endif
60
61#if defined(MBEDTLS_TIMING_C)
66 unsigned char *output, size_t len, size_t *olen);
67#endif
68
69#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
78int mbedtls_hardware_poll(void *data,
79 unsigned char *output, size_t len, size_t *olen);
80#endif
81
82#if defined(MBEDTLS_ENTROPY_NV_SEED)
88int mbedtls_nv_seed_poll(void *data,
89 unsigned char *output, size_t len, size_t *olen);
90#endif
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif /* entropy_poll.h */
Configuration options (set of defines)
int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, size_t *olen)
Entropy poll callback that provides 0 entropy.
int mbedtls_hardclock_poll(void *data, unsigned char *output, size_t len, size_t *olen)
mbedtls_timing_hardclock-based entropy poll callback