Verifying the License

The purpose of the challenge is to verify that there is a valid license present. Even a tampered server cannot respond correctly to the challenge if it does not have knowledge of the secrets contained on a particular license (i.e., there still has to be a license or the individual application secrets have to be discovered).

In verifying challenge responses, the software publisher might precompute table containing a number of random challenges along with the expected responses. Or, the developer may elect to incorporate the algorithms into the code (see Anti-Tampering Guidelines on page 25). These are just a few of the possibilities. License system vendors may be able to provide additional scenarios.

Algorithmic Method

Using this approach, the publisher simply incorporates the challenge algorithm and the actual secrets into the program code. The process is very straight forward, but the publisher must take steps to ensure that the secrets themselves are not readily detectable within the code by someone using a debugger. The tradeoffs include:

The algorithm code must be included into the application, thereby consuming code space (but the code may be placed into an overlay which is called up only as needed). Embedding the algorithm in the code does not compromise the security offered. It is the secrets themselves which must be protected.

The secrets themselves must be included into the application code. Great steps must be taken to obscure those secrets (encrypting them, scattering them about the code, etc.).

Remember, no matter what steps are taken to secure an application, the most persistent intruder will always find a way, given enough time, to compromise any system. Even hardware dongle devices are compromised -- either the hardware itself or (most likely) the code which accesses the device.

Table Lookup Method

The table lookup method can be used as an alternative to incorporating the challenge algorithms into the application. The tradeoffs include:

In addition to choosing the secrets, the set of challenge values must be chosen when the application is coded.

Many challenge values must be chosen to ensure a confident level of "randomness".

Given the set of possible challenge values, a table must be precomputed which contains the possible results for each [challenge, secret] pair.

Instead of including the challenge algorithms and secrets into the application code, a table of valid responses is incorporated. The table contains a row for each possible challenge and a column for each unique secret. Then, a particular challenge is verified by examining the intersection in the table.

A sample table is shown below:

Challenge

Secret1 Response

Secret2 Response

Secret3 Response

Secret4 Response

8675309

783ndmw732

3487dn262

367dkb37

476dndk263

63JSk23

63387d6b36

7b6b5u8b7

8hn65bv4g7

076bb856v6

833jh26

73d83m29s

8N7GJ829n8

89bn73nBH

89348nUU7

8LES654

733nbV8

8H8hu8

B73h0dn39

7590nd73n

28gHjB4

39834nd83

93n3d93n38

393n3ed83n

983n38db38


*The format and size of the values shown above are for example purposes only.

At the beginning of each run time, the application randomly chooses one of the challenge values. The chosen challenge value is then passed into the LSRequest() call. When the call returns, the application compares the actual result with the set of expected results for that challenge value.

For example (using the sample table above), the application randomly chooses the 2nd challenge (and which secret to challenge): 63JSk23. This value is passed in as the challenge in the LSRequest() call. The license system responds with a status of success and a challenge response of 8hn65bv4g7. The application examines the row of possible responses (highlighted below), comparing each entry against 8hn65bv4g7. A match is found in the 3rd column. Thus, the challenge has passed.

Challenge

Secret1 Response

Secret2 Response

Secret3 Response

Secret4 Response

8675309

783ndmw732

3487dn262

367dkb37

476dndk263

63JSk23

63387d6b36

7b6b5u8b7

8hn65bv4g7

076bb856v6

833jh26

73d83m29s

8N7GJ829n8

89bn73nBH

89348nUU7

8LES654

733nbV8

8H8hu8

B73h0dn39

7590nd73n

28gHjB4

39834nd83

93n3d93n38

393n3ed83n

983n38db38