User's Manual

43
the cryptography utilization allows only at the application to correctly interpret the serial number
the application can verify the serial exactness by setting beforehand part of this number equal to a fixed value.
Example: having a 16 byte serial, 8 of these 16 bytes can be set to '0' for all the serial numbers. If these 8 bytes
are equal to '0' after the decryption, the application is sure that the answer received from the key is really valid.
This check assures that the program is talking with a real dongle and not with a fake one, assuming that an
eventual trick does not have the correct encryption key.
9.17.2 Utilization
In order to use the new commands, the application to be protected should use the standalone or multilan (only with the
LOCAL protocol) driver that provides the common SmartKey interface and the new AES authentication commands.
According to the challenge-response protocol structure, the application must contain the AES 128 bit algorithm and a
pseudo-random numbers generator in order to implement the communication with the SmartKey. It is important to
underline that this implementation must be included into the application and not into the SmartKey driver because
moving the authenticity from the application to the SmartKey driver, the application might work even with a fake
driver.
The application code should also include some protection methods in order to hide the cryptographic key used by the
authentication process.
9.18 AES set mode
This command sets 20 different 16-byte cryptographic keys for the AES algorithm and the 16 byte serial number. The
cryptographic keys and the serial number, once written on the SmartKey, can’t be extracted or overwritten any longer
even if you run the command again. In other words, this command can be executed only once.
WARNING! the AES keys can be set ONLY ONE TIME!
This command cannot be executed from lan, it works only with a local connection with the SmartKey.
The exchange of information is organized like this:
Model Only USB SmartKey 3
Input COMMAND ‘G’
LPT SmartKey port
LABEL SmartKey Label
EXTDATA[0-15] Serial number to be set
EXTDATA[16-31] First AES key
EXTDATA[320-335] Twentieth AES key
Output None
Table 35 AES SET MODE command parameters
9.19 AES scramble mode
This command executes the authentication operation. The SmartKey works on a pseudo-random value chosen by the
application and gets back a value that is recognized by the application and allows it to verify the SmartKey presence
based on the communication protocol previously described.
The exchange of information is organized like this:
Model Only USB SmartKey 3
Input COMMAND ‘O’
LPT SmartKey port
LABEL SmartKey Label
DATA[0-15] Pseudo-random values to use