Protecting Software with Code Encryption

Modern cryptographic mechanisms provide strong software protection.  Encrypting random data is slightly more reliable than reading out data. The data is decoded later and the license is only correctly verified if the two values match. However, this type of protection also requires a simple yes/no decision in the code. This type of encryption can also be simulated by another encryption e.g. an XOR.

A more suitable method is to encrypt data or, better still, the executable code required by the application. The data is encrypted and embedded in the software prior to release. It is subsequently decoded by the copy protection system, for example a dongle. If the license is missing, the required key is missing and hence the data cannot be decoded or used.

A hacker can try to change the question so that the checksum comparison always returns “yes”. The software calculates an incorrect value and hence will not run correctly or, in the worst case, crashes. Hence it is almost impossible to crack the software without the relevant license. The hacker would have to guess the encrypted data.

Unfortunately this type of protection has a major drawback: it can be cracked by eavesdropping on the transmission between the software and copy protection. The only solution is to build numerous encrypted secrets into the software at different places and allowing more than one key to be used. As a consequence the same data can be encrypted with different keys and embedded in different places in the software. At runtime the user randomly selects which key to use. It is now much more difficult for the hacker to locate all the questions.

This method makes it extremely difficult and therefore expensive to crack existing licenses. Protection can be further improved by NOT randomly choosing the random key. Instead key could be coupled to the date and the computer data. The hacker thinks he has found a hack which works, but he will soon discover it doesn’t work later on or for his “customers”.

Learn more about the best encryption mechanisms to protect your code. Contact us today. Send us an email to info@software-licensing.com or submit the form below.

"*" indicates required fields

Please contact me about:*
This field is hidden when viewing the form