Codeblank is an encryption algorithm works and play with ascii codes of characters and it's similar to basic algorithm of Encryption - Decryption topics and it's a slide modification with Ceaser cipher algorithm.
Try to make your tool for future usage with this algorithm.
1. CODEBLANK
A STUDENT THOUGHT
A PROJECT ON
INFORMATION SECURITY
COMPUTER ENGINEERING SEM – 6TH DIV B
GOVERNMENT ENGINEERING COLLEGE
SECTOR – 28, GANDHINAGAR
2. A
Project Report
On
Information Security Concept
Codeblank is an encryption algorithm
Guided by Assist. Prof. - Mr. Jaimin Shroff
Developed By Group NO.2
Trivedi Jaydip (130133107022)
Patel Harsh (130133107016)
Vadher Mitesh (120130107068)
Patel Pratik (130133107017)
Prajapati Saajan (120130107093)
GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.
3. 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.
4. 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.
5. 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 );
}
6. 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);
}
7. GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.
STEP - 4 :
Addition of each & every input String element to
Position 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 algorithm
In this JavaScript ex. Key attachment is possible like this
encryptedString[ asciiArr.length ] = positionAscii;
8. 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:
•‘®µµ¸i’iª¶i¬»®ª½²·°i¹»®¼®·½ª½²¸·wSI
Note: On next execution output is change due to random choice
GOVERNMENT ENGINEERING COLLEGE, SECTOR-28, GANDHINAGAR.