Cryptography is a method of storing and transmitting data in a particular form so that only those for whom it is intended can read and process it.So these slides give you an introduction to cryptography and types of ciphers.
Size: 1.06 MB
Language: en
Added: Sep 19, 2017
Slides: 25 pages
Slide Content
I NTRODUCTION TO CRYPTOGRAPHY & TYPES OF CIPHERS
C RYPTOGRAPHY I t is the practice and study of techniques for secure communication in the presence of third parties. Science and art of transforming messages to make them secure and immune to attack. The art of protecting information by transforming it ie; encrypting it into an unreadable format is called ciphertext.Only those who possess a secret key can decipher the message into plain text.
T YPES OF CIPHERS Substitution ciphers Transposition ciphers
S UBSTITUTION CIPHERS It is a method of encoding by which units of plaintext are replaced with ciphertext ,according to a fixed system;the “units” may be single letters,pairs of letters,triplets of letters,mixtures of the above and so forth. The receiver deciphers the text by performing the inverse substitution .
T RANSPOSITION CIPHERS It is a simple data encryption scheme in which plaintext characters are shifted in some regular pattern to form cipher text. In transposition ciphers letters are jumbled up together. Highly secure
SUBSTITUTION CIPHERS CAESAR CIPHERS AUTOKEY CIPHERS AFFINE CIPHERS VIGNERE CIPHERS
C AESAR CIPHERS Caesar cipher involves replacing each letter of alphabet with the letter standing three places further down the alphabet . Encryption Algorithm : C= (p+3)mod26 Decryption Algorithm : P= (c-3)mod26
A UTOKEY CIPHERS In an Autokey cipher the plain text itself is used as a keyword with a slight modification. Encryption We have to start the keyword with a short seed, Generally a plain text followed by a single letter. Then write that seed letter below to first letter and plain text itself is written below all other letters. Then sum up the corresponding digital equivalence of the letters, and convert it into cipher text.
Decryption Decryption is done by rewriting to each numerical term of both plaintext and cipher text. Suppose the plain text has digital equivalent cipher text is c 1 ,c 2 ,…….. c n . If S indicate the numeral for C then the plain text number is, P 1 = (c 1 -S) mod26 P k = (c k - P k-1 )mod 26
A FFINE CIPHER Example of Monoalphabetic Cipher. Here the encryption process is substantially mathematical. Encryption The first step in the encryption process is to transform each of the letters in the plaintext alphabet to the corresponding integer in the range 0 to m -1. With this done, the encryption process for each letter is given by E(x) = (ax + b) mod m Where a and b are the key for the ciphe r.
Decryption I n deciphering the cipher text, we must perform the opposite (or inverse) functions on the cipher text to retrieve the plaintext. Once again, the first step is to convert each of the cipher text letters into their integer values. We must now perform the following calculation on each integer D(x) = c(x - b) mod m Where c is the modular multiplicative inverse of a .
V IGNERE CIPHERS The Vigenere Cipher is an adaptation of the Trithemius Cipher, but instead of systematically progressing through the cipher text alphabets in the Tabula Recta, it uses a keyword to pick which columns to use.
Encryption A sequence of n letters with numerical equivalence b 1 ,b 2 ,...b n will serve as keyword. The plane text message is expressed as p 1 ,p 2 ....p n say p i .Then conversion to cipher text using the congruence relation. C i =P i +b i (mod26) ; i =1,2....n For eg : plaintext message is “a simple example” Decryption Deciphering is carried out by the relation P i = C i –b i (mod26) Plain text a s i m p l e e x a m p l e Key stream b a t t i s t a b a t t i s
R AIL FENCE CIPHERS The Rail fence cipher is an easy to apply transposition cipher that jumbles up the order of the letters of a message in a quick convenient way. It also has the security of a key to make it a little bit harder to break. The Rail Fence cipher works by writing your message on alternate lines across the page, and then reading off each line in turn .
Encryption Write the plaintext message in zigzag lines across the page, and then read off each row. Firstly, we need to have a key, which for this cipher is the number of rows you are going to have. then start writing the letters of the plaintext diagonally down to the right until you reach the number of rows specified by the key. then bounce back up diagonally until we hit the first row again. This continues until the end of the plaintext. Eg :
Decryption We start writing the message, but leaving a dash in place of the spaces yet to be occupied. Gradually, you can replace all the dashes with the corresponding letters, and read off the plaintext from the table. We start by making a grid with as many rows as the key is, and as many columns as the length of the cipher text. We then place the first letter in the top left Square, and dashes diagonally downwards where the letters will be. When we get back to the top row, we place the next letter in the cipher text. Continue like this across the row, and start the next row when you reach the end.
R OUTE CIPHERS The Route Cipher is a transposition cipher where the key is which route to follow when reading the cipher text from the block created with the plaintext. The plaintext is written in a grid, and then read off the following route chosen Encryption First we write the plaintext in a block of reasonable size for the plaintext. Part of your key is the size of this grid, so you need to decide on either a number of columns or number of rows in the grid before starting. Once the plaintext is written out in the grid, you use the Route assigned. This could be spiralling inwards from the top right corner in a clockwise direction, or zigzagging up and dow n.
Decryption To decrypt a message received that has been encoded with the Route Cipher, we need to know the route used and the width or height of the grid. We then start by constructing a blank grid of the right size, and then place the cipher text letters in the grid following the route specified.
C OLUMNAR TRANSPOSITION CIPHER Columnar Transposition involves writing the plaintext out in rows, and then reading the cipher text off in columns. In its simplest form, it is the Route cipher where the route is to read down each column in order . Encryption We first pick a keyword for our encryption. We write the plaintext out in a grid where the number of columns is the number of letters in the keyword. We then title each column with the respective letter from the keyword. We take the letters in the keyword in alphabetical order, and read down the columns in this order. If a letter is repeated, we do the one that appears first, then the next and so on. Eg :
Decryption The decryption process is significantly easier if nulls have been used to pad out the message in the encryption process. Below we shall talk about how to go about decrypting a message in both scenarios. Firstly, if nulls have been used, then you start by writing out the keyword and the alphabetical order of the letters of the keyword. You must then divide the length of the cipher text by the length of the keyword. The answer to this is the number of rows you need to add to the grid. You then write the cipher text down the first column until you reach the last row. The next letter becomes the first letter in the second column (by the alphabetical order of the keyword), and so on.
M YSZKOWSKI TRANSPOSITION CIPHERS The same methodology as for Columnar Transposition is used, where the plaintext is written out in rows under the keyword. The only difference is that when there are repeated Letters in the keyword, rather than number them from left to right, give all the same letters the same number. Then read across columns which have the same number in the keyword.
Encryption We have to choose our keyword for the encryption process first. We then write out the plaintext in a grid, where the number of columns in the grid is the number of letters in the keyword. We then number each letter in the keyword with its alphabetical position, giving repeated letters the same numbers. We then start at number 1 (the first letter alphabetically in the keyword), and if it is the only appearance of 1, we read down the column just like in Columnar Transposition. If, however, the number 1 appears more than once, we read from left to right all the first letters of the columns headed by 1. Then we move to the next row, and read across, left to right, the letters in the rows headed by 1. Once complete, we move on to the number 2, and so on.
Decryption The decryption process is very similar to Columnar Transposition. We shall go through how to do it if nulls have been used to fill spaces. By comparing this method with that given in Columnar Transposition when nulls are not used, you should be able to work out what to do. We start by writing out the keyword, and the alphabetical order of the letters, remembering to give repeated letters the same number. We then divide the length of the cipher text by the length of the keyword to work out how many rows we need to add to our grid. We then have to systematically put the cipher text back in to the grid. Start at number 1, and continue to the highest number. If the number only appears once, we fill down the column. If the number appears twice, we move from left to right across the columns with that number head ing them.