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