139beb93cSSam Leffler /* 239beb93cSSam Leffler * MSCHAPV2 (RFC 2759) 339beb93cSSam Leffler * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi> 439beb93cSSam Leffler * 5*f05cddf9SRui Paulo * This software may be distributed under the terms of the BSD license. 6*f05cddf9SRui Paulo * See README for more details. 739beb93cSSam Leffler */ 839beb93cSSam Leffler 939beb93cSSam Leffler #ifndef MSCHAPV2_H 1039beb93cSSam Leffler #define MSCHAPV2_H 1139beb93cSSam Leffler 1239beb93cSSam Leffler #define MSCHAPV2_CHAL_LEN 16 1339beb93cSSam Leffler #define MSCHAPV2_NT_RESPONSE_LEN 24 1439beb93cSSam Leffler #define MSCHAPV2_AUTH_RESPONSE_LEN 20 1539beb93cSSam Leffler #define MSCHAPV2_MASTER_KEY_LEN 16 1639beb93cSSam Leffler 1739beb93cSSam Leffler const u8 * mschapv2_remove_domain(const u8 *username, size_t *len); 18e28a4053SRui Paulo int mschapv2_derive_response(const u8 *username, size_t username_len, 1939beb93cSSam Leffler const u8 *password, size_t password_len, 2039beb93cSSam Leffler int pwhash, 2139beb93cSSam Leffler const u8 *auth_challenge, 2239beb93cSSam Leffler const u8 *peer_challenge, 2339beb93cSSam Leffler u8 *nt_response, u8 *auth_response, 2439beb93cSSam Leffler u8 *master_key); 2539beb93cSSam Leffler int mschapv2_verify_auth_response(const u8 *auth_response, 2639beb93cSSam Leffler const u8 *buf, size_t buf_len); 2739beb93cSSam Leffler 2839beb93cSSam Leffler #endif /* MSCHAPV2_H */ 29