Mbed TLS v3.6.7
Toggle main menu visibility
Loading...
Searching...
No Matches
hkdf.h
Go to the documentation of this file.
1
9
/*
10
* Copyright The Mbed TLS Contributors
11
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
12
*/
13
#ifndef MBEDTLS_HKDF_H
14
#define MBEDTLS_HKDF_H
15
16
#include "
mbedtls/build_info.h
"
17
18
#include "
mbedtls/md.h
"
19
25
#define MBEDTLS_ERR_HKDF_BAD_INPUT_DATA -0x5F80
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
56
int
mbedtls_hkdf
(
const
mbedtls_md_info_t
*md,
const
unsigned
char
*salt,
57
size_t
salt_len,
const
unsigned
char
*ikm,
size_t
ikm_len,
58
const
unsigned
char
*info,
size_t
info_len,
59
unsigned
char
*okm,
size_t
okm_len);
60
85
int
mbedtls_hkdf_extract
(
const
mbedtls_md_info_t
*md,
86
const
unsigned
char
*salt,
size_t
salt_len,
87
const
unsigned
char
*ikm,
size_t
ikm_len,
88
unsigned
char
*prk);
89
116
int
mbedtls_hkdf_expand
(
const
mbedtls_md_info_t
*md,
const
unsigned
char
*prk,
117
size_t
prk_len,
const
unsigned
char
*info,
118
size_t
info_len,
unsigned
char
*okm,
size_t
okm_len);
119
120
#ifdef __cplusplus
121
}
122
#endif
123
124
#endif
/* hkdf.h */
mbedtls_hkdf_expand
int mbedtls_hkdf_expand(const mbedtls_md_info_t *md, const unsigned char *prk, size_t prk_len, const unsigned char *info, size_t info_len, unsigned char *okm, size_t okm_len)
Expand the supplied prk into several additional pseudorandom keys, which is the output of the HKDF.
mbedtls_hkdf_extract
int mbedtls_hkdf_extract(const mbedtls_md_info_t *md, const unsigned char *salt, size_t salt_len, const unsigned char *ikm, size_t ikm_len, unsigned char *prk)
Take the input keying material ikm and extract from it a fixed-length pseudorandom key prk.
mbedtls_hkdf
int mbedtls_hkdf(const mbedtls_md_info_t *md, const unsigned char *salt, size_t salt_len, const unsigned char *ikm, size_t ikm_len, const unsigned char *info, size_t info_len, unsigned char *okm, size_t okm_len)
This is the HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
build_info.h
Build-time configuration info.
md.h
This file contains the generic functions for message-digest (hashing) and HMAC.
mbedtls_md_info_t
struct mbedtls_md_info_t mbedtls_md_info_t
Definition
md.h:107
include
mbedtls
hkdf.h
Generated on
for Mbed TLS v3.6.7 by
1.17.0