User's Manual

36
Contrary to the SCRAMBLING mode, the algorithm is programmed in the dongle with SmartKey's ENCRYPTING
function and occupies the Expanded Secure Data register, in reverse order, starting from the last byte of the field.
The ENCRYPTING mode is certainly the most versatile and secure function of the SmartKey dongles. However, this is
also the most complex function calling for a good knowledge of logical operators. We therefore advise you to first
implement the other modes, which guarantee a very high level of security. Think of the ENCRYPTING function as an
arm for use in situations with a very high probability of attack by technologically wise hackers.
Use of the ENCRYPTING function entails comparing the Encrypted Data obtained from the dongle, to the data
calculated inside the software, applying the algorithm to the Original Data.
If the comparison proves successful, one can be certain that one's dongle is fitted on the PC, and, therefore, execution of
the program can continue.
The ENCRYPTING function does not alter the contents of the Secure Data, but uses the software Data parameter as a
variable for supporting the exchange of Original and Encrypted Data.
The exchange of information is organized like this:
Models SP, XM, NET
Input COMMAND ā€˜Eā€™
LPT Port
LABEL Label
PASSWORD Password
DATA[0..7] Original data (8 bytes)
Output DATA[0..7] Encrypted data (8 bytes)
STATUS Status
==0 Success
!=0 Error
Table 21
ENCRYPTING MODE command parameters
The algorithm is stored in the Expanded Secure Data field, in reverse direction starting from the last byte of that field.
You should check that the algorithm is located in that field, to avoid accidentally overwriting it during a WRITING
operation.
9.9.1 Parameter transfer
Parameters to be transferred to execute an ENCRYPTING operation, with the dongle on the LPT1 parallel port:
LPT
01 00
Port
COMMAND
45 00
Encrypting ("E")
LABEL
53 4D 41 52 54 4B 45 59
00 00 00 00 00 00 00 00
Label (
"SMARTKEY")
PASSWORD
45 55 54 52 4F 4E 00 00
00 00 00 00 00 00 00 00
Password ("EUTRON")
DATA
XX XX XX XX XX XX XX XX
Data to encrypt (8 byte)
Table 22
Exchange of information for the ENCRYPTING MODE command
At the end of the operation, the first 8 bytes of the Data field are replaced by the Encrypted Data, which depend on both
the Original Data and on the algorithm previously programmed in the dongle.
9.9.2 Definition of the algorithm
The logical operators which can be used to build your own security algorithm are as follows:
OPERATOR DEFINITION SYMBOL
Left Rotate Rotate to the left
<