ms_funcs.c File Reference

WPA Supplicant / shared MSCHAPV2 helper functions / RFC 2433 / RFC 2759. More...

#include "includes.h"
#include "common.h"
#include "sha1.h"
#include "ms_funcs.h"
#include "crypto.h"
#include "rc4.h"

Include dependency graph for ms_funcs.c:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define PWBLOCK_LEN   516

Functions

void nt_password_hash (const u8 *password, size_t password_len, u8 *password_hash)
 NtPasswordHash() - RFC 2759, Sect. 8.3.
void hash_nt_password_hash (const u8 *password_hash, u8 *password_hash_hash)
 HashNtPasswordHash() - RFC 2759, Sect. 8.4.
void challenge_response (const u8 *challenge, const u8 *password_hash, u8 *response)
 ChallengeResponse() - RFC 2759, Sect. 8.5.
void generate_nt_response (const u8 *auth_challenge, const u8 *peer_challenge, const u8 *username, size_t username_len, const u8 *password, size_t password_len, u8 *response)
 GenerateNTResponse() - RFC 2759, Sect. 8.1.
void generate_nt_response_pwhash (const u8 *auth_challenge, const u8 *peer_challenge, const u8 *username, size_t username_len, const u8 *password_hash, u8 *response)
 GenerateNTResponse() - RFC 2759, Sect. 8.1.
void generate_authenticator_response_pwhash (const u8 *password_hash, const u8 *peer_challenge, const u8 *auth_challenge, const u8 *username, size_t username_len, const u8 *nt_response, u8 *response)
 GenerateAuthenticatorResponse() - RFC 2759, Sect. 8.7.
void generate_authenticator_response (const u8 *password, size_t password_len, const u8 *peer_challenge, const u8 *auth_challenge, const u8 *username, size_t username_len, const u8 *nt_response, u8 *response)
 GenerateAuthenticatorResponse() - RFC 2759, Sect. 8.7.
void nt_challenge_response (const u8 *challenge, const u8 *password, size_t password_len, u8 *response)
 NtChallengeResponse() - RFC 2433, Sect. A.5.
void get_master_key (const u8 *password_hash_hash, const u8 *nt_response, u8 *master_key)
 GetMasterKey() - RFC 3079, Sect. 3.4.
void get_asymetric_start_key (const u8 *master_key, u8 *session_key, size_t session_key_len, int is_send, int is_server)
 GetAsymetricStartKey() - RFC 3079, Sect. 3.4.
void new_password_encrypted_with_old_nt_password_hash (const u8 *new_password, size_t new_password_len, const u8 *old_password, size_t old_password_len, u8 *encrypted_pw_block)
 NewPasswordEncryptedWithOldNtPasswordHash() - RFC 2759, Sect. 8.9.
void old_nt_password_hash_encrypted_with_new_nt_password_hash (const u8 *new_password, size_t new_password_len, const u8 *old_password, size_t old_password_len, u8 *encrypted_password_hash)
 OldNtPasswordHashEncryptedWithNewNtPasswordHash() - RFC 2759, Sect. 8.12.


Detailed Description

WPA Supplicant / shared MSCHAPV2 helper functions / RFC 2433 / RFC 2759.

Copyright
Copyright (c) 2004-2006, Jouni Malinen <[email protected]>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file ms_funcs.c.


Function Documentation

void challenge_response const u8 *  challenge,
const u8 *  password_hash,
u8 *  response
 

ChallengeResponse() - RFC 2759, Sect. 8.5.

Parameters:
challenge 8-octet Challenge (IN)
password_hash 16-octet PasswordHash (IN)
response 24-octet Response (OUT)

Definition at line 102 of file ms_funcs.c.

Here is the call graph for this function:

void generate_authenticator_response const u8 *  password,
size_t  password_len,
const u8 *  peer_challenge,
const u8 *  auth_challenge,
const u8 *  username,
size_t  username_len,
const u8 *  nt_response,
u8 *  response
 

GenerateAuthenticatorResponse() - RFC 2759, Sect. 8.7.

Parameters:
password 0-to-256-unicode-char Password (IN; ASCII)
password_len Length of password
nt_response 24-octet NT-Response (IN)
peer_challenge 16-octet PeerChallenge (IN)
auth_challenge 16-octet AuthenticatorChallenge (IN)
username 0-to-256-char UserName (IN)
username_len Length of username
response 20-octet AuthenticatorResponse (OUT) (note: this value is usually encoded as a 42-octet ASCII string (S=<hexdump of="" response="">)

Definition at line 233 of file ms_funcs.c.

Here is the call graph for this function:

void generate_authenticator_response_pwhash const u8 *  password_hash,
const u8 *  peer_challenge,
const u8 *  auth_challenge,
const u8 *  username,
size_t  username_len,
const u8 *  nt_response,
u8 *  response
 

GenerateAuthenticatorResponse() - RFC 2759, Sect. 8.7.

Parameters:
password_hash 16-octet PasswordHash (IN)
nt_response 24-octet NT-Response (IN)
peer_challenge 16-octet PeerChallenge (IN)
auth_challenge 16-octet AuthenticatorChallenge (IN)
username 0-to-256-char UserName (IN)
username_len Length of username
response 20-octet AuthenticatorResponse (OUT) (note: this value is usually encoded as a 42-octet ASCII string (S=<hexdump of="" response="">)

Definition at line 177 of file ms_funcs.c.

Here is the call graph for this function:

void generate_nt_response const u8 *  auth_challenge,
const u8 *  peer_challenge,
const u8 *  username,
size_t  username_len,
const u8 *  password,
size_t  password_len,
u8 *  response
 

GenerateNTResponse() - RFC 2759, Sect. 8.1.

Parameters:
auth_challenge 16-octet AuthenticatorChallenge (IN)
peer_hallenge 16-octet PeerChallenge (IN)
username 0-to-256-char UserName (IN)
username_len Length of username
password 0-to-256-unicode-char Password (IN; ASCII)
password_len Length of password
response 24-octet Response (OUT)

Definition at line 126 of file ms_funcs.c.

Here is the call graph for this function:

void generate_nt_response_pwhash const u8 *  auth_challenge,
const u8 *  peer_challenge,
const u8 *  username,
size_t  username_len,
const u8 *  password_hash,
u8 *  response
 

GenerateNTResponse() - RFC 2759, Sect. 8.1.

Parameters:
auth_challenge 16-octet AuthenticatorChallenge (IN)
peer_hallenge 16-octet PeerChallenge (IN)
username 0-to-256-char UserName (IN)
username_len Length of username
password_hash 16-octet PasswordHash (IN)
response 24-octet Response (OUT)

Definition at line 151 of file ms_funcs.c.

Here is the call graph for this function:

void get_asymetric_start_key const u8 *  master_key,
u8 *  session_key,
size_t  session_key_len,
int  is_send,
int  is_server
 

GetAsymetricStartKey() - RFC 3079, Sect. 3.4.

Parameters:
master_key 16-octet MasterKey (IN)
session_key 8-to-16 octet SessionKey (OUT)
session_key_len SessionKeyLength (Length of session_key) (IN)
is_send IsSend (IN, BOOLEAN)
is_server IsServer (IN, BOOLEAN)

Definition at line 302 of file ms_funcs.c.

Here is the call graph for this function:

void get_master_key const u8 *  password_hash_hash,
const u8 *  nt_response,
u8 *  master_key
 

GetMasterKey() - RFC 3079, Sect. 3.4.

Parameters:
password_hash_hash 16-octet PasswordHashHash (IN)
nt_response 24-octet NTResponse (IN)
master_key 16-octet MasterKey (OUT)

Definition at line 272 of file ms_funcs.c.

Here is the call graph for this function:

void hash_nt_password_hash const u8 *  password_hash,
u8 *  password_hash_hash
 

HashNtPasswordHash() - RFC 2759, Sect. 8.4.

Parameters:
password_hash 16-octet PasswordHash (IN)
password_hash_hash 16-octet PasswordHashHash (OUT)

Definition at line 88 of file ms_funcs.c.

Here is the call graph for this function:

void new_password_encrypted_with_old_nt_password_hash const u8 *  new_password,
size_t  new_password_len,
const u8 *  old_password,
size_t  old_password_len,
u8 *  encrypted_pw_block
 

NewPasswordEncryptedWithOldNtPasswordHash() - RFC 2759, Sect. 8.9.

Parameters:
new_password 0-to-256-unicode-char NewPassword (IN; ASCII)
new_password_len Length of new_password
old_password 0-to-256-unicode-char OldPassword (IN; ASCII)
old_password_len Length of old_password
encrypted_pw_block 516-octet EncryptedPwBlock (OUT)

Definition at line 406 of file ms_funcs.c.

Here is the call graph for this function:

void nt_challenge_response const u8 *  challenge,
const u8 *  password,
size_t  password_len,
u8 *  response
 

NtChallengeResponse() - RFC 2433, Sect. A.5.

Parameters:
challenge 8-octet Challenge (IN)
password 0-to-256-unicode-char Password (IN; ASCII)
password_len Length of password
response 24-octet Response (OUT)

Definition at line 256 of file ms_funcs.c.

Here is the call graph for this function:

void nt_password_hash const u8 *  password,
size_t  password_len,
u8 *  password_hash
 

NtPasswordHash() - RFC 2759, Sect. 8.3.

Parameters:
password 0-to-256-unicode-char Password (IN; ASCII)
password_len Length of password
password_hash 16-octet PasswordHash (OUT)

Definition at line 61 of file ms_funcs.c.

Here is the call graph for this function:

void old_nt_password_hash_encrypted_with_new_nt_password_hash const u8 *  new_password,
size_t  new_password_len,
const u8 *  old_password,
size_t  old_password_len,
u8 *  encrypted_password_hash
 

OldNtPasswordHashEncryptedWithNewNtPasswordHash() - RFC 2759, Sect. 8.12.

Parameters:
new_password 0-to-256-unicode-char NewPassword (IN; ASCII)
new_password_len Length of new_password
old_password 0-to-256-unicode-char OldPassword (IN; ASCII)
old_password_len Length of old_password
encrypted_password_ash 16-octet EncryptedPasswordHash (OUT)

Definition at line 444 of file ms_funcs.c.

Here is the call graph for this function:


Generated on Sun Dec 31 13:52:59 2006 for wpa_supplicant by  doxygen 1.4.2