diff --git a/eap.cabal b/eap.cabal
--- a/eap.cabal
+++ b/eap.cabal
@@ -1,5 +1,5 @@
 name:                eap
-version:             0.9.0.0
+version:             0.9.0.1
 synopsis:            Extensible Authentication Protocol (EAP)
 description:         This module provides types and on the wire de/coding of EAP packets as per RFC 3748
 homepage:            https://github.com/erickg/eap#readme
diff --git a/src/Network/EAP/MSCHAPv2.hs b/src/Network/EAP/MSCHAPv2.hs
--- a/src/Network/EAP/MSCHAPv2.hs
+++ b/src/Network/EAP/MSCHAPv2.hs
@@ -87,7 +87,7 @@
 
 -- | Calculate authenticator response as per [RFC2759], Section 8.7
 generateAuthenticatorResponse :: ByteString -- ^ Username
-                               -> ByteString -- ^ NT password hash (MD4)
+                               -> ByteString -- ^ NT password hash 
                                -> ByteString -- ^ NT Response
                                -> ByteString -- ^ Authenticator challenge
                                -> ByteString -- ^ Peer challenge
@@ -111,13 +111,14 @@
         magic2 = "Pad to make it do more than one iteration"
 
 -- | Derive Microsoft Point-to-Point Encryption (MPPE) keys see [RFC3079]
-deriveMPPEKeys :: ByteString -- ^ Hash of the NT hash
-                -> ByteString -- ^ NT Response
-                -> Except CryptoError (SB.ByteString, SB.ByteString) -- ^ (MPPE send key,
+deriveMPPEKeys :: ByteString -- ^ NT Password hash 
+               -> ByteString -- ^ NT Response
+               -> Except CryptoError (SB.ByteString, SB.ByteString) -- ^ (MPPE send key,
                                                                     --    MPPE recv key)
-deriveMPPEKeys ntHashHash ntResponse = do
-  let masterKey = fromStrict . SB.take 16 . sha1Hash $ do
-                    hash ntHashHash
+deriveMPPEKeys ntHash ntResponse = do
+  let ntHashHash = md4Hash ntHash
+      masterKey  = fromStrict . SB.take 16 . sha1Hash $ do
+                    hash . fromStrict $ ntHashHash
                     hash ntResponse
                     hash magic1
       assymetricStartKey magic = SB.take 16 . sha1Hash $ do
