Since the binary information can always be copied, the manufacturer must make the operation of his program dependent on the presence of some physical key which cannot be copied. He does this by changing his software so that it cannot run unless some sort of initialization is performed. He then adds some additional program code, called the guard module, which carries out the necessary initialization if and only if it detects the presence of the physical key. This is copy protection in a nutshell:
•a modification to the original code to make it dependent on some external action
•a guard module to provide the necessary action when it detects the key, and
•the key itself.
All copy protection schemes are alike in that they must have these three parts in order to work. If any part is missing, the scheme fails. Let's look more closely at these three parts:
Dependency on External Action
The original software must be changed in some way so that it will not run without the action of the guard module. This could consist of merely including calls to the guard module in the software. However, the best way of making the software initialization-dependent is to encrypt it. Encryption means taking the code and scrambling it so that it cannot run and is no longer recognizable. The same techniques can be applied to computer programs as to secret messages.
The Guard Module.
This is the code that restores the software to executable form or in some other way initializes the software and allows it to run. It must do this only when the key is present. When the guard module is satisfied that the key is authentic, it initializes the software and executes it. Besides the function of recognizing the key and restoring the software to executable form, the guard module must do its job in complete secrecy. It must be impossible to see what it does, impossible to imitate what it does and impossible to trick it into doing its job when the key is not really present. This is called code security. Unless, the guard module itself is protected in some way, usually by encryption and debug-trapping, the protection can be disabled, and the software made to run without the key.
The Physical Key
This is the actual physical device or object that must be present as proof of ownership and the right to use the protected program. The key can take on many forms: an original CD, a key diskette, a dongle or a "smart card".