ms_funcs.h
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant / shared MSCHAPV2 helper functions / RFC 2433 / RFC 2759
00003  * Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef MS_FUNCS_H
00016 #define MS_FUNCS_H
00017 
00018 int generate_nt_response(const u8 *auth_challenge, const u8 *peer_challenge,
00019                          const u8 *username, size_t username_len,
00020                          const u8 *password, size_t password_len,
00021                          u8 *response);
00022 int generate_nt_response_pwhash(const u8 *auth_challenge,
00023                                 const u8 *peer_challenge,
00024                                 const u8 *username, size_t username_len,
00025                                 const u8 *password_hash,
00026                                 u8 *response);
00027 int generate_authenticator_response(const u8 *password, size_t password_len,
00028                                     const u8 *peer_challenge,
00029                                     const u8 *auth_challenge,
00030                                     const u8 *username, size_t username_len,
00031                                     const u8 *nt_response, u8 *response);
00032 int generate_authenticator_response_pwhash(
00033         const u8 *password_hash,
00034         const u8 *peer_challenge, const u8 *auth_challenge,
00035         const u8 *username, size_t username_len,
00036         const u8 *nt_response, u8 *response);
00037 int nt_challenge_response(const u8 *challenge, const u8 *password,
00038                           size_t password_len, u8 *response);
00039 
00040 void challenge_response(const u8 *challenge, const u8 *password_hash,
00041                         u8 *response);
00042 int nt_password_hash(const u8 *password, size_t password_len,
00043                      u8 *password_hash);
00044 int hash_nt_password_hash(const u8 *password_hash, u8 *password_hash_hash);
00045 int get_master_key(const u8 *password_hash_hash, const u8 *nt_response,
00046                    u8 *master_key);
00047 int get_asymetric_start_key(const u8 *master_key, u8 *session_key,
00048                             size_t session_key_len, int is_send,
00049                             int is_server);
00050 int __must_check encrypt_pw_block_with_password_hash(
00051         const u8 *password, size_t password_len,
00052         const u8 *password_hash, u8 *pw_block);
00053 int __must_check new_password_encrypted_with_old_nt_password_hash(
00054         const u8 *new_password, size_t new_password_len,
00055         const u8 *old_password, size_t old_password_len,
00056         u8 *encrypted_pw_block);
00057 void nt_password_hash_encrypted_with_block(const u8 *password_hash,
00058                                            const u8 *block, u8 *cypher);
00059 int old_nt_password_hash_encrypted_with_new_nt_password_hash(
00060         const u8 *new_password, size_t new_password_len,
00061         const u8 *old_password, size_t old_password_len,
00062         u8 *encrypted_password_hash);
00063 
00064 #endif /* MS_FUNCS_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:38