Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * MSCHAPV2 (RFC 2759) |
| 3 | * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi> |
| 4 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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 */ |