xref: /freebsd/contrib/wpa/src/eap_peer/mschapv2.h (revision 02e9120893770924227138ba49df1edb3896112a)
1 /*
2  * MSCHAPV2 (RFC 2759)
3  * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef MSCHAPV2_H
10 #define MSCHAPV2_H
11 
12 #define MSCHAPV2_CHAL_LEN 16
13 #define MSCHAPV2_NT_RESPONSE_LEN 24
14 #define MSCHAPV2_AUTH_RESPONSE_LEN 20
15 #define MSCHAPV2_MASTER_KEY_LEN 16
16 
17 const u8 * mschapv2_remove_domain(const u8 *username, size_t *len);
18 int mschapv2_derive_response(const u8 *username, size_t username_len,
19 			     const u8 *password, size_t password_len,
20 			     int pwhash,
21 			     const u8 *auth_challenge,
22 			     const u8 *peer_challenge,
23 			     u8 *nt_response, u8 *auth_response,
24 			     u8 *master_key);
25 int mschapv2_verify_auth_response(const u8 *auth_response,
26 				  const u8 *buf, size_t buf_len);
27 
28 #endif /* MSCHAPV2_H */
29