📄 rfc2759.txt
字号:
NtPasswordHashEncryptedWithBlock(
IN 16-octet PasswordHash,
IN 16-octet Block,
OUT 16-octet Cypher )
{
DesEncrypt( 1st 8-octets PasswordHash,
1st 7-octets Block,
giving 1st 8-octets Cypher )
DesEncrypt( 2nd 8-octets PasswordHash,
2nd 7-octets Block,
giving 2nd 8-octets Cypher )
}
9. Examples
The following sections include protocol negotiation and hash
generation examples.
9.1. Negotiation Examples
Here are some examples of typical negotiations. The peer is on the
left and the authenticator is on the right.
The packet sequence ID is incremented on each authentication retry
response and on the change password response. All cases where the
packet sequence ID is updated are noted below.
Response retry is never allowed after Change Password. Change
Password may occur after response retry.
Zorn Informational [Page 14]
RFC 2759 Microsoft MS-CHAP-V2 January 2000
9.1.1. Successful authentication
<- Authenticator Challenge
Peer Response/Challenge ->
<- Success/Authenticator Response
(Authenticator Response verification succeeds, call continues)
9.1.2. Authenticator authentication failure
<- Authenticator Challenge
Peer Response/Challenge ->
<- Success/Authenticator Response
(Authenticator Response verification fails, peer disconnects)
9.1.3. Failed authentication with no retry allowed
<- Authenticator Challenge
Peer Response/Challenge ->
<- Failure (E=691 R=0)
(Authenticator disconnects)
9.1.4. Successful authentication after retry
<- Authenticator Challenge
Peer Response/Challenge ->
<- Failure (E=691 R=1), disable short timeout
Response (++ID) to challenge in failure message ->
<- Success/Authenticator Response
(Authenticator Response verification succeeds, call continues)
9.1.5. Failed hack attack with 3 attempts allowed
<- Authenticator Challenge
Peer Response/Challenge ->
<- Failure (E=691 R=1), disable short timeout
Response (++ID) to challenge in Failure message ->
<- Failure (E=691 R=1), disable short timeout
Response (++ID) to challenge in Failure message ->
<- Failure (E=691 R=0)
Zorn Informational [Page 15]
RFC 2759 Microsoft MS-CHAP-V2 January 2000
9.1.6. Successful authentication with password change
<- Authenticator Challenge
Peer Response/Challenge ->
<- Failure (E=648 R=0 V=3), disable short
timeout
ChangePassword (++ID) to challenge in Failure message ->
<- Success/Authenticator Response
(Authenticator Response verification succeeds, call continues)
9.1.7. Successful authentication with retry and password change
<- Authenticator Challenge
Peer Response/Challenge ->
<- Failure (E=691 R=1), disable short timeout
Response (++ID) to first challenge+23 ->
<- Failure (E=648 R=0 V=2), disable short
timeout
ChangePassword (++ID) to first challenge+23 ->
<- Success/Authenticator Response
(Authenticator Response verification succeeds, call continues)
9.2. Hash Example
Intermediate values for user name "User" and password "clientPass".
All numeric values are hexadecimal.
0-to-256-char UserName:
55 73 65 72
0-to-256-unicode-char Password:
63 00 6C 00 69 00 65 00 6E 00 74 00 50 00 61 00 73 00 73 00
16-octet AuthenticatorChallenge:
5B 5D 7C 7D 7B 3F 2F 3E 3C 2C 60 21 32 26 26 28
16-octet PeerChallenge:
21 40 23 24 25 5E 26 2A 28 29 5F 2B 3A 33 7C 7E
8-octet Challenge:
D0 2E 43 86 BC E9 12 26
16-octet PasswordHash:
44 EB BA 8D 53 12 B8 D6 11 47 44 11 F5 69 89 AE
Zorn Informational [Page 16]
RFC 2759 Microsoft MS-CHAP-V2 January 2000
24 octet NT-Response:
82 30 9E CD 8D 70 8B 5E A0 8F AA 39 81 CD 83 54 42 33 11 4A 3D 85 D6 DF
16-octet PasswordHashHash:
41 C0 0C 58 4B D2 D9 1C 40 17 A2 A1 2F A5 9F 3F
42-octet AuthenticatorResponse:
"S=407A5589115FD0D6209F510FE9C04566932CDA56"
9.3. Example of DES Key Generation
DES uses 56-bit keys, expanded to 64 bits by the insertion of parity
bits. After the parity of the key has been fixed, every eighth bit
is a parity bit and the number of bits that are set (1) in each octet
is odd; i.e., odd parity. Note that many DES engines do not check
parity, however, simply stripping the parity bits. The following
example illustrates the values resulting from the use of the password
"MyPw" to generate a pair of DES keys (e.g., for use in the
NtPasswordHashEncryptedWithBlock() described in section 8.13).
0-to-256-unicode-char Password:
4D 79 50 77
16-octet PasswordHash:
FC 15 6A F7 ED CD 6C 0E DD E3 33 7D 42 7F 4E AC
First "raw" DES key (initial 7 octets of password hash):
FC 15 6A F7 ED CD 6C
First parity-corrected DES key (eight octets):
FD 0B 5B 5E 7F 6E 34 D9
Second "raw" DES key (second 7 octets of password hash)
0E DD E3 33 7D 42 7F
Second parity-corrected DES key (eight octets):
0E 6E 79 67 37 EA 08 FE
10. Security Considerations
As an implementation detail, the authenticator SHOULD limit the
number of password retries allowed to make brute-force password
guessing attacks more difficult.
Zorn Informational [Page 17]
RFC 2759 Microsoft MS-CHAP-V2 January 2000
11. References
[1] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, RFC
1661, July 1994.
[2] Simpson, W., "PPP Challenge Handshake Authentication Protocol
(CHAP)", RFC 1994, August 1996.
[3] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[4] "Data Encryption Standard (DES)", Federal Information Processing
Standard Publication 46-2, National Institute of Standards and
Technology, December 1993.
[5] Rivest, R., "MD4 Message Digest Algorithm", RFC 1320, April
1992.
[6] RC4 is a proprietary encryption algorithm available under
license from RSA Data Security Inc. For licensing information,
contact:
RSA Data Security, Inc.
100 Marine Parkway
Redwood City, CA 94065-1031
[7] Eastlake, D., Crocker, S. and J. Schiller, "Randomness
Recommendations for Security", RFC 1750, December 1994.
[8] "The Unicode Standard, Version 2.0", The Unicode Consortium,
Addison-Wesley, 1996. ISBN 0-201-48345-9.
[9] Zorn, G. and Cobb, S., "Microsoft PPP CHAP Extensions", RFC
2433, October 1998.
[10] "DES Modes of Operation", Federal Information Processing
Standards Publication 81, National Institute of Standards and
Technology, December 1980.
[11] "Secure Hash Standard", Federal Information Processing Standards
Publication 180-1, National Institute of Standards and
Technology, April 1995.
[12] Zorn, G., "PPP LCP Internationalization Configuration Option",
RFC 2484, January 1999.
Zorn Informational [Page 18]
RFC 2759 Microsoft MS-CHAP-V2 January 2000
12. Acknowledgements
Thanks (in no particular order) to Bruce Johnson, Tony Bell, Paul
Leach, Terence Spies, Dan Simon, Narendra Gidwani, Gurdeep Singh
Pall, Jody Terrill, Brad Robel-Forrest, and Joe Davies for useful
suggestions and feedback.
13. Author's Address
Questions about this memo can also be directed to:
Glen Zorn
Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052
Phone: +1 425 703 1559
Fax: +1 425 936 7329
EMail: gwz@acm.org
Zorn Informational [Page 19]
RFC 2759 Microsoft MS-CHAP-V2 January 2000
14. Full Copyright Statement
Copyright (C) The Internet Society (2000). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Zorn Informational [Page 20]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -