Early operating systems generally didn't encrypt passwords, they generally depended on file access controls to prevent most users from reading the password file. However, this meant that the system administrator could read passwords; also, OS and application bugs could accidentally expose passwords (a well known example is in the document linked below).
Unix
According to the November 1979 article "Password Security: A Case History" in Communications of the ACM the first password security method on Unix was a simulation of the M-209 cipher machine, which was patented in 1937. The Article is noted to be received by the editor in August 1978, so that method might have been implemented prior to August 1978. From a history of Unix passwd(5) documentation, it appears that encryption was added sometime in V2 or V3, since the V1 documentation doesn't mention passwords being encrypted.
As with the later DES scheme, rather than treating the password as plaintext and encrypting with a constant key, they encrypt a constant plaintext using the user's password as the key. Using a constant key risks allowing all the passwords to be decrypted if it's discovered; using the password as the key requires a brute-force method of cracking passwords.
However, at the time they didn't salt the passwords, so the search space was relatively small and rainbow tables were feasible. The above paper has a table showing how long it would take to crack these passwords.
Multics
You can read a history of Multics security at How the Air Force cracked Multics Security. It doesn't have specific dates for the changes to password management, though.
On the Multicians mailing list, Chris Tavares said that until about 1970 passwords were cleartext and protected by an ACL that limited access to the SysDaemon and SysAdmin groups; SysDaemon was used by the login process, and SysAdmin was used for editing.
In 1971, Tom Van Vleck implemented a one-way encryption method. This algorithm is described in MULTICS SECURITY EVALUATION:
PASSWORD AND FILE ENCRYPTION TECHNIQUES (warning, this is a 47-page non-OCRed PDF, so it takes a while to load), along with a listing of the PL/I implementation. The algorithm was:
The Multics scrambler works by first compressing the 8 Multics-ASCII character password from 72 to 56 bits by removing the high-order two bits (always zero in the 9 bit Multics representation of 7 bit ASCII characters) from each character. If the password is less than 8 characters in length, blanks were added to make it 8 characters long. The resulting compressed password, called p, is then multiplied by its own low-order 16 bits, then reduced modulo 10**19 - 1.
(I think the description "I squared each password and ANDed with a mask to discard some bits" is misremembering the details.)
This was easily cracked, though, as explained in the second paper. In 1973, the step after removing the high-order two bits was replaced with a call to the encipher_() assembly function that can be found here. This was written by Roger Schell, an Air Force security expert who was leading the project to add military-grade security to Multics (this project also resulted in mandatory access control, called Access Isolation Mechanism, analogous to modern SELinux). Rather than using the password to encrypt a constant text, it uses the password as both the key and text when calling encipher_().
A listing of the scramble_() procedure can be found here. It has comments documenting the timeline:
39* Revised 5/21/73, THVV, for new algorithm.
40* THVV 10/30/71
The 1971 date was the original, easily-inverted algorithm, 1973 was when it was updated to call encipher_().
So far I have yet to find an English description of the bit twiddling algorithm in encipher_().
cryptcommand on Unix was using the enigma cypher without knowing it was broken long ago. Using encryption at that time for civil use was restricted, and their were fear enigma would be too strong to be legal. – user2284570 Mar 05 '24 at 14:58cryptthat I ever saw there was a clear warning that the enigma algorithm was too weak to protect data from a determined attacker. It seems hard to believe that anybody who ever heard of "enigma cypher" or "Alan Turing" would not know that enigma had been broken during WWII. – Solomon Slow Mar 05 '24 at 22:21cryptfirst was implemented. There were concerns about the legality of exportingcryptat the time when Linux was new, but that was around two decades after the time when Unix was new. The RSA cypher had not been invented when Unix was new. There was no well known form of encryption that the NSA* was worried about back in those days. – Solomon Slow Mar 05 '24 at 22:26manpages that I remember reading had been updated by then. [*Also, I guess, that's two years after RSA was invented. Still, it's a few years before everybody and his brother were exchanging email messages and posting on BBS forums and, before anybody worried about mathematical cryptography becoming available to "the terrorists." – Solomon Slow Mar 06 '24 at 00:06