A cryptanalyst deciphers coded messages. In 1941, cryptanalyst Colonel William Friedman had deciphered the Japanese diplomatic code, so American leaders knew a Japanese attack was imminent. They expected it to be in the Philippines or Southeast Asia, not Pearl Harbor.