Overlap with patent law
Reverse engineering mainly refers to the operation analysis of a certain process or product without the inventors clearly specifying its structure, use or internal process.
The patent project itself does not have to undergo reverse engineering before it can be researched, because the patent inventor himself has provided detailed public information, thus it obtains the legal protection of the related invention.
In many cases, products produced under one or more patents may include other unapplied patents or undisclosed technologies.
In fact, a common motivation for reverse engineering is to determine whether a competitor's product contains patent infringement or copyright infringement.
The United States
In the United States, even if an artifact or process is protected by a trade secret, it is usually legal to reverse engineer the artifact or process as long as it is obtained legally.
In the United States, the reverse engineering of computer software often belongs to both the breach of contract in the contract law and the support of other related laws.
Most end-user license agreements expressly prohibit reverse engineering, and the US court ruled that if such a clause exists, it will override copyright law that explicitly allows reverse engineering. There is a limited exemption here that allows the sharing and use of reverse engineering technology for interoperability purposes.
The European Union
The EU Directive 2009/24 on the legal protection of computer programs replaced the earlier (1991) Directive and regulates reverse engineering in the EU.
Some specifications are as follows:
The legal owner of the program is assumed to have a license through which one can create any necessary copies to use the program and modify the program within the scope of its intended purpose (for example, to correct errors). The rightful owner can also make a backup copy for their personal use. If necessary, the program can also be decompiled to ensure that it runs with other programs or devices, and the results of the decompilation must not be used for any other purpose, all of which should be done without infringing the copyright of the program.