Toggle navigation
Home
CycloneTCP
CycloneSSL
CycloneSSH
CycloneIPSEC
CycloneSTP
CycloneACME
CycloneCRYPTO
Download
Main Page
Data Structures
Files
File List
Globals
cyclone_crypto
rng
prng_algorithms.h
Go to the documentation of this file.
1
/**
2
* @file prng_algorithms.h
3
* @brief Collection of PRNG algorithms
4
*
5
* @section License
6
*
7
* SPDX-License-Identifier: GPL-2.0-or-later
8
*
9
* Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
10
*
11
* This file is part of CycloneCRYPTO Open.
12
*
13
* This program is free software; you can redistribute it and/or
14
* modify it under the terms of the GNU General Public License
15
* as published by the Free Software Foundation; either version 2
16
* of the License, or (at your option) any later version.
17
*
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with this program; if not, write to the Free Software Foundation,
25
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26
*
27
* @author Oryx Embedded SARL (www.oryx-embedded.com)
28
* @version 2.6.4
29
**/
30
31
#ifndef _PRNG_ALGORITHMS_H
32
#define _PRNG_ALGORITHMS_H
33
34
//Dependencies
35
#include "
core/crypto.h
"
36
37
//Hash_DRBG PRNG support?
38
#if (HASH_DRBG_SUPPORT == ENABLED)
39
#include "
rng/hash_drbg.h
"
40
#endif
41
42
//HMAC_DRBG PRNG support?
43
#if (HMAC_DRBG_SUPPORT == ENABLED)
44
#include "
rng/hmac_drbg.h
"
45
#endif
46
47
//CTR_DRBG PRNG support?
48
#if (CTR_DRBG_SUPPORT == ENABLED)
49
#include "
rng/ctr_drbg.h
"
50
#endif
51
52
//XDRBG PRNG support?
53
#if (XDRBG_SUPPORT == ENABLED)
54
#include "
rng/xdrbg.h
"
55
#endif
56
57
//C++ guard
58
#ifdef __cplusplus
59
extern
"C"
{
60
#endif
61
62
63
/**
64
* @brief Generic PRNG algorithm context
65
**/
66
67
typedef
union
68
{
69
#if (HASH_DRBG_SUPPORT == ENABLED)
70
HashDrbgContext
hashDrbgContext
;
71
#endif
72
#if (HMAC_DRBG_SUPPORT == ENABLED)
73
HmacDrbgContext
hmacDrbgContext
;
74
#endif
75
#if (CTR_DRBG_SUPPORT == ENABLED)
76
CtrDrbgContext
ctrDrbgContext
;
77
#endif
78
#if (XDRBG_SUPPORT == ENABLED)
79
XdrbgContext
xdrbgContext
;
80
#endif
81
}
PrngContext
;
82
83
84
//C++ guard
85
#ifdef __cplusplus
86
}
87
#endif
88
89
#endif
XdrbgContext
XDRBG PRNG context.
Definition:
xdrbg.h:60
PrngContext::xdrbgContext
XdrbgContext xdrbgContext
Definition:
prng_algorithms.h:79
HmacDrbgContext
HMAC_DRBG PRNG context.
Definition:
hmac_drbg.h:55
PrngContext::ctrDrbgContext
CtrDrbgContext ctrDrbgContext
Definition:
prng_algorithms.h:76
hash_drbg.h
Hash_DRBG pseudorandom number generator.
PrngContext
Generic PRNG algorithm context.
Definition:
prng_algorithms.h:68
hmac_drbg.h
HMAC_DRBG pseudorandom number generator.
crypto.h
General definitions for cryptographic algorithms.
xdrbg.h
XDRBG pseudorandom number generator.
PrngContext::hashDrbgContext
HashDrbgContext hashDrbgContext
Definition:
prng_algorithms.h:70
HashDrbgContext
Hash_DRBG PRNG context.
Definition:
hash_drbg.h:57
ctr_drbg.h
CTR_DRBG pseudorandom number generator.
CtrDrbgContext
CTR_DRBG PRNG context.
Definition:
ctr_drbg.h:59
PrngContext::hmacDrbgContext
HmacDrbgContext hmacDrbgContext
Definition:
prng_algorithms.h:73