| More and more attention has been paid to the protection of software. In addition to using legal means to protect their own interests, software developers also began to focus on the technical means of software encryption to protect their intellectual property rights. Since the DES algorithm, static encryption method and comparison protection of data are used in the most common USB dongle. The dongle is always simulated by software and this will result in invalidation of the software protection.Based on the design principles of the common USB dongle and the related technology, a USB dongle implementation scheme with three-layer protection is proposed in this thesis. This thesis mostly accomplishes the following works:(1) An optimization algorithm of AES is proposed in this thesis. The multiplication in the AES encryption algorithm is turned into shift and XOR operation in the memory-constrained 8-bit microcontroller with slow processing speed. And then the efficency of the alogrithem is well in the microcontroller. All the processes in the AES decryption algorithm are merged into Lookup and XOR operation in the 32-bit controller so as to improve the efficency of the alogrithem. A result is generated from the mixed operations with the next three aspects:the cipher text digest of homogenized chaotic sequence, the program code which is mapped through the random number that generated by the on-chip timer and the output data of the on-chip temperature sensor. The above result can be used as dynamic key in the AES algorithm.(2) A system structure of USB dongle is proposed in the thesis. Comparison protection of random number, protection of PC uniqueness and protection of key parameters, the three-layer protection is used in this software dongle so as to solve the problem of software simulation in the dongle.(3) The design and implementation process of USB dongle is given in detail. It includes the design of hardware schematic and PCB with PROTEL, the device firmware is developed on the environment of KEIL. The device customer driver of HID and host application is developed on the environment of VC++6.0.At last, a protected game of picture matching is used to test the software dongle. After numerous experiments, it proves USB dongle describled in this thesis has a promising market prospect with its safety and stability. |