libsec: add rfc5869 hmac-based key derivation function hkdf_x()

This commit is contained in:
cinap_lenrek 2015-09-02 11:30:17 +02:00
parent b749f36baa
commit 7ed22aaeec
3 changed files with 46 additions and 1 deletions

View file

@ -464,3 +464,8 @@ void curve25519_dh_finish(uchar x[32], uchar y[32], uchar z[32]);
/* password-based key derivation function 2 (rfc2898) */
void pbkdf2_x(uchar *p, ulong plen, uchar *s, ulong slen, ulong rounds, uchar *d, ulong dlen,
DigestState* (*x)(uchar*, ulong, uchar*, ulong, uchar*, DigestState*), int xlen);
/* hmac-based key derivation function (rfc5869) */
void hkdf_x(uchar *salt, ulong nsalt, uchar *info, ulong ninfo, uchar *key, ulong nkey, uchar *d, ulong dlen,
DigestState* (*x)(uchar*, ulong, uchar*, ulong, uchar*, DigestState*), int xlen);