Code as speech is the legal and philosophical doctrine in the United States that computer source code and similar digital expressions are forms of speech protected by the First Amendment. The idea emerged prominently during the "crypto wars" in the 1990s, when the courts disputed the U.S. government's notion that encryption software constituted munitions, instead recognizing code's expressive function in cases such as Bernstein v. United States. Since then, debates over encryption, privacy tools, cryptocurrency, and 3D-printed gun files have continued to test the boundaries of how law treats code as a medium of expression and continues to be the subject of legal and scholarly debate.
History
Encryption as munitions
In 1977, controversy arose over the application of U.S. export controls to academic research in cryptography, after a member of the National Security Agency sent a letter to the Institute of Electrical and Electronics Engineers (IEEE) warning that the presentation material at a Cornell cryptography conference might violate weapons export regulations. In the early 1990s, the U.S. government started to more actively enforce that strong encryption software was a munition under export regulations, meaning it could not legally be shared overseas without a license. This classification of encryption as munitions was strongly opposed by computer scientists as well as civil liberties, privacy advocates, and cypherpunks who argued that encryption algorithms were mathematical ideas and publishing source code should be protected as speech. Activists printed cryptographic source code on T-shirts as a protest against U.S. encryption export restrictions. Adam Back's "Munitions T-shirt", for example, displayed a short implementation of RSA, intended to demonstrate the implications of treating encryption software as export-controlled munitions.
Bernstein v. United States
In the mid-1990s Bernstein v. United States, mathematician Daniel J. Bernstein challenged U.S. export controls that restricted him from publishing Snuffle, an encryption system he had developed. Bernstein argued that the regulations constituted an unconstitutional restriction on his ability to publish and discuss cryptographic research. Bernstein was represented by the Electronic Frontier Foundation (EFF), which has since played a major role in digital free speech litigation. The federal district court held that Bernstein's encryption source code constituted speech protected by the First Amendment, reasoning that, "Like music and mathematical equations, computer language is just that, language, and it communicates information either to a computer or to those who can read it." In 1999, a three-judge panel of the Ninth Circuit affirmed the judgment, concluding that encryption source code could constitute expression protected by the First Amendment. The Ninth Circuit subsequently granted rehearing en banc and withdrew the panel opinion. Although the Ninth Circuit opinion in Bernstein was withdrawn, the case became an important part of the legal debate over whether computer source code constitutes speech protected by the First Amendment.
Apple, the FBI, and compelled speech
In 2016, the FBI sought to compel Apple to create special software to bypass security on an iPhone used by the San Bernardino shooter. Apple refused, arguing that the code itself is expressive and compelling software engineers to write it would violate the First Amendment's ban on compelled speech. The dispute ended in March 2016 after the FBI, with assistance from a third party, accessed the iPhone without Apple's help, and the government withdrew its request. As a result, the court did not rule on Apple's argument that compelling it to write and digitally sign the software would constitute compelled speech in violation of the First Amendment.
Cryptocurrency and blockchain privacy tools
In the 2010s and 2020s, debate began to ensue about whether Bitcoin constituted code protected as speech. Proponents argue that Bitcoin's source code and protocol are themselves political statements about decentralization, censorship resistance, and distrust of centralized authority. Some legal scholars and activists argue that publishing or running Bitcoin software is inherently protected speech because it expresses economic and ideological beliefs and because it is code. In the 2020s, U.S. authorities began to target developers of open-source privacy tools that interface with blockchains. In 2022, the U.S. Treasury sanctioned Tornado Cash, an Ethereum mixing protocol. Critics of this sanction argued that this constituted a sanction of the code rather than the criminal use. The EFF also defended the Tornado Cash developers arguing that publishing open-source privacy tools is protected expression. The prosecution of Tornado Cash founder Roman Storm, while sometimes framed as part of the war on crypto ended in August 2025, when Storm was convicted following a four-week jury trial of conspiracy to operate an unlicensed money transmitting business. The jury found that he knowingly operated Tornado Cash while it transmitted criminal proceeds; the offense carries a maximum sentence of five years' imprisonment. In 2024, Keonne Rodriguez and William Lonergan Hill, the developers of Samourai Wallet, a Bitcoin privacy tool that uses CoinJoin to mix transactions, were indicted. Critics of the prosecution argued that the government was using efforts to combat criminal activity as a justification to target privacy software and code as speech. In July 2025, Rodriguez and Hill each pleaded guilty to one count of conspiracy to operate a money transmitting business knowing that it transmitted criminal proceeds. As part of their plea agreements, they agreed to forfeit approximately $238 million.
3D-printed guns
… excerpt ends here. Continue reading the full article.


![Code as speech: Abstract of the 2008 Bitcoin white paper by Satoshi Nakamoto. The paper combined technical and political arguments for a decentralized system, often cited to show that Bitcoin's code embodies political speech protected by the First Amendment.[20][21]](https://thumb.wikimedia.org/wikipedia/commons/thumb/9/9d/Bitcoin_white_paper.png/500px-Bitcoin_white_paper.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)

