home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-newman-auth-scram-00.txt < prev    next >
Text File  |  1997-09-10  |  24KB  |  677 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          C. Newman
  8. Internet Draft: SCRAM-SHA1 SASL Mechanism                       Innosoft
  9. Document: draft-newman-auth-scram-00.txt                  September 1997
  10.                                                    Expires in six months
  11.  
  12.  
  13.        Salted Challenge Response Authentication Mechanism (SCRAM)
  14.  
  15.  
  16. Status of this memo
  17.  
  18.      This document is an Internet-Draft.  Internet-Drafts are working
  19.      documents of the Internet Engineering Task Force (IETF), its areas,
  20.      and its working groups.  Note that other groups may also distribute
  21.      working documents as Internet-Drafts.
  22.  
  23.      Internet-Drafts are draft documents valid for a maximum of six
  24.      months and may be updated, replaced, or obsoleted by other
  25.      documents at any time.  It is inappropriate to use Internet-Drafts
  26.      as reference material or to cite them other than as "work in
  27.      progress."
  28.  
  29.      To view the entire list of current Internet-Drafts, please check
  30.      the "1id-abstracts.txt" listing contained in the Internet-Drafts
  31.      Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
  32.      (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East
  33.      Coast), or ftp.isi.edu (US West Coast).
  34.  
  35.  
  36. Abstract
  37.  
  38.      SCRAM is a simple passphrase-based authentication mechanism which
  39.      uses only a publicly available cryptographic hash function to
  40.      provide authentication for protocols.  It is designed to replace
  41.      plaintext password mechanisms without significant additional
  42.      complexity, loss of performance or plaintext equivalent verifiers.
  43.  
  44.      CRAM-MD5 [CRAM-MD5], a similar mechanism, has the drawback that the
  45.      password verifier stored on the server can be used to impersonate
  46.      the user.  Current plaintext password mechanisms do not have this
  47.      drawback and it is a serious issue for servers which allow remote
  48.      login or sites which distribute the authentication database to
  49.      multiple servers via an insecure protocol.  SCRAM-SHA1 corrects
  50.      this drawback with minimal additional complexity.
  51.  
  52.      This document defines the SCRAM-SHA1 SASL mechanism [SASL] using
  53.      the SHA1 [SHA1] and HMAC-SHA1 [HMAC] algorithms.
  54.  
  55.  
  56.  
  57.  
  58. Newman                                                          [Page 1]
  59.  
  60. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  61.  
  62.  
  63. 0. Open Issues
  64.  
  65.      (1) Although this mechanism has no new concepts, it has not had
  66.      extensive review.  Advice on the completeness of the security
  67.      considerations is appreciated.
  68.  
  69.      (2) The TWEKE proposal (appendix B) is more secure and more
  70.      complex.  Is it an acceptable or desirable tradeoff?  Perhaps SCRAM
  71.      could get 40% penetration into the plaintext market and TWEKE could
  72.      get 30%, would it be worthwhile to do TWEKE instead of SCRAM in
  73.      this case?  What if there's a bigger difference?
  74.  
  75.  
  76. 1. Conventions Used in this Document
  77.  
  78.      The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
  79.      in this document are to be interpreted as defined in "Key words for
  80.      use in RFCs to Indicate Requirement Levels" [KEYWORDS].
  81.  
  82.  
  83. 2. Client Implementation of SCRAM-SHA1
  84.  
  85.      This section includes a step-by-step guide for client implementors.
  86.      Although section 7 contains the formal definition of the syntax and
  87.      is the authoritative reference in case of errors here, this section
  88.      should be sufficient to build a correct implementation.
  89.  
  90.      When used with SASL the mechanism name is "SCRAM-SHA1".  The
  91.      mechanism does not provide a security layer.
  92.  
  93.      The client begins by sending a message to the server containing
  94.      three pieces of information:
  95.  
  96.      (1) An authorization identity.  When the empty string is used, this
  97.      defaults to the authentication identity.  This is used by system
  98.      administrators or proxy servers to login with a different user
  99.      identity.  This field may be up to 255 octets and is terminated by
  100.      a NUL (0) octet.  US-ASCII printable characters are preferred,
  101.      although UTF-8 [UTF-8] printable characters are permitted to
  102.      support international names.  Use of character sets other than
  103.      US-ASCII and UTF-8 is forbidden.
  104.  
  105.      (2) An authentication identity.  The identity whose passphrase will
  106.      be used.  This field may be up to 255 octets and is terminated by a
  107.      NUL (0) octet.  US-ASCII printable characters are preferred,
  108.      although UTF-8 [UTF-8] printable characters are permitted to
  109.      support international names.  Use of character sets other than
  110.      US-ASCII and UTF-8 is forbidden.
  111.  
  112.  
  113.  
  114. Newman                                                          [Page 2]
  115.  
  116. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  117.  
  118.  
  119.      (3) A "client nonce" of 8 to 256 octets.  It is important that this
  120.      be globally unique and somewhat random.  It can be generated by
  121.      appending the system clock to a random number (advice for
  122.      generating good random numbers can be found in [RANDOM]) and the
  123.      client's IP address or domain name.
  124.  
  125.      The server responds by sending a message containing three pieces of
  126.      information:
  127.  
  128.      (4) An 8-octet salt value, specific to the authentication identity.
  129.  
  130.      (5) A server id consisting of the service name of the protocol's
  131.      SASL profile followed by a "." followed by the domain name of the
  132.      server followed by an "@" and optional extension data terminated by
  133.      NUL.  This will not be longer than 512 octets.  The client SHOULD
  134.      verify this is correct.
  135.  
  136.      (6) A "server nonce" of 8 to 32 octets.
  137.  
  138.      The client then does the following:
  139.  
  140.      (A) Create a buffer containing the user's passphrase.  The client
  141.      MUST support passphrases of at least 64 octets.  US-ASCII
  142.      characters are preferred, although UTF-8 characters are permitted.
  143.      Character sets other than UTF-8 MUST NOT be used.
  144.  
  145.      (B) Apply the SHA1 function to (A), producing a 20 octet result.
  146.      Once this is done, (A) SHOULD be erased from memory.
  147.  
  148.      (C) Apply the HMAC-SHA1 function with the result of (B) as the key
  149.      and the 8-octet salt (4) value as the data.  This produces a 20
  150.      octet result.
  151.  
  152.      (D) Create a buffer containing the server's response (4)-(6),
  153.      immediately followed by the initial client message (1)-(3).
  154.  
  155.      (E) Apply the HMAC-SHA1 function with the result of (C) as the key
  156.      and the buffer from (D) as the data.  This produces a 20-octet
  157.      result.
  158.  
  159.      (F) Create a 20-octet buffer containing the exclusive-or of (B) and
  160.      (E).
  161.  
  162.      The client then sends a message to the server containing the
  163.      following:
  164.  
  165.      (7) The 20-octet result of step (F).
  166.  
  167.  
  168.  
  169.  
  170. Newman                                                          [Page 3]
  171.  
  172. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  173.  
  174.  
  175.      If authentication is successful, then the server responds with the
  176.      following:
  177.  
  178.      (8) A 20-octet mutual authentication verifier.
  179.  
  180.      The client SHOULD verify this with the following procedure:
  181.  
  182.      (G) Create a buffer containing the initial client message (1)-(3)
  183.      immediately followed by the initial server response (4)-(6).
  184.  
  185.      (H) Apply the HMAC-SHA1 function with the result of (C) as the key
  186.      and the buffer from (G) as the data.
  187.  
  188.      (I) If the result of (H) matches (8), the server is authenticated.
  189.  
  190.      A secured client MAY store the result of (B) to re-authenticate.
  191.      Permanent storage of (B) by the client is discouraged although it
  192.      is preferable to storing the actual passphrase.
  193.  
  194.  
  195. 3. Server Implementation of SCRAM-SHA1.
  196.  
  197.      The section includes a step-by-step guide for server implementors.
  198.      Although section 7 contains the formal definition of the syntax and
  199.      is the authoritative reference in case of errors here, this section
  200.      in conjunction with section 2 should be sufficient to build a
  201.      correct implementation.
  202.  
  203.      The server's authentication database contains an 8-octet salt and
  204.      20-octet verifier for each local user.  The server MAY support
  205.      remote users using the syntax "user@host" for the authentication
  206.      identity, but if it doesn't it MUST truncate the authentication
  207.      identity at the "@" sign prior to lookup in the authentication
  208.      database.
  209.  
  210.      The authentication verifier is equal to the result of step (C)
  211.      above.  To create its initial response, the server simply looks up
  212.      the authentication identity to fetch the salt, and generates an 8
  213.      to 32 octet nonce.  This nonce MUST be unique to prevent replay
  214.      attacks.  It can be generated by appending a system clock to a
  215.      random number [RANDOM].  To verify the client's credentials, the
  216.      server preforms the following steps:
  217.  
  218.      (a) Generate a buffer identical to step (D) for the client.
  219.  
  220.      (b) Apply the HMAC-SHA1 function with the stored verifier as the
  221.      key and the result of (a) as the data.  This produces a 20-octet
  222.      result equal to step (E) above.
  223.  
  224.  
  225.  
  226. Newman                                                          [Page 4]
  227.  
  228. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  229.  
  230.  
  231.      (c) Exclusive-or the result of (b) with message (7) from the
  232.      client.  This produces a 20-octet result which should be equal to
  233.      the output of step (B) above.
  234.  
  235.      (d) Apply the HMAC-SHA1 function with (c) as the key and the stored
  236.      salt as the data.  This produces a 20-octet result.
  237.  
  238.      (e) if the result of (d) is equal to the stored verifier, then the
  239.      user is authenticated.
  240.  
  241.      (f) Generate a buffer identical to step (G) above.
  242.  
  243.      (g) Apply the HMAC-SHA1 function with the stored verifier as the
  244.      key and the buffer from (f) as the data.  This produces a 20-octet
  245.      result.
  246.  
  247.      The result of (g) is sent to the client as the mutual
  248.      authentication step.
  249.  
  250.  
  251. 4. Example
  252.  
  253.      XXX: to be done
  254.  
  255.  
  256. 5. System Administrator Advice
  257.  
  258.      This section includes advice for system administrators using this
  259.      mechanism.
  260.  
  261.      Although the verifiers used by SCRAM-SHA1 are probably more secure
  262.      than those used by current plaintext mechanisms (such as Unix
  263.      /etc/password), it is still very important to keep them secret.
  264.      Just as tools exist to try common passwords against Unix
  265.      /etc/password files, it is also possible to build such tools for
  266.      SCRAM-SHA1.  In addition, once a SCRAM-SHA1 verifier is stolen, a
  267.      passive (undetectable) snoop of that user logging in will result in
  268.      the output of step (B) above, which is sufficient to impersonate a
  269.      user.  This is far better than current plaintext mechanisms where a
  270.      passive snoop always recovers the user's password, but is still a
  271.      serious concern.
  272.  
  273.      Verifiers SHOULD be kept hidden from all users on the server.
  274.      Sites which distribute verifiers among multiple servers, SHOULD
  275.      encrypt them when distributing them.
  276.  
  277.      SCRAM-SHA1 is only a good mechanism if passphrases are well chosen.
  278.      For this reason, implementations should use the term "passphrase"
  279.  
  280.  
  281.  
  282. Newman                                                          [Page 5]
  283.  
  284. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  285.  
  286.  
  287.      rather than "password" and when a user's passphrase is set, site
  288.      policy restrictions should be applied.  A reasonable site policy
  289.      would require passphrases of at least 10 characters with at least
  290.      one non-alphanumeric character.
  291.  
  292.      SCRAM-SHA1 doesn't protect the integrity or privacy of data
  293.      exchanged after authentication.  Use of an external encryption
  294.      layer or a stronger authentication mechanism such as Kerberos is
  295.      encouraged if this functionality is needed.
  296.  
  297.  
  298. 6. SCRAM-SHA1 Functional Notation
  299.  
  300.      This section is designed to provide a quick understanding of
  301.      SCRAM-SHA1 for the mathematically inclined.
  302.  
  303.      +        octet concatenation
  304.      XOR      the exclusive-or function
  305.      AU       is the authentication user identity (NUL terminated)
  306.      AZ       is the authorization user identity (NUL terminated)
  307.               if AZ would be the same as AU, a single NUL is used instead.
  308.      SV       is the name of the service and server
  309.      p        is the plaintext passphrase
  310.      H(x)     is a one-way hash function applied to "x", such as SHA-1
  311.      M(x,y)   is a message authentication code (MAC) such as HMAC-SHA1
  312.               "y" is the key and "x" is the text signed by the key.
  313.      V        is a per-user verifier the server stores
  314.      s        is a per-user salt value the server stores
  315.      P        is the proof the client sends the server
  316.      Us       is a unique nonce the server sends to the client
  317.      Uc       is a unique nonce the client sends to the server
  318.  
  319.      The verifier (V) is computed by applying the hash function to the
  320.      plaintext passphrase, then using the result to sign the salt.
  321.      Thus:
  322.  
  323.      V = M(s, H(p))
  324.  
  325.      The proof (P) is computed as follows:
  326.  
  327.      P = H(p) XOR M(s + SV + Us + AZ + AU + Uc, V)
  328.  
  329.      The SCRAM exchange is as follows:
  330.  
  331.      client -> server: AZ + AU + Uc
  332.      server -> client: s + SV + Us
  333.      client -> server: P
  334.      server -> client: M(AZ + AU + Uc + s + SV + Us, V)
  335.  
  336.  
  337.  
  338. Newman                                                          [Page 6]
  339.  
  340. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  341.  
  342.  
  343.      The server verifies P by checking that the following is equal to V:
  344.  
  345.      M(s, P XOR M(s + SV + Us + AZ + AU + Uc, V))
  346.  
  347.      The client verifies the server's identity by performing the same
  348.      computation the server does and comparing it to the server's
  349.      result.
  350.  
  351.  
  352. 7. Formal Syntax of SCRAM-SHA1 Messages
  353.  
  354.      This is the formal syntactic definition of the client and server
  355.      messages.  This uses the ABNF [ABNF] notation.
  356.  
  357.      client-msg-1     = [authorize-id] NUL authenticate-id NUL client-nonce
  358.  
  359.      server-msg-1     = salt server-id NUL server-nonce
  360.  
  361.      client-msg-2     = proof
  362.  
  363.      server-msg-2     = mutual-auth
  364.  
  365.      passphrase       = 8*UTF8-SAFE
  366.                         ;; At least 64 octets MUST be supported
  367.  
  368.  
  369.      authorize-id     = *UTF8-PRINT
  370.                         ;; No more than 255 octets
  371.  
  372.      authenticate-id  = *UTF8-PRINT
  373.                         ;; No more than 255 octets
  374.  
  375.      server-id        = service-name "." server-domain
  376.                         "@" [ server-ext-data ]
  377.                         ;; No more that 511 octets total
  378.  
  379.      service-name     = *USASCII-PRINT
  380.                         ;; a GSSAPI service name
  381.  
  382.      server-domain    = *USASCII-PRINT
  383.                         ;; an internet domain name
  384.  
  385.      server-ext-data  = *UTF8-SAFE
  386.                         ;; extension data
  387.  
  388.      server-id        = *UTF8-PRINT
  389.                         ;; No more than 511 octets
  390.  
  391.  
  392.  
  393.  
  394. Newman                                                          [Page 7]
  395.  
  396. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  397.  
  398.  
  399.      client-nonce     = 8*256OCTET
  400.  
  401.      server-nonce     = 8*32OCTET
  402.  
  403.      salt             = 8OCTET
  404.  
  405.      proof            = 20OCTET
  406.  
  407.      mutual-auth      = 20OCTET
  408.  
  409.      NUL              = %x00  ;; US-ASCII NUL character
  410.  
  411.      US-ASCII-SAFE    = %x01-09 / %x0B-0C / %x0E-7F
  412.                        ;; US-ASCII except CR, LF, NUL
  413.  
  414.      US-ASCII-PRINT   = %x20-7E
  415.                        ;; printable US-ASCII including SPACE
  416.  
  417.      UTF8-SAFE        = US-ASCII-SAFE / UTF8-1 / UTF8-2 / UTF8-3
  418.                           / UTF8-4 / UTF8-5
  419.  
  420.      UTF8-PRINT      = US-ASCII-PRINT / UTF8-1 / UTF8-2 / UTF8-3
  421.                           / UTF8-4 / UTF8-5
  422.  
  423.      UTF8-CONT        = %x80..BF
  424.  
  425.      UTF8-1           = %xC0..DF UTF8-CONT
  426.  
  427.      UTF8-2           = %xE0..EF 2UTF8-CONT
  428.  
  429.      UTF8-3           = %xF0..F7 3UTF8-CONT
  430.  
  431.      UTF8-4           = %xF8..FB 4UTF8-CONT
  432.  
  433.      UTF8-5           = %xFC..FD 5UTF8-CONT
  434.  
  435.  
  436. 8. Security Considerations
  437.  
  438.      Security considerations are discussed throughout this document.
  439.      The security considerations of SHA1 [SHA1] and HMAC [HMAC] also
  440.      apply.
  441.  
  442.      SCRAM-SHA1 is conjectured to be a reasonably strong mechanism as
  443.      long as passphrases are well chosen and verifiers are kept secret.
  444.      Making a SCRAM-SHA1 verifier public is believed to be no worse than
  445.      making a Unix /etc/password verifier public when a plaintext-only
  446.      mechanism is used.
  447.  
  448.  
  449.  
  450. Newman                                                          [Page 8]
  451.  
  452. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  453.  
  454.  
  455.      There are two particularly dangerous attacks against SCRAM-SHA1.
  456.      The first is to passively record an authentication session (or
  457.      steal the verifier) and perform an offline dictionary attack to
  458.      find the passphrase.  This type of attack is estimated to be about
  459.      40% effective at typical sites with current behavior patterns
  460.      [SCHNEIER].  Use of the term "passphrase", enforcement of site
  461.      policy when passphrases are changed and user education may improve
  462.      this to acceptable levels for many sites.
  463.  
  464.      The second attack is to both steal the verifier for a user and
  465.      passively record an authentication session by that user.  This
  466.      results in the ability to impersonate that user and more than
  467.      doubles the speed of a dictionary attack or brute-force attack to
  468.      recover the actual passphrase.  For this reason, verifiers should
  469.      be kept well-protected.
  470.  
  471.      This mechanism provides no protection for the session after
  472.      authentication.  A passive observer can see information
  473.      transmitted, and an active attacker can hijack the session.  Use of
  474.      an external encryption layer such as TLS [TLS] can address this
  475.      problem.
  476.  
  477.      This mechanism uses a hash-function combined with exclusive-or as a
  478.      simple single-block cipher.  [SCHNEIER] expresses reservations
  479.      about ciphers built using one-way hash functions, although not all
  480.      of his reservations may apply to this limited use.
  481.  
  482.  
  483. 9. Intellectual Property Issues and Prior Art
  484.  
  485.      The author is not aware of any patents which apply to this
  486.      mechanism.
  487.  
  488.      This is primarily a derivative of simple hash-based challenge
  489.      response systems.  The hash-based challenge response idea has
  490.      existed since at least 1992, when the RIPE project published the
  491.      SKID algorithm according to [SCHNEIER].
  492.  
  493.      The repeated-hash idea used to verify the client's authenticator is
  494.      derived from S/KEY [SKEY].
  495.  
  496.      The idea of using a hash function to construct a cipher (with
  497.      exclusive-or) was originally invented by Peter Gutmann in 1993
  498.      according to [SCHNEIER].
  499.  
  500.      The idea of using salt to protect against global dictionary attacks
  501.      dates back to the unix /etc/password system or before.  There is
  502.      some discussion of this in [SCHNEIER].
  503.  
  504.  
  505.  
  506. Newman                                                          [Page 9]
  507.  
  508. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  509.  
  510.  
  511.      SCRAM combines these four techniques.  The author of this
  512.      specification first proposed this publicly on a mailing list July
  513.      16, 1997.  There is nothing new about this mechanism beyond the
  514.      idea of combining these existing techniques.
  515.  
  516.      The SCRAM algorithm includes a single-block cipher capable of
  517.      encrypting 20 octets of authentication data.  The author does not
  518.      believe this will cause problems for export restrictions, but
  519.      checking with the appropriate government(s) should be considered.
  520.      Computer readable source code for cryptographic hash functions such
  521.      as MD5 and SHA1 have been exported from the United States without
  522.      problems.
  523.  
  524.  
  525. 10. References
  526.  
  527.      [ABNF] Crocker, D., "Augmented BNF for Syntax Specifications:
  528.      ABNF", Work in progress: draft-ietf-drums-abnf-xx.txt
  529.  
  530.      [CRAM-MD5] Klensin, Catoe, Krumviede, "IMAP/POP AUTHorize Extension
  531.      for Simple Challenge/Response", RFC 2095, MCI, January 1997.
  532.  
  533.          <ftp://ds.internic.net/rfc/rfc2095.txt>
  534.  
  535.      [HMAC] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message
  536.      Authentication", RFC 2104, IBM, UCSD, February 1997.
  537.  
  538.          <ftp://ds.internic.net/rfc/rfc2104.txt>
  539.  
  540.      [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
  541.      4rev1", RFC 2060, University of Washington, December 1996.
  542.  
  543.          <ftp://ds.internic.net/rfc/rfc2060.txt>
  544.  
  545.      [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
  546.      Requirement Levels", RFC 2119, Harvard University, March 1997.
  547.  
  548.          <ftp://ds.internic.net/rfc/rfc2119.txt>
  549.  
  550.      [RANDOM] Eastlake, Crocker, Schiller, "Randomness Recommendations
  551.      for Security", RFC 1750, DEC, Cybercash, MIT, December 1994.
  552.  
  553.          <ftp://ds.internic.net/rfc/rfc1750.txt>
  554.  
  555.      [SASL] Myers, "Simple Authentication and Security Layer (SASL)",
  556.      work in progress.
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Newman                                                         [Page 10]
  563.  
  564. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  565.  
  566.  
  567.      [SCHNEIER] Schneier, "Applied Cryptography: Protocols, Algorithms
  568.      and Source Code in C," John Wiley and Sons, Inc., 1996.
  569.  
  570.      [SHA1] NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995.
  571.  
  572.      [SKEY] Haller, Neil M. "The S/Key One-Time Password System", RFC
  573.      1760, Bellcore, February 1995.
  574.  
  575.          <ftp://ds.internic.net/rfc/rfc1760.txt>
  576.  
  577.      [TLS] Dierks, Allen, "The TLS Protocol Version 1.0", Work in
  578.      progress.
  579.  
  580.      [UTF8] Yergeau, F. "UTF-8, a transformation format of Unicode and
  581.      ISO 10646", RFC 2044, Alis Technologies, October 1996.
  582.  
  583.          <ftp://ds.internic.net/rfc/rfc2044.txt>
  584.  
  585. 11. Author's Address
  586.  
  587.      Chris Newman
  588.      Innosoft International, Inc.
  589.      1050 Lakes Drive
  590.      West Covina, CA 91790 USA
  591.  
  592.      Email: chris.newman@innosoft.com
  593.  
  594. A. Appendix - Sample Source Code
  595.  
  596.      XXX: to be done
  597.  
  598. B. Appendix - TWEKE Proposal
  599.  
  600.      Tom Wu has proposed adding a Diffie-Hellman key exchange to this
  601.      mechanism.  Diffie-Hellman works roughly as follows:
  602.  
  603.      Server picks g, n and x.  Server computes X = g^x mod n.
  604.  
  605.      server -> client: g, n, X
  606.  
  607.      Client picks y and computes Y = g^y mod n  and  K = X^y mod n.
  608.  
  609.      client -> server: Y
  610.  
  611.      Server computes K = Y^x mod n  (which is the same as the client's
  612.      K).
  613.  
  614.      If g, n, x and y are sufficiently big and have the right
  615.  
  616.  
  617.  
  618. Newman                                                         [Page 11]
  619.  
  620. Internet Draft         SCRAM-SHA1 SASL Mechanism          September 1997
  621.  
  622.  
  623.      characteristics, then both the client and server share K which is
  624.      very difficult for a passive evesdropper to obtain.
  625.  
  626.      The TWEKE proposal would add the following steps:
  627.  
  628.      (4.5) Server sends g, n, X.
  629.  
  630.      (7.5) Client sends Y.
  631.  
  632.      and would modify steps (D) and (a) to include the value K.  This
  633.      would result in a protocol safe from passive attacks.  The expense
  634.      would be reduced performance, the need for a bignum math library
  635.      and a requirement that an export license be obtained from certain
  636.      governments (included the United States).  This would not defend
  637.      against active attacks, but should be free of patent restrictions
  638.      after October 6th, 1997.
  639.  
  640.      TWEKE might be harder to deploy than SCRAM due to the higher math
  641.      and the use of public key technology.
  642.  
  643. C. Appendix - Additional Services
  644.  
  645.      Several additional services are needed to make SCRAM useful in
  646.      various usage scenarios.  These include remote authentication
  647.      database support for servers, authentication database APIs for
  648.      servers, remote passphrase change support for clients, single-
  649.      sign-on APIs for clients and management tools.  The server-id is
  650.      included to facilite the remote authentication database service.
  651.      Otherwise these issues are deferred for future work.
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Newman                                                         [Page 12]
  675.  
  676.  
  677.