10
CODEBLANK A STUDENT THOUGHT A PROJECT ON INFORMATION SECURITY COMPUTER ENGINEERING SEM – 6 TH DIV B GOVERNMENT ENGINEERING COLLEGE SECTOR – 28, GANDHINAGAR

Codeblank - A student thought

Embed Size (px)

Citation preview

Page 1: Codeblank - A student thought

CODEBLANKA STUDENT THOUGHT

A PROJECT ON INFORMATION SECURITY

COMPUTER ENGINEERING SEM – 6TH DIV B

GOVERNMENT ENGINEERING COLLEGE SECTOR – 28, GANDHINAGAR

Page 2: Codeblank - A student thought

A Project Report

On Information Security Concept

Codeblank is an encryption algorithm

Guided by Assist. Prof. - Mr. Jaimin Shroff

Developed By Group NO.2Trivedi Jaydip (130133107022)Patel Harsh (130133107016)Vadher Mitesh (120130107068)Patel Pratik (130133107017)Prajapati Saajan (120130107093)

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

Page 3: Codeblank - A student thought

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

INTRODUCTION

• An algorithm based on playing with ASCII values of all input characters of input string which is enter by end user.

• The codeblank cipher algorithm is a simple algorithm that works & play with an ASCII values of characters.

• It works with symmetric key i.e. same key used for both encryption as well as decryption.

Page 4: Codeblank - A student thought

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

DESCRIPTION

• Algorithm is similar to Ceaser cipher• The twist is next thing in algorithm• Codeblank algorithm is divided in six different steps• To study codeblank algorithm is easy if you know how to play

with ascii codes of characters• In the case of codeblank we consider an array of a to z

characters• But key point is randomly selection of key position means every

time key is change on execution• Encryption & decryption is possible only one time because of key

position changing every execution.• Same key is used for both encryption & decryption so symmetric

key is used.

Page 5: Codeblank - A student thought

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

STEP - 1 : Convert input string character in respected ASCII codes and

store it in array like below mentioned example of JavaScript code.

for ( i = 0 ; i < inputString.length; i++ ){asciiArr[i] = inputString[ i ].charCodeAt( 0 );

}

STEP - 2 :Fill A to Z array in capital or small letter as below mentioned example of JavaScript code:

for ( i = 0, code=65; i < 26; i++, code++) {

atozArr[ i ] = String.fromCharCode( code );}

Page 6: Codeblank - A student thought

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

STEP - 3 :Choose randomly single character index from A to Z and differentiate its position in one variable and its respected ASCII value in second variable.

position = randomIndexFromInterval(0, atozArr.length – 1);

positionAscii = atozArr[position].charCodeAt(0);

NOTE: Use third party function for getting random number between limits.

function randomIndexFromInterval(min, max) {return Math.floor( Math.random( )*(max - min+1)+

min);}

Page 7: Codeblank - A student thought

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

STEP - 4 :Addition of each & every input String element toPosition Ascii which is shown in below example:

for( i =0; i < inputString.length; i++) {encryptedString[i] = parseInt( asciiArr[ i ] ) + parseInt( atozArr[position].charCodeAt( 0 ));

}

STEP - 5 :Your encryption is complete Now the question is key attachment Whether key is to be attached with an encrypted string or not it’s depend on the developer of algorithmIn this JavaScript ex. Key attachment is possible like thisencryptedString[ asciiArr.length ] = positionAscii;

Page 8: Codeblank - A student thought

STEP - 6 :Finally, all steps are executed. So, your encryption is ready to display on html page or it’s your choice where to display.

for ( i = 0; i < encryptedString.length; i++){outputString.innerHTML = outputString.innerHTML +

String.fromCharCode( encryptedString[i] );}

Example of Algorithm like this:

Plain Text:

Hello I am creating presentation.

Cipher Text:

�®µµ¸iiª¶i¬»®ª½²·°i¹»®¼®·½ª½²¸·wSI� �

Note: On next execution output is change due to random choice GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

Page 9: Codeblank - A student thought

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.

SCREENSHOT of web browser

Page 10: Codeblank - A student thought

THANK YOU

Visit our blog

http://www.codeblankjd.blogspot.in

Creation of semester 6th – b student of computer engineering department

GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.