file encryption application for windows based on polyalphabetic substitution cipher

44
File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Upload: sabyasachi-ghosh

Post on 09-Jan-2017

183 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

File Encryption Application For Windows

Based On Polyalphabetic Substitution Cipher

Page 2: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Team members

• Mohit Kundu (3313 -61 -0028)

• Sabyaschi Ghosh (3313 -61 -0031)

• Nilanjit Roy (3313 -61 -0029)

Page 3: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

WHAT IS ENCRYPTION ?

Encryption is a method of converting an original message of regular text into encoded text. The text is encrypted by means of an algorithm (type of formula). If information is encrypted, there would be a low probability that anyone other than the receiving party who has the key to the code or access to another confidential process would be able to decrypt (translate) the text and convert it into plain, comprehensible text.

Page 4: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

1. Data security

Encryption ensures data security by encrypting the data that can’t be accessed by others. This way the data can also be sent over unsecured channels as security is present in the encrypted data itself.

WHY IS IT IMPORTANT ?

2. Data Integrity

Encryption ensures that if the data has been modified during transit or intentionally by a hacker, the same cannot be decoded at the recipient's end, providing complete security of the data.

Page 5: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Plain Text

Encryption

Decryption

Cipher Text

Page 6: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

OUR ALGORITHM

Page 7: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

1. Start.

Method of encryption

2. Input the plain text.3. Assume a variable K and initialized with a constant value.4. Assume a variable Kmax and initialized with a constant value greater than K.5. Take a character from the plain text and repeat 5 to 13 steps while the all characters of the plain text have not been taken.6. Check the value of the variable K whether its value less than Kmax or not.7. If the value of K is equal or greater than Kmax then reset the value of K with initial value.8. Assume one more variable N.9. Do the following 3 steps (i.e. 10, 11, 12) for N =1 to K.

10. Convert the character to their corresponding ASCII (decimal) equivalent.11. Add {5*(-1)N+3N} with the ASCII (decimal) value of the character.12. Convert the Modified ASCII value to its equivalent character and store it as encrypted text.13. Increment the value of K by 1.14. Stop

Page 8: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

1. Please Start..

Method of decryption

2. Input the Encrypted text.3. Initialized a variable SKP, where the value of SKP is equal to (K-1) (K variable is initialized at the time of encryption algorithm initialization.).4. Take the a character from the encrypted text and repeat 5 to 9 steps while the all characters of the encrypted text have not been taken.5. Convert the character to their corresponding ASCII (decimal) equivalent.6. Add 2 to the ASCII value of the character. Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N} Original ASCII value of character = Modified ASCII value - {5*(-1)N+3N} For each character of plain text, the value of first bit of each bit Stream is = {5*(-1)1+3*1} (where N=1) = -5+3 = - 2 Original ASCII value of character = Modified ASCII value - {5*(-1)N+3N} Original ASCII value of character = Modified ASCII value - (- 2) Original ASCII value of character = Modified ASCII value +2 Convert the Modified ASCII value to its equivalent character and store it in a New plain text. Check the value of SKIP less than (Kmax-1) or not.

Page 9: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

7. If the value of SKIP is equal or greater than (Kmax-1) then reset the value of SKIP with initial value..

Method of decryption

8. Skip next SKP (Where SKP is a variable) character.9. Increment the value of SKP by 1. 10. Stop

Page 10: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

ILLUSTRATION OF THE ENCRYPTION ALGORITHM WITH A SUITABLE EXAMPLE

Page 11: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

C A B

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N} • The variable K, which value is lies between 5 to 9 and it also determine the

number of character to be generated for a single character of the plain text.

67

• No of character for each character of plain text (k-1)

: 4

• Value of N :

1• ASCII Value of plain

character : 67

+ 5 * (-1)1 + 3*1

• ASCII Value of cipher character : = 67

= 67 + (-5) + 3= 67 + (-2)= 65

65

A

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

Page 12: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

67

• No of character for each character of plain text (k-1)

: 4

• Value of N :

2• ASCII Value of plain

character : 67

+ 5 * (-1)2 + 3*2

• ASCII Value of cipher character : = 67

= 67 + (+5) + 6= 67 + (+11)= 78

65 78

A N

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 13: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

67

• No of character for each character of plain text (k-1)

: 4

• Value of N :

3• ASCII Value of plain

character : 67

+ 5 * (-1)3 + 3*3

• ASCII Value of cipher character : = 67

= 67 + (-5) + 9= 67 + (+4)= 71

65 78 71

A N G

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 14: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

67

• No of character for each character of plain text (k-1)

: 4

• Value of N :

4• ASCII Value of plain

character : 67

+ 5 * (-1)4 + 3*4

• ASCII Value of cipher character : = 67

= 67 + (+5) + 12= 67 + (+17)= 84

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 15: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567

• No of character for each character of plain text (k-1)

: 5

• Value of N :

1• ASCII Value of plain

character : 65

+ 5 * (-1)1 + 3*1

• ASCII Value of cipher character : = 65

= 65 + (-5) + 3= 65 + (-2)= 63

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63

?

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 16: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567

• No of character for each character of plain text (k-1)

: 5

• Value of N :

2• ASCII Value of plain

character : 65

+ 5 * (-1)2 + 3*2

• ASCII Value of cipher character : = 65

= 65 + (+5) + 6= 65 + (+11)= 76

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76

? L

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 17: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567

• No of character for each character of plain text (k-1)

: 5

• Value of N :

3• ASCII Value of plain

character : 65

+ 5 * (-1)3 + 3*3

• ASCII Value of cipher character : = 65

= 65 + (-5) + 9= 65 + (+4)= 69

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69

? L E

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 18: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567

• No of character for each character of plain text (k-1)

: 5

• Value of N :

4• ASCII Value of plain

character : 65

+ 5 * (-1)4 + 3*4

• ASCII Value of cipher character : = 65

= 65 + (+5) + 12= 65 + (+17)= 82

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 19: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567

• No of character for each character of plain text (k-1)

: 5

• Value of N :

5• ASCII Value of plain

character : 65

+ 5 * (-1)5 + 3*5

• ASCII Value of cipher character : = 65

= 65 + (-5) + 15= 65 + (+10)= 75

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

75

K

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 20: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567 66

• No of character for each character of plain text (k-1)

: 6

• Value of N :

1• ASCII Value of plain

character : 66

+ 5 * (-1)1 + 3*1

• ASCII Value of cipher character : = 66

= 66 + (-5) + 3= 66 + (-2)= 64

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

75

K

64

@

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 21: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567 66

• No of character for each character of plain text (k-1)

: 6

• Value of N :

2• ASCII Value of plain

character : 66

+ 5 * (-1)2 + 3*2

• ASCII Value of cipher character : = 66

= 66 + (+5) + 6= 66 + (+11)= 77

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

75

K

64 77

@ M

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 22: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567 66

• No of character for each character of plain text (k-1)

: 6

• Value of N :

3• ASCII Value of plain

character : 66

+ 5 * (-1)3 + 3*3

• ASCII Value of cipher character : = 66

= 66 + (-5) + 9= 66 + (+4)= 70

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

75

K

64 77 70

@ M F

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 23: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567 66

• No of character for each character of plain text (k-1)

: 6

• Value of N :

4• ASCII Value of plain

character : 66

+ 5 * (-1)4 + 3*4

• ASCII Value of cipher character : = 66

= 66 + (+5) + 12= 66 + (+17)= 83

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

75

K

64 77 70 83

@ M F S

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 24: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567 66

• No of character for each character of plain text (k-1)

: 6

• Value of N :

5• ASCII Value of plain

character : 66

+ 5 * (-1)5 + 3*5

• ASCII Value of cipher character : = 66

= 66 + (-5) + 15= 66 + (+10)= 76

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

75

K

64 77 70 83

@ M F S

76

L

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 25: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

CAB

• The variable K, which value is lies between 5 to 9 and it also determine the number of character to be generated for a single

character of the plain text.

6567 66

• No of character for each character of plain text (k-1)

: 6

• Value of N :

6• ASCII Value of plain

character : 66

+ 5 * (-1)6 + 3*6

• ASCII Value of cipher character : = 66

= 66 + (+5) + 18= 66 + (+23)= 89

65 78 71 84

A N G T

• The variable N, which value lies between 1 to (K-1)

( Let CAB is a plain text )

63 76 69 82

? L E R

75

K

64 77 70 83

@ M F S

76

L

89

Y

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

Page 26: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Encryption Program

Page 27: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

ENCRYPTION DONE

Page 28: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

ILLUSTRATION OF THE DECRYPTION ALGORITHM WITH A SUITABLE EXAMPLE

Page 29: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Original ASCII value of character = Modified ASCII value - {5*(-1)N+3N}

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

65

• The SKIP variable is used to skip no encrypted character.

• For first character of a bit stream the value of N always be 1

• For first time the value of SKIP variable is 0.

No of Character to SKIP :Value of N :Original ASCII value of character :

- {5*(-1)1+3*1}

0

- {(-5)+3} = 65 = 65 - (-2) = 65 + 2 = 67

= 65

1

A N G T ? L E R K @ M F S L Y

C

Page 30: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Original ASCII value of character = Modified ASCII value - {5*(-1)N+3N}

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

A N G T ? L E R K @ M F S L Y

65 63

• The SKIP variable is used to skip no encrypted character.

• For first character of a bit stream the value of N always be 1

• For first time the value of SKIP variable is 0.

No of Character to SKIP :Value of N :Original ASCII value of character :

- {5*(-1)1+3*1} = 63 - {(-5)+3} = 63

= 63 - (-2) = 63 + 2 = 65

3 1

C A

Page 31: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Original ASCII value of character = Modified ASCII value - {5*(-1)N+3N}

Modified ASCII value = Original ASCII value of character + {5*(-1)N+3N}

A N G T ? L E R K @ M F S L Y

65 63 64

• The SKIP variable is used to skip no encrypted character.

• For first character of a bit stream the value of N always be 1

• For first time the value of SKIP variable is 0.

No of Character to SKIP :Value of N :Original ASCII value of character :

- {5*(-1)1+3*1} = 64 - {(-5)+3} = 64

= 64 - (-2) = 64 + 2 = 66

4 1

C A B

Page 32: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Decryption Program

Page 33: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

DECRYPTION DONE

Page 34: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Password Protection

Page 35: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Why is it necessary ?

Page 36: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Without password protection

Sender

X Y Z

With password protection

= Can decode

= Can’t decode

Encrypted text

Encrypted text

Sender

X Y Z

Page 37: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

How is it done here ?

Encoder

Password

Plain Text

Spacial Characte

r

Encrypted Text

Page 38: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Some features of our application• It does Support trail version & demo version.

• Register user can set password to the encrypted file.

• It automatically attched the sender information with this encrypted file.

• It requires low memory space (Primary memory as well as secondary memory.

Page 39: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Limitation of Our project

• Our application is devoloped in C enviroment only for windows xp platform.

• This application only works on text type file(.txt) .

• We can not use ‘tiled’ (~) character in password, because tiled character is used to separate text file password and original text.

• There is no provision to know if the encrypted file is modified or some text missing.

Page 40: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Future Scope• At present our application works on only text type of document(.txt), but in future we are thinking that we also works on video(.mp4), audio(.mp3) and image type of file(.jpg) format.

• Now our application generates 4-8 bit character for each single character in plain text, but we are thinking to change it in 32-64 character for each single character in plain text.

• If someone changes our cipher text file, hen there may be creating some problem to get the original file by decryption. But in future we are trying to develop that; if someone modify the cipher text file then it will automatically find out the error and correct it.

Page 41: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

References[1] Bement A. L. et. al. (2004), Standards for Security Categorization of Federal Information and Information Systems, Computer Security Division, Information Technology Laboratory, National Institute of Standards and Technology Gaithersburg, MD 20899-8900.

[2] Ayushi, (2010), A Symmetric Key Cryptographic Algorithm, International Journal of Computer Applications (0975 - 8887) Volume 1. No. 15.

[3] Atul Kahate, (2008) Cryptography and Network Security, Tata McGraw-Hill Education, pg. 47.

[4] Ijaz Ali Shoukat , Kamalrulnizam Abu Bakar and Mohsin Iftikhar, “A Survey about the Latest Trends and Research Issues of Cryptographic Elements”, p 141, International Journal of Computer Science Issues, Vol. 8, Issue 3, No. 2, May 2011, ISSN 1694 0814.

[5] Sukalyan Som, Saikat Ghosh, “A Survey of Traditional or Character Oriented Symmetric Key Cryptography”, International Journal of Advanced Research in Computer Science, Vol. 2, No. 4, July-August 2011

Page 42: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Journal Publication International Journal of Computer Applications (0975 –

8887)Volume 39– No.8, February 2012

ISBN: 978-93-80866-31-7

Page 43: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Special ThanksSRIJONI MAITRA

ARUN KUMAR CHAKRABARTISAMIT MAZUNDER

SONALI GUPTA

Page 44: File Encryption Application For Windows Based On Polyalphabetic Substitution Cipher

Thank you