The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
mschap.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LM_DIGEST_LENGTH   16
 
#define MSCHAP_CHALLENGE_LENGTH   8
 
#define MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH   16
 
#define MSCHAP_PEER_CHALLENGE_LENGTH   16
 
#define NT_DIGEST_LENGTH   16
 

Functions

void mschap_add_reply (request_t *request, unsigned char ident, fr_dict_attr_t const *da, char const *value, size_t len)
 
void mschap_auth_response (char const *use_rname, size_t user_name_len, uint8_t const *nt_hash_hash, uint8_t const *ntresponse, uint8_t const *peer_challenge, uint8_t const *auth_challenge, char *response)
 
void mschap_challenge_hash (uint8_t challenge[static MSCHAP_CHALLENGE_LENGTH], uint8_t const peer_challenge[static MSCHAP_PEER_CHALLENGE_LENGTH], uint8_t const auth_challenge[static MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH], char const *user_name, size_t user_name_len)
 
int mschap_nt_password_hash (uint8_t out[static NT_DIGEST_LENGTH], char const *password)
 Converts Unicode password to 16-byte NT hash with MD4. More...
 

Macro Definition Documentation

◆ LM_DIGEST_LENGTH

#define LM_DIGEST_LENGTH   16

Definition at line 8 of file mschap.h.

◆ MSCHAP_CHALLENGE_LENGTH

#define MSCHAP_CHALLENGE_LENGTH   8

Definition at line 9 of file mschap.h.

◆ MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH

#define MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH   16

Definition at line 11 of file mschap.h.

◆ MSCHAP_PEER_CHALLENGE_LENGTH

#define MSCHAP_PEER_CHALLENGE_LENGTH   16

Definition at line 10 of file mschap.h.

◆ NT_DIGEST_LENGTH

#define NT_DIGEST_LENGTH   16

Definition at line 7 of file mschap.h.

Function Documentation

◆ mschap_add_reply()

void mschap_add_reply ( request_t request,
unsigned char  ident,
fr_dict_attr_t const *  da,
char const *  value,
size_t  len 
)

Definition at line 162 of file mschap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mschap_auth_response()

void mschap_auth_response ( char const *  use_rname,
size_t  user_name_len,
uint8_t const *  nt_hash_hash,
uint8_t const *  ntresponse,
uint8_t const *  peer_challenge,
uint8_t const *  auth_challenge,
char *  response 
)

Definition at line 101 of file mschap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mschap_challenge_hash()

void mschap_challenge_hash ( uint8_t  challenge[static MSCHAP_CHALLENGE_LENGTH],
uint8_t const  peer_challenge[static MSCHAP_PEER_CHALLENGE_LENGTH],
uint8_t const  auth_challenge[static MSCHAP_PEER_AUTHENTICATOR_CHALLENGE_LENGTH],
char const *  user_name,
size_t  user_name_len 
)

Definition at line 72 of file mschap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mschap_nt_password_hash()

int mschap_nt_password_hash ( uint8_t  out[static NT_DIGEST_LENGTH],
char const *  password 
)

Converts Unicode password to 16-byte NT hash with MD4.

Parameters
[out]outPointer to 16 byte output buffer.
[in]passwordto encode.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 52 of file mschap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: