home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-tls-passauth-00.txt < prev    next >
Text File  |  1996-11-22  |  17KB  |  349 lines

  1. INTERNET-DRAFT                                      Daniel Simon
  2. Transport Layer Security Working Group              Microsoft Corp.
  3. Draft-ietf-tls-passauth-00.txt                      November 20, 1996
  4.                                           Expires:  May 25, 1997
  5.  
  6.  
  7.  
  8.  
  9. Addition of Shared Key Authentication to Transport Layer Security (TLS)
  10.  
  11.  
  12. 0. Status Of this Memo
  13.  
  14. This document is an Internet-Draft.  Internet-Drafts are working
  15. documents of the Internet Engineering Task Force (IETF), its
  16. areas, and its working groups.  Note that other groups may also
  17. distribute working documents as Internet-Drafts.
  18.  
  19. Internet-Drafts are draft documents valid for a maximum of six
  20. months and may be updated, replaced, or obsoleted by other
  21. documents at any time.  It is inappropriate to use Internet-
  22. Drafts as reference material or to cite them other than as
  23. ''work in progress.''
  24.  
  25. To learn the current status of any Internet-Draft, please check
  26. the ``1id-abstracts.txt'' listing contained in the Internet-
  27. Drafts Shadow Directories on ftp.is.co.za (Africa),
  28. nic.nordu.net (Europe), munnari.oz.au (Pacific Rim),
  29. ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast).
  30.  
  31. 1.  Abstract
  32.  
  33. This document presents a shared-key authentication mechanism for the TLS 
  34. protocol.  It is intended to allow TLS clients to authenticate using a 
  35. secret key (such as a password) shared with either the server or a 
  36. third-party authentication service.  The security of the secret 
  37. authentication key is augmented by its integration into the normal 
  38. SSL/TLS server authentication/key exchange mechanism.
  39.  
  40.  
  41. 2.  Introduction
  42.  
  43. Recent transport-layer security protocols for the Internet, such as SSL 
  44. versions 2.0 and 3.0 [1, 2] and PCT version 1 [3], have effected 
  45. challenge-response authentication using strictly public-key (asymmetric) 
  46. cryptographic methods, with no use of out-of-band shared secrets.  This 
  47. choice has both benefits and drawbacks.  The primary benefit is improved 
  48. security:  an asymmetric private key used for authentication is only 
  49. stored in one location, and the out-of-band identification necessary for 
  50. public key certification need only be reliable, not secret (as an out-
  51. of-band shared key exchange must be).  In addition, the difficult task 
  52. of out-of-band shared-key exchange in shared-key authentication systems 
  53. often leads implementers to resort to human-friendly shared keys 
  54. (manually typed passwords, for instance), which may be vulnerable to 
  55. discovery by brute force search or "social engineering". 
  56.  
  57. However, shared-key authentication has certain advantages as well.  
  58. These are, chiefly:
  59.  
  60. - Portability:  Precisely because shared keys are often human-remembered 
  61. passwords or passphrases, they can be transported from (trusted) machine 
  62. to (trusted) machine with ease--unlike asymmetric private keys, which 
  63. must be transported using some physical medium, such as a diskette or 
  64. "smart card", to be available for use on any machine.
  65.  
  66. - Backward Compatibility:  Shared-key authentication is in very wide use 
  67. today, and the cost of conversion to its public-key counterpart may not 
  68. be worth the extra security, to some installations.
  69.  
  70. - Established Practice:  Shared-key authentication has been in use for 
  71. quite a while, and a valuable body of tools, techniques and expertise 
  72. has grown up around it.  In contrast, public-key authentication is very 
  73. new, its associated tools and methods are either untested or non-
  74. existent, and experience with possible implementation or operation 
  75. pitfalls simply doesn't exist.
  76.  
  77. These reasons are particularly relevant when individual human users of a 
  78. service are being authenticated over the Internet, and as a result, 
  79. virtually all authentication of (human) clients of such services is 
  80. currently performed using shared passwords.  Typically, servers 
  81. implementing one of the aforementioned transport-layer security 
  82. protocols, and needing client authentication, simply accept secure 
  83. (i.e., encrypted and server-authenticated) connections from each client, 
  84. who then provides a password (or engages in a challenge-response 
  85. authentication protocol based on a password) over the secure connection 
  86. to authenticate to the server.
  87.  
  88. Unfortunately, such "secure" connections are often not secure enough to 
  89. protect passwords, because of the various international legal 
  90. restrictions that have been placed on the use of encryption.  Obviously, 
  91. secret keys such as passwords should not be sent over weakly encrypted 
  92. connections.  In fact, even a challenge-response protocol which never 
  93. reveals the password is vulnerable, if a poorly chosen, guessable 
  94. password is used; an attacker can obtain the (weakly protected) 
  95. transcript of the challenge-response protocol, then attempt to guess the 
  96. password, verifying each guess against the transcript.   
  97.  
  98. However, it is possible to protect even badly-chosen passwords against 
  99. such attacks by incorporating shared-key authentication into the 
  100. transport-layer security protocol itself.  These protocols already 
  101. involve the exchange of long keys for message authentication, and those 
  102. same keys can be used (without the legal restraints associated with 
  103. encryption) to provide very strong protection for shared-key-based 
  104. challenge-response authentications, provided that the mechanism used 
  105. cannot be diverted for use as a strong encryption method.  This latter 
  106. requirement makes it essential that the shared-key-based authentication 
  107. occur at the protocol level, rather than above it (as is normally the 
  108. case today), so that the implementation can carefully control use of the 
  109. long authentication key. 
  110.   
  111.  
  112. 3.  Protocol Additions
  113.  
  114. Starting from SSL version 3.0 notation and formats, the following three
  115. new HandshakeTypes are added, and included in the Handshake message 
  116. definition:
  117.  
  118. shared_keys(30), shared_key_request(31), shared_key_verify(32)
  119.  
  120. A new CipherSuite is also included, to allow the client to signal 
  121. support for shared-key authentication to the server:
  122.  
  123. TLS_AUTH_SHARED_KEY = {x01, x01};
  124.  
  125. The client's inclusion of this CipherSuite is independent of other 
  126. listed CipherSuites, and simply indicates to the server the 
  127. client's support for shared-key authentication.
  128.  
  129.  
  130. 3.1  SharedKeys message
  131.  
  132. The SharedKeys message has the following structure:
  133.  
  134. struct {
  135.      DistinguishedName auth_services_client<1..65535>;
  136. } SharedKeys;
  137.  
  138. This optional message may be sent by the client immediately following 
  139. the ClientHello message; in fact, if sent, it is actually enclosed 
  140. within the ClientHello message, immediately following the last defined 
  141. field of the ClientHello message.  (For forward compatibility reasons, 
  142. the SSL 3.0 ClientHello message is allowed to contain data beyond its 
  143. defined fields, and because there is no ClientHelloDone message, the 
  144. server cannot know that an extra message follows the ClientHello unless 
  145. it is actually included in the ClientHello message itself.  A server 
  146. that does not support shared-key authentication will simply ignore the 
  147. extra data in the ClientHello message.)  Although enclosed within the 
  148. ClientHello, the SharedKeys message retains the normal structure and 
  149. headers of a Handshake message.   
  150.  
  151. The SharedKeys message contains a list of distinguished names of 
  152. authentication services to which the client is willing to authenticate.  
  153. This list need not be exhaustive; if the server cannot find an 
  154. acceptable authentication service from the list in the SharedKeys 
  155. message, then the server is free to reply with a list of acceptable 
  156. services in a subsequent SharedKeyRequest message.  
  157.  
  158. In cases where pass-through authentication is used, this message allows 
  159. clients to be able to notify servers in advance of one or more 
  160. authentication services sharing a key with the client, so that the 
  161. server need only fetch (or use up) a challenge from a single service for 
  162. that client.  This message may also be useful in non-pass-through 
  163. situations; for example, the client may share several keys with the 
  164. server, associated with identities on different systems (corresponding 
  165. to different "authentication services" residing on the same server).  
  166. If a server receives a SharedKeys message, then any subsequent 
  167. SharedKeyRequest message can contain a single authentication service 
  168. selected from the client's list.  
  169.  
  170. Note that sending a SharedKeys message does not in itself normally 
  171. reveal significant information about the client's as-yet-unspecified 
  172. identity or identities.  However, if information about the set of 
  173. authentication services supported by a particular client is at all 
  174. sensitive, then the client should not send this message.
  175.  
  176.  
  177. 3.2  SharedKeyRequest message
  178.  
  179. The SharedKeyRequest message has the following structure:
  180.  
  181. struct { 
  182.          DistinguishedName auth_service_name;
  183.          opaque display_string<0..65535>;
  184.          opaque challenge<0..255>;
  185. } AuthService;
  186.  
  187. struct {
  188.      AuthService auth_services_server<1..65535>;
  189. } SharedKeyRequest;
  190.  
  191. This optional message may be sent immediately following the server's 
  192. first set of consecutive messsages, which includes the ServerHello and 
  193. (possibly) the Certificate, CertificateRequest and ServerKeyExchange 
  194. messages, but before the ServerHelloDone message.  The 
  195. auth_services_server field contains a list of distinguished names of 
  196. shared-key authentication services by which the client can authenticate.  
  197. The challenge field accompanying each authentication service name 
  198. contains an optional extra authentication challenge, in case the server 
  199. needs to obtain one from an authentication service for pass-through 
  200. authentication.  If none is required, then it would simply be an empty 
  201. (zero-length) field.  Similarly, the display_string field may contain 
  202. information to be used (displayed to the user, for example) during 
  203. authentication, if needed; its interpretation is left to the 
  204. implementation. 
  205.  
  206.  
  207. 3.3  SharedKeyVerify message
  208.  
  209. The SharedKeyVerify message is sent in response to a SharedKeyRequest 
  210. message from the server, at the same point at which a CertificateVerify 
  211. message would be sent in response to a CertificateRequest message.  (If 
  212. both a CertificateRequest and a SharedKeyRequest are sent by the server, 
  213. then the client may respond with either a CertificateVerify message or a 
  214. SharedKeyVerify message.  Only one of the two messages is ever sent in 
  215. the same handshake, however.)  The SharedKeyVerify message has the 
  216. following structure:
  217.  
  218. struct {
  219.      AuthService auth_service;
  220.      opaque identity<1..65535>;
  221.      opaque shared_key_response<1..255>;
  222. } SharedKeyVerify;
  223.  
  224. The value of auth_service must be identical to one of the AuthService 
  225. values on the list in SharedKeyRequest.auth_services_server.  If the 
  226. client does not share a key with any of the authentication services 
  227. listed in the SharedKeyRequest message (and cannot supply a certificate 
  228. matching the requirements specified in the accompanying 
  229. CertificateRequest message, if one was sent), then the client returns a 
  230. "no certificate" alert message (in its normal place in the protocol).
  231.  
  232. The format of the identity field is left to the implementation, and must 
  233. be inferable from the accompanying value of auth_service.  The value of 
  234. shared_key_response is defined as
  235.  
  236. SharedKeyVerify.shared_key_response
  237.      hash (auth_write_secret + pad_2 + 
  238.             hash (auth_write_secret + pad_1 + hash (handshake_messages)                   
  239.                   + SharedKeyVerify.auth_service.auth_service_name
  240.                   + SharedKeyVerify.auth_service.display_string
  241.                   + SharedKeyVerify.auth_service.challenge
  242.                   + SharedKeyVerify.identity + shared_key) )
  243.      
  244. Here "+" denotes concatenation.  The hash function used (hash) is 
  245. taken from the pending cipher spec.  The client_auth_write_secret and 
  246. server_auth_write_secret values are obtained by extending the 
  247. key_block by CipherSpec.hash_size bytes beyond the server_write_key (or 
  248. the server_write_IV, if it is derived from key_block as well), and using 
  249. this extended portion as the client_auth_write_secret value.  (Only the 
  250. client_auth_write_secret is used, since only the client ever sends a 
  251. SharedKeyVerify message.)  The value of handshake_messages is the 
  252. concatenation of all handshake messages from the first one sent up to 
  253. (but not including) the shared_key_verify message.  The pad_1 and pad_2 
  254. values correspond to the ones used for MAC computation in the 
  255. application_data message.  The fields from the SharedKeyVerify message 
  256. are input with their length prefixes included.  
  257.  
  258.  
  259. 4.  Normal Authentication
  260.  
  261. A shared-key-based client authentication may proceed as follows:  the 
  262. client includes the TLS_AUTH_SHARED_KEY CipherSuite in its list of 
  263. CipherSuites in its ClientHello message.  It also may or may not send a 
  264. SharedKeys message along with the ClientHello message, listing the 
  265. authentication services with which the client shared a key for 
  266. authentication purposes.  In any event, the server sends a 
  267. SharedKeyRequest handshake message following the ServerHello and 
  268. accompanying messages containing a list of names of one or more 
  269. authentication services; if a SharedKeys message was sent, then this 
  270. list will contain a single choice from the client's SharedKeys message.  
  271. The client, on receiving the SharedKeyRequest message, selects an 
  272. authentication service from the server's list (if more than one is 
  273. offered) and constructs the appropriate authentication response as 
  274. described above, sending it back, along with its identity and choice of 
  275. authentication service, in a SharedKeyVerify handshake message.  The 
  276. server itself also constructs the correct authentication response using 
  277. the known shared key, and checks it against the one provided by the 
  278. client.  The authentication is successful if the two match exactly.  
  279. Note that if the shared key is password-based, then it would typically 
  280. be derived from the password using a one-way cryptographic hash 
  281. function, rather than being the password itself, so that the original 
  282. password need not be remembered by anyone but the client.
  283.  
  284.  
  285. 5.  Pass-through Authentication
  286.  
  287. In some circumstances, it is preferable for shared keys to be stored in 
  288. one place (a central, well-protected site, for instance) while servers 
  289. that actually communicate with clients are elsewhere (possibly widely 
  290. distributed, but maintaining secure connections to the central shared-
  291. key server).  One of the advantages of the shared-key authentication 
  292. method proposed here is that it allows "pass-through" authentication by 
  293. a third party, if the server accepting the public-key key exchange and 
  294. the server sharing the key with the client happen to be different.  (The 
  295. use of a separately derived authentication key in the response 
  296. computation makes this possible.)  
  297.  
  298. Pass-through authentication might work as follows:  The server would 
  299. either collect random challenges in advance from its authentication 
  300. services, or request them as needed.  (If the client sends a SharedKeys 
  301. message, then the server can select an authentication service from the 
  302. client's list, and obtain a challenge from that service alone.)  
  303. Assuming that the client indicates support for shared-key authentication 
  304. by including the TLS_AUTH_SHARED_KEY CipherSuite in its list, the server 
  305. would then send a list of one or more authentication services and 
  306. associated challenges in a SharedKeyRequest message.  The client would 
  307. then select an authentication service (if more than one is offered), 
  308. compute the correct authentication response using the above proposed 
  309. formula, and send it to the server in a SharedKeyVerify message.
  310.  
  311. The server, on receiving a response from a client, would pass it through 
  312. to the authentication service, along with the values necessary to 
  313. recalculate it:  the client_auth_write_key, the hash of all the 
  314. handshake messages and the identity field from the certificate verify 
  315. message.  The authentication service would then use the values provided, 
  316. along with the secret key it shares with the client and the challenge it 
  317. supplied, to reconstruct the correct value of the response.  If this 
  318. value exactly matches the one provided by the server, then the 
  319. authentication would succeed; otherwise it would fail.  
  320.  
  321.  
  322. References
  323.  
  324. [1]  K. Hickman and T. Elgamal, "The SSL Protocol", Internet Draft 
  325. <draft-hickman-netscape-ssl-01.txt> (deleted), February 1995.
  326.  
  327. [2]  A. Freier, P. Karlton and P. Kocher, "The SSL Protocol Version 
  328. 3.0", Internet Draft <draft-freier-ssl-version3-01.txt>, March 1996.
  329.  
  330. [3]  J. Benaloh, B. Lampson, D. Simon, T. Spies and B. Yee, The PCT 
  331. Protocol", Internet Draft <draft-benaloh-pct-00.txt>, November 1995.  
  332.  
  333.  
  334. Author's Address
  335.  
  336. Daniel Simon <dansimon@microsoft.com>
  337.  
  338.  
  339. Microsoft Corporation 
  340. One Microsoft Way
  341. Redmond, WA  98052
  342. Phone: (206) 936-6711
  343. Fax:   (206) 936-7329
  344.  
  345.  
  346. Draft-ietf-tls-passauth-00.txt
  347. November 20, 1996
  348. Expires:  May 25, 1997
  349.