home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / crypt / 2789 < prev    next >
Encoding:
Text File  |  1992-07-30  |  2.0 KB  |  53 lines

  1. Newsgroups: sci.crypt
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!ubc-cs!newsserver.sfu.ca!erick
  3. From: erick@fraser.sfu.ca (Erick Bryce Wong)
  4. Subject: Re: choosing passwords (was: Re: Crypt should be based on MD5)
  5. Message-ID: <1992Jul30.214032.21982@sfu.ca>
  6. Sender: news@sfu.ca
  7. Organization: Simon Fraser University, Burnaby, B.C., Canada
  8. References: <yZoioB1w165w@elrond.toppoint.de> <1992Jul26.202154.15664@sfu.ca> <8350@amsaa-cleo.brl.mil>
  9. Date: Thu, 30 Jul 1992 21:40:32 GMT
  10. Lines: 41
  11.  
  12. hagadorn@amsaa-cleo.brl.mil (Thomas Hagadorn) writes:
  13. >erick@fraser.sfu.ca (Erick Bryce Wong) writes:
  14. >|freitag@elrond.toppoint.de (Claus Schoenleber) writes:
  15. >|>[a  is digit a at position i, i=10 is leftmost]
  16.                                  ^^^^
  17. >|>     [         / 10         \          ]
  18. >|>     |        /  __          \         |
  19. >|>c =  | 11 -  (   \   a  * i   ) mod 11 | mod 11
  20. >|>     |        \  /_   i      /         |
  21. >|>     [         \ i=2        /          ]
  22. >|
  23. >|You can put this in slightly simpler terms if you define i=1 to be the leftmo
  24.                                                            ^^^
  25. >|       / #digits    \  
  26. >|      /  __          \ 
  27. >|c =  (   \   a  * i   ) mod 11
  28. >|      \  /_   i      / 
  29. >|       \ i=1        /  
  30. >|
  31. >   Almost, make that:
  32. >
  33. >            / #digits    \  
  34. >           /  __          \ 
  35. >11 - c =  (   \   a  * i   ) mod 11
  36. >           \  /_   i      / 
  37. >            \ i=1        /  
  38.  
  39. You apparently didn't read both articles carefully.  If the original formula
  40. is correct, then (using pseudo-TeX notation to cut the size down a bit):
  41. (I'll use the same meanings for a_i and i as the original article.)
  42.  
  43. 11 - \sum_2^10{a_i * i} == - \sum_2^10{a_i * i}
  44.                         == \sum_2^10{a_i * {-i}}
  45.                         == \sum_2^10{a_i * {11-i}}
  46.                         == \sum_1^9{a_{11-i} * i} (mod 11).
  47.  
  48. Which is exactly what my formula corresponds to, as I define the leftmost
  49. position to be 1 with the rest ascending, not 10 with the rest descending.
  50.  
  51. -- 
  52.  -- Erick, the perfect square  :-)
  53.