The vulnerability of Japanese naval codes and ciphers was crucial to the conduct of World War II, and had an important influence on foreign relations between Japan and the west in the years leading up to the war as well. Every Japanese code was eventually broken, and the intelligence gathered made possible such operations as the victorious American ambush of the Japanese Navy at Midway in 1942 (by breaking code JN-25b) and the shooting down of Japanese admiral Isoroku Yamamoto a year later in Operation Vengeance.