Was encryption regulated in history?

by __pragma__

In the past few decades, computers have made it much easier for ordinary people to access strong cryptography. Some countries have responded with legislation that restricts private access to cryptography.

What about in history? Prior to the 1970s, were there any examples of jurisdictions placing restrictions on secret codes, ciphers or whatnot?

mtaw

Cipher technology has been kept secret since the start of its use as its uses were originally primarily for military and diplomatic communications. Strong cryptography has been regulated among western countries through the international COCOM agreement since the 1940s. Although only NATO members and Australia were formally members of CoCom the rest complied with it for threat of trade embargoes. In the 1990s CoCom was replaced with the so-called Wassenaar Arrangement.