PolarSSL v1.3.9
pbkdf2.c
Go to the documentation of this file.
1
30/*
31 * PBKDF2 is part of PKCS#5
32 *
33 * http://tools.ietf.org/html/rfc2898 (Specification)
34 * http://tools.ietf.org/html/rfc6070 (Test vectors)
35 */
36
37#if !defined(POLARSSL_CONFIG_FILE)
38#include "polarssl/config.h"
39#else
40#include POLARSSL_CONFIG_FILE
41#endif
42
43#if defined(POLARSSL_PBKDF2_C)
44
45#include "polarssl/pbkdf2.h"
46#include "polarssl/pkcs5.h"
47
48int pbkdf2_hmac( md_context_t *ctx, const unsigned char *password, size_t plen,
49 const unsigned char *salt, size_t slen,
50 unsigned int iteration_count,
51 uint32_t key_length, unsigned char *output )
52{
53 return pkcs5_pbkdf2_hmac( ctx, password, plen, salt, slen, iteration_count,
54 key_length, output );
55}
56
57#if defined(POLARSSL_SELF_TEST)
58int pbkdf2_self_test( int verbose )
59{
60 return pkcs5_self_test( verbose );
61}
62#endif /* POLARSSL_SELF_TEST */
63
64#endif /* POLARSSL_PBKDF2_C */
Configuration options (set of defines)
Password-Based Key Derivation Function 2 (from PKCS#5) DEPRECATED: use pkcs5.h instead.
int pbkdf2_hmac(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 DEPRECATED: Use pkcs5_pbkdf2_hmac() instead!
int pbkdf2_self_test(int verbose)
Checkup routine DEPRECATED: Use pkcs5_self_test() instead!
PKCS#5 functions.
int pkcs5_self_test(int verbose)
Checkup routine.
int pkcs5_pbkdf2_hmac(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.
Generic message digest context.
Definition: md.h:132