Top Banner

Click here to load reader

CHENCHUAES

Aug 22, 2014

ReportDownload

Documents

satya248

ABSTRACT

The AES encryption/decryption algorithm is widely used in modern consumer electronic products for security. To shorten the encryption/decryption time of plenty of data, it is necessary to adopt the algorithm of hardware implementation; however, it is possible to meet the requirement for low cost by completely using software only. In this paper, we implemented the AES encryption algorithm with hardware in combination with part of software using the custom instruction mechanism provided by the ARM7 with keil platform. The main functional blocks of this algorithm are AES-128 key expansion block: The initial 128-bit cipher key has to be expanded to eleven round keys of same length. The first round key is the cipher key (RoundKey0) and all subsequent round keys are produced when a function is applied to the previously generated round key. A data block of 128-bits, called plaintext, is provided as input to the AES encryption algorithm. AES performs a number of transformations to the plaintext, and a 128-bit output block (called cipher text) is produced as a result.

Introduction

Page 1

CHAPTER-1

INTRODUCTION TO EMBEDDED SYSTEMS1.1 Introduction

An Embedded system is any computer system hidden inside a product other than a computer. Embedded systems are found in wide range of applications like expensive industrial control applications. As the technology brought down the cost of dedicated processors. They began to appear in moderately expansive applications such as automobiles, communications and office equipment, televisions. Todays embedded system is so inexpensive that they are used in almost every electronic product in our life. Performance goals will force us to learn and apply new techniques such as multitasking and scheduling. The need to communicate directly with sensors actuators, keypads, displays etc will require programmers to have a better understanding of how alternative methods for performing input and output provide opportunities to trade speed, complexity and cost

1.a How powerful are embedded processorsThe embedded system found in most consumer products employs a single chip controller. That includes the microprocessor, a limited amount of memory and simple input output devices. By far the vast majority of the embedded systems in production today are based on the 4bit, 8bit, or 16bit processors. Although 32bit processors account for relatively small percentage of the current market, their use in embedded systems is growing at the fastest rate. In 1998, almost 250 million 32bit embedded processor were shipped, compared to 100million desk top computers.

1.b What programming languages are usedAlthough it is occasionally necessary to code some small parts of an embedded application program in assembly language, rest of the code in even the simplest application is written in a high level language. Traditionally the choice of the language has been C. Programs written in C are very portable from one compiler and/or target processor toIntroduction Page 2

another. C compilers are available for a number of different target processors, and they generate very efficient code. Despite the popularity of C++ and Java for desktop application programming, they are rarely used in embedded systems because of the large run-time overhead required to support some of their features. For example, even a relatively simple C++ program will produce about twice as much code as the same program written in C,and the situation is Much worse for large program that makes extensive use of the run-time library.

1.c How is building an embedded application unique?You should already be familiar with the tools and soft ware components used to build a desktop application program and load it into memory for execution. Desktop Application program is as shown in fig. 1.1. Desktop application programs.

Object files Compiler Executable Image Assebler file Linker Loader Read write RAM Memory (RAM)

Boot process Run time library

Fig.1.1 Desktop application programs.

Operating system image

Introduction

Page 3

Embedded Application Program

Object Files Compiler Executable Assembler Image File Linker Loader file

Rom image

Read write Memory (RAM)

Rom Program Burner initialization

Read only Memory (ROM)

Fig.1.2 Embedded Application ProgramRe-entrant library

A compiler and/or an assembler are used to build one or more object files that areRun-time gather linked to kernel with a run-time library to form an executable image thats stored as a file on

the disk. When we want run a desktop application program, its executable image is loaded from a disk into memory by a part of the operating system known as the Loader. The operating system itself is already in memory, put there during the boot process. The desktop system is intended to run a number of different application programs. Thus, read-write main memory is used so that an entirely different application program can be quickly and easily loaded into memory, replacing the previous application whenever necessary. Unlike general desktop systems embedded systems are designed to serve a single purpose. Once the embedded software is in memory, there is usually no reason to change it.

1.2 Embedded Software Development Tools

Application programmers typically do their work on the same kind of computer on which the application will run. If programmers edit the program, compiles its links it, tries it out and debugs it, all on the same machin The tactic has to change for embedded systems. In the first place, most embedded systems have specialized hardware to attach to special sensors or to drive special controls, and the only way to try out the software is on the specialized hardware.

Introduction

Page 4

In the second place, embedded systems often use microprocessors that have never been used as the basis of workstations. Obviously, programs do not get magically compiled into the instruction set for what ever microprocessor you happen to have chosen for your system, and programs do not magically jump into the memory of your embedded system for execution

1.2.1 Host And Target MachinesMost programming work for embedded systems is done on a host, a computer system on which all the programming tools run. Only after the program has been written, compiled, assembled and linked is it moved to target, the system that is shipped to customers. Some people use the word workstation instead of host; the word target is almost universal(See in Figure given below).

1.2.2 Cross compilersMost desktop system used as host comes with compilers, assemblers, and linkers and so on for the building to the programs that will run on the host. These tools are called as the native tools. The need of a compiler that needs run on the host system but produce the binary instructions that will be understand by the target microprocessor. Such a program is called a cross compiler. The fact that program works on your host machine and compiles cleanly with your cross compiler is no assurance that will work on your target system. The same problem that haunts every other effort to port C programs from machine another apply. The variables declared has int may be one size on the host and a different size on the target. Structures may be packed differently on the two machines. Ur ability to access 16 bit and 32 bits and entities that reside at odd numbered address may be different.

Introduction

Page 5

HOST

Machine EC Files(.C) Cross Compiler .O bj Link er Locat orAssembly (.asm)

Cross Assembler

.O bj

Target

SystemFig. 1.3 Cross Compilers

1.2.3 Cross AssemblersAnother tool that will need if we must write any of the program in assembly language is a cross assembler. As we might imagine from the name, a cross assembler is an assembler that run on host but produces binary instructions appropriated for the target. The input to the cross assembler must be assembly language appropriated for the target (since that is the only assembly language that can be translated into binary instructions for the target).

Introduction

Page 6

1.2.4 Linker/Locators for Embedded Software The first difference between a native linker and locator is the nature of the output files that they create. The native linker creates a file on the disk drive of the host system that is read by a part of the O.S called the loader. The locator creates file that will be used by some program that copies the output to the target system. Later, the output from the locator will have to run its own. In an embedded system, there is no separate O.S. Linkers for embedded system is often called as locators.

1.3 Embedded Design MethodologyThe fast growing complexity and short time to market of today's real-time embedded systems necessitates new design methods and tools to face the problem of specification, design, analysis, scheduling, simulation, integration and validation of complex systems. In the project, a system level method for embedded real-time systems design is developed exploiting SystemC strength for system level dan co-design modeling. In order to support the methodology, some extentions to SystemC are proposed starting form RTOS modeling and framework for scheduling simulation.

Introduction

Page 7

CHAPTER-2

INTRODUCTION2.1Information Security:The concept of information will be taken to be an understood quantity. To introduce cryptography, an understanding of issues related to information security in general is necessary. Information security manifests itself in many ways according to the situation and requirement. Regardless of who is involved, to one degree or another, all parties to a transaction must