|
Lightweight Cryptography Primitives
|
Password-based key derivation function based on Romulus-HMAC. More...
#include <stddef.h>Go to the source code of this file.
Macros | |
| #define | ROMULUS_PBKDF2_SIZE 32 |
| Default output block size for Romulus-PBKDF2. Key material is generated in blocks of this size. | |
Functions | |
| void | romulus_pbkdf2 (unsigned char *out, size_t outlen, const unsigned char *password, size_t passwordlen, const unsigned char *salt, size_t saltlen, unsigned long count) |
| Derives key material using Romulus-PBKDF2. More... | |
Password-based key derivation function based on Romulus-HMAC.
Reference: https://tools.ietf.org/html/rfc8018
| void romulus_pbkdf2 | ( | unsigned char * | out, |
| size_t | outlen, | ||
| const unsigned char * | password, | ||
| size_t | passwordlen, | ||
| const unsigned char * | salt, | ||
| size_t | saltlen, | ||
| unsigned long | count | ||
| ) |
Derives key material using Romulus-PBKDF2.
| out | Points to the output buffer to receive the key material. |
| outlen | Number of bytes of key material to generate. |
| password | Points to the bytes of the password. |
| passwordlen | Number of bytes in the password. |
| salt | Points to the bytes of the salt. |
| saltlen | Number of bytes in the salt. |
| count | Number of iterations to perform. If this is set to zero, then the value will be changed to 1. |
This function can generate a maximum of (2^32 - 1) * ROMULUS_PBKDF2_SIZE bytes, but this limit is not checked. The count value should be large enough to provide resistance against dictionary attacks on the password.
1.8.6