data encryption and decryption process using bit shifting and stuffing (bss) methodology

Post on 14-Apr-2017

248 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Online\OfflineData Encryption and

Decryption Process

using Bit OperationsPresented By:

Rakshith R NaikUnder the Guidance of:

Prof. M. V. Jerabandi (M.tech, CSE)

CONTENTS

IntroductionRelated workMethodologyAlgorithmProcess In MemoryAnalysisDemoConclusion

ENCODING?DECODING?PUBLIC KEY?COMPRESSION?WHY ENCRYPTION?WHY DECRYPTION?WHY COMPRESSION?

INTRODUCTION

WikipediaB. Ravi Kumar. et. alB. Ravi Kumar. et. alJ. Freeman. et. alWayne G. Barker. et. alN. A Kofahi. et. alW. Stallings. et. al

X. Lai. et. alDiffie. et. alC.P. Wu. et. alM . J. Weiner. et. al

RELATED WORK

Encryption process

In this process every eight bytes of plain text becomes seven bytes of cipher text.

METHODOLOGY

Input: Text file, keyOutput: Encrypted file

Repeat for every 8 characters of input fileFor each i from 7 to 1

Take ith bit from 8th character Replace it in the ith character at 8th bit position Write the character to temporary file

Repeat for every character of the temporary file XOR key with character Write the character to encrypted file

ENCRYPTION ALGORITHM

ENCRYPTION IN MEMORY CELL

EXAMPLECharacter ASCII

ValueBinary Number

a 65 0 1 0 0 0 0 0 1

b 66 0 1 0 0 0 0 1 0

c 67 0 1 0 0 0 0 1 1

d 68 0 1 0 0 0 1 0 0

e 69 0 1 0 0 0 1 0 1

f 70 0 1 0 0 0 1 1 0

g 71 0 1 0 0 0 1 1 1

h 72

Bit Positions 8 7 6 5 4 3 2 1

Before Encryption: abcdefgh

Character Binary Number

a 1 0 0 0 0 0 1

b 1 0 0 0 0 1 0

c 1 0 0 0 0 1 1

d 1 0 0 0 1 0 0

e 1 0 0 0 1 0 1

f 1 0 0 0 1 1 0

g 1 0 0 0 1 1 1

Bit Positions

8 7 6 5 4 3 2 1

After Encrypted :

10 0 00 010

ENCRYPTION RESULT

Decryption Process

In this process for every 7 characters of cipher text the 8 characters of original text will appears.

DECRYPTION

DECRYPTION ALGORITHM

Input: Encrypted file, keyOutput: Decrypted file

Repeat for every characters of encrypted file XOR key with character Write the character to temporary file

Repeat for every 7 character of the temporary fileFor each I from 7 to 1

Take 8th bit from ith character Place it in the ith bit of 8th character Write the character to decrypted file

DECRYPTION IN MEMORY CELL

EXAMPLE

Character Binary Number

a 0 1 0 0 0 0 0 1

b 0 1 0 0 0 0 1 0

c 0 1 0 0 0 0 1 1

d 0 1 0 0 0 1 0 0

e 0 1 0 0 0 1 0 1

f 0 1 0 0 0 1 1 0

g 0 1 0 0 0 1 1 1

h

Bit Positions

8 7 6 5 4 3 2 1

Character Binary Number

a 1 0 0 0 0 0 1

b 1 0 0 0 0 1 0

c 1 0 0 0 0 1 1

d 1 0 0 0 1 0 0

e 1 0 0 0 1 0 1f 1 0 0 0 1 1 0

g 1 0 0 0 1 1 1

Bit Positions

8 7 6 5 4 3 2 1

Before Decryption :

After Decryption : abcdefgh

0

0

1001

0

0

DECRYPTION RESULT

METHODOLOGY

Data CompressionThe purpose of data compression is that we can reduce the size of data to save storage and reduce time for transmission.

In this process Data is compressed by using Huffman coding.

HUFFMAN CODING

Huffman code process

Huffman code is particular type of optimal prefix code that is commonly used for data compression

The process of huffman code is converting the characters into binary form based on their frequencies in a plain text and optimum or compress the text length.

HUFFMAN CODING ALGORITHMInput: Encrypted fileOutput: Compressed file

1. Find the frequency of each character2. Group the character according to frequency and

label it as node3. Merge the two smallest probabilities into its parent

node4. Repeat the 2nd step until a super symbol remains

EXAMPLE

Let A={a/20, b/17, c/3, d/15, e/45} be the alphabet and its frequency distribution

a=20

b=17

c=3

d=15

e=45

The Huffman code is A=00, b=010, c=0110, d=0111, e=1

12

3

4

DEMO

ANALYSIS

An implementation of BSS encryption algorithm is presented.

The algorithm is simple to implement, effective, and easy to understand.

It performs well and works efficiently with text file of any size.

The results obtained are presented. It provides both security and data compression.

This can be extended to images, audio & video files.

CONCLUSION & FUTURE WORK

[1] Wikipedia, “Encryption”, http://en.wikipedia.org/wiki/Encryption, modified on 13 December 2006.

[2] B. Ravi Kumar, Dr. P. R. K.Murti B. Ravi Kumar et al. / International Journal on

Computer Science and Engineering (IJCSE) [3] J. Freeman, R. Neely, and L. Megalo “Developing

Secure Systems: Issues and Solutions”. IEEE Journal of Computer and Communication, Vol. 89, PP. 36-45. 1998

REFERENCES

THANK YOU

QUESTIONS ????????

top related