home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / sci / crypt / 3680 < prev    next >
Encoding:
Internet Message Format  |  1992-10-08  |  3.3 KB

  1. Path: sparky!uunet!mcsun!sunic!dkuug!uts!unijbm
  2. From: unijbm@uts.uni-c.dk (J|rgen B. Madsen)
  3. Newsgroups: sci.crypt
  4. Subject: Re: Just what is the DES crypt()
  5. Message-ID: <1992Oct8.114312.13564@uts.uni-c.dk>
  6. Date: 8 Oct 92 11:43:12 GMT
  7. References: <9210080452.AA12560@deepthought.cs.utexas.edu>
  8. Organization: UNI-C, Danish Computing Centre for Research and Education
  9. Lines: 70
  10.  
  11. In <9210080452.AA12560@deepthought.cs.utexas.edu> STDN%MARIST@VM.MARIST.EDU (Dan Newcombe) writes:
  12.  
  13. >Well , the subject really says it...
  14.  
  15. >  what is this DES crypt function, and why is it so important?
  16.  
  17. >Sorry for being ignorant.
  18. >  -Dan
  19.  
  20. I have a description from Michael Glad in Denmark:
  21.  
  22.  
  23. To represent binary values at encrypted password and the encryption salts,
  24. the UNIX crypt algorithm uses at 6 bit character set, i.e. a mapping of the
  25. integers 0..63 to ASCII characters. The mapping is
  26.  
  27.     ./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  28.  
  29. Salt values have to be in this set. The salt characters are converted one at a
  30. time giving two 6 bit values. They are combined to a 12 bit entity where the
  31. 6 bit representing the first salt character gets shifted by 6. The 12 bit value
  32. is then used to swap entries in the E selection table. The entries with
  33. index 0..11 are permuted with the entries with index 12..33 according to bits
  34. set in the salt value. The entries in the table specify a selection, the table
  35. has 48 entries with values in the range 1..32 meaning that a 32 bit value is
  36. expanded to 48 bit.
  37.  
  38. The 6 bit representation is also used to pack the output of the 25 DES round.
  39. DES output is 64 bits. Two implicit zero bits are then added giving 66 bits.
  40. These bits are then converted to ASCII 6 bits a time giving 11 characters.
  41. Being prefixed with the two salt characters, we get 13 chars alltogether.
  42.  
  43. The password is used to give the DES key using 7 bits per character. Passwords
  44. shorter than 8 bytes are padded with zero bytes.
  45.  
  46. The salting (and the conventions for representing output) are the only changes
  47. made to DES. 
  48.  
  49. Fast implementations are available. Just to mention one random chosen :-),
  50. UFC-crypt is a package which fits nicely into Crack (it is mentioned in the Crack
  51. docs. It is availble for anon. ftp from many sites, also from 'ftp.daimi.aau.dk'
  52. in 'pub/ufc-crypt.pl1e.tar.Z'. It may appear a little hard to understand unless
  53. you've studied the DES standard closely.
  54.  
  55. The password encryption is the same in virtually all UNIX versions.
  56. The 'Berkeley Crypt' supports 24 bits salts (simple extension) but this is not
  57. in common use. Digital has a 'Enhanced security option' which used a 'crypt16'
  58. function. UFC implements it too. It was recently made to mincemeat in a discussion
  59. in alt.security.
  60.  
  61. I hope I've clarified things a little. You're welcome to contact me if you have
  62. further questions.
  63.  
  64. Sincerely,
  65.  
  66.     -- Michael Glad, email: glad@daimi.aau.dk
  67.  
  68.  
  69.  
  70. Regards,
  71. Jorgen Bo Madsen
  72.  
  73. +-----------------------------------------------------------------------+
  74. !   Jorgen Bo Madsen,  Security Consultant                !
  75. !   UNI-C Lyngby,  Danish Computing Centre for Research and Education    !
  76. !   DTH,  Building 305,  DK - 2800 Lyngby                !
  77. !   Phone  : +45-45-938355                        !
  78. !   Telefax: +45-45-930220                        !
  79. !   E-Mail : Jorgen.Bo.Madsen@uni-c.dk                    !
  80. +-----------------------------------------------------------------------+
  81.