Lightweight IPsec in embedded systems design and implementation

Author
XueFuShi
Advisor
LeiHang
School
University of Electronic Science and Technology
Major
Applied Computer Technology
Classification
TP368.1 Microprocessor
Degree
Master's thesis
Year
2011
Downloads
37
Citations
0

Request the full text

Abstract

Along with the successful implement of networking technology in embedded systems, more and more embedded devices have been connected to the Internet. Due to limit of resources of embedded systems, however, many light-weight TCP/IP protocol stacks used in low-end embedded devices, which are widely used, have had little security measures incorporated into them, thus exposing the whole system to security threats. Obviously it is necessary and urgent to apply IPsec security protocols to those embedded devices connected to Internet.Given that the low-end embedded systems are used most in the field of control, which do not usually involve large amount of data transmission, and that many embedded platforms are not quite demanding the speed of network data transmission, it is feasible to implement IPsec on embedded systems to achieve network security.This thesis concentrates on the implement of lightweight IPsec protocol stacks on low-end embedded platforms, to add the stacks to existing network devices, or to have them embedded into new embedded devices. In this thesis, lwIP is used as TCP/IP protocol stacks, based on which, standard IPsec is tailored. In designing the SPD and SAD database query, static addition scheme is used; in memory management, zero-copy technology and dynamic adjusting data-pack size scheme is employed. In order to improve code execution and memory usage efficiency, in-place program is used in algorithm design. Finally, IPsec simulation approach is adopted to embed the whole code into the existing software system to ensure it can be applied to the existing devices.The whole system has achieved ESP and AH data packet encapsulation method under IPsec tunnel mode and supplies SHA1, MD5 authentication algorithm, and DES, 3DES encrypt algorithm, with the size of the whole IPsec code block being smaller than 120KB. Subsequently the system is tested on the embedded platforms, of which the CPU are S3C2440 (ARM9 core) and PIC16F877(16 bit MCU) and OS is ucOSIIV2.80. The Ethernet connection being 10Mbps, CPU clock set at 20M, the round-trip time (RTT, max data being 1280 byte) is within 120ms with AH packet encapsulation and within 1000ms with ESP encapsulation, thus satisfying the needs for data processing and transmitting of some embedded devices.Based on the discussion above, the IPsec designed in this thesis can be embedded into some existing embedded systems and applied to some new embedded devices and work for their networking security, and thus partly solving the network security issue in embedded network systems.

Table of contents

Abstract 4-5 ABSTRACT 5-14 first chapter 14-20 1.1 thesis research background and significance 14 -15 1.2 research status 15-17 1.3 The main technical route 17 1.4 main work and thesis organization 17-19 <br / > 1.4.1 the main thesis work 17-18 1.4.2 structure of the thesis 18-19 1.5 Summary 19-20 < br /> Chapter embedded with IPsec key technical overview 20-47 2.1 embedded system development and system architecture 20-24 2.1.1 embedded technology and its particularity 20-21 2.1.2 embedded hardware and software system architecture 21-24 2.2 TCP / IP protocol stack and lwIP implementation framework 24-35 2.2.1 TCP / IP protocol 24-25 2.2.2 network packet packet and unpacking process 25-27 2.2.3 IP, TCP, UDP protocol description and Baotou structure 27-32 2.2.4 of the standard TCP / IP protocol stack to the embedded system's shortcomings 32-33 2.2 .5 lightweight TCP / IP protocol stack lwIP its implementation 33-34 2.2.6 LwIP process model 34-35 2.2.7 operating system emulation layer 35 2.3 IPsec protocol architecture and key technologies 35-46 2.3.1 several common network attacks 35-37 2.3. 2 IPsec protocol architecture 37-40 2.3.3 AH protocol 40-41 2.3.4 ESP protocol 41-42 2.3. 5 DES encryption algorithm principle 42-44 2.3.6 HASH algorithm principle 44-46 2.4 Summary 46-47 Chapter lightweight IPsec framework and software system design 47-62 3.1 IPsec lightweight design framework 47-49 3.2 software architecture and implementation 49 -53 3.3 storage management design 53-56 3.4 AH algorithm design and implementation 56-58 3.4.1 AH data origin authentication processes 56-57 3.4.2 AH encapsulation processes 57-58 3.5 ESP algorithm design and implementation 58-61 3.5.1 ESP decapsulation processing process 59-60 3.5.2 ESP encapsulation processes 60-61 3.6 Summary 61-62 Chapter IV coding system 62-83 4.1 IPsec device module 62-67 4.1.1 IPsecdev_input function implementation 62-64 4.1.2 IPsecdev_output function implementation 64-66 4.1.3 IPsecdev_netlink_output function implementation 66 4.1.4 IPsecdev_init function implementation 66-67 4.2 SPD / SAD module 67-72 4.2.1 SPD / SAD data structure design 67-68 4.2.2 SPD lookup function to achieve 68-70 4.2. 3 SAD lookup function to achieve 70-72 4.3 AH module 72-77 4.3.1 IPsec_ah_check function implementation 72-75 4.3. 2 IPsec_ah_encapsulate function implementation 75-77 4.4 ESP module 77-82 4.4.1 input process reopened handler IPsec_esp_decapsulate () implementation 77-79 4.4.2 output flow package handler IPsec_esp_encapsulate () implementation 79-82 4.5 Chapter Summary 82-83 Chapter test 83 -90 5.1 test environment and test methods 83-84 5.2 module structure tests and results 84-85 5.3 functional tests and results 85 -87 5.3.1 functional Test methods 85-86 5.3.2 safety Test 86-87 5.4 application Testing 87-89 5.4.1 code volume statistics 87-88 5.4.2 system Performance 88-89 5.5 chapter Summary 89-90 <br / > Chapter VI Conclusion and Outlook 90-91 Thanks 91-92 References 92-95

Related dissertations

  1. Desigen of Weighing Controller Based on LAN
  2. Design of the Embedded Internet Controller Based on STM32
  3. Research and Design of Information Processing System in Interferometric Fiber-optic Sensor
  4. The Research and Implementation of Embedded TCP/IP Stack Based on F28M35HX
  5. The Research of Process Gas Analysis Instruments Networking
  6. The Design of an Wireless Image Transmission System Based on WIFI
    WangJing ·Xi'an Optics and Fine Mechanics ·2013 ·Master's thesis
  7. The Development and Research of LED Control System in WIFI Environment
  8. Embedded Performance Detecting System for Automotive Switch
    SuXing ·Tianjin University of Technology ·2013 ·Master's thesis
  9. And implementation of artillery information processing design based on LPC2478
  10. Research and Development of the Register Real-Time Monitoring System Based on F28M35x
  11. Design on Some Modules of Permanent Magnet MRI
    PengQiuShi ·Xiamen University ·2014 ·Master's thesis
  12. Study on the Embedded Equipment Monitoring Platform Based on μC/OS-Ⅱ and LwIP
    LuXu ·Chongqing University ·2013 ·Master's thesis
  13. Embedded Web Monitoring System Based on ARM and μC/OS-Ⅱ
    LvYiHui ·Nanchang University ·2012 ·Master's thesis
  14. Design and Implementation of the Module of Uart to Modbus-TCP Client
    WangHuaiKuan ·Anhui University ·2013 ·Master's thesis
  15. Development of Electric Actuators Based on EPA Protocol
    WangWenLiang ·Tianjin University ·2012 ·Master's thesis
  16. The Research of Time Synchronization System Based on IEEE1588
    ZouLei ·Nanjing Forestry University ·2012 ·Master's thesis
  17. Design of Embedded Web Server Based on Cortex-M3
    CaiXiongFei ·Zhejiang University of Technology ·2013 ·Master's thesis
  18. Research and Realization of RTU Networking Based on LwIP Protocol Stack
    ChenChen ·Xi'an University of Petroleum ·2011 ·Master's thesis
  19. LwIP Transplantation and Application Research of Embedded WEB Based on Cortex-M3
    HuYiWan ·Nanchang University ·2013 ·Master's thesis
  20. Design of Intelligent Access Control System in Villa Estate
    ZhangPeng ·Shandong University ·2012 ·Master's thesis