12
PAF-Karachi Institute of Economics & Technology Final Project Report Project: Encrypter/Decrypter Course: Network Security C.Id:55911 Instructor: Ma’m Seema Ansari Group Members: 1

Network Security

Embed Size (px)

DESCRIPTION

Encrypter/Decrypter

Citation preview

Page 1: Network Security

PAF-Karachi Institute of Economics & Technology

Final Project Report

Project: Encrypter/Decrypter

Course: Network Security

C.Id:55911

Instructor: Ma’m Seema Ansari

Group Members:

Salman Khaliq Bajwa (3746) Pawan Khan (4236)

1

Page 2: Network Security

DEDICATION

This report is dedicated to

Our Parents,

Whose love, affection and support helped s in bringing our work to this level of

accomplishments; we are also thankful to them for educating us for unconditional support

and encouragement to pursue our interests, even when the interest went beyond the

boundaries of field and scope. Without their support and kindness this work would not

have been possible.

2

Page 3: Network Security

ACKNOWLEDEMENT

Praise to Allah the most beneficent and the most merciful

We are grateful to our project advisor Ma’m Seema Ansari, for enlightening us with her

precious knowledge and vast experience to benefit us in the future. We also like to thank

our teachers and lab assistants for their assistance and support.

We would also thank with all gratitude and depth of our hearts to our parents who helped

us not only financially but with integrity too and support us in all our hardships. Finally

our sincere thanks to our institute PAF-KIET, for providing us the opportunity to gave us

the strength to undertake this project.

Special thanks to all our fellows and friends who lend us a hand throughout the project’s

each phase.

We pray this effort may prove to be the beginning of new era, a era in which Science and

Technology may make great progress in Pakistan and Pakistan may become a part of the

developed nations.

Thank you.

3

Page 4: Network Security

Table of ContentsEncrypter/Decrypter............................................................................................................................5

Objective:............................................................................................................................................6

Introduction:........................................................................................................................................6

What is encryption?.............................................................................................................................6

Why do we need it?.............................................................................................................................6

What is Decryption?.............................................................................................................................7

Description:.........................................................................................................................................7

1. Ceaser Cipher:...........................................................................................................................7

2. Transposition Cipher:................................................................................................................8

3. Morsecode Cipher:....................................................................................................................8

4. Vigenere Cipher:.......................................................................................................................9

Vigenere Cipher Table:.................................................................................................................9

Conclusion:..........................................................................................................................................9

Refrences:..........................................................................................................................................10

4

Page 5: Network Security

Encrypter/Decrypter

5

Page 6: Network Security

Objective:The main objective of this project was to develop an encrypter/decrypter using different encryption techniques in order to prevent the messages or information from loosing or eavesdropping.

Introduction:Maintaining privacy in our personal communications is something everyone desires. Encryption is a means to achieve that privacy. It was invented for that purpose. But encryption, like most things, can be used for good or evil. And the debate over how to harness this powerful tool rages on as people on both sides see that there are no easy answers.

What is encryption?Encryption is the process of scrambling a message so that only the intended recipient can read it. The actual cryptographic process is generally a complicated mathematical formulation, the more complex -- the more difficult to break. A key is supplied to the recipient so that they can then decipher the message. Keys for encryption algorithms are described in terms of the number of bits. The higher the number of bits - the more difficult that cryptosystem would be to break.

Why do we need it?Encryption can provide a means of securing information. As more and more information is stored on computers or communicated via computers, the need to insure that this information is invulnerable to snooping and/or tampering becomes more relevant. Any thoughts with respect to your own personal information (ie. medical records, tax records, credit history, employment history, etc.) may bring to mind an area in which you do want, need or expect privacy. As teachers, we are often called upon to handle sensitive student information. We need to have access to student records, but maintain the confidentiality of their information.

Encryption is seen by many people as a necessary step for commerce on the internet to succeed. Without confidence that net transactions are secure, people are unwilling to trust a site enough to transact any sort of business using it. Encryption may give consumers the confidence they need to do internet business.

Encryption can also provide a means of "message authentication". The PGP User's Guide explains, "The sender's own secret key can be used to encrypt a message thereby signing it. This creates a digital signature of a message. This proves that the sender was the true

6

Page 7: Network Security

originator of the message, and that the message has not been subsequently altered by anyone else, because the sender alone possesses the secret key that made that signature." This prevents forgery of that signed message, and prevents the sender from denying the signature.

E-mail is certainly not secure. While you may believe that the use of a password makes your business private, you should be aware that sending information without encryption has been likened to sending postcards through the mail. Your message is totally open to interception by anyone along the way. You may believe that your personal e-mail is not incriminating and does not contain content that you must keep secret, and you may be right. But there are many common situations, where users have a legitimate need for security both to protect that information and to insure that information is not tampered with: Consumers placing orders with credit cards via the Internet, journalists protecting their sources, therapists protecting client files, businesses communicating trade secrets to foreign branches, ATM transactions, political dissenters, or whistle-blowers -- all are examples of why encryption may be needed for e-mail or data files, and why it might be necessary to create a secure environment through its use.

What is Decryption?Decryption is the opposite of encryption. When something is encrypted, the receiver needs to decrypt that in order to read the original information or message.

Description:In our project in order to develop an encrypter/decrypter, we used four different encryption techniques & algorithms namely;

Ceaser Cipher Transposition Cipher Moscode Cipher Vinegar Cipher

1. Ceaser Cipher:In cryptography, a Caesar cipher, also known as a Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 3, A would be replaced by D, B would become E, and so

7

Page 8: Network Security

on. The method is named after Julius Caesar, who used it in his private correspondence.Example:Text: Cipher text:I m salman l dp vdopdq

Thus, the Caesar cipher is a shift cipher since the ciphertext alphabet is derived from the plaintext alphabet by shifting each letter a certain number of spaces. For example, if we use a shift of 19, then we get the following pair of ciphertext and plaintext alphabets:

Plaintext: A B C D E F G H I J K L M N O P Q R S T U V W X Y ZCiphertext: T U V W X Y Z A B C D E F G H I J K L M N O P Q R S

2. Transposition Cipher: In cryptography, a transposition cipher is a method of encryption by which the positions held by units of plaintext (which are commonly characters or groups of characters) are shifted according to a regular system, so that the ciphertext constitutes a permutation of the plaintext. That is, the order of the units is changed. Mathematically obijective function is used on the characters' positions to encrypt and an inverse function to decrypt.Example: The way the simplest of these works is by picking a matrix of a fixed size (say, 6x10) and then writing your message across the rows. e.g. I am Salman Bajwa (matrix 4).0 1 2 3I - a m- S a lM a n -B a j w- - a -

3. Morsecode Cipher: Morse Code, created by Samuel Morse, was designed to transmit letters across telegrams. He wanted frequently used letters to have short codes and less frequently used letters to have longer codes. When encrypting, only letters and numbers will be encoded and the rest will be treated like spaces. When decrypting, only periods and hyphens will be decoded and the rest will be treated like spaces. This web page uses International Morse Code with some additional enhancements, but without support for foreign characters. It also is geared to help you decode Morse Code snippets you find with the Reverse (flips the text) and Swap (exchanges periods and hyphens) links.e.g. I am Salman

8

Page 9: Network Security

Morsecode Cipher Text: .. / .- -- / ... .- .-.. -- .- -.

This is a table of all the Morse Code translations

A   .-B   -...C   -.-.D   -..E   .F   ..-.G   --.H   ....I   ..J   .--- K   -.-L   .-..M   --N   -.O   ---P   .--.Q   --.-R   .-.S   ...T   - U   ..-V   ...-W   .--X   -..-Y   -.--Z   --..0   -----1   .----2   ..---3   ...-- 4   ....-5   .....6   -....7   --...8   ---..9   ----..   .-.-.-,   --..--?   ..--..-   -....- =   -...-:   ---...;   -.-.-.(   -.--.)   -.--.-/   -..-."   .-..-.$   ...-..-'   .----.¶   .-.-.. _   ..--.-@   .--.-.!   ---.!   -.-.--+   .-.-.~   .-...#   ...-.-&   . ...⁄   -..-. 

4. Vigenere Cipher:The Vigenère cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.

In a Caesar cipher, each letter of the alphabet is shifted along some number of places; for example, in a Caesar cipher of shift 3, A would become D, B would become E, Y would become B and so on. The Vigenère cipher consists of several Caesar ciphers in sequence with different shift values.

Vigenere Cipher Table:

Conclusion:In the end we were able to develop an encrypter & decrypter for the security purposes, Alhamdolilah.

9

Page 10: Network Security

Refrences: Cryptography & Network Security- Course Book Google

10