1. Field of the Invention
The present invention relates to a program encryption method, and more particularly to a method of designing an application program encryption that uses an Embedded Linux System as a platform to prevent users from copying the application program.
2. Description of Related Art
According to the definition of the Institute of Electrical Engineers (IEE), an “Embedded System” is a control, monitoring, or accessory equipment, machine, or even factory-operating device, and the embedded system is integrated with a computer software and hardware that can meet the “Custom-made” principle. In other words, it is a system developed according to a certain specific application. Since the embedded system can enhance the stability and portability of a product, lower the cost, and add specific functions, etc, therefore the embedded system is extensively used. At present, the common embedded operating system includes VxWORK, QNX, Palm OS, Windows CE, and Linux, etc, and the embedded Linux system has an advantage of free license, and thus the embedded Linux system is used by most users.
After an embedded Linux system designer obtains a device supplied by a device supplier, the designer will use the embedded Linux system as a platform to design an application program for the device, and then sell the device to end users. Since most software in the embedded Linux System are readable, therefore when the designer uses the embedded Linux system to design the application program, a user just needs to logon the system and the user can copy the application program easily. Such the application programs can be misappropriated easily by similar or same devices. Therefore, end users can directly purchase the device from the device supplier instead of the designer, and then copy the application program into the device. In this case, the designers lose their rights and benefits. As a result, most designers abandon the embedded Linux system and use a dedicated operating system instead. The embedded Linux system designers waste money and time, and cannot prevent their programs from being misappropriated.
The present invention has been accomplished under the circumstances in view. It is the main objective of the present invention to use a KEY and a predefined conversion table to add a file header in an application program that adopt an embedded Linux system as a platform for the design. All contents of the file header are computed to disrupt contents of an execution file to protect the application program from being copied. Therefore, a designer can use the embedded Linux system to develop application programs without worrying about the misappropriation.
Referring to
When a device executes the application program with the encryption (as shown in
Further, the Linux kernel of the embedded Linux system can add a loader of the executable file to determine whether or not a restoration is needed; if yes, then read the KEY in the execute file and restore the execute file according to the KEY; if no, then execute the application program directly, so that a designer can select which application program needs to add the KEY.
Further, in the design of the embedded Linux system, a computer is often used for cross development. Therefore, software can be designed in advance and stored for the foregoing conversion.
Referring to
(100) start.
(110) read the execute file and the KEY, and the execute file reads 128 bits for a time; if the number of bit is not up to 128, then fill in “0” to make up the 128 bits.
(120) obtain remainders of 8 by the key, and the remainders determine which predefined array to be used.
(130) use the selected array to disrupt the read execute file.
(140) check whether or not reading of execute file is completed; if yes, execute Step (150), or else execute Step (110).
(150) end.
The foregoing process can disrupt the sequence of the execute file, and prevent any unauthorized use of the application program by users who have no KEY or an incorrect KEY.