JN-25 is the name used by Western crypto organizations for the main secure communications scheme used by the Japanese Imperial Navy during and before WWII. It was a superencyphered code, producing 5 numeral groups as the traffic which was actually broadcast. It was frequently revised during its lifetime. New code books were introduced and new superencryption books were also introduced. In particular, JN-25 was significantly changed just before the Pearl Harbor attack in December 1941. It was the version of JN-25 introduced immediately before the Pearl Harbor Attack which was sufficiently broken to provide the forewarning which led to the US victory at the Battle of Midway. The British and Americans cooperated on attacks against JN-25 in the period leading up to the Pearl Harbor attack, but the credible public accounts agree that the version in use before December 1941 was not more than perhaps 10% broken at the time of the attack.

Note that the Purple cypher used by the Japanese Foreign Office as its most secure system had no connection with any version of JN-25, or indeed any of the encryption systems used by the Japanese military before or during the War.

See also: cryptography, Pearl Harbor attack, Purple code, Battle of Midway