Data Encryption Using Field Programmable Logic Controller
Data Encryption Using Field Programmable Logic Controller
Data Encryption Using Field Programmable Logic Controller
www.iosrjen.org
I.
INTRODUCTION
Encryption is the process of encoding messages or information in such a way that only authorized
parties can read it. Encryption does not of itself prevent interception, but denies the message content to the
interceptor. In an encryption scheme, the message or information, referred to as plaintext, is encrypted using an
encryption algorithm, generating cipher text that can only be read if decrypted. For technical reasons, an
encryption scheme usually uses a pseudo-random encryption key generated by an algorithm. It is in principle
possible to decrypt the message without possessing the key, but, for a well-designed encryption scheme, large
computational resources and skill are required. An authorized recipient can easily decrypt the message with the
key provided by the originator to recipients, but not to unauthorized interceptors.
Encryption has long been used by militaries and governments to facilitate secret communication. It is
now commonly used in protecting information within many kinds of civilian systems. Encryption can be used to
protect data "at rest", such as files on computers and storage devices .In recent years there have been numerous
reports of confidential data such as customers' personal records being exposed through loss or theft of laptops or
backup drives. Encrypting such files at rest helps protect them should physical security measures fail.
Encryption is also used to protect data in transit, for example data being transferred via networks (e.g. the
Internet, e-commerce), mobile telephones, wireless microphones, wireless intercom systems, Bluetooth devices
and bank automatic teller machines. There have been numerous reports of data in transit being intercepted in
recent years. Encrypting data in transit also helps to secure it as it is often difficult to physically secure all access
to networks.
II.
METHODOLOGY
The system is divided into parts; hardware and software. In the hardware, an FPGA is used as a real time
processing tool in the system design.. A data logger is used as a model for the storage of the encrypted data . In
the design a personnel computer is considered as the source of data to the FPGA. The design accepts stream of
data from any digital electronic source to supply the FPGA with plain data.
A software code is developed in the FPGA to encrypt the incoming stream of data . The code of encryption is
written in VHDL language and downloaded in the FPGA in a (.bit) format. A` multi level gates technique is
implemented in structuring the digital electronic circuit into the FPGA. SPARTAN-3 software package is used
in programming the FPGA.. The PC generates the plain stream of data using Turbo C++ language) TC++).
53 | P a g e
SYSTEM LAYOUT
The aim of the design is to illustrate the usage of the encryption process and its applications .The electronic
devices required to construct the encryption system is a personnel computer, FPGA , data logger , plus
interconnection links and lab link cable. The block diagram of the hardware implementation of the entire system
is shown in Figure (1) below.
IV.
To achieve the objective of the real time encryption and data logging , we need to go through five steps as
follows:
1. Step one is developing a VHDL program in the computer by using Spartan-3 software .
2. Step two includes VHDL synthesis in the design, which converts the design in the behavioral description file
into gates. The synthesis tools figure out what gates to be used based on the VHDL program file.
3. Step three includes downloading of the (.bit file) into the FPGA as shown in figure (2).
4. Step four includes interconnecting the FPGA to the data logger by a lab link , as shown in figure (1).
5. Step five in includes testing and debugging the operation of the whole system .
54 | P a g e
The algorithm performs a real time encryption of data and storage in the data logger. The algorithm
contains four subroutines . Calling the subroutine one after the other makes the program modular .The first
subroutine processes the data encryption related to level-1 gates array in the FPGA. The second subroutine
processes the data encryption related to level-2 gates array in the FPGA. The third subroutine processes the data
encryption related to level-3 gates array in the FPGA. The fourth subroutine processes the data conveyance from
the FPGA to the data logger .The execution of the four subroutines means performing a complex encryption
procedure on a single byte of the data stream .The processing is repeated till the end of the data stream coming
from the PC. The FPGA algorithm is :
Start
Initialization :
Program FPGA connector (A1) as input.
Program FPGA connector (A2) as output.
... Clear the FPGA output connector (A2).
Poll for data input:
.. If a byte is received , then call level-1 encryption subroutine..
.. Call level-2 encryption subroutine..
.. Call level-3 encryption subroutine..
.. Call output to data logger subroutine..
Go to Poll the sensors.
Level-1 encryption subroutine :
Pass the byte though eight XOR gates array.
Pass byte to level-2.
Return.
Level-2 encryption subroutine :
Pass the byte though eight NAND gates array.
Pass byte to level-3.
Return.
Level-3 encryption subroutine :
Pass the byte though eight OR gates array.
Pass byte to FPGA output connector (A2).
Return.
Output to data logger subroutine:
Pass the encrypted byte to the data logger .
.. Give byte finish acknowledge.
Return.
The PC supplies the FPGA with plain data byte by byte through the parallel port . Turbo C++ programming
language is used .The PC algorithm: is :
Start
Initialization:
... Clear the parallel port output.
55 | P a g e
V.
RESULTS
The system performs two types of tasks. The first task is programming the FPGA with VHDL language . The
second task is the plain data generation ,encryption and storage in the data logger..Table (1) below shows the
results when operating the system .The table indicates the result obtained for a randomly selected byte..
Table (1) The results when operating the system
BYTE
LEVEL-1 (XOR)
0
1
0
0
0
0
0
1
1
0
1
1
1
1
1
0
LEVEL-2
(AND)
0
0
1
1
1
1
1
0
LEVEL-3
(OR)
0
1
1
1
1
1
1
0
BYTE IN DATA
LOGGER
0
1
1
1
1
1
1
0
NOTE: ASCII code of input byte represents (A) , while the byte in the data logger becomes (~).
VI.
CONCLUSION
The circuit that enabled the data encryption in the FPGA adapted three levels strategy of gate arrays.
The number of levels can be changed as well as the algorithm of performing the encryption. . The electronic
FPGA represents an embedded system . Any change in the strategy and the algorithm results in a total change in
the stored data in the data logger.. A model of the system is constructed and its operation is satisfactory.
REFERENCES
[1]
[2]
[3]
[4]
[5]
William Stallings, Cryptography and Network Security Principles and Practice, 5th Edition, Prentice
Hall, 2011.
Volnei A. Pedroni, Circuit Design with VHDL, MIT press, Massachusts, 2004.
ISE Simulator (ISim), UG682(v1.0), 2009.
Deming.C, Jason.C, and Peichan. P, FPGA Design Automation: A Survey, now Publishers In, (2006).
Stephen .B and Zvonko.V,Fundamental of Digital logic with VHDL Design,McGrow Hil,(2005)
56 | P a g e