ArticleslgStudy

computer science

Code as speech

Code as speech is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Code as speech rather than just read about it. In short: 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…

Code as speech — main illustration
Code as speech — illustration

Key takeaways

  • Code as speech belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Code as speech to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Code as speech from memory before moving on to harder problems.

Reference excerpt

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.

Illustrations

Code as speech: Export-restricted RSA encryption source code printed on a T-shirt made it an export-restricted munition, as a freedom of speech protest against U.S. encryption export restrictions (Back side).
Export-restricted RSA encryption source code printed on a T-shirt made it an export-restricted munition, as a freedom of speech protest against U.S. encryption export restrictions (Back side).
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]
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]
Code as speech: Digital Liberator pistol by Defense Distributed
Digital Liberator pistol by Defense Distributed
Code as speech: The Free Speech Flag is a freedom of speech symbol whose colors correspond to a cryptographic key that could be used to decrypt HD DVDs and Blu-ray Discs protected by AACS.
The Free Speech Flag is a freedom of speech symbol whose colors correspond to a cryptographic key that could be used to decrypt HD DVDs and Blu-ray Discs protected by AACS.

Worked examples

Example 1 — a first encounter with Code as speech

Start with the simplest possible case. Write down what Code as speech claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Code as speech before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Code as speech ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Code as speech

In research
Code as speech appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Code as speech in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Code as speech is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer law, Freedom of speech in the United States, History of cryptography, so understanding it makes those chapters shorter.
In everyday life
Look for Code as speech outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Code as speech” →

How to study Code as speech in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Code as speech means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Code as speech out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Code as speech in simple terms?

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. governmen…

Why does Code as speech matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Code as speech?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Code as speech.

Tags

  • Computer law
  • Freedom of speech in the United States
  • History of cryptography

Keep exploring