In December 1941 a fleet of Japanese aircraft carriers struck at Pearl Harbor in Hawaii. Their planes decimated the battleships of Battleship Row and wiped out hundreds of U.S. aircraft on the ground. However, four U.S. carriers remained out of reach, along with Station HYPO which was also in Hawaii.

While Japan were victorious in 1941, the survival of the aircraft carriers had ensured further naval battles with the United States in 1942. These aircraft carriers of the U.S. Pacific Fleet would be influential in the United States' eventual victory in the Pacific. Firstly, they were in action in the Battle of Coral Sea which ensured that Port Moresby remained with the Allies. Although the loss of the Lexington was a blow, the USS Yorktown was quickly repaired for further operations and naval battles.

However, aside from the surviving aircraft carriers the team of U.S. cryptanalysts at Station HYPO were almost as influential in the battles that would follow. Before Pearl Harbor, Rochefort's team had been the front-line of code breakers in the Pacific that cracked the Japanese navy code JN – 25 in 1942. With JN – 25 traffic effectively deciphered, Station HYPO began to filter through further details on potential Japanese operations in the Pacific.

In the spring of 1942, the code breakers at Station HYPO intercepted Japanese plans for an advance towards Midway Island. The code breakers discovered that the Japanese were targeting AF. Rochefort suggested that AF was geographically Midway Island, although still needed something to further highlight that was the case.

As such, he set up a ploy in which Midway Island reported water shortages to Pearl Harbor in plain text. That was entirely false, although as Midway Island lacked a natural water supply such reports of a blown up water filtration plant at Midway remained reasonably convincing. This was intercepted by the Japanese, and they also reported that water shortages were at AF. U.S. interceptors picked up on this broadcast, and so this effectively proved to the U.S. military that AF was Midway Island as Rochefort had stated.

Rochefort informed Admiral Nimitz. Nimitz was given clear and accurate details of the Japanese fleet approaching Midway, and a date of when they would arrive to occupy Midway. Yamamoto's plan was falling apart before the IJN had even reached Midway, as it needed its fleet to remain undetected by the Americans before reaching Midway Island.

Nimitz gave the go-ahead for a fleet of three U.S. aircraft, alongside supporting warships, to rendezvous at a point almost 400 miles to the northeast of Midway Island. This fleet of aircraft carriers were clear on what they were looking for, and soon found their targets in the Pacific. At Midway Island, the aircraft stationed there were also clear about the imminent Japanese airstrike which duly came on June 4. As such, they were not caught on the ground when the Japanese aircraft approached.

In the battle that followed the United States emerged victorious as U.S. bombers wiped out four Japanese aircraft carriers. The United States had lost the Yorktown, but it was still a great victory. Rochefort and the cryptanalysts had effectively deciphered and forecast the Japanese operation at Midway which gave the U.S. Navy a crucial advantage in the Battle of Midway.  Had they not done so, then the Japanese operation at Midway might have been more effective.