-
Notifications
You must be signed in to change notification settings - Fork 7
/
ctr_drbg.h
41 lines (33 loc) · 1.5 KB
/
ctr_drbg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Copyright (C) 2022 - This file is part of libdrbg project
*
* Author: Ryad BENADJILA <[email protected]>
* Contributor: Arnaud EBALARD <[email protected]>
*
* This software is licensed under a dual BSD and GPL v2 license.
* See LICENSE file at the root folder of the project.
*/
#ifndef __CTR_DRBG_H__
#define __CTR_DRBG_H__
#include "drbg_common.h"
drbg_error ctr_drbg_get_lengths(drbg_options *options,
uint32_t *drbg_strength,
uint32_t *min_entropy_input_length,
uint32_t *max_entropy_input_length,
uint32_t *max_pers_string_length,
uint32_t *max_addin_length,
uint32_t *max_asked_length);
drbg_error ctr_drbg_instantiate(drbg_ctx *ctx,
const unsigned char *entropy_input, uint32_t entropy_input_len,
const unsigned char *nonce, uint32_t nonce_len,
const unsigned char *personalization_string, uint32_t personalization_string_len,
uint32_t *asked_strength,
drbg_options *opt);
drbg_error ctr_drbg_reseed(drbg_ctx *ctx,
const unsigned char *entropy_input, uint32_t entropy_input_len,
const unsigned char *addin, uint32_t addin_len);
drbg_error ctr_drbg_generate(drbg_ctx *ctx,
const unsigned char *addin, uint32_t addin_len,
unsigned char *out, uint32_t out_len);
drbg_error ctr_drbg_uninstantiate(drbg_ctx *ctx);
#endif /* __CTR_DRBG_H__ */