$search

ms_funcs.c File Reference

#include "includes.h"
#include "common.h"
#include "sha1.h"
#include "ms_funcs.h"
#include "crypto.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

static int challenge_hash (const u8 *peer_challenge, const u8 *auth_challenge, const u8 *username, size_t username_len, u8 *challenge)
void challenge_response (const u8 *challenge, const u8 *password_hash, u8 *response)
int encrypt_pw_block_with_password_hash (const u8 *password, size_t password_len, const u8 *password_hash, u8 *pw_block)
int 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)
int 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)
int 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)
int 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)
int get_asymetric_start_key (const u8 *master_key, u8 *session_key, size_t session_key_len, int is_send, int is_server)
int get_master_key (const u8 *password_hash_hash, const u8 *nt_response, u8 *master_key)
int hash_nt_password_hash (const u8 *password_hash, u8 *password_hash_hash)
int 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)
int nt_challenge_response (const u8 *challenge, const u8 *password, size_t password_len, u8 *response)
int nt_password_hash (const u8 *password, size_t password_len, u8 *password_hash)
void nt_password_hash_encrypted_with_block (const u8 *password_hash, const u8 *block, u8 *cypher)
int 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)

Define Documentation

#define PWBLOCK_LEN   516

Definition at line 374 of file ms_funcs.c.


Function Documentation

static int challenge_hash ( const u8 peer_challenge,
const u8 auth_challenge,
const u8 username,
size_t  username_len,
u8 challenge 
) [static]

challenge_hash - ChallengeHash() - RFC 2759, Sect. 8.2 : 16-octet PeerChallenge (IN) : 16-octet AuthenticatorChallenge (IN) : 0-to-256-char UserName (IN) : Length of username : 8-octet Challenge (OUT) Returns: 0 on success, -1 on failure

Definition at line 32 of file ms_funcs.c.

void challenge_response ( const u8 challenge,
const u8 password_hash,
u8 response 
)

challenge_response - ChallengeResponse() - RFC 2759, Sect. 8.5 : 8-octet Challenge (IN) : 16-octet PasswordHash (IN) : 24-octet Response (OUT)

Definition at line 101 of file ms_funcs.c.

int encrypt_pw_block_with_password_hash ( const u8 password,
size_t  password_len,
const u8 password_hash,
u8 pw_block 
)

encrypt_pw_block_with_password_hash - EncryptPwBlockWithPasswordHash() - RFC 2759, Sect. 8.10 : 0-to-256-unicode-char Password (IN; ASCII) : Length of password : 16-octet PasswordHash (IN) : 516-byte PwBlock (OUT) Returns: 0 on success, -1 on failure

Definition at line 384 of file ms_funcs.c.

int 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 
)

generate_authenticator_response - GenerateAuthenticatorResponse() - RFC 2759, Sect. 8.7 : 0-to-256-unicode-char Password (IN; ASCII) : Length of password : 24-octet NT-Response (IN) : 16-octet PeerChallenge (IN) : 16-octet AuthenticatorChallenge (IN) : 0-to-256-char UserName (IN) : Length of username : 20-octet AuthenticatorResponse (OUT) (note: this value is usually encoded as a 42-octet ASCII string (S=hexdump_of_response) Returns: 0 on success, -1 on failure

Definition at line 239 of file ms_funcs.c.

int 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 
)

generate_authenticator_response_pwhash - GenerateAuthenticatorResponse() - RFC 2759, Sect. 8.7 : 16-octet PasswordHash (IN) : 24-octet NT-Response (IN) : 16-octet PeerChallenge (IN) : 16-octet AuthenticatorChallenge (IN) : 0-to-256-char UserName (IN) : Length of username : 20-octet AuthenticatorResponse (OUT) (note: this value is usually encoded as a 42-octet ASCII string (S=hexdump_of_response) Returns: 0 on success, -1 on failure

Definition at line 181 of file ms_funcs.c.

int 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 
)

generate_nt_response - GenerateNTResponse() - RFC 2759, Sect. 8.1 : 16-octet AuthenticatorChallenge (IN) : 16-octet PeerChallenge (IN) : 0-to-256-char UserName (IN) : Length of username : 0-to-256-unicode-char Password (IN; ASCII) : Length of password : 24-octet Response (OUT) Returns: 0 on success, -1 on failure

Definition at line 125 of file ms_funcs.c.

int 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 
)

generate_nt_response_pwhash - GenerateNTResponse() - RFC 2759, Sect. 8.1 : 16-octet AuthenticatorChallenge (IN) : 16-octet PeerChallenge (IN) : 0-to-256-char UserName (IN) : Length of username : 16-octet PasswordHash (IN) : 24-octet Response (OUT) Returns: 0 on success, -1 on failure

Definition at line 152 of file ms_funcs.c.

int get_asymetric_start_key ( const u8 master_key,
u8 session_key,
size_t  session_key_len,
int  is_send,
int  is_server 
)

get_asymetric_start_key - GetAsymetricStartKey() - RFC 3079, Sect. 3.4 : 16-octet MasterKey (IN) : 8-to-16 octet SessionKey (OUT) : SessionKeyLength (Length of session_key) (IN) : IsSend (IN, BOOLEAN) : IsServer (IN, BOOLEAN) Returns: 0 on success, -1 on failure

Definition at line 312 of file ms_funcs.c.

int get_master_key ( const u8 password_hash_hash,
const u8 nt_response,
u8 master_key 
)

get_master_key - GetMasterKey() - RFC 3079, Sect. 3.4 : 16-octet PasswordHashHash (IN) : 24-octet NTResponse (IN) : 16-octet MasterKey (OUT) Returns: 0 on success, -1 on failure

Definition at line 280 of file ms_funcs.c.

int hash_nt_password_hash ( const u8 password_hash,
u8 password_hash_hash 
)

hash_nt_password_hash - HashNtPasswordHash() - RFC 2759, Sect. 8.4 : 16-octet PasswordHash (IN) : 16-octet PasswordHashHash (OUT) Returns: 0 on success, -1 on failure

Definition at line 88 of file ms_funcs.c.

int 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 
)

new_password_encrypted_with_old_nt_password_hash - NewPasswordEncryptedWithOldNtPasswordHash() - RFC 2759, Sect. 8.9 : 0-to-256-unicode-char NewPassword (IN; ASCII) : Length of new_password : 0-to-256-unicode-char OldPassword (IN; ASCII) : Length of old_password : 516-octet EncryptedPwBlock (OUT) Returns: 0 on success, -1 on failure

Definition at line 420 of file ms_funcs.c.

int nt_challenge_response ( const u8 challenge,
const u8 password,
size_t  password_len,
u8 response 
)

nt_challenge_response - NtChallengeResponse() - RFC 2433, Sect. A.5 : 8-octet Challenge (IN) : 0-to-256-unicode-char Password (IN; ASCII) : Length of password : 24-octet Response (OUT) Returns: 0 on success, -1 on failure

Definition at line 262 of file ms_funcs.c.

int nt_password_hash ( const u8 password,
size_t  password_len,
u8 password_hash 
)

nt_password_hash - NtPasswordHash() - RFC 2759, Sect. 8.3 : 0-to-256-unicode-char Password (IN; ASCII) : Length of password : 16-octet PasswordHash (OUT) Returns: 0 on success, -1 on failure

Definition at line 61 of file ms_funcs.c.

void nt_password_hash_encrypted_with_block ( const u8 password_hash,
const u8 block,
u8 cypher 
)

nt_password_hash_encrypted_with_block - NtPasswordHashEncryptedWithBlock() - RFC 2759, Sect 8.13 : 16-octer PasswordHash (IN) : 16-octet Block (IN) : 16-octer Cypher (OUT)

Definition at line 443 of file ms_funcs.c.

int 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 
)

old_nt_password_hash_encrypted_with_new_nt_password_hash - OldNtPasswordHashEncryptedWithNewNtPasswordHash() - RFC 2759, Sect. 8.12 : 0-to-256-unicode-char NewPassword (IN; ASCII) : Length of new_password : 0-to-256-unicode-char OldPassword (IN; ASCII) : Length of old_password : 16-octet EncryptedPasswordHash (OUT) Returns: 0 on success, -1 on failure

Definition at line 460 of file ms_funcs.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Fri Mar 1 16:00:29 2013