-
Notifications
You must be signed in to change notification settings - Fork 7
/
hmac_drbg.h
42 lines (34 loc) · 1.38 KB
/
hmac_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
42
/*
* Copyright (C) 2022 - This file is part of libdrbg project
*
* Author: Ryad BENADJILA <ryad.benadjila@ssi.gouv.fr>
* Contributor: Arnaud EBALARD <arnaud.ebalard@ssi.gouv.fr>
*
* This software is licensed under a dual BSD and GPL v2 license.
* See LICENSE file at the root folder of the project.
*/
#ifndef __HMAC_DRBG_H__
#define __HMAC_DRBG_H__
/* Used for HMAC */
#include "drbg_common.h"
drbg_error hmac_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 hmac_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 hmac_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 hmac_drbg_generate(drbg_ctx *ctx,
const unsigned char *addin, uint32_t addin_len,
unsigned char *out, uint32_t out_len);
drbg_error hmac_drbg_uninstantiate(drbg_ctx *ctx);
#endif /* __HMAC_DRBG_H__ */