ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/hkdf.h
(Generate patch)

Comparing gvpe/src/hkdf.h (file contents):
Revision 1.1 by root, Tue Jul 16 16:44:36 2013 UTC vs.
Revision 1.2 by root, Wed Jul 17 04:36:03 2013 UTC

32#ifndef HKDF_H__ 32#ifndef HKDF_H__
33#define HKDF_H__ 33#define HKDF_H__
34 34
35#include "global.h" 35#include "global.h"
36 36
37#define HKDF_HASH EVP_sha512
38
39// see RFC5869 37// see RFC5869
40struct hkdf 38struct hkdf
41{ 39{
42 HMAC_CTX ctx; 40 HMAC_CTX ctx;
43 u8 prk[EVP_MAX_MD_SIZE]; 41 u8 prk[EVP_MAX_MD_SIZE];
44 42
45 hkdf (const void *salt = 0, int len = 0, const EVP_MD *hash = HKDF_HASH ()); 43 hkdf (const void *salt = 0, int len = 0, const EVP_MD *xtr_hash = EVP_sha512 ());
46 ~hkdf (); 44 ~hkdf ();
47 45
48 void extract (const void *ikm, int len); 46 void extract (const void *ikm, int len);
49 void extract_done (); 47 void extract_done (const EVP_MD *prf_hash = 0);
50 48
51 void expand (void *okm, int len, const void *info = 0, int infolen = 0); 49 void expand (void *okm, int len, const void *info = 0, int infolen = 0);
52 50
53 static void verify (); 51 static void verify ();
54}; 52};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines