diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-02 11:28:11 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-02 11:28:11 +0200 |
commit | b749f36baa4800e116bea6fcd0abc23c28e7078f (patch) | |
tree | e14d41caa2a00c303c5572e1a417578923dd13f0 /sys/include/libsec.h | |
parent | 4c52aedfe92da7efe85e3b855855acb94863e084 (diff) |
libsec: generalize pbkdf2_hmac_sha1() to pbkdf2_x() passing the hmac as an argument
Diffstat (limited to 'sys/include/libsec.h')
-rw-r--r-- | sys/include/libsec.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/include/libsec.h b/sys/include/libsec.h index 38d8a67c5..e46180829 100644 --- a/sys/include/libsec.h +++ b/sys/include/libsec.h @@ -454,12 +454,13 @@ mpint* dh_new(DHstate *dh, mpint *p, mpint *q, mpint *g); /* calculate shared key: k = y**x % p */ mpint* dh_finish(DHstate *dh, mpint *y); -/* password-based key derivation function 2 (RFC 2898) */ -void pbkdf2_hmac_sha1(uchar *p, ulong plen, uchar *s, ulong slen, ulong rounds, uchar *d, ulong dlen); - /* Curve25519 elliptic curve, public key function */ void curve25519(uchar mypublic[32], uchar secret[32], uchar basepoint[32]); /* Curve25519 diffie hellman */ void curve25519_dh_new(uchar x[32], uchar y[32]); 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); |