Apple said yesterday that its legal battle with the FBI has such far-reaching consequences that it should be settled by Congress rather than by the courts – but if that tack is unsuccessful, Bloomberg reports that the company will be putting forward a rather unusual argument in court. Apple will argue that the digital signature it uses to validate code is protected by the First Amendment as free speech, which cannot be compelled in law.

In other words, even if the government could force Apple to write code that would remove the passcode protections, it shouldn’t be allowed to force Apple to sign the code – and if Apple doesn’t sign it, the iPhone won’t accept it …

Before you download a new game or messaging app on your iPhone, the device checks for a digital signature tucked within the lines of code on the app. All applications sold through the App Store are approved by Apple and have this cryptographic autograph from the company telling your iPhone it’s safe. In the FBI case, some privacy advocates believe the company has a strong First Amendment case because it’s being asked to add that signature, against its will, to software that would aid the government.

The free speech argument won’t form the main thrust of Apple’s defence, according to an anonymous Apple executive cited by Bloomberg: that will be that the government is pushing the centuries-old All Writs Act into territory far beyond its original scope, and therefore doesn’t have the legal authority to compel Apple to write the compromised code. But the First Amendment argument will form a secondary element of Apple’s case.

“That’s a fundamental First Amendment problem because it can’t compel speech,” said David Rivkin, a constitutional litigator at BakerHostetler.

Washington University law professor Neil Richards said that courts are likely to be very wary of accepting the free speech argument because of the precedent it would set. He believes Apple already has a compelling defence without resorting to this.

The idea that code is protected free speech is not entirely without existing precedent, however.

“The argument is if all software is speech and all data flows are protected, then everything we do with communication is protected, and any regulation of the digital society becomes impossible,” said Richards, who sides with Apple in this case. “If we’re not careful we could end up a society that strikes a terrible balance.”

But other judges have ruled that code is not protected by the First Amendment, so we could be in for an extremely interesting court battle!

In the 1990s, a graduate student at the University of California at Berkeley wrote an encryption program for his own research that he wanted to make public. Under federal regulations, a coder must get a license to publish cryptography tools, and the government denied the student’s license. In 1999, the U.S. Court of Appeals in San Francisco ruled for the first time that source code was protected as speech, and the student, Dan Bernstein, who is now an instructor at the University of Illinois at Chicago, was allowed to share the code freely.

You can read all our coverage of the case in the links below.