1
ENCRYPTED COMPILER
BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention relates generally to the field of computer science. More particularly, the invention relates to software.
2. Discussion of the Related Art
Prior art source code compilers are known to those skilled in the art. A source code compiler transforms source code into an executable, shared object library or object file. The resulting executable, shared object library or object file is then utilized by a computer system.
The executable, shared object library or object file may be specific to a given computer system and can be very difficult to reverse engineer. Consequently, the proprietary content of these files is relatively secure.
On the other hand, the proprietary content of source code is relatively non-secure. There are times in which source code for some or all of an application will be exposed to one or more individuals in an insecure environment. The person or company that wrote, generated, or distributed the source code may find this unacceptable but may have no recourse except to do so and attempt to limit exposure through the use of copyright, legal agreements and reverse engineering impediments.
The source code itself is vulnerable to copying. Although source code may be copyrighted, detection of unauthorized copying may be impossible. Further, even where detection is possible, the cost of copyright enforcement may be prohibitive. Therefore, what is needed is a solution that protects the proprietary content of source code more effectively than copyright.
Legal agreements (e.g., licenses, nondisclosure agreements, etc.) can also have violation detection and enforcement problems. Therefore, what is also needed is a solution that protects the proprietary content of source code more effectively than by legal agreement.
Source code is also vulnerable to reverse engineering. The proprietary content of source code can be harvested without apparent copyright violation if the algorithmic content can be gleamed through analysis and then restyled as another expression. Reverse engineering can also present practical problems to respect to legal agreements. What is also needed, therefore, is a solution that protects the proprietary content of source code from reverse engineering.
One unsatisfactory approach, in an attempt to protect the proprietary content of source code involves obfuscation. For instance, an algorithm may be discretely located within a much larger block of code. Further, an algorithm may be separated into subsections that are individually located throughout different parts of a program. Furthermore, spurious code lines may be added to the algorithm and/or the program in a deliberate attempt to mislead.
Another approach to obfuscation involves removing all meaningful variable names and replacing them with nonmeaningful ones (for example, replace "BinaryTreePointer" with "II". The approach can also be extended to removing all comments, indentation, etc. that makes code easy to read. Finally, another approach to obfuscation involves replacing sections of code with macros that make the reverse engineering of such code more difficult.
However, given enough time and/or resources, systematic analysis may yield the algorithmic content despite attempts at obfuscation. Therefore, what is also needed is a solution that impedes reverse engineering more effectively than obfuscation.
2
Another disadvantage of the obfuscation approach is that debugging and/or modification of the source code may become problematic. The tactics used for obfuscation can make it more difficult for a subsequent authorized program
5 mer to understand the source code, especially when documentation is nonexistent. Therefore, what is also needed is a solution that impedes reverse engineering without hindering debugging and/or modification of the source code. Another disadvantage of the obfuscation approach has
10 been relatively high cost. A large amount of extraneous code may be required to provide cover for the proprietary content. These additional lines of code can increase the time required to compile substantially. Therefore, what is also needed is a solution that prevents reverse engineering in a more costeffective manner.
Heretofore, the requirements of providing more effective protection for source code than copyright, legal agreement or obfuscation, without hindering debugging and/or modification or incurring excessive costs, referred to above have not been fully met. What is needed is a solution that
20 addresses all of these requirements.
SUMMARY OF THE INVENTION
Thus, there is a need for the following embodiments. One embodiment of the invention is based on a method, com
25 prising: generating a first sub-file of source code; then encrypting said first sub-file of source code; then writing said first sub-file of source code to a buffer; then reading a second sub-file of source code from said buffer; then decrypting said second sub-file of source code; and then
30 compiling said second sub-file of source code. Another embodiment of the invention is based on an apparatus, comprising: an on-the-fly source code encrypter; a buffer coupled to said source code encrypter; a source code decrypter coupled to said buffer; and a compiler coupled to
35 said source code decrypter. Another embodiment of the invention is based on an electronic media, comprising a computer program adapted to: generate a first sub-file of source code; then encrypt said first sub-file of source code; then write said first sub-file of source code to a buffer; then
40 read a second sub-file of source code from said buffer; then decrypt said second sub-file of source code; and then compile said second sub-file of source code. Another embodiment of the invention is based on a computer program comprising computer program means adapted to perform the
45 steps of generating a first sub-file of source code; then encrypting said first sub-file of source code; then writing said first sub-file of source code to a buffer; then reading a second sub-file of source code from said buffer; then decrypting said second sub-file of source code; and then
50 compiling said second sub-file of source code when said program is run on a computer.
These, and other, embodiments of the invention will be better appreciated and understood when considered in conjunction with the following description and the accompa
55 nying drawings. It should be understood, however, that the following description, while indicating various embodiments of the invention and numerous specific details thereof, is given by way of illustration and not of limitation. Many substitutions, modifications, additions and/or rearrange
60 ments may be made within the scope of the invention without departing from the spirit thereof, and the invention includes all such substitutions, modifications, additions and/ or rearrangements.
65 BRIEF DESCRIPTION OF THE DRAWINGS
The drawings accompanying and forming part of this specification are included to depict certain aspects of the