With the advent of radio, over which communication is inherently public, it became even more necessary to protect messages by scrambling them mathematically---cryptography. "Wireless" radio was a destabilizing military technology: for example, it enabled ships at sea to communicate as easily as by telegraph, which made large-scale coordinated naval warfare possible. Thus it was equally necessary to figure out how to unscramble the enemy's messages---cryptoanalysis.
Cryptography and cryptoanalysis created productive employment for generations of talented mathematicians. Even today it is not widely recognized that Polish, British, and American mathematicians successfully compromised German and Japanese military cryptography in the World Wars. This was an important factor in key battles, including the Battle of Britain, the Battle of the Atlantic, Midway, and the Normandy D-Day invasion.
Among these mathematicians was Alan Turing, who laid the foundations of modern computer science at Cambridge in the 1930s before joining the British military as its leading codebreaker in the fight against Fascism. Tragically, Turing died by his own hand in disgrace in 1954 after being exposed and persecuted as a homosexual. His true contribution to his country was kept hidden as a British military secret until years after his death.
The Code Book