#include "lc_aes.h"
#include "lc_drbg.h"
#include "lc_memory_support.h"
#include "lc_rng.h"
#include "lc_sym.h"
Go to the source code of this file.
◆ LC_DRBG_CTR_NO_DF_CTX_ON_STACK
| #define LC_DRBG_CTR_NO_DF_CTX_ON_STACK |
( |
|
name | ) |
|
Value: _Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
LC_SYM_COMMON_ALIGNMENT); \
struct lc_rng_ctx *name = (struct lc_rng_ctx *)name##_ctx_buf; \
LC_DRBG_CTR_RNG_CTX(name, 0, LC_DRBG_CTR_SCRATCHPAD_NO_DF); \
_Pragma("GCC diagnostic pop")
#define LC_ALIGNED_BUFFER(name, size, alignment)
Allocate aligned stack memory.
Allocate stack memory for the CTR DRBG without Derivation Function context.
- Parameters
-
| [in] | name | Name of the stack variable |
- Warning
- You MUST seed the DRNG!
Definition at line 128 of file lc_ctr_drbg.h.
◆ LC_DRBG_CTR_USE_DF_CTX_ON_STACK
| #define LC_DRBG_CTR_USE_DF_CTX_ON_STACK |
( |
|
name | ) |
|
Value: _Pragma("GCC diagnostic push") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
LC_SYM_COMMON_ALIGNMENT); \
struct lc_rng_ctx *name = (struct lc_rng_ctx *)name##_ctx_buf; \
LC_DRBG_CTR_RNG_CTX(name, 1, LC_DRBG_CTR_SCRATCHPAD_USE_DF); \
_Pragma("GCC diagnostic pop")
Allocate stack memory for the CTR DRBG with Derivation Function context.
- Parameters
-
| [in] | name | Name of the stack variable |
- Warning
- You MUST seed the DRNG!
Definition at line 111 of file lc_ctr_drbg.h.
◆ lc_drbg_ctr_no_df_alloc()
| int lc_drbg_ctr_no_df_alloc |
( |
struct lc_rng_ctx ** |
drbg | ) |
|
Allocate CTR DRBG without Derivation Function context on heap.
- Parameters
-
| [out] | drbg | Allocated CTR DRBG context |
- Warning
- You MUST seed the DRNG!
- Returns
- : 0 on success, < 0 on error
◆ lc_drbg_ctr_use_df_alloc()
| int lc_drbg_ctr_use_df_alloc |
( |
struct lc_rng_ctx ** |
drbg | ) |
|
Allocate CTR DRBG with Derivation Function context on heap.
- Parameters
-
| [out] | drbg | Allocated CTR DRBG context |
- Warning
- You MUST seed the DRNG!
- Returns
- : 0 on success, < 0 on error