har dware implementation of rc4 stream cipher using vlsi issue 2013/hardware...stream cipher using...

5
Special Is ISBN No.: 978-81-926080-0-6/22-24 Hardware Implem Abstract: This paper deals with the d cipher for wire less LAN Security. RC4 key from 1 to 256 bytes to initialize a 256 is used for subsequent generation of pseu then generates a pseudorandom stream, w the plaintext/cipher text to give the ciph RC4 stream cipher works in two phases and the pseudorandom key stream g phases must be performed for every new supports 1044 bytes storage locations w only one 512 bytes storage locatio implemented in hardware by using VHD FPGA device. RC4 is the most widely stream cipher .The cipher has been int and WEP implementations. The cipher Rivest in 1987 and kept as a trade secret in 1994.RC4 is extremely fast and its paper deals with RC4 keystream generat the existing model of an exchange shuff better security. The main factors in RC4 wide range of applications are its speed a implementations in both software and h to develop. Keywords—RC4,Stream cipher, DataSerializer , K Stream Serializer. I. INTRODUCT Cryptography is a Greek word for art and science of transfor information(plaintext) i intermediate form (ciphertext) which s storage or transit. Normally, security having a vast number of different tran an opponent acquires some cipher tex different plaintext messages presu produced that exact same ciphertext, possible keys. Cryptography is a part further divided into secret codes versus to steganography, which seeks to hid message, cryptography seeks to render Prof. Mr. D. B. Rane Miss.U Jyoti F International Conference on Recent Trends in enginee ssue of International Journal of Electronics, Communication & Soft Computing S 4 Feb 2013 ©2013 SNJB's KBJ CoE mentation of RC4 Stream C VLSI design of RC4 stream uses a variable length 6-byte array. The array udo-random bytes and which is EXORed with her text/plaintext. The s. The key setup phase generator phase. Both w key. Previous designs while this design uses ons. The system is DL language and Xilinx y used software based tegrated into TLS/SSL r was design by Ron until it was leaked out design is simple. This tor, within the scope of fle ,in order to achieve 4's success over such a and simplicity: efficient hardware are very easy KRAM, SRAM, TION "hidden writing."The rming (encrypting) into an secures information in occurs as a result of nsformations. Then, if xt, a vast number of umably could have one for each of the of cryptology, and is s ciphers. As opposed de the existence of a a message unintelligible even when t exposed. Cryptography includ Secrecy, Message authentication Wireless Local Area Ne shows bright future for differe industries. The IEEE 802.11 is wireless standards.IEEE 802.1 implementation details, but physical and Media Access C standard is widely used in ad-ho but special attention should be in transmission channel. The based on Wired Equivalent Currently, all the IEEE 802.11 IEEE 802.11i working group Encryption Standard (AES), as future IEEE 802.11applications The WEP uses Pseudorandom Number Gen integrity algorithm. The PRN component because it is the core. WEP adopts RC4 stream Cyclic Redundancy Check ( algorithm. WEP has several procedure has no provision fo transmit the data using sam cracking of WEP even easie wireless security importance in Fidelity (Wi-Fi) alliance propo Wi-Fi Protected Access (WPA cipher as a security algorith management method, known Protocol (TKIP). TKIP uses M instead of WEP’s CRC-32 for e is a secure solution for upgrad not supporting to WPA2. As concerned WPA has edge over W II. RC4 STR RC4 uses a variable length ke initialize a 256-byte array. The S-Box and K-Box. The S-arra S0=0, S1=1, S2=2………..S25 Ukande F. Miss.Gund Shwetal R. Miss.Pawar Cha ering & Technology - 2013(ICRTET'2013) Science & Engineering, ISSN: 2277-9477 70 Cipher using the message is completely es at least: Key generation, n (integrity). etwork (WLAN) technology ent wireless communications one of the most widely used 1 standard does not provide provides specifications for Control (MAC) layers. This oc and client/server networks given to the security of data security of this standard is t Privacy (WEP) scheme. 1 products support WEP, but p introduced the Advanced s the security scheme for the s. two basic components, neration (PRNG) and the NG is the most important actually original encryption m cipher as PRNG unit and (CRC-32) as the integrity limitations and encryption or key rotation, usershave to me single key; which made er. In response to growing n corporate field, the Wireless osed a new security protocol A). WPA uses RC4 stream hm with new dynamic key as Temporal Key Integrity Message Integrity Code (MIC) ensuring data integrity. WPA dable equipment of WEP but far as transmission speed is WPA2. REAM CIPHER ey from 1 byte to 256 bytes to ere are two 256-bytes arrays, ay is filled linearly such as 55=255. The K-array consists andreshwari B.

Upload: others

Post on 08-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Har dware Implementation of RC4 Stream Cipher using VLSI Issue 2013/Hardware...Stream Cipher using VLSI esign of RC4 stream -byte array. The array -random bytes and er text/plaintext

Special Iss

ISBN No.: 978-81-926080-0-6/22-24 Feb 2013 ©2013 SNJB's KBJ CoE

Hardware Implementation of RC4

Abstract: This paper deals with the d

cipher for wire less LAN Security. RC4 uses a variable length

key from 1 to 256 bytes to initialize a 256

is used for subsequent generation of pseudo

then generates a pseudorandom stream, which is EXORed with

the plaintext/cipher text to give the ciph

RC4 stream cipher works in two phases. The key setup phase

and the pseudorandom key stream generator phase. Both

phases must be performed for every new key. Previous designs

supports 1044 bytes storage locations while this design use

only one 512 bytes storage locations. T

implemented in hardware by using VHDL language and Xilinx

FPGA device. RC4 is the most widely used software based

stream cipher .The cipher has been integrated into TLS/SSL

and WEP implementations. The cipher was design by Ron

Rivest in 1987 and kept as a trade secret until it was leaked out

in 1994.RC4 is extremely fast and its design is simple. This

paper deals with RC4 keystream generator, within the scope of

the existing model of an exchange shuffl

better security. The main factors in RC4's success over such a

wide range of applications are its speed and simplicity: efficient

implementations in both software and hardware are very easy

to develop.

Keywords—RC4,Stream cipher,

DataSerializer , K Stream Serializer.

I. INTRODUCTION

Cryptography is a Greek word for "hidden writing."The

art and science of transforming (encrypting)

information(plaintext) into an

intermediate form (ciphertext) which secures information

storage or transit. Normally, security occurs as a result of

having a vast number of different transformations. Then, if

an opponent acquires some cipher text, a vast number of

different plaintext messages presumably could have

produced that exact same ciphertext, one for each of the

possible keys. Cryptography is a part of cryptology, and is

further divided into secret codes versus

to steganography, which seeks to hide the existence of a

message, cryptography seeks to render a messag

Prof. Mr. D. B.

Rane

Miss.Ukande

Jyoti F.

International Conference on Recent Trends in engineering & Technology Special Issue of International Journal of Electronics, Communication & Soft Computing Science & Engineering, ISSN: 2277

24 Feb 2013 ©2013 SNJB's KBJ CoE

dware Implementation of RC4 Stream Cipher using

VLSI

This paper deals with the design of RC4 stream

RC4 uses a variable length

key from 1 to 256 bytes to initialize a 256-byte array. The array

is used for subsequent generation of pseudo-random bytes and

then generates a pseudorandom stream, which is EXORed with

the plaintext/cipher text to give the cipher text/plaintext. The

RC4 stream cipher works in two phases. The key setup phase

and the pseudorandom key stream generator phase. Both

phases must be performed for every new key. Previous designs

supports 1044 bytes storage locations while this design uses

only one 512 bytes storage locations. The system is

implemented in hardware by using VHDL language and Xilinx

RC4 is the most widely used software based

stream cipher .The cipher has been integrated into TLS/SSL

cipher was design by Ron

Rivest in 1987 and kept as a trade secret until it was leaked out

in 1994.RC4 is extremely fast and its design is simple. This

paper deals with RC4 keystream generator, within the scope of

the existing model of an exchange shuffle ,in order to achieve

The main factors in RC4's success over such a

wide range of applications are its speed and simplicity: efficient

hardware are very easy

cipher, KRAM, SRAM,

NTRODUCTION

Cryptography is a Greek word for "hidden writing."The

art and science of transforming (encrypting)

information(plaintext) into an

intermediate form (ciphertext) which secures information in

storage or transit. Normally, security occurs as a result of

having a vast number of different transformations. Then, if

an opponent acquires some cipher text, a vast number of

different plaintext messages presumably could have

ciphertext, one for each of the

possible keys. Cryptography is a part of cryptology, and is

further divided into secret codes versus ciphers. As opposed

to steganography, which seeks to hide the existence of a

message, cryptography seeks to render a message

unintelligible even when the message is completely

exposed. Cryptography includes at least: Key generation,

Secrecy, Message authentication (integrity

Wireless Local Area Network (WLAN) technology

shows bright future for different wireless communications

industries. The IEEE 802.11 is one of the most widely used

wireless standards.IEEE 802.11 standard does not provide

implementation details, but p

physical and Media Access Control (MAC) layers. This

standard is widely used in ad-hoc and client/server networks

but special attention should be given to the security of data

in transmission channel. The security of this standar

based on Wired Equivalent Privacy (WEP) scheme.

Currently, all the IEEE 802.11 products support WEP, but

IEEE 802.11i working group introduced the Advanced

Encryption Standard (AES), as the security scheme for the

future IEEE 802.11applications.

The WEP uses two basic components,

Pseudorandom Number Generation (PRNG) and the

integrity algorithm. The PRNG is the most important

component because it is the actually original encryption

core. WEP adopts RC4 stream cipher as PRNG unit and

Cyclic Redundancy Check (CRC

algorithm.

WEP has several limitations and encryption

procedure has no provision for key rotation, usershave to

transmit the data using same single key; which made

cracking of WEP even easier. In

wireless security importance in corporate field, the Wireless

Fidelity (Wi-Fi) alliance proposed a new security protocol

Wi-Fi Protected Access (WPA). WPA uses RC4 stream

cipher as a security algorithm with new dynamic key

management method, known as Temporal Key Integrity

Protocol (TKIP). TKIP uses Message Integrity Code (MIC)

instead of WEP’s CRC-32 for ensuring data integrity. WPA

is a secure solution for upgradable equipment of WEP but

not supporting to WPA2. As far as transmission s

concerned WPA has edge over WPA2.

II. RC4 STREAM

RC4 uses a variable length key from 1 byte to 256 bytes to

initialize a 256-byte array. There are two 256

S-Box and K-Box. The S-array is filled linearly such as

S0=0, S1=1, S2=2………..S255=255. The K

Miss.Ukande

Jyoti F.

Miss.Gund

Shwetal R.

Miss.Pawar Chandreshwari B.

International Conference on Recent Trends in engineering & Technology - 2013(ICRTET'2013) lectronics, Communication & Soft Computing Science & Engineering, ISSN: 2277-9477

70

Stream Cipher using

unintelligible even when the message is completely

exposed. Cryptography includes at least: Key generation,

Secrecy, Message authentication (integrity).

Wireless Local Area Network (WLAN) technology

shows bright future for different wireless communications

industries. The IEEE 802.11 is one of the most widely used

wireless standards.IEEE 802.11 standard does not provide

implementation details, but provides specifications for

physical and Media Access Control (MAC) layers. This

hoc and client/server networks

but special attention should be given to the security of data

in transmission channel. The security of this standard is

based on Wired Equivalent Privacy (WEP) scheme.

Currently, all the IEEE 802.11 products support WEP, but

IEEE 802.11i working group introduced the Advanced

Encryption Standard (AES), as the security scheme for the

future IEEE 802.11applications.

The WEP uses two basic components,

Pseudorandom Number Generation (PRNG) and the

integrity algorithm. The PRNG is the most important

component because it is the actually original encryption

core. WEP adopts RC4 stream cipher as PRNG unit and

Redundancy Check (CRC-32) as the integrity

WEP has several limitations and encryption

procedure has no provision for key rotation, usershave to

transmit the data using same single key; which made

cracking of WEP even easier. In response to growing

wireless security importance in corporate field, the Wireless

Fi) alliance proposed a new security protocol

Fi Protected Access (WPA). WPA uses RC4 stream

cipher as a security algorithm with new dynamic key

thod, known as Temporal Key Integrity

Protocol (TKIP). TKIP uses Message Integrity Code (MIC)

32 for ensuring data integrity. WPA

is a secure solution for upgradable equipment of WEP but

not supporting to WPA2. As far as transmission speed is

concerned WPA has edge over WPA2.

TREAM CIPHER RC4 uses a variable length key from 1 byte to 256 bytes to

byte array. There are two 256-bytes arrays,

array is filled linearly such as

S0=0, S1=1, S2=2………..S255=255. The K-array consists

Miss.Pawar Chandreshwari B.

Page 2: Har dware Implementation of RC4 Stream Cipher using VLSI Issue 2013/Hardware...Stream Cipher using VLSI esign of RC4 stream -byte array. The array -random bytes and er text/plaintext

Special Iss

ISBN No.: 978-81-926080-0-6/22-24 Feb 2013 ©2013 SNJB's KBJ CoE

of the key, repeating as necessary times, in order

array.The RC4 key is often limited to 40 bits, because of

export restrictions but it is sometimes used as a 128 bits key.

It has the capability of using keys between 1 byte and 256

bytes. The RC4 algorithm works in two ph

and pseudorandom key stream generation phase. Key setup

is the first and most difficult phase of this algorithm. During

N-bit key setup (N being your key length), the encryption

key is used to generate an encrypting variable using two

arrays, sarray, k-array and N-number of mixing operations.

These mixing operations consist of swapping bytes

according to RC4 algorithm. Figure 1 shows the block

diagram of the RC4 two phases.

RC4 uses two counters, counter i and counter j,which

are initialized to zero value. In the key setup phase the S

is being modified according to pseudo-code:

Key setup phase:

For i= 0 to 255

j = (j + Si + Ki) mod 256

Swap Si and Sj

Once the encrypting variables are produced from the key

setup phase, it enters in the pseudorandom key stream

generation phase. The pseudorandom key stream generation

phase is given by the following pseudo code:

Key stream generation phase:

i=(i+ 1)mod256

j = (j + Si) mod 256

Swap Si, and Sj

t = (Si + Sj) mod 256

K=Si

Where this generated pseudo random code is XORed with

the plain text/cipher text to create cipher text/plain text.

XOR is the logical operation of comparing two binary bits.

If the bits are different, the result is 1. I

same, the result is 0. Once the receiver gets the encrypted

message, he decrypts it by XORing the encrypted message

with the same encrypting variable.

ttttttttttttttttttttttttttttttt

Fig1: Block diagram of RC4 phases

Fig 1: RC4 Implementation

International Conference on Recent Trends in engineering & Technology Special Issue of International Journal of Electronics, Communication & Soft Computing Science & Engineering, ISSN: 2277

24 Feb 2013 ©2013 SNJB's KBJ CoE

essary times, in order to fill the

array.The RC4 key is often limited to 40 bits, because of

export restrictions but it is sometimes used as a 128 bits key.

It has the capability of using keys between 1 byte and 256

bytes. The RC4 algorithm works in two phases, key setup

pseudorandom key stream generation phase. Key setup

is the first and most difficult phase of this algorithm. During

bit key setup (N being your key length), the encryption

key is used to generate an encrypting variable using two

number of mixing operations.

These mixing operations consist of swapping bytes

according to RC4 algorithm. Figure 1 shows the block

RC4 uses two counters, counter i and counter j,which

zed to zero value. In the key setup phase the S-box

code:

Once the encrypting variables are produced from the key

enters in the pseudorandom key stream

generation phase. The pseudorandom key stream generation

phase is given by the following pseudo code:

Where this generated pseudo random code is XORed with

the plain text/cipher text to create cipher text/plain text.

XOR is the logical operation of comparing two binary bits.

If the bits are different, the result is 1. If the bits are the

same, the result is 0. Once the receiver gets the encrypted

message, he decrypts it by XORing the encrypted message

: Block diagram of RC4 phases

Implementation

III. PROPOSED

The implementation of the storage unit S

is shown in Fig. 2. The S-box RAM consists of three

bytes RAM blocks. S-box RAM has four inputs and one

output. The two inputs are the read and write

the other two are the address and data signals. Also, the

RAM box has the signals of clock and reset. The operation

of RAM blocks is quite simple. If the reset signal occurs the

blocks are initialized linearly. For Ram block, if the write

signal occurs new data are stored in the address position, or

if the read signal occurs the data in the address position are

available on the output of the block

diagram for proposed architecture. It goes through Initial

state, Adder2Cal state, Adder2Ld state, Sj state, Swap Si

state, Swap Sj state, Addr2Gen state, TCal state, Kbyte state

and Encryption state to complete key setup generation phase

and key stream generation phase.

module of proposed architecture, which consists of two

storage units, S-Ram and

K-ram. It also consists of Addr1 and addr2. The function of

addr1 is to generate initial data and address for S

function of addr2 is to generate address for K

adder1 is used to calculate j = j+ Si + Ki and Sreg1, Sreg2,

with DataMux and DataDMux are used for swapping the

contents of S-Ram block. The hart of architecture is SMC

which generates control signals for all modules. The Key

stream serializer and Data serializer are used

serial conversion and then EX

generate encrypted signal.

Initial State: In this state we first fill the SRAM and

To fill both the RAM, the Data is given directly to the

KRAM for filling the Data randomly as a Dat

and address is given by Addr1. The Data at SRAM is filled with the help of Addr1 which gives the address and

at same time same data comes from the DataMux and are

loaded at same address. Addr1 gives the location from 0 to

255 (as cnt255) in both the RAM. The output of Addr1 is

given to the KRAM that gives the address for Data Bus of

KRAM. The input of SRAM (as Addr[7:0]) shows address

and Data fill linearly

from DataIn as S0=0, S1=1, S2=2, …………S255=255. The

initial state exists till the SRAM / KRAM fi

255 location). After filling, InitialOver = 1, and state go to

Addr2cal state.

Addr2cal state: In this state, Mux gives the

KeyDataOut as MuxOut by selecting the Sel=1, and SRAM

gives the data through DataOut to DataDMux. And

SelDataOut select this DataOut as SR1 and load this value in

S_Reg1. All these values from A2, SR1 and MuxOut are

added.

Adder2Ld state: In this state the output of Adder1

(Adder1Out) is loaded into the Addr2 register.

SJ state: Loaded value at Addr2 gives j value. T

the address, which is selected by SelAddr of

output of AddrMux gives address of SRAM.

International Conference on Recent Trends in engineering & Technology - 2013(ICRTET'2013) lectronics, Communication & Soft Computing Science & Engineering, ISSN: 2277-9477

71

ARCHITECTURE The implementation of the storage unit S-array and k-array

box RAM consists of three 256

box RAM has four inputs and one

output. The two inputs are the read and write signals while

other two are the address and data signals. Also, the

has the signals of clock and reset. The operation

blocks is quite simple. If the reset signal occurs the

initialized linearly. For Ram block, if the write

new data are stored in the address position, or

signal occurs the data in the address position are

output of the block .Figure 3 shows the state

architecture. It goes through Initial

Adder2Ld state, Sj state, Swap Si

Addr2Gen state, TCal state, Kbyte state

to complete key setup generation phase

generation phase. Figure 4 shows hardware

architecture, which consists of two

ram. It also consists of Addr1 and addr2. The function of

addr1 is to generate initial data and address for S-Ram. The

function of addr2 is to generate address for K-Ram. The

calculate j = j+ Si + Ki and Sreg1, Sreg2,

DataMux and DataDMux are used for swapping the

Ram block. The hart of architecture is SMC

which generates control signals for all modules. The Key

stream serializer and Data serializer are used for parallel to

serial conversion and then EX-ORing is performed to

In this state we first fill the SRAM and KRAM.

To fill both the RAM, the Data is given directly to the

randomly as a Data Bus

address is given by Addr1. The Data at SRAM the help of Addr1 which gives the address and

same data comes from the DataMux and are

address. Addr1 gives the location from 0 to

RAM. The output of Addr1 is

that gives the address for Data Bus of

SRAM (as Addr[7:0]) shows address

from DataIn as S0=0, S1=1, S2=2, …………S255=255. The

initial state exists till the SRAM / KRAM fill completely (all

255 location). After filling, InitialOver = 1, and state go to

In this state, Mux gives the

KeyDataOut as MuxOut by selecting the Sel=1, and SRAM

gives the data through DataOut to DataDMux. And

select this DataOut as SR1 and load this value in

S_Reg1. All these values from A2, SR1 and MuxOut are

In this state the output of Adder1

(Adder1Out) is loaded into the Addr2 register.

Loaded value at Addr2 gives j value. This j value is

the address, which is selected by SelAddr of AddrMux. The

output of AddrMux gives address of SRAM. The value of

Page 3: Har dware Implementation of RC4 Stream Cipher using VLSI Issue 2013/Hardware...Stream Cipher using VLSI esign of RC4 stream -byte array. The array -random bytes and er text/plaintext

Special Iss

ISBN No.: 978-81-926080-0-6/22-24 Feb 2013 ©2013 SNJB's KBJ CoE

that location is obtained as DataOut, selected by

as SR2 and stored at S_Reg2 as SJ Swap SI:

the address is taken from

Addr2, which is selected by AddrMux as Addr and the data

is loaded on this address of SRAM as DataIn by selecting

Reg2 through DataMux.

Swap SJ: In this state, the address is taken from

which is selected by AddrMux as Addr and the data

loaded on this address of SRAM as DataIn by selecting

Reg1 through DataMux. All process of like Addr2cal,

Addr2ld, SJ, Swap SI and Swap SJ occurred 255 times.

When Keysetupover=1(high) and Flag=1(high) then it goes

to Addr2Gen state.

Addr2Gen state: At this state again we obtain the

by Key Setup phase .

For i = 0 to 255

j = [j+Si+Ki] ,

Here, Muxout is taken 00000000, so

j = j+Si and i=i+1;

In this state, MuxIn (00000000) is selected as output of

Mux, and the whole process of Addr2Cal state is repeated.

After this it follows the process of Addr2Ld, SJ, Swap SI

and Swap SJ. These processes occur just once.

TCal state: When Swap SJ complete, flag will high

reaches the TCal state. At TCal state we perform the

following operation.

t = Si +Sj

So in this state the value of S_Reg1 and S_Reg2 are added

at Adder2 register. The output of Adder2 i.e. Adder2Out

value goes to the AddrMux. The output of AddrMux is

selected by selAddr as Adder2Out. This output of AddrMux

gives the address and the Data at this address comes out

through DataDMux as KeyStreamOut.

KByte state: The data that was given to FIFO in the

Initial state is now loaded into DataSerializer. At the same

time the data from DataDMux is

K_StreamSerializer.

Encryption state: The key data byte from

Serializer and plaintext from Data Serializer comes

serially in the form of bits, are XORed to gives the output

encrypted data. EOC becomes high whenever a byte of

plaintext is encrypted.

International Conference on Recent Trends in engineering & Technology Special Issue of International Journal of Electronics, Communication & Soft Computing Science & Engineering, ISSN: 2277

24 Feb 2013 ©2013 SNJB's KBJ CoE

that location is obtained as DataOut, selected by DatDMux

Swap SI: In this state,

Addr2, which is selected by AddrMux as Addr and the data

loaded on this address of SRAM as DataIn by selecting

In this state, the address is taken from Addr1,

which is selected by AddrMux as Addr and the data is

loaded on this address of SRAM as DataIn by selecting

through DataMux. All process of like Addr2cal,

Swap SI and Swap SJ occurred 255 times.

Keysetupover=1(high) and Flag=1(high) then it goes

this state again we obtain the value of J

is selected as output of

Addr2Cal state is repeated.

After this it follows the process of Addr2Ld, SJ, Swap SI

and Swap SJ. These processes occur just once.

When Swap SJ complete, flag will high and

reaches the TCal state. At TCal state we perform the

So in this state the value of S_Reg1 and S_Reg2 are added

Adder2 register. The output of Adder2 i.e. Adder2Out

goes to the AddrMux. The output of AddrMux is

selAddr as Adder2Out. This output of AddrMux

address and the Data at this address comes out

that was given to FIFO in the

DataSerializer. At the same

time the data from DataDMux is loaded into

The key data byte from K_Stream

Serializer comes out

serially in the form of bits, are XORed to gives the output as

encrypted data. EOC becomes high whenever a byte of

Fig 2. State diagram of pro

IV. DESCRIPTION OA. S-RAM & K-

Proposed architecture consist of 256 byte RAM this RAM used as S-RAM1(S1), S

RAM1(K1) and K-RAM2(K2) with necessary control unit

and addressed generator logic. The implementation of the

storage unit S-array and k-array is shown in figure. The S

box RAM consists of three 256 bytes RA

RAM has four inputs and one output. The two inputs are the

read and write signals while the other two are the address

and data signals. Also, the RAM box has the signals of clock

and reset. The operation of RAM blocks is quite simple. If

the reset signal occurs the blocks are initialized linearly. For

Ram block, if the write signal occurs new data are stored in

the address position, or if the read signal occurs the data in

the address position are available on the output of the block

[01, 02, 03]. Due to parallel structure of this architecture

two parallel streams are generated from S

SRAM2.

B. MULTIPLEXER:- Here used 2:1 mux. More confusion at the

output side can be added by selecting one of the streams

randomly from MUX out by using 8 bit LFSR as select

lines, whose feedback function is represented by primitive

polynomial x8 + x4 + x3 + x2 + 1. The MUX output is

International Conference on Recent Trends in engineering & Technology - 2013(ICRTET'2013) lectronics, Communication & Soft Computing Science & Engineering, ISSN: 2277-9477

72

State diagram of proposed architecture

OF BLOCK DIAGRAM -RAM:-

consist of 256 byte RAM and

RAM1(S1), S-RAM2(S2),K-

RAM2(K2) with necessary control unit

and addressed generator logic. The implementation of the

array is shown in figure. The S-

box RAM consists of three 256 bytes RAM blocks. S-box

RAM has four inputs and one output. The two inputs are the

read and write signals while the other two are the address

and data signals. Also, the RAM box has the signals of clock

and reset. The operation of RAM blocks is quite simple. If

e reset signal occurs the blocks are initialized linearly. For

Ram block, if the write signal occurs new data are stored in

the address position, or if the read signal occurs the data in

the address position are available on the output of the block

Due to parallel structure of this architecture

two parallel streams are generated from S-RAM1 and

Here used 2:1 mux. More confusion at the

output side can be added by selecting one of the streams

rom MUX out by using 8 bit LFSR as select

lines, whose feedback function is represented by primitive

polynomial x8 + x4 + x3 + x2 + 1. The MUX output is

Page 4: Har dware Implementation of RC4 Stream Cipher using VLSI Issue 2013/Hardware...Stream Cipher using VLSI esign of RC4 stream -byte array. The array -random bytes and er text/plaintext

Special Iss

ISBN No.: 978-81-926080-0-6/22-24 Feb 2013 ©2013 SNJB's KBJ CoE

pseudorandom byte converted into serial form using key

searilizer.

C Key searillizer & Data searillizer The MUX output is pseudorandom byte

converted into serial form using key searilizer. The eight

byte FIFO is used to store eight bytes of data and converted

into serial form by data searilizer. Finally two streams are

Ex-ORed to obtain encrypted serial data out .

D (LFSR) :- 4. Linear Feedback Shift Registers An LFSR consists of clocked storageelements

(flip-flops) and a feedback path. The number of storage

elements gives us the degree of the LFSR. In other words, an

LFSR with m flip-flops is said to be of degree

feedback network computes the input for the last flip

XOR-sum of certain flip-flops in the shift register.

As we have learned so far, strea

a stream of key bits s1, s2, . . .that are generated by the key

stream generator, which should have certain properties. An

elegant way of realizing long pseudorandom sequences is to

use linear feedback shift registers (LFSRs). LFSRs are easil

implemented in hardware and many, but

stream ciphers make use of LFSRs. As we will see,

though a plain LFSR produces a sequence with good

statistical properties, it is cryptographically weak.LFSRs can

make secure stream ciphers. It should be stressed that there

are many ways for constructing stream ciphers.

Fig 3: Block Diagram of proposed architecture of RC4

stream cipher

International Conference on Recent Trends in engineering & Technology Special Issue of International Journal of Electronics, Communication & Soft Computing Science & Engineering, ISSN: 2277

24 Feb 2013 ©2013 SNJB's KBJ CoE

pseudorandom byte converted into serial form using key

arillizer:- The MUX output is pseudorandom byte

converted into serial form using key searilizer. The eight

byte FIFO is used to store eight bytes of data and converted

into serial form by data searilizer. Finally two streams are

o obtain encrypted serial data out .

4. Linear Feedback Shift Registers An LFSR consists of clocked storageelements

. The number of storage

of the LFSR. In other words, an

flops is said to be of degree m. The

feedback network computes the input for the last flip-flop as

flops in the shift register.

As we have learned so far, stream ciphers use

that are generated by the key

stream generator, which should have certain properties. An

elegant way of realizing long pseudorandom sequences is to

use linear feedback shift registers (LFSRs). LFSRs are easily

implemented in hardware and many, but certainly not all,

stream ciphers make use of LFSRs. As we will see, even

though a plain LFSR produces a sequence with good

is cryptographically weak.LFSRs can

t should be stressed that there

are many ways for constructing stream ciphers.

architecture of RC4

Fig4: Hardware module

V. VLSI IMPLEMENTATION

The proposed architecture was captured by

usingVHDL. All the system components were described

withstructural architecture. The system tested using

confirmed testvectors in order to examine its correctness and

simulated byModelsim simulator, Figure 5 shows out put

waveforms forthe same.The whole design was synthesized,

placed and routedby using XILINX FPGA device

International Conference on Recent Trends in engineering & Technology - 2013(ICRTET'2013) lectronics, Communication & Soft Computing Science & Engineering, ISSN: 2277-9477

73

: Hardware module

MPLEMENTATION RESULTS architecture was captured by

usingVHDL. All the system components were described

withstructural architecture. The system tested using

confirmed testvectors in order to examine its correctness and

simulated byModelsim simulator, Figure 5 shows out put

orms forthe same.The whole design was synthesized,

INX FPGA device .

Page 5: Har dware Implementation of RC4 Stream Cipher using VLSI Issue 2013/Hardware...Stream Cipher using VLSI esign of RC4 stream -byte array. The array -random bytes and er text/plaintext

Special Iss

ISBN No.: 978-81-926080-0-6/22-24 Feb 2013 ©2013 SNJB's KBJ CoE

Fig. 5 Output wV:

CONCLUSION

A hardware implementation of the RC4 stream cipher

for wire less LAN Security is presented in this paper. The

proposed design provides high data throughput using

variable key length from 1 byte to 16 bytes. It provides high

flexibility as it can be used in many applications with any

key length from 1 byte to 256 bytes. The proposed system

achieves a data throughput up to 22 MBytes/sec in a clock

frequency of 64 MHz. This design requires only 512 bytes

storage, while previous designs supports for 1044 bytes

storage. The comparison of these results with previous

results proves that this new reduced hardware

implementation is better solution for a

cryptographic system.

REFERENCES [1] Stephen Brown Zvonk Vransic, Fundamentals of Digital Logic Design

with VHDL, Second editation, Tata Mcgraw Hill, 2005.

[2] Douglas A. Pucknell, Kamran Eshraghian,

Edition, Prentice Hall of India, 2004.

[3] Morris Mano, Digital Design, Third editation, Prentice Hall of India,

2006.

[4] Andrew S. Tanenbaum, Computer Networks, Second editation, Prentice

Hall of India, 1991.

[5] IEEE Std 802.11. IEEE Standard: Hardware

stream cipher-P.kitsos, G. Kostopoulos, N. Sklavos and

O.Koufopavlou.VLSI design laboratory.

[6] B. Schneier, "Applied Cryptography - Protocols, Algorithms and Source

Code in C", Second Edition, John Wiley and Sons, New York,1996

[7] A. Menezes, P. van Oorschot, and S. Vanstone, "

Cryptography", CRC Press, 1996.

[8] S. Fluhrer, I. Mantin, and A. Shamir. "Weaknesses in the key scheduling

algorithm of RC4 ". In Proc. 8ih Workshop on Selected

Cryptography, LNCS 2259. Springer-Verlag, 2001.

[9] Confirmed Test Vector for RC4, http://www.qrst.de/html/dsds/rc4.htm

[131 Xilinx Inc., San Jose, Calif., "Virtex, 2.5 V Field Programmable Gate

Arrays," 2003, www.xilinx.com.aveforms.

International Conference on Recent Trends in engineering & Technology Special Issue of International Journal of Electronics, Communication & Soft Computing Science & Engineering, ISSN: 2277

24 Feb 2013 ©2013 SNJB's KBJ CoE

V:

A hardware implementation of the RC4 stream cipher

is presented in this paper. The

design provides high data throughput using

variable key length from 1 byte to 16 bytes. It provides high

flexibility as it can be used in many applications with any

key length from 1 byte to 256 bytes. The proposed system

2 MBytes/sec in a clock

frequency of 64 MHz. This design requires only 512 bytes

storage, while previous designs supports for 1044 bytes

of these results with previous

proves that this new reduced hardware

better solution for any

Fundamentals of Digital Logic Design

, Second editation, Tata Mcgraw Hill, 2005.

[2] Douglas A. Pucknell, Kamran Eshraghian, Basic VLSI design, 3rd

, Third editation, Prentice Hall of India,

[4] Andrew S. Tanenbaum, Computer Networks, Second editation, Prentice

implementation of the RC4

P.kitsos, G. Kostopoulos, N. Sklavos and

Protocols, Algorithms and Source

", Second Edition, John Wiley and Sons, New York,1996.

[7] A. Menezes, P. van Oorschot, and S. Vanstone, "Handbook of Applied

Weaknesses in the key scheduling

". In Proc. 8ih Workshop on Selected Areas in

Verlag, 2001.

[9] Confirmed Test Vector for RC4, http://www.qrst.de/html/dsds/rc4.htm

[131 Xilinx Inc., San Jose, Calif., "Virtex, 2.5 V Field Programmable Gate

International Conference on Recent Trends in engineering & Technology - 2013(ICRTET'2013) lectronics, Communication & Soft Computing Science & Engineering, ISSN: 2277-9477

74