Mbed TLS v2.28.7
havege.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_HAVEGE_H
11 #define MBEDTLS_HAVEGE_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 #include <stdint.h>
21 
22 #define MBEDTLS_HAVEGE_COLLECT_SIZE 1024
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 typedef struct mbedtls_havege_state {
32  uint32_t PT1, PT2, offset[2];
34  uint32_t WALK[8192];
35 }
37 
44 
51 
61 int mbedtls_havege_random(void *p_rng, unsigned char *output, size_t len);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* havege.h */
uint32_t offset[2]
Definition: havege.h:32
HAVEGE state structure.
Definition: havege.h:31
Configuration options (set of defines)
uint32_t PT1
Definition: havege.h:32
uint32_t PT2
Definition: havege.h:32
uint32_t WALK[8192]
Definition: havege.h:34
void mbedtls_havege_init(mbedtls_havege_state *hs)
HAVEGE initialization.
uint32_t pool[MBEDTLS_HAVEGE_COLLECT_SIZE]
Definition: havege.h:33
struct mbedtls_havege_state mbedtls_havege_state
HAVEGE state structure.
int mbedtls_havege_random(void *p_rng, unsigned char *output, size_t len)
HAVEGE rand function.
void mbedtls_havege_free(mbedtls_havege_state *hs)
Clear HAVEGE state.
#define MBEDTLS_HAVEGE_COLLECT_SIZE
Definition: havege.h:22