Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
136 views57 pages

Cryptography Unit 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
136 views57 pages

Cryptography Unit 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 57
Basic Terminology + CIPHER TEXT - the coded Message + CIPHER - algorithm for transforming plaintext to cipher text * KEY - info used in cipher known only to sender/receiver * ENCIPHER (ENCRYPT) - converting plaintext to cipher text * DECIPHER (DECRYPT) - recovering cipher text from plaintext * CRYPTOGRAPHY - study of encryption principles/Methods * CRYPTANALYSIS (CODEBREAKING) - the study of principles/ Methods of deciphering ciphertext without knowing key * CRYPTOLOGY - the field of both cryptography and cryptanalysis Cryptography Concepts and Techniques Cryptographic systems are generally classified along 3 independent dimensions: 1. Type of operations used for transforming plain text to cipher text: All the encryption algorithms are based on two general principles: a. Substitution: in which each element in the plaintext is mapped into another element. b. Transposition: in which clements in the plaintext are rearranged. Cryptography Concepts and Techniques... 2. The number of keys used: a. Ifthe sender and receiver uses same key then it is said to be symmetric key (or) single key (or) conventional encryption. b. If the sender and receiver use different keys then it is said to be public key encryption. 3. The way in which the plain text is processed: a. A block cipher processes the input and block of elements at a time, producing output block for each input block. b. A stream cipher processes the input elements continuously, producing output element one at a time, as it goes along. Classical Encryption Techniques «There are two basic building blocks of all encryption techniques: Substitution and Transposition. 1, SUBSTITUTION TECHNIQUES: A substitution technique is one in which the letters of plaintext are replaced by other letters or by numbers or symbols. If the plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with cipher text bit patterns. a. CAESAR CIPHER: The earliest known use of a substitution cipher and the simplest was by Julius Caesar. The Caesar cipher involves replacing each letter of the alphabet with the letter standing 3 places further down the alphabet. Substitution Techniques (Caesar Cipher)... Example: Plain text: PAY MORE MONEY Cipher text: SDB PRUH PRQHB + Note that the alphabet is wrapped around, so that letter following: + Z is ,,a”. For each plaintext letter p, substitute the cipher text letter ¢ such that C = E (p) = (p+3) Mod 26 + A shift May be any amount, so that general Caesar algorithm is C=E (p) = (ptk) Mod 26 Where k takes on a value in the range | to 25. + The decryption algorithm is P= D(C) =(C-k) Mod 26 A etric ~ © Mono-Alphabetic cipher substitution technique It uses fixed substitution over the entire message Uses random substitution © Requires permutation or combination of 26 alphabets. Hard to crack © Example! Een oon nao ee yN LK X BOS HMI WD P Sec ae a ON On Ml ee eS Ce tar * Plain text is =“WELCOME” © Cipher text is =“GXDLRPX” Sisson fava a e Homophonic substitution technique ¢ A plain text alphabet can map to more than one cipher text alphabet. ° Example + Acan be replaced by [D,H,P,R] and B can be replaced by [E1,QS] Sls inva ® etric © Polygram substitution technique * A block of plain text alphabet is replaced by block of cipher text alphabet. ° Example © Hello can be replaced by YUQQW Sila0 inva » Substitution Techniques (Playfair Cipher) * It is the best-known Multiple—letter encryption cipher which treats diagraph in the plaintext as single units and translates these units into cipher text diagraph. + The scheme was invented in 1854 by Charles Wheatstone but was named after Lord Playfair who promoted the use of the cipher. * The Playfair Cipher is a diagraph substitution cipher offering a relatively weak method of encryption. * It was used for tactical purposes by British forces in the Second Boer War and in World War I'and for the same purpose by the Australians and Germans during World War if. * This was because Playfair is reasonably fast to use and requires no special equipment. A typical scenario for Playfair use would be to protect important but non-critical secrets during actual combat. Substitution Techniques (Playfair Cipher)... * Encryption Key: monarchy Plaintext: instruments Playfair Encryption Algorithm consists of 2 steps: 1. Generate the key Square(5*5): * The key square is a 5*5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted from the table (as the table can hold only 25 M|O|N/A/R C|H|Y/|B|D E|F/G/I|K L/|P/Q|Ss|T Ul|ViIwlx/Zz alphabets). If the plaintext contains J, then it is replaced by I. * The initial alphabets in the key square are the unique alphabets of the key in the order in which they appear followed by the remaining letters of the alphabet in order. Substitution Techniques (Playfair Cipher)... 2. Algorithm to encrypt the plain text: The plaintext is split into pairs of two letters (digraphs). If there is an odd number of letters, a Z is added to the last letter. Example: Plaintext: "instruments" After Split: 'in' 'st' ‘ru’ 'me' ‘nt’ ‘sz* Cases: a. Pair cannot be made with same letter. Break the letter in single and add a bogus letter to the previous letter, Plain Text: “hello” After Split: ‘he’ ‘Ix’ ‘lo’ Here ‘x’ is the bogus letter. Substitution Techniques (Playfair Cipher)... b. If the letter is standing alone in the proc letter with the alone letter of pairing, then add an extra bogus Plain Text: “helloe” AfterSplit: ‘he’ ‘Ix’ ‘lo’ ‘ez’ Here *z” is the bogus letter. Substitution Techniques (Playfair Cipher)... Rules for Encryption: a. If both the letters are in the same column: Take the letter below each one going back to the top if at the bottom). Example Diagraph: "me" Encrypted Text: cl Encryption: m-> Cc e- 1 Substitution Techniques (Playfair Cipher)... b. If both the letters are in the same row: Take the letter to the right of each one (going back to the leftmost if at the rightmost position). Example Diagraph: "st" Encrypted Text: tl Encryption: s => t t -> 2 Substitution Techniques (Playfair Cipher)... ce. If neither of the above rules is true: Form a rectangle with the two letters and take the letters on the horizontal opposite corner of the rectangle. Example Diagraph: "nt" Encrypted Text: rq Encryption: n->P t->4q Substitution Techniques (Playfair Cipher)... *Example: PlainText: "instruments" After Split: 32’ Plain Texts rumen wR] «fo N R | Encrypted Text: gatinzcleaty . ee CEC fegeren FE K — |F |e |i jk | —_ Pp ') P lo sant v z ju fy fw ix fz seo me: [Jo [x [a [R | mt [m Jo sz [m [oO [WN JA [R weve H ly [a lo c |H ic [H |y |e [o wed F |e |i |k E |F elFiefi ik) ¢3 P fo |s |r |p u |p fo part u |v fw fx fz u [V Fs Substitution Techniques (Playfair Cipher)... * Decryption: Decrypting the Playfair cipher is as simple as doing the same process in reverse. The receiver has the same key and can create the same key table, and then decrypt any messages made using that key. |} Mi] O|N/A R Key: monarchy D ciphertext: gatlmzclrqtx K Playfair Decryption Algorithm consists of 2 steps: L/P /Q|S|T zZ 1. Generate the key Square(5*5) at the receiver’s end: | U | V |W) X + The key squa sa 5x5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted from the table (as the table can held only 25 alphabets). If the plaintext contains J, then it is replaced by I. Substitution Techniques (Playfair Cipher)... * The initial alphabets in the key square are the unique alphabets of the key in the order in which they appear followed by the remaining letters of the alphabet in order. 2. Algorithm to decrypt the ciphertext: The ciphertext is split into pairs of two letters (digraphs), Note: The ciphertext always have even number of characters. Example: CipherText: "gatlmzclrgtx" After Split: ‘ga’ 'tl' 'mz' 'cl' 'rq' 'tx' Substitution Techniques (Playfair Cipher)... Rules for Decryption: a. If both the letters are in the same column; Take the letter above each one (going back to the bottom if at the top). Diagraph: "cl" Decrypted Text: me Decryption: c->m l->e Substitution Techniques (Playfair Cipher)... b. If both the letters are in the same row: Take the letter to the left of each one (going back to the rightmost if at the leftmost position). Diagraph: "tl" Decrypted Text: st Decryption: t-+>s LF" Substitution Techniques (Playfair Cipher)... ec. If neither of the above rules is true: Form a rectangle with the two letters and take the letters on the horizontal opposite corner of the rectangle. Diagraph: "rq Decrypted Text: nt Decryption: r->n g->t Substitution Techniques (Playfair Cipher)... Example: CipherText: “gatImzclrqtx" After Split: ‘ga’ ‘tl’ ‘mz! ‘cl’ ‘rq’ ‘tx’ ce] «hop fe] «Mo Ww je [nw ly |e [0 c [ny fe [o | ¢ [nH [y |e jo e [F K E |r |e [i |x | E |F |e |i |K t [po fs |r eo |p fo [s |r uv z iw |X ABM pisin text: "gatImzclrqtx" Decrypted Text: instrumentsz Decryption: (red)-> (green) ga > in tl -> st Substitution Techniques (Hill Cipher) * Hill cipher is a polygraphic substitution cipher based on linear algebra. Each letter is represented by a number modulo 26, Often the simple scheme A = 0, B = 1, ..., Z = 25 is used, but this is not an essential feature of the cipher. + To encrypt a message, cach block of n letters (considered as an n- component vector) is multiplied by an invertible n x n matrix, against modulus 26. + To decrypt the message, each block is multiplied by the inverse of the matrix used for encryption. Substitution Techniques (Hill Cipher)... * Itis also a multi letter encryption cipher. It involves substitution of ‘m” cipher text letters for ‘m’ successive plaintext letters. For substitution purposes using ‘m’ linear equations, each of the characters are assigned a numerical values. + The system can be defined as (M=3): cl =(kI1 pl + k12 p2 + k13 p3) mod 26 ¢2 =(k21 pl + k22 p2 + k23 p3) mod 26 ¢3 = (k31 pl + k32 p2 + k33 p3) mod 26 Substitution Techniques (Hill Cipher)... + Tf we represent in matrix form, the above statements as matrices and column vectors: c ki iz Kas \ fp e) ky, yy kay HH pp | mod 26 cy kai Kaa Kan/ \ps Thus, C = KP Mod 26, where C= Column vectors of length 3 P= Column vectors of length 3 K =3x3 eneryption key Matrix. Substitution Techniques (Hill Cipher)... + For decryption pracess, inverse of Matrix K i.e. Kis required which is defined by the equation: KK! =K'K=1 where [ is the identity Matrix that contains only 0’s and 1’s as its elements. + Plaintext is recovered by applying K"' to the cipher text. It is expressed as C= EK(P) = KP Mod 26 P= DK(C) = K'C Mod 26 = K'KP = IP =P Substitution Techniques (Hill Cipher)... T can’t do it can’t do il se 5 #201319 314819 The eneryption pro: carried aut as follows i 2) a So, the enerypted text will be given as > EON THY Sv Example 9 18 10 Plain text: I can’t do it, Size of M is 3, Key K is ( a ) Substitution Techniques (Polyalphabetic Cipher) In order to make substitution ciphers more secure, more than one alphabet can be used. Such ciphers are Called polyalphabet i.e., which means that. The same letter message can be represented by different letters when encoded. Such a one-to-many correspondence makes the use of frequency analysis much more difficult in order to crack the code. We describe one such cipher named for Blaise de Vigenere a 16-th century Frenchman. The Vigenere cipher is a polyalphabetic cipher based on using successively shifted alphabets, a different shifted alphabet for each of the 26 English letters. The procedure is based on the table as shown below and the use of a keyword. The letters of the keyword determine the shifted alphabets used in the encoding process. Substitution Techniques (Polyalphabetic Cipher)... SCEOODICESECESEQROCOEEO0EE b+ [Mf[ealo [lulu [ofz|-|=]z[4/z|=[o]a/ofeaj-|5|>|3| x] [x]>-[n]<|o [ofall fo}x]-|-]:e| 4] =| 2]ofa}aler|a|-|>]>]3} [=|x)>[n|<|m)0]a]u}ufo}z|~|]x|4]3|z]o]a}ola|a)-|3]>} I> [[x[>|N]<[eafo]aylfulolx|-|>]<]]z]2]o]a fale] a)-|} [> [> fe fxs] <[e[ufofuli[ol=|-[-]|-]2]2[ola ole] 9) [ie] >]>]5)x|[>|N]<| 0/0} O}u)u |) x} =| >} x} .}3]z/0]0|0] or] a} la[- |] 3 |x| [N] <]e]0[o}ululo|z|-|=[z]-]3/=/]a/o]a] BORESESSSCEOONCOREEEEECRS lojalof-[a|>|=bx|>[s]|<))2|=|o/a! fa. [cole| ia} > [>-[2|[x|[3|=[0] jo/afolelalelais|=}<)+[x]<|ao/afulilofz|-jafelals|= zlO|aloalop-la|>le|=|>|n||stxl> INix|e|o|a}u)a oz) — >|] =} }2[ofe fole|alt|=|>]s]x]>1s]<[o|ofafilefol=|-|5]x4 f/f }z[o[a [ole] of-|>)>|=|x)>[N]<)a/o]olujufolz|=[>} |} i] 2] ||| |e] | >]>|3S]e<] >] M) <] | ]ea}ua]u| | =) -|>}<]=]3|=|0\a|o|e/a}-|>|>[z]|+[s}]>[=|«/>|y)<|ojola)ule lo} lol =|-|>[x|=[el2olajole|al+-|a[>]s|x)>[n|<|ajula]uful le [ol=|=[=|x|-}s|=[olalo}e|in[-|5]>]3[x]>n[]e]x)>(N||z|< >In) <[a] Jo] ofofufu olz|~[>]x]~)3[2[ola]ofc|al-|a|>|e[x]>/s]¢] BEOGOSCBESCRSSCRCCORESEEEE Substitution Techniques (Polyalphabetic Cipher)... * For the Message COMPUTING GIVES INSIGHT and keyword LUCKY we proceed by repeating the keyword as Many times as needed above the message, as follows: ude Quldudyffuld al yuful du)yful NGGHIIVIE ST stilclufr| ome ulti Encryption: Given a key letter x and a plaintext letter y, the cipher text letter is at the intersection of the row labeled x and the column labeled * So for L, the cipher text letter would be N. So, the cipher text for the given plaintext would be given as: | q < Llulclaty[eful cl ety(e pul ela yet ulel «iy te | c| ulti itn! Gight {viel stilal si |G) alt k==MESSAGE Ni S| E/ CIP] OIE} TIP! Gi Cl GY] MK! QI ELE k==Encoded Message Substitution Techniques (Polyalphabetic Cipher)... Decryption: The key letter again identifies the row and position of cipher text letter in that row decides the column and the plaintext letter is at the top of that column, + The strength of this cipher is that there are multiple cipher text letters for each plaintext letter, one for each unique letter of the keyword and thereby making the letter frequency information is obscured. + Still, breaking this cipher has been made possible because this reveals some Mathematical principles that apply in cryptanalysis. * To overcome the drawback of the periodic nature of the keyword, a new technique is proposed which is referred as an auto key system, in which a key word is concatenated with the plaintext itself to provide a running key. Substitution Techniques (Polyalphabetic Cipher)... Example: + In the above example, the key would be Iucky computing gives in Still, this scheme is vulnerable to cryptanalysis as both the key and plaintext share the same frequency distribution of letters allowing a statistical technique to be applied. * Thus, the ultimate defense against such a cryptanalysis is to choose a keyword that is as long as plaintext and has no statistical relationship to it. * Anew system which works on binary data rather than letters is given as: C= pik where, pi = i" binary digit of plaintext h binary digit of key i binary digit of cipher text = exclusive-or operation. Substitution Techniques (Polyalphabetic Cipher)... * Because of the properties of XOR, decryption is done by performing the same bitwise operation. pi=Ci ki «It is very long but, repetition key word is used making cryptanalysis difficult. Transposition Techniques «A very different kind of mapping is achieved by performing some sort of permutation on the plaintext letters. This technique is referred to as a transposition cipher which includes: ee Rail-fence Technique Columnar Transposition Verman Cipher Book/Running-key Cipher Transposition Techniques (Rail-Fence) +In Rail Fence Cipher, given a plain-text message and a numeric key then cipher/decipher the given text using the Rail Fence algorithm. * The rail fence cipher is also called a "zigzag cipher" because we make a rectangle box and write plain text into it in a zigzag form. + It is a form of transposition cipher that jumbles up the order of the letters of a message using a basic algorithm. It derives its name from how it is encrypted, * The rail fence cipher works by writing your plain text or message on alternate lines across the prail and then reading off each line or rows in turn by turn. Transposition Techniques (Rail-Fence)... Encryption: *In a transposition cipher, the order of the alphabets is mixed up or we can say rearrange to obtain the cipher-text or encrypted text. 1. In the rail fence cipher, the plain-text is written as zigzag way as firstly go downward till the box is not end and diagonally on successive rails of an imaginary fence. 2. When we reach the bottom rail, we simply traverse opposite moving diagonally, after reaching the top rail or top line, the direction is changed again. Thus the alphabets of the plain text are written in a zig-zag form. 3. When all the alphabet is fill in the rail then the individual's rows are combined together to give a ciphertext. Transposition Techniques (Rail-Fence)... Example: Plaintext: “defend the east wall”, key size or the size of the row is 3. Eneryption method: |2 That at the end of the message we have inserted two “X”s. These are called nulls and act as placeholders. We do this to make the text fit into the rail so that there is the same number of letters on the top row as well as on the bottom row. is not necessary, it makes the decryption process a bit easier if the text has this format. * Cipher text: "dnetleedheswixftaax". Transposition Techniques (Rail-Fence)... Decryption The number of columns in rail fence cipher remains equal to the length of plain-text which we took, And the key remains the same as in encryption to the number of rails. Hence, the Rail Fence matrix can be constructed likely. Once we have got the matrix we can find-out the places where plain texts should be placed using the same way as we doe in the encryption method of moving diagonally up and down alternatively to form text. Then, we fill the cipher-text accordingly to row-wise. After filling the text, we traverse the matrix in the zig-zag form to get the original text or the plain text. Transposition Techniques (Rail-Fence)... Example Ciphertext: “TEKOOHRACIRMNREATANFTETYTGHH”, it will be encrypted with a key size of 4. + We start by placing the “T” in the first square. You then dash the diagonal down places until you get back to the top line, and place the “E” here. Continuing to fill the rows you get the pattern below TT E LT [kl 1 J ol | [ Jo Transposition Techniques (Rail-Fence)... + As we have a key size of 4 and the length of the message is 28 so we make like this and continues this till all the text does not fit into it. Transposition Techniques (Rail-Fence)... + Third stage in decryption process T E 7 Ik TT [Jol [I ° * Forth and the final stage in decryption process * Now, we read them as diagonally from top to bottom then bottom to top and we get the plain text or the original text ie. “THEY ARE ATTACKING FROM THE NORTH” Transposition Techniques (Columnar Transposition) A. Basic Technique It is a slight variation to the Rail-fence technique, let’s see its algorithm: 1, Ina rectangle of pre-defined size, write the plain-text message row by row. 2. Read the plain message in random order in a column-wise fashion. It can be any order such as 2, 1, 3 ete. 3. Thus Cipher-text is obtained, Transposition Techniques (Columnar Transposition)... Example: Plain Text: “INCLUDEHELP IS AWESOME”. + Now we apply the above algorithm and create the rectangle of 4 columns. (we decide to make a rectangle with four column it can be any number.) Column 4 Column 2 Column 3 Column 4 H N c L u D E H E L P 1 Ss A Ww. E s 0 M E * Now let’s decide on an order for the column as 4, 1, 3 and 2 and now we will read the text in column-wise. Cipher-text: LHIEEIUESSCEPWMNDLAO Transposition Techniques (Columnar Transposition)... B. Columnar Technique with multiple rounds + In this method, we again change the chipper text we received from a Basic technique that is in round | and again follows the same procedure for the cipher-text from round 1. Algorithm: 1. Ina rectangle of pre-defined size, write the plain-text message row by row. 2. Read the plain message in random order in a column-wise fashion. It can be any order such as 2, 1, 3 ete. . Thus, Cipher-text of round 1 is obtained. 4. Repeat from step 1 to 3. w Transposition Techniques (Columnar Transposition)... Example: Plain Text: “INCLUDEHELP IS AWESOME” Round 1: + Now we apply the above algorithm and create the rectangle of 4 column (we decide to make a rectangle with four column it ean be any number.) Column 1 Column 2 Column 3 Column 4 L N c L U o E H E L P 1 s A Ww E s Q M E * Now let’s decide on an order for the column as 4, 1, 3 and 2 and now we will read the text in column-wise. * Cipher-text of round 1: LHIEEIUESSCEPWMNDLAO Transposition Techniques (Columnar Transposition)... Round 2: Column 1 [Column 2 Column 3 Column a 4 1 T vu s c Ww ™ L A []=Je)RI= lolz|mimim * Now, we decide to go with a previous order that is 4,1,3,2. * Cipher-text: EEENLESPICUMHISW * These multi-round columnar techniques are harder to crack as compared to methods seen earlier. Transposition Techniques (Vernam Cipher) * The Vernam Cipher has a specific subset one-time pad, which uses input ciphertext as a random set of non-repeating character. * The thing to notice here is that, once an input cipher text gets used it will never be used again hence one-time pad and length of cipher-text is the size that of message text. Algorithm: 1. Plain text character will be represented by the numbers as A=0, B=1, C=2,... Z=25. 2. Add each corresponding number of a plain text message to the input cipher text alphabet numbers. If the sum is greater than or equal to 26, subtract 26 from it. . Translate each number back to corresponding letters and we got our cipher text. BY Transposition Techniques (Vernam Cipher)... Example: Plain Text: “INCLUDEHELP” and input cipher text: “ATQXRZWOBYV” ney ram pes * One time pad should be discarded after every single use and this technique is proved highly secure and suitable for small messages but illogical if used for long messages. Transposition Techniques (Book/Running-Key Cipher) * The Running Key cipher has the same internal workings as the Vigenere cipher. The difference lies in how the key is chosen; the Vigenere cipher uses a short key that repeats, whereas the running key cipher uses a long key such as an excerpt from a book. + This means the key does not repeat, making cryptanalysis more difficult. The cipher can still be broken though, as there are statistical patterns in both the key and the plaintext which can be exploited, If the key for the running key cipher comes from a statistically random source, then it becomes a “one time pad” cipher. One time pads are theoretically unbreakable ciphers, because every possible decryption is equally likely. Transposition Techniques (Book/Running-Key Cipher)... Algorithm: * The “key” for a running key cipher is a long piece of text, e.g. an excerpt from a book. The running key cipher uses the following table to encipher the plaintext: Ni N€BUBMeOTHAYIEZOLOEMED>2x> >| PN@QUQULOTHNYsZZOROEMEIDEX XyNCBUOUROTHNYsEZOLOEMRIDE EXD N@OUGULOTHnesTZOROE MEDD | DEM>N@BUBULOTHNYJEZOLOERES DDExDNqaUOULOTHNZITZOLOW Or [pad ExeNCeuOUROTHNxsEZOLOEN | Mro>3x>udovausetHnxsez onde HWb OD 2X>N ae UOELOTHNYJ E2009 OEWhI>EX>NqouGuEOIMNYsTZ00 AOU I>EXHNdBuouLOTHNZ4zzZ0 OROTUE D> Sx} Nd dU OwROEHNeSEZ | RORQRMED>EX>N@RUCUROTHAYZE = EZOLOEMHI>IX>N2x>Ne@evounorHny M4ZZO0R0E MEI >3K>NCaUOMEOTHN | n¥sEZOCVE RP O>Ex>NdoUdeLOTH = Hnw sz Z0L0eURI 92x > NC EUO UL OT \EMMxJEZ20ROEMFI> zx NdoUOBLD OIMMYsEZOACEMrI>2x>NCovouE SOXHMRIEZOA EME D> EXPNA HUGE SLOTHAYJEZOROEMEI>EK>NCBUO OuLerAnyizzonGEAbI>2x>NGOU VOWLOTHnxszZOLOKHFI>IKONEE SUOwROTHnxJEZOLGEMPIDEKE NS | €6UGuLOrHAY 4ZZ08GaM+3>2x> Transposition Techniques (Book/Running-Key Cipher)... + To encipher a message, write the key stream above the plaintext, in this case our key is from a Terry Pratchett book: 'How does the duck know that? said Victor’. + If we needed to encipher a longer plaintext, we could just continue reading from the: book. HOWDOESTHEDUCKKNOWTHATSAIDVI DEFENDTHEEASTWALLOFTHECASTLE + Now we take the letter we will be encoding, 'D', and find it on the first column on the table. Then, we move along the 'D' rew of the table until we come to the column with the 'H' at the top (The 'H’ is the keyword letter for the first 'D'), the intersection is our ciphertext character, 'K'. + So, the ciphertext for the above plaintext is: HOWDOESTHEDUCKKNOWTHATSAIDVI DEFENDTHEEASTWALLOFTHECASTLE KSBHBHLALIDMVGKYZKYAHXUAANGM Encryption and Decryption e¢ Encryption: It is the process of locking up information using cryptography. Information that has been locked this way is encrypted. © Decryption: The process of unlocking the encrypted information using cryptographic techniques. ® Key: A secret like a password used to encrypt and decrypt information. There are a few different types of keys used in cryptography. Symmetric and Asymmetric Key Cryptography Symmetric Key Encryption: + This is the simplest kind of encryption that involves only one secret key to cipher and decipher information. * Symmetrical encryption is an old and best-known technique. It uses a secret key that can either be a number, a word or a string of random letters. «It is a blended with the plain text of a message to change the content in a particular way. * The sender and the recipient should know the secret key that is used to encrypt and decrypt all the messages. + Examples of Symmetric Encryption: Blowfish, AES, RC4, DES, RCS, and RC6. * The most widely used Symmetric Algorithms are AES-128, AES-192, and AES- 256, Symmetric and Asymmetric Key Cryptography... Sy Encryption amet Secret Secret Some Key Key kev cs Aash*L@s. _ Te=#/>Be1 ROS/12.>21 1PRL39P20 ” Plain Text Plain Text Cipher Text « The main disadvantage of the symmetric key encryption is that all parties involved have to exchange the key used to encrypt the data before they can decrypt it. Symmetric and Asymmetric Key Cryptography... Asymmetric Key Encryption: + Asymmetrical encryption is also known as public key cryptography, which is a relatively new Method, compared to symmetric encryption. + Asymmetric encryption uses two keys to encrypt a plain text. Secret keys are exchanged over the Internet or a large network. It ensures that malicious persons do not misuse the keys. «It is important to note that anyone with a secret key can decrypt the message and this is why asymmetrical encryption uses two related keys to boosting security. Symmetric and Asymmetric Key Cryptography... * A public key is made freely available to anyone who might want to send you a message. The second private key is kept a secret so that you can only know. Asymmetric Encryption Public Different Keys Secret Key Key aS AaSh"L@g. S T6=8/>Be1 ROG/J2.>2L LPRL39P20 id Cipher Text Plain Text Plain Text Symmetric and Asymmetric Key Cryptography... * A message that is encrypted using a public key can only be decrypted using a private key, while also, a message encrypted using a private key can be decrypted using a public key. * Security of the public key is not required because it is publicly available and can be passed over the internet. Asymmetric key has a far better power in ensuring the security of information transmitted during communication. * Asymmetric encryption is mostly used in day-to-day communication channels, especially over the Internet. * Popular asymmetric key encryption algorithm includes ElGamal, RSA, DSA, Elliptic curve techniques, PKCS.

You might also like