Data Encryption on FPGA using Huffman Coding

Similar documents
FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Design and Implementation of Hamming Code on FPGA using Verilog

FPGA Implementation of Huffman Encoder and Decoder for High Performance Data Transmission

An Efficient Decoding Technique for Huffman Codes Abstract 1. Introduction

Encoding. A thesis submitted to the Graduate School of University of Cincinnati in

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

Workshop on Digital Circuit Design in FPGA

OPTIMIZATION OF LZW (LEMPEL-ZIV-WELCH) ALGORITHM TO REDUCE TIME COMPLEXITY FOR DICTIONARY CREATION IN ENCODING AND DECODING

Verilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering

Design and Implementation of Hamming Code using VHDL & DSCH

Lab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog

HARDWARE IMPLEMENTATION OF LOSSLESS LZMA DATA COMPRESSION ALGORITHM

Implementation of Hamming code using VLSI

Lossless Compression Algorithms

FPGA-BASED DATA ACQUISITION SYSTEM WITH RS 232 INTERFACE

What is Verilog HDL? Lecture 1: Verilog HDL Introduction. Basic Design Methodology. What is VHDL? Requirements

A New Symmetric Key Algorithm for Modern Cryptography Rupesh Kumar 1 Sanjay Patel 2 Purushottam Patel 3 Rakesh Patel 4

A Compression Method for PML Document based on Internet of Things

Keywords: Soft Core Processor, Arithmetic and Logical Unit, Back End Implementation and Front End Implementation.

Efficient VLSI Huffman encoder implementation and its application in high rate serial data encoding

Fundamentals of Multimedia. Lecture 5 Lossless Data Compression Variable Length Coding

Nikhil Gupta. FPGA Challenge Takneek 2012

Highly Secure Invertible Data Embedding Scheme Using Histogram Shifting Method

A Research Paper on Lossless Data Compression Techniques

VLSI ARCHITECTURE FOR NANO WIRE BASED ADVANCED ENCRYPTION STANDARD (AES) WITH THE EFFICIENT MULTIPLICATIVE INVERSE UNIT

Advanced WG and MOWG Stream Cipher with Secured Initial vector

Lab 7 (All Sections) Prelab: Introduction to Verilog

Data Compression Fundamentals

VHDL CODE FOR SINGLE BIT ERROR DETECTION AND CORRECTION WITH EVEN PARITY CHECK METHOD USING XILINX 9.2i

FPGA Implementation of High Speed AES Algorithm for Improving The System Computing Speed

Golomb Coding Implementation in FPGA

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

FPGA based Data Compression using Dictionary based LZW Algorithm

FPGA BASED CRYPTOGRAPHY FOR INTERNET SECURITY

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson

Design and Implementation of a Data Compression Scheme: A Partial Matching Approach

Digital Design with FPGAs. By Neeraj Kulkarni

A Novel Image Compression Technique using Simple Arithmetic Addition

Spiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification.

Register Transfer Level in Verilog: Part I

Matrix Manipulation Using High Computing Field Programmable Gate Arrays

Comparative Study of Dictionary based Compression Algorithms on Text Data

Tutorial on VHDL and Verilog Applications

Analysis of Algorithms

An Application of Graph Theory in Cryptography

Introduction to Verilog HDL

A Comparative Study of Entropy Encoding Techniques for Lossless Text Data Compression

Intro. To Multimedia Engineering Lossless Compression

Implementation of Ethernet, Aurora and their Integrated module for High Speed Serial Data Transmission using Xilinx EDK on Virtex-5 FPGA

Research Article Does an Arithmetic Coding Followed by Run-length Coding Enhance the Compression Ratio?

ENTROPY ENCODERS: HUFFMAN CODING AND ARITHMETIC CODING 1

FSM and Efficient Synthesizable FSM Design using Verilog

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Design and Implementation of VLSI 8 Bit Systolic Array Multiplier

International Journal of Advanced Research in Computer Science and Software Engineering

32 bit Arithmetic Logical Unit (ALU) using VHDL

Field Programmable Gate Array

Implementation of Lifting-Based Two Dimensional Discrete Wavelet Transform on FPGA Using Pipeline Architecture

An Efficient Compression Technique Using Arithmetic Coding

Enhanced Play Fair Cipher

VERILOG: FLIP-FLOPS AND REGISTERS

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits

Design of a Multiplier Architecture Based on LUT and VHBCSE Algorithm For FIR Filter

CO SIMULATION OF GENERIC POWER CONVERTER USING MATLAB/SIMULINK AND MODELSIM

Introduction. Why Use HDL? Simulation output. Explanation

AN EFFICIENT DESIGN OF VLSI ARCHITECTURE FOR FAULT DETECTION USING ORTHOGONAL LATIN SQUARES (OLS) CODES

Volume 2, Issue 9, September 2014 ISSN

Design of Convolutional Codes for varying Constraint Lengths

Network Routing Protocol using Genetic Algorithms

AES1. Ultra-Compact Advanced Encryption Standard Core AES1. General Description. Base Core Features. Symbol. Applications

IMPLEMENTATION OF FPGA-BASED ARTIFICIAL NEURAL NETWORK (ANN) FOR FULL ADDER. Research Scholar, IIT Kharagpur.

Shri Vishnu Engineering College for Women, India

Enhanced 3-D PLAYFAIR Cipher

LSN 1 Digital Design Flow for PLDs

FPGA CAN BE IMPLEMENTED BY USING ADVANCED ENCRYPTION STANDARD ALGORITHM

EECS150 - Digital Design Lecture 4 - Verilog Introduction. Outline

A Proposed Method for Cryptography using Random Key and Rotation of Text

Huffman Coding. (EE 575: Source Coding Project) Project Report. Submitted By: Raza Umar. ID: g

DESIGN AND IMPLEMENTATION OF 8 BIT AND 16 BIT ALU USING VERILOG LANGUAGE

High speed DCT design using Vedic mathematics N.J.R. Muniraj 1 and N.Senathipathi 2

Comparison between Variable Bit Representation Techniques for Text Data Compression

Secure Communication With Lossless Data Compression Using Dpd Encoding

DESIGNING OF STREAM CIPHER ARCHITECTURE USING THE CELLULAR AUTOMATA

International Journal of Advance Engineering and Research Development

A Combined Encryption Compression Scheme Using Chaotic Maps

What is Xilinx Design Language?

THE INTERNATIONAL JOURNAL OF SCIENCE & TECHNOLEDGE

Workshop on Digital Circuit Design in FPGA

International Journal of Science Engineering and Advance Technology, IJSEAT, Vol 2, Issue 11, November ISSN

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and

ENSC Multimedia Communications Engineering Huffman Coding (1)

Vertex Magic Total Labeling of Complete Graphs and their application for Public-Key Cryptosystem

IMAGE COMPRESSION TECHNIQUES

A Proposed Cipher Technique with a Study of Existing Cryptography Techniques

A Comparative Study of Lossless Compression Algorithm on Text Data

FPGA Implementation of a High Speed Multiplier Employing Carry Lookahead Adders in Reduction Phase

Information Technology Department, PCCOE-Pimpri Chinchwad, College of Engineering, Pune, Maharashtra, India 2

A New Compression Method Strictly for English Textual Data

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

Fixed-point Simulink Designs for Automatic HDL Generation of Binary Dilation & Erosion

Transcription:

Data Encryption on FPGA using Huffman Coding Sourav Singh 1, Kirti Gupta 2 12 Electronics and Communication Department, Bharati Vidyapeeth s College of Engineering, New Delhi, (India) ABSTRACT The ultimate goal to design an encryption algorithm is to ensure security against unauthorized attacks. To accomplish this, code compression is a vital step performed in high-speed digital data transport. Huffman coding is one of the efficient coding scheme used to perform compression. A critical step in performing compression is building the dictionary. The better the dictionary used by compression, the higher the compression rate. Huffman coding codes values statistically according to their probability of occurrence. Short code words are assigned to highly probable values and long code words to less probable values. The reference design files show the efficient implementation of the algorithms on encryption of data. Keywords: Data security, Digital, FPGA, Huffman coding, Spartan, Verilog I. INTRODUCTION Data Security is one of the area that has gained importance in digital communication. Encryption of data is usually done to achieve the purpose. By Data Encryption it means to perform mathematical calculations and application of algorithmic schemes so as to transform plain text into cipher text, a form that is non-readable to unauthorized parties. A recipient of an encrypted message at the receiver side uses a key which triggers the algorithm mechanism for the decryption of the data. The decryption refers the transformation of the received data into the original plaintext version. There are many different types of data encryption, but not all are reliable. Huffman coding is one of the best available techniques; presently available for data encryption. Huffman coding is used for lossless data compression, in image compression, in communication process for transmission of highly encrypted data. Huffman coding reduces the memory problem. [1-2]. A programmable integrated circuit named as Field-programmable gate array (FPGA) is designed to be configured by a customer or a designer after manufacturing hence has been referred to as FPGA meaning "field-programmable". The FPGA configuration is generally specified using a hardware description language (HDL) such as the VHDL, the Verilog etc. Instead of being restricted to any predetermined hardware function, an FPGA allows to program product features and functions, adapt to new standards, and reconfigure hardware for specific applications even after the product has been installed. A FPGA contains many (64 to over 10,000) identical configurable logic blocks (CLB) that can be viewed as standard components. CLBs can be programmed for to exhibit different functionalities [3]. The individual CLBs are interconnected by a matrix of wires and programmable switches. Paper is organized in the following manner. Firstly, a brief introduction about Huffman coding is presented in section II. Thereafter, the design approach at the software level and the hardware level is explained in section 507 P a g e

III and IV. The simulation results on Active HDL and FPGA are presented in section V. Lastly the conclusion are drawn in section VI. II. HUFFMAN CODING ALGORITHM To attain lossless data compression an entropy encoding algorithm known as Huffman coding is commonly algorithm used. The algorithm was proposed by David Huffman when he was enrolled in a Ph.D course at MIT, and published in the 1952 paper [1]. It is a method for the construction of minimum-redundancy codes and is known as the most efficient known compression style. It uses a variable-length code table for encoding a source symbol, where the table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol [2-5]. A. Algorithm 1. The probability of each character is computed. 2. The data set is sorted in ascending order. 3. A new node where the left child is the lowest in the sorted list and the right is the second lowest in the sorted list is created. 4. Chop-off those two elements in the sorted list as they are now part of one node and add the Probabilities. The result is the probability for the new node. 5. An insertion sort on the list with the new node is performed. 6. STEPS 3-5 are repeated until only one node is left. A pictorial representation of the algorithm is shown in Fig. 1 for the ready reference. Formalized description Input. Alphabet A= {a 1,a 2,.,a n } which is the symbol alphabet of size n. Set, W = {w 1,w 2,.,w n } which is the set of the (positive) symbol weights (usually proportional to probabilities), i.e. W i =weight (a i ) 1 i n Output C(A,W)=(c 1,c 2,.,c n ) Code, which is the set of (binary) codeword s, where is the codeword for. a i, 1 i n Goal. Let L(C)= W i x length(c i ), be the weighted path length of code C. Condition: L(C) L(T), for any code T(A,W). 508 P a g e

Fig. 1. An example of data encryption using Huffman Alogorithm III. DESIGN APPROACH IN VERILOG HDL In this manuscript, Verilog, standardized as IEEE 1364, is a hardware description language (HDL) has been used to model electronic systems. Verilog commonly employed in the design and verification of digital circuits at the register-transfer level of abstraction. A block diagram for the Huffman Coding module is shown in Fig. 2. The inputs to the block are a,b,c,d and clk whereas the 8 lines forms the encrypted data lines of the module. Based on the above algorithm, a sub-section of the program is given below which scans the array or string & count the frequency of each alphabet. It then assigns a appropriate Huffman code to the respective alphabet. Fig.2. Block Diagram of the Huffman module A subsection of the Huffman code in Verilog Always @ (posedge CLK) If ((a==1'b0) && (b==1'b0)) c1=c1+1; Else if ((a==1'b0) && (b==1'b1)) c2=c2+1; Else if ((a==1'b1) && (b==1'b0)) 509 P a g e

c3=c3+1; Else if ((a==1'b1) && (b==1'b1)) c4=c4+1 IV. DESIGN APPROACH FOR FPGA After calculating the frequency of each alphabet, the algorithm will check the alphabet with highest frequency and check; if its frequency is greater than the sum of rest of three alphabets. If it is found correct then it will assign bit 1 to it, else it will assign it bit 0. Now, going to next frequency; it will first apply the compliment of highest frequency and then the same procedure is followed for it and rest of the alphabets. A synthesizable code written in Verilog to implement the functionality on FPGA is as follows: Always@ (c1 or c2 or c3 or c4) If (c1>= (c2+c3+c4)) a1=1'b1; Else a1=1'b0; If (c2>= (c3+c4)) b1 [0] =1'b1; b1 [1] = (~a1); Else b1 [0] =1'b0; b1 [1] = (~a1); If (c3>=c4) c11 [0] =1'b1; c11 [1] = (~b1 [0]); c11 [2] = (~a1); d1 [0] = (~c11 [0]); d1 [1] = (~b1 [0]); d1 [2] = (~a1); 510 P a g e

Else c11 [0] =1'b0; c11 [1] = (~b1 [0]); c11 [2] = (~a1); d1 [0] = (~c11 [0]); d1 [1] = (~b1 [0]); d1 [2] = (~a1); module V. SIMULATION RESULTS This section first present the results of Huffman coding on Active HDL. Thereafter, the results of the synthesizable code on FPGA: SPARATAN-II is demonstrated. 5.1 Result on Active-HDL Active-HDL is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction. It shows the frequency of each character in string. Greater the number of counts to a respective character, which means maximum, is its frequency and vice-versa. Fig.3. Output Waveforms on Active HDL 5.2Result on FPGA The field-programmable gate array (FPGA) is a semiconductor device that can be programmed after manufacturing. With each clock pulse, the FPGA first count the frequency of each character and then gives first as the character with maximum frequency and in second clock pulse it gives the output with second highest frequency and so on. 511 P a g e

Fig. 4. FPGA output of Huffman Coding VI. CONCLUSION The principal goal guiding the design of any encryption algorithm must be security against unauthorized attacks. The critical part of compression is building the dictionary. The better the dictionary used by compression, the higher your compression rate. Huffman coding is used to code values statistically according to their probability of occurrence. Short code words are assigned to highly probable values and long code words to less probable values. We first calculated the frequency of each alphabet and then encrypted them using Huffman coding and make it synthesizable for FPGA. This Huffman coding application note describes the Huffman coding algorithm. REFERENCES [1] Daugman, J. G. Entropy reduction and decorrelation in visual coding by oriented neural receptive fields. IEEE Transactions on Biomedical Engineering, 36(1), 1989, 107-114. [2] Vitter, J. S. Design and analysis of dynamic Huffman codes. Journal of the ACM (JACM), 34(4), 1987, 825-845. [3] Monmasson, E., & Cirstea, M. N. FPGA design methodology for industrial control systems A review. IEEE transactions on industrial electronics, 54(4), 2007, 1824-1842. [4] Katona, G., & Nemetz, O. Huffman codes and self-information. IEEE Transactions on Information Theory, 22(3), 1976, 337-340. [5] Bell, T. C., Cleary, J. G., & Witten, I. H. Text compression. Prentice-Hall, Inc. 1990. 512 P a g e