The Layered Protocol Wrappers Exercise-Network Data .ppt
《The Layered Protocol Wrappers Exercise-Network Data .ppt》由会员分享,可在线阅读,更多相关《The Layered Protocol Wrappers Exercise-Network Data .ppt(31页珍藏版)》请在麦多课文档分享上搜索。
1、The Layered Protocol Wrappers Exercise: Network Data Encryption / Decryption Using ROT13 Algorithm,Henry FuWashington University Applied Research LabSupported by: NSF ANI-0096052 and Xilinx Corp.http:/www.arl.wustl.edu/arl/projects/fpx/fpx_kcpsm/ hwf1arl.wustl.edu,The Layered Protocol Wrappers Exerc
2、ise,Network data encryption / decryption using ROT13 algorithm Rotates characters by 13 places A N, M Z, a n, m z Encryption Example: Hello World encrypts to Uryyb Jbeyq Decryption Example: Uryyb Jbeyq decrypts to Hello World,Approach to the ROT13 Algorithm,Consider the following four cases IF (ch =
3、 A) & (ch = N) & (ch = a) & (ch = n) & (ch = z) Rotate “Left” ch by 13 characters,The ROT13 Module Package,The ROT13 Module Package Detailed information on the Internet: http:/www.arl.wustl.edu/arl/projects/fpx/fpx_kcpsm/ Download the ROT13 Module Package Right click on ROT13.tar.gz Save it to h: Ex
4、tract the ROT13 Module Package Open a cygwin window cd /cygdrive/h/ gunzip ROT13.tar.gz tar xvf ROT13.tar,The ROT13 Module Package (More),The ROT13 Module Package includes ROT13/sim/ Modelsim simulation directory ROT13/syn/ Synplicity, Xinlinx backend synthesis directory ROT13/vhdl/ VHDL source dire
5、ctory ROT13/wrappers/ Layered Protocol Wrappers package directory,The ROT13 Module Framework,The ROT13 Module (“module.vhd”) is based on the ExampleApp Module Instantiate the UDP Wrapper Instantiate the ROT13 Application (“rot13app.vhd”) Instantiate the UDPEcho entity Instantiate four parallel ROT13
6、 entity (“rot13.vhd”) D_MOD_IN is 32-bit data bus, but we need to encrypt on a character boundary (8-bit data),Overview of the ROT13 Application,The ROT13 Entity,The ROT13 encrypts / decrypts the characters stored in the UDP payload Implement a state machine that steps through the ATM Cells Looks fo
7、r the start of the ATM Cell (SOF) Looks for the start of the UDP Datagram (SOD) Looks for the start of the UDP Payload Encrypts the UDP Payload with the ROT13 algorithm when there are valid data Looks for the end of the ATM Cell (EOF),State Diagram of the ROT13 State Machine,IDLE,REQ,REQ2,UDPPayload
8、,IF DataEn = 1 then Encrypts / Decrypts Payload,VHDL Process of the ROT13 State Machine,type StateType is (Idle, Req1, Req2, UDPPayload); - states signal state, nx_state : StateType; - current and new statestate_machine: process (Reset_l, state, sof_in, dataen_in, eof_in, sod_in, data_in)variable tm
9、p_state : StateType; - new statevariable tmp_data : UNSIGNED (7 downto 0);begin - process state_machine- default valuetmp_state := state;tmp_data := UNSIGNED (data_in);- details of state machine goes here- set statenx_state = tmp_state;data_out = std_logic_vector (tmp_data);dataen_out = dataen_in;so
10、f_out = sof_in;eof_out = eof_in;sod_out = sod_in;end process state_machine;,Simulating the ROT13 Module,Modelsim is used to simulate the ROT13 Go to the sim directory and create the input file cd ROT13/sim/ cp HELLO.DAT INPUT_CELLS.DAT Compile the module and start Modelsim Make compile Make sim In M
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- THELAYEREDPROTOCOLWRAPPERSEXERCISENETWORKDATAPPT

链接地址:http://www.mydoc123.com/p-373298.html