home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / general / passch.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  10.2 KB  |  237 lines

  1. Newsgroups: sci.crypt
  2. Path: netcom.com!grady
  3. From: grady@netcom.com (Grady Ward)
  4. Subject: Passphrase proto-FAQ
  5. Message-ID: <gradyCBIx4n.6n8@netcom.com>
  6. Organization: Moby lexicons
  7. X-Newsreader: TIN [version 1.1 PL8]
  8. Date: Tue, 10 Aug 1993 03:17:11 GMT
  9. Lines: 224
  10.  
  11. FAQ: How do I choose a good password or phrase?
  12.  
  13.  
  14. ANS: shocking nonsense makes the most sense
  15.  
  16.     With the intrinsic strength of some of the modern 
  17. encryption, authentication, and message digest algorithms 
  18. such as RSA, MD5, SHS and IDEA the user password or phrase 
  19. is becoming more and more the focus of vulnerability.
  20.  
  21.     Considering even the early PGP 1.0 application for example, 
  22. a Deputy with the Los Angeles Country Sheriff's Department 
  23. admitted in early 1993 that both they and the FBI despaired 
  24. of breaking the system except through a successful 
  25. dictionary attack (trying many possible passwords or 
  26. phrases from lists of probable choices and their 
  27. variations) rather than "breaking" the underlying 
  28. cryptographic algorithm mathematically.
  29.  
  30.     The fundamental reason why attacking or trying to 
  31. guess the user's password or phrase will increasingly be 
  32. the focus of cryptanalysis is that the user's choice of 
  33. password may represent a much simpler cryptographic key 
  34. than optimal for the encryption algorithm. This weakness of 
  35. the user's password choice provides the cryptanalytic 
  36. wedge.
  37.  
  38.     For example, suppose a user chooses the password 
  39. 'david.' On the surface the entropy of this key (or the 
  40. number of different equiprobable key states) appears to be 
  41. five characters chosen from a set of twenty-six with 
  42. replacements: 26^5 or 1.188 x 10^7. But since the user is 
  43. apparently biased toward common given names, which a 
  44. majority appear in lists numbering only 6,000-7,000 
  45. entries, the true entropy is undoubtedly much closer to 6.5 
  46. x 10^3, or about four orders of magnitude smaller than the 
  47. raw length might suggest. (In fact this password probably 
  48. possesses a much smaller entropy than even this for the 
  49. very common name "david" would be one of the first names to 
  50. be checked by an optimized dictionary attack program.) In 
  51. other words, "entropy" is not a fixed physical quantity: 
  52. the cryptanalyst can exploit whole meanings and contexts, 
  53. not just byte frequencies, digraphs, or even whole-word 
  54. correlations to reduce the entropy of the key space he or 
  55. she is trying to explore.
  56.  
  57.     To thwart this avenue of attack we would like to 
  58. discover a method of selecting passwords or phrases that 
  59. have at least as many bits of entropy (or "hard-to-
  60. guessness") as the entropy of the cryptographic key of the 
  61. underlying algorithm being used.
  62.  
  63.     To compare, DES (Data Encryption Standard) is believed 
  64. to have about 54-55 bits (~4 x 10 ^16) of entropy while the 
  65. IDEA algorithm is believed to have about 128 bits (~3.5 x 
  66. 10^38) of entropy. The closer the entropy of the user's 
  67. password or phrase is to the intrinsic entropy of the 
  68. cryptographic key of the underlying algorithm being used, 
  69. the more likely an attacker would need to search a 
  70. substantially larger portion of the algorithm's key space 
  71. in order to discover it.
  72.  
  73.     Unfortunately many documents suggest choosing 
  74. passwords or phrases that are distinctly inferior to the 
  75. latest methods. For example, one white paper widely 
  76. archived on the internet suggests selecting an original 
  77. password by constructing an acronym from a popular song 
  78. lyric or from a line of script from, for example, the SF 
  79. movie "Star Wars". Both of these ideas turn out to be weak 
  80. because both the entire script to Stars Wars and entire 
  81. sets of song lyrics to thousands of popular songs are 
  82. available on-line to everyone and, in some case, are 
  83. already embedded into "crack" dictionary attack programs.
  84.  
  85.     However the conflict between choosing an easy-to-
  86. remember key and choosing a key with a high level of 
  87. entropy is not a hopeless task if we exploit mnemonic 
  88. devices that have been known for a long time outside the 
  89. field of cryptography. With the goal of making up a 
  90. passphrase not included in any existing corpus yet very 
  91. easy to remember, an effective technique the one known as 
  92. "shocking nonsense."
  93.  
  94.     "Shocking nonsense" means to make up a short phrase or 
  95. sentence that is both nonsensical and shocking in the 
  96. culture of the user, that is, it contains grossly obscene, 
  97. racist or impossible or other extreme juxtaposition of 
  98. ideas. This technique is permissable because the 
  99. passphrase, by its nature, ought never to be revealed to 
  100. anyone with sensibilities to be offended.
  101.  
  102.     Further, shocking nonsense is unlikely to be 
  103. duplicated anywhere because it does not describe a matter-
  104. of-fact that could be accidentally rediscovered by anyone 
  105. else and the emotional evocation makes it difficult for the 
  106. creator to forget. A relatively mild example of such 
  107. shocking nonsense might be: "mollusks peck my galloping 
  108. genitals ." The reader can undoubtedly make up many far 
  109. more shocking examples for himself or herself...
  110.  
  111.     Even relatively short phrases offer acceptable entropy 
  112. because the far larger "alphabet" pool of word symbols that 
  113. may be chosen than characters form the Roman alphabet. Even 
  114. choosing from a vocabulary of a few thousand words a five 
  115. word phrase might have on the order of 58 to 60 bits of 
  116. entropy -- more than what is needed for the DES algorithm, 
  117. for example. If in the case an entire phrase cannot be used 
  118. because the password is restricted to, say, eight 
  119. alphanumeric characters, concatenating the first letters of 
  120. a suitable shocking nonsense passphrase should usually give 
  121. a better than reasonable starting point if followed by 
  122. adding numeric and non-alphabetic characters.
  123.  
  124.     When you are permitted to use passphrases of arbitrary 
  125. length (in PGP for example) it is not necessary to further 
  126. perturb your 'shocking nonsense' passphrase to include 
  127. numbers or special symbols because the pool of word choices 
  128. is already very high. Not needing those special symbols or 
  129. numbers (that are not intrinsically meaningful) makes the 
  130. shocking nonsense passphrase that much easier to remember.
  131.  
  132.  
  133. Appendix A.  For software developers
  134.  
  135.     For software developers designing "front-ends" or user 
  136. interfaces to conventional short-password applications, 
  137. very good results will come from permitting the user 
  138. arbitrary length passphrases that are then "crunched" or 
  139. processed using a strong digest algorithm such as the 160-
  140. bit SHS (Secure Hash Standard) or the 128-bit MD5 (Message 
  141. Digest rev. 5). The interface program then chooses the 
  142. appropriate number of bits from the digest and supplies 
  143. them to the engine enforcing a short password. This 'key 
  144. crunching' technique will assure the developer that even 
  145. the short password key space will have a far greater 
  146. opportunity of being fully exploited by the user.
  147.  
  148.  
  149. Appendix B. A tool to experimentally investigate entropy
  150.  
  151.     A practical Unix tool for investigating the entropy of 
  152. typical user keys can be found in Wu and Manber's 'agrep' 
  153. (approximate grep) similarity pattern matching tool 
  154. available in C source from cs.arizona.edu [192.12.69.5]. 
  155. This tool can determine the "edit distance," that is, the 
  156. number of insertions, substitutions, or deletions that 
  157. would be required of an arbitrary pattern in order for it 
  158. to match any of a large corpus of words or phrases, say the 
  159. usr/dict word list, or over the set of Star Trek trivia 
  160. archives. The user can then adjust the pattern to give an 
  161. arbitrary high threshold difference between it and common 
  162. words and phrases in the corpus to make crack programs that 
  163. systematically vary known strings less likely to succeed. 
  164. It is often surprising to discover that a substring pattern 
  165. like "hxirtes" is only of edit distance two from as many as 
  166. forty separate words ranging from "bushfires" to "whitest." 
  167. Certainly no password or phrase ought to be chosen as a 
  168. working password or phrase that is within two or fewer edit 
  169. distance from a known string or substring in any on-line 
  170. collection.
  171.  
  172.  
  173. select references
  174.  
  175. [selection and of passwords in differing threat 
  176. environments]
  177. Department of Defense Password Management Guideline
  178. CSC-STD-002-85
  179. published by the Computer Security Center of the Department 
  180. of Defense Fort George G. Meade, MD 20755
  181.  
  182. [discovering weak passwords]
  183. The COPS Security Checker System by D. Farmer, E. Spafford
  184. Purdue University Technical Report CSD-TR-993
  185. West Lafayette, IN 47907
  186.  
  187. [an example of automated key cracking]
  188. With Microscope and Tweezers:
  189. An Analysis of the Internet Virus of 1988
  190. by M. Eichin, J. Rochlis, Massachusetts Institute of 
  191. Technology Cambridge, MA 02139
  192.  
  193. [password vulnerabilities in distributed systems]
  194. Computer Emergency Response - An International Problem
  195. by R. Pethia, K. van Wyk CERT/Software Engineering 
  196. Institute
  197. Carnegie Mellon University, Pittsburgh, PA 15213
  198.  
  199. [key metrics and the MD5 message digest algorithm]
  200. Answers to Frequently Asked Questions About Today's 
  201. Cryptography by Paul Fahn
  202. RSA Laboratories, Redwood City, CA 94065
  203. (available through anonymous FTP from rsa.com)
  204.  
  205. [implementation details of the MD5 message digest 
  206. algorithm]
  207. RFC-1321 ('request for comments') The MD5 algorithm
  208. by R. Rivest MIT Center for Computer Science
  209. (available on the internet from gatekeeper.dec.com)
  210.  
  211. [implementation details of the NIST Secure Hash Standard]
  212. The Secure Hash Standard (SHS) Specification, Jan 1992 
  213. DRAFT
  214. Federal Information Processing Standards Publication YY
  215. Director, Computer Systems Laboratory
  216. National Institute of Standards and Technology
  217. Gaithersburg, MD 20899
  218. (The SHS was approved as a Federal Standard in May, 1993)
  219.  
  220. [other possible approaches to password generation]
  221. Automated Password Generator, NIST publication ????
  222. Director, Computer Systems Laboratory
  223. National Institute of Standards and Technology
  224. Gaithersburg, MD 20899
  225. (a pronounceable password algorithm using DES)
  226.  
  227. v 1.0 alpha
  228. comments on this FAQ are solicited; e-mail grady@netcom.com
  229.  
  230. -- 
  231. grady@netcom.com  voice/fax (707) 826-7715 
  232. compiler of Moby lexical databases, including
  233. Moby Part-of-Speech, second edition: 230,000 entries, priority marked 
  234. finger grady@netcom.com or e-mail for more information.
  235.  
  236. --
  237.