基于通用USB接口软件加密狗设计.PDF
文本预览下载声明
基于通用 USB 接口的软件加密狗设计
Design of Softdog Based on the General USB Interface
(平顶山学院) 翟卫青 ,翟子楠
(Pingdingshan university) ZHAI Weiqing , ZHAI Zinan
[摘要] USB 接口已逐渐成为计算机上最常用的接口之一,基于 USB 接口的软件加密狗相对于并
口或串口的软件加密狗将具有更强的通用性。同时,由于USB 接口的热插拔特性,用户使用时更
加便捷。本文主要讨论了基于单片机扩展 USB 接口设计软件加密狗的方法,给出了硬件原理图并
介绍了固件程序、设备驱动、RC5 加密算法的编制过程。
[关键词] 单片机;USB 接口;设备描述符;加密狗;RC5 ;
[中图分类号] TN309.2 [文献标识码] A
[ Abstract] As the USB interface has becoming the most popular interface,the softdog based on the USB
interface has more compatibility than that based on the parallel interface or serial interface.meanwhile,
the USB interface will be convenient for users who use the softdog, as the plug-in and plug-out
characteristic. This paper mainly discussed a method of designing softdog based on expanding USB
interface on the standard 51 single chip processor series. A hardware theory drawing is be
given,besides,introduced the programming process of firmware,device and Encryption of RC5.
[ Keyword] Single chip computer ;USB interface ;Device descriptor ;Softdog ;RC5
引言
近年来,正版软件制造商设计了多种防盗版的技术来防止自己的软件被侵权。其中软件加密
狗由于具有难以完全复制的硬件设备,一直是非常有效的手段。但它们大多使用的是计算机的并
行口,而且算法简单,这就降低了其通用性和保密性。随着计算机外围接口的不断推陈出新,USB
接口已逐渐成为计算机上最常用的接口之一,一般 PC 机都带有 3 到 4 个 USB 接口,其发展及应
用涉及消费类电子产品、工业仪表、学校实验设备等许多领域。本文讨论的以廉价的 51 单片机做
控制单元,采用专用 USB 接口芯片与 PC 机通讯,利用 RC5 算法加密实现的软件加密狗不仅具有
很高的通用性和保密性,同时也降低了制造商的成本。这里主要介绍了在 Philips 公司的 P89C51RD
单片机上扩展全速 USB 接口芯片 USBN9603 的硬件措施及RC5 软件加密实现方法。
一、USB 技术简介
USB ,全称为 Universal Serial Bus(通用串行总线) ,USB V1.1 版本全速 12Mb/S,低速 1.5Mb/S。
在新的 USB2.0 接口标准中,它通过将内部时钟加快以及其他的方法,将传输速度提高到 V1.1 版
本的 40 倍,达到了 480Mbps 的速度。其突出的特点是支持热插拔和即插即用。物理连接使用 4
根信号线,分别是 USBVCC ,GND,差动D+ ,D- 。具体电气特性可参考有关资料。
USB 总线有 4 种数据传输方式,分别是控制传输、中断传输、批量传输和同步传输。主机要
识别一个 USB 设备,必须经过设备列举的过程。过程如下:(1)使用预设的地址 0 获得设备描述符;
(2)设定设备的新地址;(3)使用新地址获得设备描述符;(4)获得配置描述符
显示全部