13

This article is about Ken Thompson's old Unix password hash being cracked. One line in the article intrigues:

"Even an exhaustive search over all lower-case letters and digits took several days (back in 2014) and yielded no result," wrote Neukirchen, who wondered whether Thompson might somehow have used uppercase or special characters.

(emphasis mine)

Was there some reason why Ken Thompson would not have been able to use uppercase or special characters? The word "somehow" suggests that it wasn't easily done.

2
  • 1
    To answer the title: Yes, any character could be used. (Just as comment, because too short, but more important, Stephen answers quite well the question behind the question)
    – Raffzahn
    Oct 10, 2019 at 10:01
  • 4
    At the OS level, yes you could - but many terminals had a much more restricted repertoire, thereby making those characters less useful to many users. Oct 10, 2019 at 16:12

2 Answers 2

28

In later versions of Unix, Ken Thompson would most certainly have been able to use upper-case characters but it's unclear whether he would have wanted to. It's not that Unix itself prevented it, but rather that there were still plenty of terminals at that time that supported only the 64-character ASCII character set, which were upper-case only.

The "7th Edition UNIX - Summary" document found in the 7th edition programmer's manual (volume 2) listed the hardware requirements for v7 Unix and stated that "full duplex 96- character ASCII terminals" were "strongly recommended" (i.e., not "required").

Similarly, in "UNIX For Beginners - Second Edition" (Kernighan, 1978) it's stated:

But note: UNIX is strongly oriented towards devices with lower case. If your terminal produces only upper case (e.g., model 33 Teletype, some video and portable terminals), life will be so difficult that you should look for another terminal.

Unix was able to deal with such terminals by converting upper-case to lower-case, effectively turning that terminal into a lower-case-only device, so that Unix interpreted everything as lower-case, even if the user was seeing it in upper-case. It was possible in these situations to tell Unix to treat certain characters as upper-case by using a special escape sequence (namely, a backslash), but it was a nuisance.

Given the strong possibility that Ken Thompson might find himself logging on to a Unix system on, say, a Teletype Model 33, it would have made sense for him to avoid upper-case characters in his own password, simply to avoid the nuisance of using escape sequences.

Note that in very early versions of Unix (e.g. 1st through 3rd editions) the console Teletype was always mapped to lower-case (i.e. it was not possible to type upper-case characters at the console), and given that Ken Thompson would have been one of the people likely to use the console typewriter, there would have been a technical obstacle preventing him from using upper-case characters in his password, at least in those early versions.

7
  • 8
    To some extent that’s still the case nowadays — you probably wouldn’t use ‘é’, ‘ß’, etc. in a password if you use US keyboards ;-). Oct 10, 2019 at 21:09
  • Unix file names - including the commands - were case sensitive* and the commands exclusively used lower case. Unix would have been completely unusable without the ability to either type lower case letters or have the terminal driver convert upper case to lower case.
    – JeremyP
    Oct 11, 2019 at 9:23
  • * actually, it depends on the file system, Apple's file system is case insensitive, for example, but in the early days, Unix file systems were always case sensitive.
    – JeremyP
    Oct 11, 2019 at 9:26
  • @JeremyP Both HFS+ and APFS can be case-sensitive, and I think they actually default to being case-sensitive these days. And when not case-sensitive, they are case-preserving rather than case-insensitive (i.e. you can't have two files foo and fOo in a directory, but if you have just fOo, it won't be renamed to foo or FOO.
    – 8bittree
    Oct 11, 2019 at 17:46
  • 1
    Fun fact, you can still enable the lower-to-upper conversion on linux today using e.g. the stty utility: stty olcuc. Note: This will mess up your shell. Oct 12, 2019 at 10:24
15

Yes, you could use uppercase and special characters in passwords in early Unix.

No, there was no Unix-related reason Ken Thompson wouldn’t have been able to use uppercase or special characters. Many of the passwords found in 2014 used special characters; none used uppercase, which doesn’t say anything about the original password requirements, only about the search parameters for the hashing tool used in 2014. When attempting to crack passwords, you have to start somewhere; Leah Neukirchen got interesting results with only lowercase characters, numbers, and a few special characters (at least ‘/’, ‘.’, ‘,’, ‘!’, ‘%’, and ‘;’). Adding uppercase characters would have significantly added to the time required.

It turns out Ken’s password did only use lowercase characters (and numbers and special characters), so Leah Neukirchen’s probably mis-remembered the search space used in 2014 — adding ‘-’ to the mix of characters would have found it.

3
  • 6
    He was fine with lowercase characters in general. It was vowels he didn't use.
    – davidbak
    Oct 10, 2019 at 18:02
  • I don't understand. The message says ken is done: and is followed by a string of uppercase letters, lowercase letters, digits, and symbols.
    – CJ Dennis
    Oct 12, 2019 at 23:29
  • @CJ the message gives the password hash followed by a colon and the password itself. Oct 13, 2019 at 6:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .