AXL RADIUS Server API V3

com.theorem.radserver3
Class MSChapV2

Object
  extended byMSChap
      extended byMSChapV2

public final class MSChapV2
extends MSChap

Class to handle the Microsoft code described in RFC's 2548, 2759 , and 3079.


Field Summary
static boolean NTHASH_PASSWORD
          Indicates that the password is an NT Hash of the plain text password.
static boolean PLAINTEXT_PASSWORD
          Indicates that the password is plain text.
 
Fields inherited from class MSChap
CHALLENGE_LENGTH, NTHASH_PASSWORD_LENGTH, RESPONSE_LENGTH
 
Constructor Summary
MSChapV2()
          Constructor.
 
Method Summary
 byte[] getAsymmetricStartKey(byte[] masterKey, int keyLength, boolean isSend, boolean isServer)
          Create the send or receive keys for either the client or server MPPE.
 byte[] getKey(byte[] initialKey, byte[] currentSessionKey, int keyLength)
          Get the session key for the MS-CHAP-MPPE-Keys.
 byte[] getMasterKey(byte[] ntPasswordHashHash, byte[] ntResponse)
          Get the master key for MPPE.
 byte[] HashNtPasswordHash(byte[] passwordHash)
          Create the password hash hash.
 
Methods inherited from class MSChap
ChallengeResponse, createChallenge, DesEncrypt, DesHash, getIdent, LmChallengeResponse, LmEncryptedPasswordHash, LmPasswordHash, NtChallengeResponse, NtEncryptedPasswordHash, NtPasswordHash, parityKey, PasswordHashEncryptedWithBlock, toUnicode
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NTHASH_PASSWORD

public static final boolean NTHASH_PASSWORD
Indicates that the password is an NT Hash of the plain text password.

See Also:
Constant Field Values

PLAINTEXT_PASSWORD

public static final boolean PLAINTEXT_PASSWORD
Indicates that the password is plain text.

See Also:
Constant Field Values
Constructor Detail

MSChapV2

public MSChapV2()
         throws RADIUSException
Constructor.

Method Detail

getAsymmetricStartKey

public byte[] getAsymmetricStartKey(byte[] masterKey,
                                    int keyLength,
                                    boolean isSend,
                                    boolean isServer)
Create the send or receive keys for either the client or server MPPE.

Parameters:
masterKey - Master key.
keyLength - length of key in bytes.
isSend - True if this is the send key.
isServer - True if this is the server side key, false for the client side.
Returns:
Asymetric start key.

getKey

public byte[] getKey(byte[] initialKey,
                     byte[] currentSessionKey,
                     int keyLength)
Get the session key for the MS-CHAP-MPPE-Keys.

Parameters:
initialKey - Initial session key.
currentSessionKey - The current session key or the initial session key for the first iteration.
keyLength - length of key in bytes.
Returns:
The session key.

getMasterKey

public byte[] getMasterKey(byte[] ntPasswordHashHash,
                           byte[] ntResponse)
Get the master key for MPPE.

Parameters:
ntPasswordHashHash - Hashed (16 bytes) NT password hash.
ntResponse - the NT response field (24 bytes) from the MS-CHAP-Response sub-attribute.
Returns:
the master key (16 bytes).

HashNtPasswordHash

public final byte[] HashNtPasswordHash(byte[] passwordHash)
Create the password hash hash.

Overrides:
HashNtPasswordHash in class MSChap
Parameters:
passwordHash - 16 bytes.
Returns:
16 bytes of hashed hash.

AXL RADIUS Server API V3

Submit a bug report or feature request

Copyright 1998-2008 AXL Software. PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.