If decompilation is [[DecompilationPossible][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) investment in writing 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 to make reproductions or 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. [[http://www.lessig.org][Lawrence Lessig]] wrote in this [[http://www.eff.org/IP/P2P/MGM_v_Grokster/20050301_cc.pdf][Amicus Curiae for MGM v Grokster]]:
_But just as gun owners who defend the legal use of guns are not endorsing cop killers, or free speech activists who attack overly broad restrictions on pornography are not thereby promoting the spread of child pornography, so too is the defense of p2p technologies not an endorsement of “piracy.”_
It could be added "so too is the research of decompilation technology not an endorsement of the violation of copyright". ---+++ 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 [[http://www.sims.berkeley.edu/~pam/papers/acm_vol45_p15.pdf]["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 [[http://anti-dmca.org][the Anti-DMCA Website]], and [[http://blackbox.cs.fit.edu/blog/kaner/archives/000124.html][CEM Kaner's Blog]]; point 8 refers to reverse engineering including decompilation.). As Cem points out, California courts have started enforcing no-reverse-engineering ([[http://www.infoworld.com/article/03/06/26/HNreverseengineering_1.html][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 [[http://www.netlexfrance.com/weblogs/index.php?p=2186][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". ---+++ MGM v Grokster In June 2005, the US Supreme Court ruled: * "We hold that one who distributes a device with the object of promoting its use to infringe copyright, as shown by clear expression or other affirmative steps taken to foster infringement, is liable for the resulting acts of infringement by third parties using the device, regardless of the device's lawful uses." (545 U.S. (2005)). This [[http://news.bbc.co.uk/2/hi/technology/4627679.stm][BB News article]] contains a link to a [[http://news.bbc.co.uk/1/shared/bsp/hi/pdfs/supreme_court_mgm_grokster_27_06_05.pdf][PDF copy of the full finding]]. This appears to overturn certainty that came from the landmark [[http://www.eff.org/legal/cases/betamax/][Sony Betamax case]] (464 U.S. 417 (1984)), which said in effect that manufacturers of potentially infringing devices (such as VCRs) are not responsible for the illegal actions of users, as long as there are "substantial non-infringing uses" for the device. Now, there is a question of inducement. ---- See also the LegalIssues of ReverseEngineering. CategoryDecompilation