⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc1938.txt

📁 <VC++网络游戏建摸与实现>源代码
💻 TXT
📖 第 1 页 / 共 3 页
字号:
RFC 1938               A One-Time Password System               May 19967.0 VERIFICATION OF ONE-TIME PASSWORDS   An application on the server system that requires OTP authentication   is expected to issue an OTP challenge as described above. Given the   parameters from this challenge and the secret pass-phrase, the   generator can compute (or lookup) the one-time password that is   passed to the server to be verified.   The server system has a database containing, for each user, the one-   time password from the last successful authentication or the first   OTP of a newly initialized sequence. To authenticate the user, the   server decodes the one-time password received from the generator into   a 64-bit key and then runs this key through the secure hash function   once. If the result of this operation matches the stored previous   OTP, the authentication is successful and the accepted one-time   password is stored for future use.8.0 PASS-PHRASE CHANGES   Because the number of hash function applications executed by the   generator decreases by one each time, at some point the user must   reinitialize the system or be unable to authenticate.   Although some installations may not permit users to initialize   remotely, implementations MUST provide a means to do so that does not   reveal the user's secret pass-phrase.  One way is to provide a means   to reinitialize the  sequence through explicit specification of the   first one-time password.   When the sequence of one-time passwords is reinitialized,   implementations MUST verify that the seed or the pass-phrase is   changed.  Installations SHOULD discourage any operation that sends   the secret pass-phrase over a network in clear-text as such practice   defeats the concept of a one-time password.   Implementations MAY use the following technique for   [re]initialization:    o  The user picks a new seed and hash count (default values may       be offered).  The user provides these, along with the       corresponding generated one-time password, to the host system.    o  The user MAY also provide the corresponding generated one       time password for count-1 as an error check.    o  The user SHOULD provide the generated one-time password for       the old seed and old hash count to protect an idle terminal       or workstation (this implies that when the count is 1, theHaller & Metz               Standards Track                     [Page 7]RFC 1938               A One-Time Password System               May 1996       user can login but cannot then change the seed or count).   In the future a specific protocol may be defined for reinitialization   that will permit smooth and possibly automated interoperation of all   hosts and generators.9.0 PROTECTION AGAINST RACE ATTACK   All conforming server implementations MUST protect against the race   condition described in this section.  A defense against this attack   is outlined; implementations MAY use this approach or MAY select an   alternative defense.   It is possible for an attacker to listen to most of a one-time   password, guess the remainder, and then race the legitimate user to   complete the authentication.  Multiple guesses against the last word   of the six-word format are likely to succeed.   One possible defense is to prevent a user from starting multiple   simultaneous authentication sessions. This means that once the   legitimate user has initiated authentication, an attacker would be   blocked until the first authentication process has completed.  In   this approach, a timeout is necessary to thwart a denial of service   attack.10.0 SECURITY CONSIDERATIONS   This entire document discusses an authentication system that improves   security by limiting the danger of eavesdropping/replay attacks that   have been used against simple password systems [4].   The use of the OTP system only provides protections against passive   eavesdropping/replay attacks.  It does not provide for the privacy of   transmitted data, and it does not provide protection against active   attacks.  Active attacks against TCP connections are known to be   present in the current Internet [9].   The success of the OTP system to protect host systems is dependent on   the non-invertability of the secure hash functions used.  To our   knowledge, none of the hash algorithms have been broken, but it is   generally believed [6] that MD4 is not as strong as MD5.  If a server   supports multiple hash algorithms, it is only as secure as the   weakest algorithm.Haller & Metz               Standards Track                     [Page 8]RFC 1938               A One-Time Password System               May 199611.0 ACKNOWLEDGMENTS   The idea behind OTP authentication was first proposed by Leslie   Lamport [1]. Bellcore's S/KEY system, from which OTP is derived, was   proposed by Phil Karn, who also wrote most of the Bellcore reference   implementation.12.0 REFERENCES  [1]  Leslie Lamport, "Password Authentication with Insecure       Communication", Communications of the ACM 24.11 (November       1981), 770-772  [2]  Rivest, R., "The MD4 Message-Digest Algorithm, RFC 1320",       MIT and RSA Data Security, Inc., April 1992.  [3]  Neil Haller, "The S/KEY One-Time Password System", Proceedings       of the ISOC Symposium on Network and Distributed System       Security, February 1994, San Diego, CA  [4]  Haller, N., and R. Atkinson, "On Internet Authentication",       RFC 1704, Bellcore and Naval Research Laboratory, October 1994.  [5]  Haller, N., "The S/KEY One-Time Password System", RFC 1760,       Bellcore, February 1995.  [6]  Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,       MIT and RSA Data Security, Inc., April 1992.  [7]  National Institute of Standards and Technology (NIST),       "Announcing the Secure Hash Standard", FIPS 180-1, U.S.       Department of Commerce, April 1995.  [8]  International Standard - Information Processing -- ISO 7-bit       coded character set for information interchange (Invariant Code       Set), ISO-646, International Standards Organization, Geneva,       Switzerland, 1983  [9]  Computer Emergency Response Team (CERT), "IP Spoofing and       Hijacked Terminal Connections", CA-95:01, January 1995.       Available via anonymous ftp from info.cert.org in       /pub/cert_advisories.Haller & Metz               Standards Track                     [Page 9]RFC 1938               A One-Time Password System               May 199613.0 AUTHORS' ADDRESSES   Neil Haller   Bellcore   MCC 1C-265B   445 South Street   Morristown, NJ, 07960-6438, USA   Phone: +1 201 829-4478   Fax:   +1 201 829-2504   EMail: nmh@bellcore.com   Craig Metz   Kaman Sciences Corporation   For NRL Code 5544   4555 Overlook Avenue, S.W.   Washington, DC, 20375-5337, USA   Phone: +1 202 404-7122   Fax:   +1 202 404-7942   EMail: cmetz@cs.nrl.navy.milHaller & Metz               Standards Track                    [Page 10]RFC 1938               A One-Time Password System               May 1996Appendix A   -   Interfaces to Secure Hash AlgorithmsMD4 Message Digest (see reference [2])          strcpy(buf,seed);          strcat(buf,passwd);          MDbegin(&md)          MDupdate(&md,(unsigned char *)buf,8*buflen);          /* Fold result to 64 bits */          md.buffer[0] ^= md.buffer[2];          md.buffer[1] ^= md.buffer[3];MD5 Message Digest (see reference [6])          MD5_CTX mdCxt;          strcpy(buf,seed);          strcat(buf,passwd);          /* Crunch the key through MD5  */          MD5Init(&mdCxt);          MD5Update(&mdCxt,(unsigned char *)bits,strlen(bits));          MD5Update(&mdCxt,(unsigned char *)buf,buflen);          MD5Final(&mdCxt);          /* Fold result to 64 bits */          for( i = 0; i < 8; i++ )              result[i] = mdCxt.digest[i] ^ mdCxt.digest[i+8];SHA Secure Hash Algorithm (see reference [7])          /*  Fold 160 bit result to 64 bits */          md.buffer[0] ^= md.buffer[2];          md.buffer[1] ^= md.buffer[3];          md.buffer[0] ^= md.buffer[4];Appendix B   -   Alternative Dictionary Algorithm   The purpose of alternative dictionary encoding of the OTP one-time   password is to allow the use of language specific or friendly words.   As case translation is not always well defined, the alternative   dictionary encoding is case insensitive.  Servers SHOULD accept this   encoding in addition to the standard 6-word and hexadecimal   encodings.Haller & Metz               Standards Track                    [Page 11]RFC 1938               A One-Time Password System               May 1996GENERATOR ENCODING USING AN ALTERNATE DICTIONARY  The standard 6-word encoding uses the placement of a word in the  dictionary to represent an 11-bit number. The 64-bit one-time  password can then be represented by six words.  An alternative dictionary of 2048 words may be created such that  each word W and position of the word in the dictionary N obey the  relationship:          alg( W ) % 2048 == N  where          alg is the hash algorithm used (e.g. MD4, MD5, SHA1).  In addition, no words in the standard dictionary may be chosen.  The generator expands the 64-bit one-time password to 66 bits by  computing parity as with the standard 6-word encoding.  The six 11-  bit numbers are then converted to words using the dictionary that  was created such that the above relationship holds.SERVER DECODING OF ALTERNATE DICTIONARY ONE-TIME PASSWORDS  The server accepting alternative dictionary encoding converts each  word to an 11-bit number using the above encoding. These numbers are  then used in the same way as the decoded standard dictionary words  to form the 66-bit one-time password.  The server does not need to have access to the alternate dictionary  that was used to create the one-time password it is authenticating.  This is because the decoding from word to 11-bit number does not  make any use of the dictionary.  As a result of the independence of  the dictionary, a server accepting one alternate dictionary accept  all alternate dictionaries.Appendix C - Dictionary for Converting Between 6-Word and BinaryFormats   This dictionary is from the module put.c in the original Bellcore   reference distribution.{        "A",    "ABE",   "ACE",   "ACT",   "AD",    "ADA",   "ADD","AGO",   "AID",  "AIM",   "AIR",   "ALL",   "ALP",   "AM",    "AMY","AN",    "ANA",  "AND",   "ANN",   "ANT",   "ANY",   "APE",   "APS","APT",   "ARC",  "ARE",   "ARK",   "ARM",   "ART",   "AS",    "ASH","ASK",   "AT",   "ATE",   "AUG",   "AUK",   "AVE",   "AWE",   "AWK","AWL",   "AWN",  "AX",    "AYE",   "BAD",   "BAG",   "BAH",   "BAM",Haller & Metz               Standards Track                    [Page 12]RFC 1938               A One-Time Password System               May 1996

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -