BeRTOS
Functions
kdf.h File Reference

Generic interface for key derivation functions. More...

#include <cfg/compiler.h>
#include <cfg/macros.h>
#include <cfg/debug.h>
#include <string.h>

Go to the source code of this file.

Functions

void kdf_begin (Kdf *kdf, const char *pwd, size_t pwd_len, const uint8_t *salt, size_t salt_len)
 Initialize the key derivation function, with the specified password and salt.
void kdf_read (Kdf *kdf, uint8_t *out, size_t len)
 Extract len derived bytes into the out buffer.

Detailed Description

Generic interface for key derivation functions.

Author:
Giovanni Bajo <rasky@develer.com>

Definition in file kdf.h.


Function Documentation

void kdf_read ( Kdf *  kdf,
uint8_t *  out,
size_t  len 
) [inline]

Extract len derived bytes into the out buffer.

After having initialized the derivation function iwth kdf_begin, you can call this function multiple times, to produce several batches of derived data.

Note:
Some algorithms implementing this API might have a maximum length of bytes that can be derived, after which they will simply ASSERT().

Definition at line 76 of file kdf.h.