xref: /titanic_44/usr/src/cmd/cmd-inet/usr.lib/wpad/wpa_enc.h (revision a399b7655a1d835aa8606c2b29e4e777baac8635)
1*a399b765Szf162725 /*
2*a399b765Szf162725  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3*a399b765Szf162725  * Use is subject to license terms.
4*a399b765Szf162725  */
5*a399b765Szf162725 
6*a399b765Szf162725 /*
7*a399b765Szf162725  * Copyright (c) 2003-2004, Jouni Malinen <jkmaline@cc.hut.fi>
8*a399b765Szf162725  * Sun elects to license this software under the BSD license.
9*a399b765Szf162725  * See README for more details.
10*a399b765Szf162725  */
11*a399b765Szf162725 #ifndef __WPA_ENC_H
12*a399b765Szf162725 #define	__WPA_ENC_H
13*a399b765Szf162725 
14*a399b765Szf162725 #pragma ident	"%Z%%M%	%I%	%E% SMI"
15*a399b765Szf162725 
16*a399b765Szf162725 #include <openssl/sha.h>
17*a399b765Szf162725 #include <openssl/md5.h>
18*a399b765Szf162725 
19*a399b765Szf162725 #ifdef	__cplusplus
20*a399b765Szf162725 extern "C" {
21*a399b765Szf162725 #endif
22*a399b765Szf162725 
23*a399b765Szf162725 #define	SHA1_MAC_LEN	SHA_DIGEST_LENGTH
24*a399b765Szf162725 #define	MD5_MAC_LEN	MD5_DIGEST_LENGTH
25*a399b765Szf162725 
26*a399b765Szf162725 void aes_wrap(uint8_t *, int, uint8_t *, uint8_t *);
27*a399b765Szf162725 int aes_unwrap(uint8_t *, int, uint8_t *, uint8_t *);
28*a399b765Szf162725 
29*a399b765Szf162725 void hmac_sha1_vector(unsigned char *, unsigned int,
30*a399b765Szf162725     size_t, unsigned char *[], unsigned int *, unsigned char *);
31*a399b765Szf162725 
32*a399b765Szf162725 void hmac_sha1(unsigned char *, unsigned int,
33*a399b765Szf162725     unsigned char *, unsigned int, unsigned char *);
34*a399b765Szf162725 
35*a399b765Szf162725 void sha1_prf(unsigned char *, unsigned int,
36*a399b765Szf162725     char *, unsigned char *, unsigned int, unsigned char *, size_t);
37*a399b765Szf162725 
38*a399b765Szf162725 void pbkdf2_sha1(char *, char *, size_t, int, unsigned char *, size_t);
39*a399b765Szf162725 
40*a399b765Szf162725 void rc4_skip(uint8_t *, size_t, size_t, uint8_t *, size_t);
41*a399b765Szf162725 void rc4(uint8_t *, size_t, uint8_t *, size_t);
42*a399b765Szf162725 
43*a399b765Szf162725 void hmac_md5_vector(uint8_t *, size_t, size_t,
44*a399b765Szf162725     uint8_t *[], size_t *, uint8_t *);
45*a399b765Szf162725 void hmac_md5(uint8_t *, size_t, uint8_t *, size_t, uint8_t *);
46*a399b765Szf162725 
47*a399b765Szf162725 #ifdef __cplusplus
48*a399b765Szf162725 }
49*a399b765Szf162725 #endif
50*a399b765Szf162725 
51*a399b765Szf162725 #endif /* __WPA_ENC_H */
52