Legality Of Decompilation

Program-Transformation.Org: The Program Transformation Wiki
If decompilation is possible to a certain extent, is it then also allowed?

Decompilation can be used for a number of reasons (see WhyDecompilation for more), including:

  • Recovery of lost source code (by accident or via a disgruntled employee),
  • Migration of assembly language applications to a new hardware platform,
  • Translation of code written in obsolete languages no longer supported by compiler tools,
  • Determination of the existence of viruses or malicious code in the program, and
  • Recovery of someone else's source code (to determine an algorithm for example).

However, not all uses of decompilers are legal uses.

Throughout the world, computer programs are protected by copyright law. Copyright protects the expression of an idea in the form of a program, hence protecting the developer's (or company's) intellectual property on the software. Copyright law provides a bundle of exclusive rights to the software developer, among others, the right to reproduce and make adaptations to the developed computer program. It is a breach of these rights the making of reproductions and adaptations without permission of the copyright holder. Further, license agreements may also bind the user to operate the program in a certain way and to avoid using decompilation or disassembly techniques on that program.

Different countries have different exceptions to the copyright owner's rights or precedent has been established in court proceedings. This means that these uses are allowed by law. The most common ones are:

  • Decompilation/disassembly for the purposes of interoperability (to another piece of software or hardware) where the interface specification has not been made available,
  • Decompilation/disassembly for the purposes of error correction where the owner of the copyright is not available to make the correction, and
  • To determine parts of the program that are not protected by copyright (e.g. algorithms), without breach of other forms of protection (e.g. patents or trade secrets).

Not all countries implement the same laws, you should contact your lawyer if in doubt.

Innovation

In Bonito Boats, Inc. v. Thunder Craft Boats, Inc. 489 U.S. 141(1989), the U.S. Supreme Court regarded reverse engineering as "an essential part of innovation", likely to yield variations on the product that "could lead to significant advances in technology". (From "Reverse Engineering Under Siege", Pamela Samuelson, Comm. ACM 45(10) October 2002.) It is possible that decompilation (when it becomes practical) could do the same for software that physical reverse engineering does for boats and other fields of endeavour.

The article above also states that "Courts in the U.S. have also treated reverse engineering as an important factor in maintaining the balance in intellectual property law". It goes on to point out that patents confer significant advantages to their owners, but only in return for disclosure of the invention, so that the public will ultimately benefit from the it. Perhaps decompilation can help redress the balance that the recent flood of dubious software patents has perturbed.

The U.S. DMCA

With the Digital Millennium Copyright Act (DMCA), the USA has become one of the worst countries as far as the freedoms of computer users is concerned (e.g. see the Anti-DMCA Website, and CEM Kaner's Blog; point 8 refers to reverse engineering including decompilation.). As Cem points out, California courts have started enforcing no-reverse-engineering (link). Worse, the US government attempts to apply pressure through its economic might to other countries. The European Union has bowed to this pressure, while Australia seems to have so far resisted the worst of it.

Despite all this, it appears that decompilation in the USA is still legal under certain circumstances. The DMCA has been interpreted as follows on this page, even where the circumvention of a "copy protection device" is involved:

“The exception allows reverse engineering of computer programs if the reverse engineer lawfully obtains the program, seeks permission from the copyright owner, only uses the results of their efforts to create an interoperable computer program and does not publish the results".


See also the LegalIssues of ReverseEngineering.

CategoryDecompilation

Transform.LegalityOfDecompilation moved from Transform.EthicsOfDecompilation on 03 Dec 2004 - 23:49 by MikeVanEmmerik - put it back