毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc

上传人:laozhun 文档编号:2979956 上传时间:2023-03-07 格式:DOC 页数:7 大小:199.50KB
返回 下载 相关 举报
毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc_第1页
第1页 / 共7页
毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc_第2页
第2页 / 共7页
毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc_第3页
第3页 / 共7页
毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc_第4页
第4页 / 共7页
毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc》由会员分享,可在线阅读,更多相关《毕业论文(设计)基于NiosⅡ 的U 盘安全控制器设计与实现.doc(7页珍藏版)》请在三一办公上搜索。

1、基于Nios的U盘安全控制器设计与实现杨献超,苏锦海,张立朝摘 要: 针对U盘等存储设备的安全隐患及用户的安全需求,分析目前常见的解决方法,遵循灵活方便、高安全性的原则,利用SoPC技术,设计实现了一款基于Nios的U盘安全控制器。详细论述了安全控制器的系统设计、硬件架构、固件划分和工作流程。采用高强度的密码算法,对普通U盘中的数据进行扇区级的加解密,保证U盘中数据的安全,具有灵活安全、易于升级的特点。关键词: U盘;USB主机;Nios;安全控制器 目前,U盘等USB移动存储载体由于其容量大、价格低、携带方便、可靠性高等优点,得到了越来越广泛的应用,在生活、工作中随处可见。然而,USB移动存

2、储载体的便利性及其自身安全脆弱性的矛盾十分突出。 本文针对U盘的安全隐患,分析目前较为常见的解决方法,利用SoPC技术,设计实现了一款基于Nios处理器的U盘安全控制器。该控制器位于PC机和U盘之间,通过对U盘进行扇区级的加解密操作,将普通U盘升级为安全U盘,保证U盘中数据的安全性。控制器遵循USB MassStorage类协议,无需专用驱动,即插即用,具有灵活方便、安全性高等优点1。1 安全控制器的整体设计1.1 安全U盘解决方案分析 U盘最为突出的安全问题是其内部所存储的数据都以明文形式存储,任何人得到该存储载体,即可对其中的数据进行任意的操作。因此,普通U盘一旦丢失,其存储的数据则毫无安

3、全性可言。针对这一问题,目前已经有多种解决方法,其中较为常见、安全性较高的是采用专用安全U盘的方法。 专用安全U盘的硬件架构如图1所示,主要由微处理器、存储芯片(NandFlash)、USB模块及加解密模块等组成2。当U盘和PC机进行数据传输时,加解密模块在微处理器的控制下对数据流进行加解密操作,使得U盘存储芯片中的数据都以密文形式存在。当PC机对数据进行读写时,首先需要进行身份认证,若认证不通过,则读写操作不能进行,即使攻击者将安全U盘物理分解,直接读取存储芯片,而由于存储芯片中的数据是以密文形式存在的,攻击者也只能获得数据的密文。安全U盘通过加解密和认证相结合的方法,保证其存储数据的安全性

4、。 专用安全U盘由于保密性高的优势,在一些特殊场合得到了广泛的应用。然而安全U盘也有自身的不足,主要表现在: (1)成本高。与普通U盘相比,安全U盘硬件构造复杂,成本通常为普通U盘的数倍乃至数十倍。 (2)开发难度大。安全U盘开发涉及USB协议、加解密算法、密钥保护方案、NandFlash读写等,其涉及面广、开发周期长、工作量大。 (3)密钥、算法、数据保存在同一载体中。若安全U盘丢失,则直接导致密钥、算法和数据一起丢失,不但增大了数据被破解的可能性,而且有可能导致密码算法的丢失。1.2 U盘安全控制器的系统设计 本文借鉴安全U盘的优缺点,按照方便快捷、安全性高的原则,利用SoPC技术,设计实

5、现了U盘安全控制器。片上可编程系统SoPC技术是基于可编程编辑器件PLD解决方案的片上系统(SoC)。SoPC是PLD和ASIC技术融合的结果,是一种软硬件协同设计技术。SoPC可以方便地将硬件系统(包括处理器、存储器、外设和自定义逻辑电路等)和固件集成到一个PLD器件上,构建成一个可编程的片上系统,具有设计灵活、可裁剪、易升级、可编程等优点,同时还有丰富的IP核资源可供使用3。 本文所设计的安全控制器系统架构如图2所示,安全控制器位于PC机和U盘之间,主要由USB Device模块、USB Host模块、微处理器、缓冲区、加解密模块等组成。控制器对于PC机表现为一个USB大容量存储(Mass

6、Storage)类设备,而对于U盘,则表现为一个USB Host。USB Device模块负责接收PC机的命令和数据,USB Host模块负责向U盘等USB发送命令和数据,加解密模块则完成数据的加解密,整个系统在微处理器的控制下工作。2 安全控制器硬件架构的设计实现 本设计采用USB接口芯片+FPGA的方案来实现安全控制器的硬件架构,通过微处理器器对USB接口芯片的控制即可实现USB通信。采用USB接口芯片有助于降低开发费用,缩短系统的开发周期。2.1 USB接口芯片选型 本设计中,安全控制器既要实现USB Host的功能,又要实现USB Device的功能。因此,若能采用一片USB接口芯片实

7、现两者的功能,则有助于降低硬件系统的复杂性。综合USB芯片的功能需求、价格、硬件复杂性等因素,本设计选用NXP公司的ISP1761作为USB接口芯片。 ISP1761是一个单芯片的高速USB OTG 控制器,在其单芯片上集成了一个OTG控制器、一个主机控制器和一个外设控制器,主机和外设控制器兼容USB2.0协议,并支持480 Mb/s的高速传输。ISP1761有3个USB接口,接口1可以被配置为Host接口、Device接口或者OTG接口,接口2、3只能被配置为Host接口。在OTG模式下,ISP1761的接口1可通过跳线灵活配置成Host接口或Device接口。ISP1761可以直接与目前市

8、场上的大多数带寻址功能的微处理器直接连接,微处理器通过读写ISP1761内部的寄存器或存储器即可实现USB通信功能。ISP1761支持DMA传输,可以提高数据的吞吐率4。2.2 控制器整体硬件架构 安全控制器整体硬件架构如图3所示,由SoPC模块和ISP1761芯片及按键组成。SoPC模块使用Altera公司提供的开发工具SoPC Builder生成,主要由Nios控制器、内存、加解密模块、JTAG、ISP1761控制器、锁相环、PIO控制器和DMA控制器组成。 Nios控制器作为整个系统的核心,完成对各个模块的调度和控制;锁相环为系统各个模块提供所需要的时钟;加解密模块完成数据流的加解密功能

9、;ISP1761控制器则用来连接Nios控制器和ISP1761芯片,通过该控制器,Nios处理器可以访问ISP1761芯片内部的寄存器和存储器;DMA控制器负责PC机到控制器、控制器到U盘的数据传输,提高数据传输速率。ISP1761芯片分别连接主机和U盘,在Nios的控制下实现USB Host接口和USB Device接口的功能。3 安全控制器固件的设计实现3.1 固件模块及层次的划分 安全控制器固件实际上是运行于Nios处理器上的COS(Chip Operating System),主要负责监控USB Host接口及USB Device接口的状态,解析PC机发出的命令,对系统各个模块进行调度

10、,实现PC机到U盘间的数据通信,完成数据流的加解密。 安全控制器固件主要包括初始化模块、USB Host模块、USB Device模块、DMA模块、密码模块等。各模块的功能如下: (1)初始化模块:安全控制器系统的启动;ISP1761芯片接口的配置,将接口1配置成USB Host接口,接口2配置成USB Device接口。 (2)USB Host模块5:检测USB接口芯片Host接口的状态,检测U盘的插入和移除等;向插入的USB设备发出标准的USB标准命令,获取设备描述符、配置描述符、接口描述符、端点描述符等;向插入的USB设备发出USB MassStorage类命令,获取设备的容量等基本信息

11、及对设备进行读写操作。 (3)USB Device模块:向PC机报告USB设备的插入;响应PC机发出的标准的USB命令,返回相应的数据,如各种描述符等。此时返回的描述符应为安全控制器的描述符;响应PC机发出的USB MassStorage命令,返回设备的基本信息,此时返回的基本信息应为U盘的信息。 (4)加解密模块6:身份认证方案的实现,如用户口令的保存、更改等;加解密算法的高速实现及密钥的保护等。 (5)DMA模块:DMA控制器的配置、启动等。 安全控制器固件层次划分如图4所示,主要包括硬件抽象层、USB协议层和批量传输层。硬件抽象层主要实现Nios处理器对外设的读写以及对ISP1761芯片

12、内部寄存器和存储器的访问;USB协议层通过对ISP1761芯片的控制实现USB协议;批量传输层则实现MassStorage类的操作,通过Bulk-In和Bulk-Out端点,完成CBW、数据、CSW的传输。安全控制器在批量传输层对数据进行扇区级的加解密操作,不进行文件系统级的解析。3.2 整体工作流程 以一次PC机向U盘写数据的过程为例,U盘安全控制器的工作流程如图5所示。 (1)U盘安全控制器初始化; (2)循环检测ISP1761芯片Host接口的状态,判断是否有USB设备插入; (3)若检测到USB设备,判断设备是否是USB MassStorage类设备; (4)若是USB MassSto

13、rage类设备,则向PC机报告设备的插入,否则返回步骤(2); (5)安全控制器响应PC机发出的命令,包括USB标准命令和Mass Storage类命令,返回描述符及所插入设备的基本信息; (6)PC机发出写(Write10)命令及数据,安全控制器将数据加密,然后向U盘转发写命令及加密后的数据; (7)一次传输过程结束。 本文针对USB存储设备的安全问题,利用SoPC技术,设计实现了U盘安全控制器,并在terasic公司的DE3开发板上得到验证。结果表明,该控制器将普通U盘升级为安全U盘,保证U盘中的数据都以密文形式存在,方便快捷、安全性高,具有广泛的应用前景。下一步重点是研究密码方案,如身份

14、认证方案的设计、密钥的保护及加解密算法的高速实现等。参考文献1 王威.具有身份认证及数据加密U盘的研究与实现D. 沈阳:沈阳航空工业学院,2010.2 李亚强.基于Z8HM2芯片的加密U盘的设计D.哈尔滨:哈尔滨工业大学,2010.3 SoPC Builder Data SheetEB/OL.2011-08-15.4 ISP1761 user manualEB/OL.2011-08-10.5 董扬生.USB主机在嵌入式系统中的应用D.南京:南京理工大学,2008.6 LIBERATORI M,OTERO F B.AES-128 cipher high speed,low cost FPGA i

15、mplementationC2007 3RD Southern Conference on Programmable Logic,2007(12):195-198Editors note: Judson Jones is a meteorologist, journalist and photographer. He has freelanced with CNN for four years, covering severe weather from tornadoes to typhoons. Follow him on Twitter: jnjonesjr (CNN) - I will

16、always wonder what it was like to huddle around a shortwave radio and through the crackling static from space hear the faint beeps of the worlds first satellite - Sputnik. I also missed watching Neil Armstrong step foot on the moon and the first space shuttle take off for the stars. Those events wer

17、e way before my time.As a kid, I was fascinated with what goes on in the sky, and when NASA pulled the plug on the shuttle program I was heartbroken. Yet the privatized space race has renewed my childhood dreams to reach for the stars.As a meteorologist, Ive still seen many important weather and spa

18、ce events, but right now, if you were sitting next to me, youd hear my foot tapping rapidly under my desk. Im anxious for the next one: a space capsule hanging from a crane in the New Mexico desert.Its like the set for a George Lucas movie floating to the edge of space.You and I will have the chance

19、 to watch a man take a leap into an unimaginable free fall from the edge of space - live.The (lack of) air up there Watch man jump from 96,000 feet Tuesday, I sat at work glued to the live stream of the Red Bull Stratos Mission. I watched the balloons positioned at different altitudes in the sky to

20、test the winds, knowing that if they would just line up in a vertical straight line we would be go for launch.I feel this mission was created for me because I am also a journalist and a photographer, but above all I live for taking a leap of faith - the feeling of pushing the envelope into uncharted

21、 territory.The guy who is going to do this, Felix Baumgartner, must have that same feeling, at a level I will never reach. However, it did not stop me from feeling his pain when a gust of swirling wind kicked up and twisted the partially filled balloon that would take him to the upper end of our atm

22、osphere. As soon as the 40-acre balloon, with skin no thicker than a dry cleaning bag, scraped the ground I knew it was over.How claustrophobia almost grounded supersonic skydiverWith each twist, you could see the wrinkles of disappointment on the face of the current record holder and capcom (capsul

23、e communications), Col. Joe Kittinger. He hung his head low in mission control as he told Baumgartner the disappointing news: Mission aborted.The supersonic descent could happen as early as Sunday.The weather plays an important role in this mission. Starting at the ground, conditions have to be very

24、 calm - winds less than 2 mph, with no precipitation or humidity and limited cloud cover. The balloon, with capsule attached, will move through the lower level of the atmosphere (the troposphere) where our day-to-day weather lives. It will climb higher than the tip of Mount Everest (5.5 miles/8.85 k

25、ilometers), drifting even higher than the cruising altitude of commercial airliners (5.6 miles/9.17 kilometers) and into the stratosphere. As he crosses the boundary layer (called the tropopause), he can expect a lot of turbulence.The balloon will slowly drift to the edge of space at 120,000 feet (2

26、2.7 miles/36.53 kilometers). Here, Fearless Felix will unclip. He will roll back the door.Then, I would assume, he will slowly step out onto something resembling an Olympic diving platform.Below, the Earth becomes the concrete bottom of a swimming pool that he wants to land on, but not too hard. Sti

27、ll, hell be traveling fast, so despite the distance, it will not be like diving into the deep end of a pool. It will be like he is diving into the shallow end.Skydiver preps for the big jumpWhen he jumps, he is expected to reach the speed of sound - 690 mph (1,110 kph) - in less than 40 seconds. Lik

28、e hitting the top of the water, he will begin to slow as he approaches the more dense air closer to Earth. But this will not be enough to stop him completely.If he goes too fast or spins out of control, he has a stabilization parachute that can be deployed to slow him down. His team hopes its not ne

29、eded. Instead, he plans to deploy his 270-square-foot (25-square-meter) main chute at an altitude of around 5,000 feet (1,524 meters).In order to deploy this chute successfully, he will have to slow to 172 mph (277 kph). He will have a reserve parachute that will open automatically if he loses consc

30、iousness at mach speeds.Even if everything goes as planned, it wont. Baumgartner still will free fall at a speed that would cause you and me to pass out, and no parachute is guaranteed to work higher than 25,000 feet (7,620 meters).It might not be the moon, but Kittinger free fell from 102,800 feet in 1960 - at the dawn of an infamous space race that captured the hearts of many. Baumgartner will attempt to break that record, a feat that boggles the mind. This is one of those monumental moments I will always remember, because there is no way Id miss this.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 教育教学 > 成人教育


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号