Mbed TLS v3.6.3
Loading...
Searching...
No Matches
pkcs5.h
Go to the documentation of this file.
1
8/*
9 * Copyright The Mbed TLS Contributors
10 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
11 */
12#ifndef MBEDTLS_PKCS5_H
13#define MBEDTLS_PKCS5_H
14
15#include "mbedtls/build_info.h"
17
18#include "mbedtls/asn1.h"
19#include "mbedtls/md.h"
20#include "mbedtls/cipher.h"
21
22#include <stddef.h>
23#include <stdint.h>
24
26#define MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -0x2f80
28#define MBEDTLS_ERR_PKCS5_INVALID_FORMAT -0x2f00
30#define MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -0x2e80
32#define MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH -0x2e00
33
34#define MBEDTLS_PKCS5_DECRYPT MBEDTLS_DECRYPT
35#define MBEDTLS_PKCS5_ENCRYPT MBEDTLS_ENCRYPT
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#if defined(MBEDTLS_ASN1_PARSE_C) && defined(MBEDTLS_CIPHER_C)
42
43#if !defined(MBEDTLS_DEPRECATED_REMOVED)
85 const unsigned char *pwd, size_t pwdlen,
86 const unsigned char *data, size_t datalen,
87 unsigned char *output);
88#endif /* MBEDTLS_DEPRECATED_REMOVED */
89
90#if defined(MBEDTLS_CIPHER_PADDING_PKCS7)
91
125int mbedtls_pkcs5_pbes2_ext(const mbedtls_asn1_buf *pbe_params, int mode,
126 const unsigned char *pwd, size_t pwdlen,
127 const unsigned char *data, size_t datalen,
128 unsigned char *output, size_t output_size,
129 size_t *output_len);
130
131#endif /* MBEDTLS_CIPHER_PADDING_PKCS7 */
132
133#endif /* MBEDTLS_ASN1_PARSE_C && MBEDTLS_CIPHER_C*/
134
150 const unsigned char *password,
151 size_t plen, const unsigned char *salt, size_t slen,
152 unsigned int iteration_count,
153 uint32_t key_length, unsigned char *output);
154
155#if defined(MBEDTLS_MD_C)
156#if !defined(MBEDTLS_DEPRECATED_REMOVED)
174 const unsigned char *password,
175 size_t plen,
176 const unsigned char *salt,
177 size_t slen,
178 unsigned int iteration_count,
179 uint32_t key_length,
180 unsigned char *output);
181#endif /* !MBEDTLS_DEPRECATED_REMOVED */
182#endif /* MBEDTLS_MD_C */
183#if defined(MBEDTLS_SELF_TEST)
184
190int mbedtls_pkcs5_self_test(int verbose);
191
192#endif /* MBEDTLS_SELF_TEST */
193
194#ifdef __cplusplus
195}
196#endif
197
198#endif /* pkcs5.h */
Generic ASN.1 parsing.
This file contains an abstraction interface for use with the cipher primitives provided by the librar...
Build-time configuration info.
This file contains the generic functions for message-digest (hashing) and HMAC.
mbedtls_md_type_t
Supported message digests.
Definition: md.h:47
int mbedtls_pkcs5_pbkdf2_hmac_ext(mbedtls_md_type_t md_type, const unsigned char *password, size_t plen, const unsigned char *salt, size_t slen, unsigned int iteration_count, uint32_t key_length, unsigned char *output)
PKCS#5 PBKDF2 using HMAC without using the HMAC context.
int mbedtls_pkcs5_pbes2_ext(const mbedtls_asn1_buf *pbe_params, int mode, const unsigned char *pwd, size_t pwdlen, const unsigned char *data, size_t datalen, unsigned char *output, size_t output_size, size_t *output_len)
PKCS#5 PBES2 function.
int mbedtls_pkcs5_self_test(int verbose)
Checkup routine.
int MBEDTLS_DEPRECATED mbedtls_pkcs5_pbes2(const mbedtls_asn1_buf *pbe_params, int mode, const unsigned char *pwd, size_t pwdlen, const unsigned char *data, size_t datalen, unsigned char *output)
PKCS#5 PBES2 function.
int MBEDTLS_DEPRECATED mbedtls_pkcs5_pbkdf2_hmac(mbedtls_md_context_t *ctx, const unsigned char *password, size_t plen, const unsigned char *salt, size_t slen, unsigned int iteration_count, uint32_t key_length, unsigned char *output)
PKCS#5 PBKDF2 using HMAC.
Common and shared functions used by multiple modules in the Mbed TLS library.
#define MBEDTLS_DEPRECATED
Definition: platform_util.h:37