Dennis Boone wrote:
Original Bell unix stored unencrypted passwords. The
first hashed
password storage used the M-209 rotor machine emulation which already
existed in unix somewhere. As with the DES hash which came shortly
after, the M-209 setup used the password as the key and encrypted a
fixed data pattern. I don't know if the M-209 variant salted.
IIRC it didn't.
This would explain why John The Ripper spat out the hash as invalid...
Last I
checked, the DES version used a block of zeros as the data, dunno yet
about M-209.
I haven't managed to find a C implementation of the M209 cipher.
Apparently DES was introduced around 1976, so anything older than that
should include an implementation.
I've raided Google Code Search and TUHS and come up with...
--- DES algorithm, in C ---
the source to crypt(3) from 7th Edition Unix:
http://google.com/codesearch/p#118goTAkg2o/usr/src/libc/gen/crypt.c
And passwd.c from the same:
http://google.com/codesearch/p#miRTe8ZyR0o/Archive/PDP-11/Distributions/res…
--- M209 rotor algorithm? ---
This is passwd from V6:
http://google.com/codesearch/p#miRTe8ZyR0o/Archive/PDP-11/Distributions/res…
And the password encoding function, in PDP11 assembler by the looks of
things:
http://google.com/codesearch/p#miRTe8ZyR0o/Archive/PDP-11/Distributions/res…
Any PDP11 experts want to convert that into C?
--
Phil.
classiccmp at philpem.me.uk
http://www.philpem.me.uk/