Crypto Basics 2

You might also like

Download as pdf
Download as pdf
You are on page 1of 25
Traclitonal’ En cry prion Technigues eh: ao fant! hy \g ‘ \\ we can W iiide the ah ie Energion a un 23 two broad Categories 2 » s ksh wn ay ANS 1a SMVas\> wi Sorting yy Fhe Sects 34 Substitution Ciphers 3* See Th Substitution Ciphers, aymboh tn Ae plaintert is seplaced with another. Zp the Aymbol in the plaintet Uy an alphabet character , thn we seplace one character ith another, For example, we car replace Vay. Yor A and 46 on. yy the symbol 4a ciget C0 #9) Von we can replace one light wi another, For example "8° with 6 '-ano! 20:07) Substifution Ciphers Care again be catezorizeol ast © Monoatphabeti c Ciphers Poly alphabetic Ciphers. iphens 32> a Ta Mono-abphabere i racter 0% a symbol 4 always changed. ymbok” in tht | for example’, 1] per Aan the ‘plaintext Uy replaced with ether ‘yin the Ciphertert, thn eveny time Jetkey A will be yoplacech uith teter Dd. Means Lhe yelationship between tht Lellevs Ln the. plaintext and ciphertext a one to One Example } ha v —xK— x ‘ Plaintert + hello Cipherlext : KHOOR, a * This: a dn the example 4 . mono al Lphabetre because wy ee Wer asyume that dhe plaintert Consiv-ts 0 Lower Case Jelters, ext (A-3)4 the ciphex_ text consists 4) upper: case Ca =z) Aelkers Tn adie Ciphers, we tye a numerical Value #0 each chavacher Clower Case ov oper. Cate) fare applying a mathematial operation Jar ene /ption. ae jongteypren These numerical valuus 20 Ah Letters (of Plaintert € Lipher-tert) ate aligned accorel * SIE a7 Bichtay x the given Plaintertiabede fg... 3 Ciphertert 1A BOD ERG HZ Vaio ORs seca 4-=P 2 5= Zn adllitive ciphers, the secret ke between the sendex and the receiver We an integer in 2,4 Can integer bf 0 and 2%). 7 eS ee Y The encryption ntiim aclle the Ke to the plain ‘ext chavacter anal he dlecryption 2 alygositim Aubtrats the Key, for ciphertext character. Means in faite Ciphers» 2M enoryption and olecryption 2s el tut Cea to Ashe given formulae = C= CPe#k) mod 26 P = Cc-k) mod: 26 where C y the Giphextext Charack’, Waar ete plain text Vhovee ane. ‘ky Ahe secret Key. re Exam, ple s— P ie fiver Hy Kato" and Plaintert YU “A “quantum” i) Additive Cipher, ik tan be ade aga es ee = yy 5 Bo\hny Pod eorn\c Cote) Mod 26 2PM Sie Nae " abe Use’ dhe deli tive Cipher with Key = 15 b clecrybe the mesage "“WTAAD’, w (22) 2 P= C2acis)med 26. = o DR Tg) 2 P2Cig-ts)ined 26 = 0h = e Aloo). Ree lamin) a6 = We di Aloe): Bale is) mod 262 I= eo Be ee os ra ae eo Vk . Shipt, Cipher 2? a z © Addi tive Ciphers ane also cobted shift ciphers because Ahi enciypten and decryption the tert, i based 07 EES ae ie. ey ples yh K cee ses he encryption ihn Viele, Characken 15 | characters own fowardll ord. and Phe decypion all A os Bc? ioe i) caracters V favaic Ai. beginning) Example '~ 7 the laintave t eee key a “ik cipher tert with be*— | ve wilt be dlecrypkd 4 c oO will be derypkol a f "Zoo" will be dletaypted a aR Ramey ees 3 characters clown towawls Ahe “plore ~ when we reach the end ae ae g the alphabets we #0 Wrap axouno, iY lassen capher +> a Aalditive Gpher was seo! ca : Caer fo communicate with Ws 4 ny it u abo sometime Jubtus ed rh “ma a mubbipicadive apher, dhe encryption. algorithm Apel fer rout} bi the plaintert by tne Key and Ah decryption ori tun Apeipies division 4 Me cppotert ty ed : | since the portions aie ae the decryption rears Pll Ve DW utplicatie inoue g We 7 So, the enenyplion nd deenpption ing, multiplicative cipher can be cavied by He ghuen formulae * Cuphertert 6 = Cpexn) mod 26 — Plaintrt P 2 Cex K') trod 26 ‘ =, pate Gpher , the plaintert if ipnontert yackers ane assigned tn gad Od ate bey la an inten 7 Note ay only 12 integers 5 14,15, 17, 19, 21, 23,25, Skat his ‘ Enoypt Ray" uun” using rnubhiplicac Cipher, boned k23, “4 S012) = C=C)2x3) mod 2% = 25 4 > A €20) 3 C=C20x3)mad 2% = 08 > T 7 C13) & 6 = 13K3) med 26 = 13 > [c= Big Pr decryption 2 mt ie eS) es Mod 26 = Pee 2as)> P= (25x9) mod a¢ = =IF 5 R= C08 XG) med 2¢ = 2595 yy. a Re mong), ad al 7 @ Affine Cipher 2+ ES Eee 3 on uv a Combination ay eu and mubsplicatve bead of usii ol. py hand Lhe Affore ciph both - Additive Cp Cijphers ; : Ta agfine Uphe , Wis a. dingle key fox ent pplion ON wwe tue a pals 4 Key Ckysks) dh fiat key by A Med with the rnulti/pli— Lcative cipher and the decond key Ka a wued with the additive cipher Tn affine Gipher , the encryption and decryption can be done tng Bie given formulae co Ciphestexe C= € PxkK, +k.) mod 26 _ flaintert P= CekCe-K,) x ky!) mod 2¢ uere CK, sks) bs i Bs ‘ Oe es ere ivode af “h, Bee aeGe, hh j aoe a) dh key k, yb tom ard ey Be rom 2 ize : cay. ee He tie hey domain ts ce Example! Use an affine cipher to encrybt the zi mesege “hello” where the kay par it (2) n pees briven) kz Kya 2 C= OP XK, HK) mod 26 hor) = C= (oF x7 +2) mod % 9S = = (04 x# 42) mod 26 = 04 7 & = Cu xe +2) mod % = of 7 & Paes eCo4) 2 c LCD RA Ltn) 2 € = (wx7+2) mod 26 S och) = Gy x7. 72). rode thay 22 So, Ciphatxt = Zes8w” Decryption :— | p -C@€- 2) xk) mod 26 xx * 0 G7jlats) yi Giisimenmere Z(25)> Ef P= (GS-2) x7') mod 26 =07 PK E (04) > p =(C04-2)xX 7") mod 26 =0y 7 € BCI) 2 P= (Coi-2) x7!) mod 26. = 11 7 ie =i. = E B lol) > P= (01-2) x71) rod 26 w (#2) > p =(C22-2)A7 |) mod 26 = 14 > © Po plaintext = “ helfo” foly atphate tic Ciphers 3° aa Ker Km Kee i) poly abphabetre phe, a charatey &* Aymbol in the plaintert U4 mat abioays supstituded. with the dame Character in the dighertext. Means the yvelationship bho a Chaxocter in the plaintert toa Character) in the dphertert ty one - to" Yrany. For example 5a Con be. enciyp. tel at “N” ly it endl as Lin the mécolle in the given EAE To Create a polyalphabetrc | cipher , we neta 40 MaKe each ciphertert character dependent bn both the Covrespord plaintert chawacder and the position the plaintert characte in the poe * Here we we a key theam k a Ky, ---) Where Ky 4 ued to“ enciphey pias ith character in the plaintert 2 character in the Boots ese SS _ TPH 9 Poly-alphabetio Ciphers 2» ee oe © Playfair. Cipher 38> eS Ploy fair Gpher 4 an example 4 the poly-alphabetic ciphex dred by “the British Bi, Sint, ee The secret Key tn Aku cipher 4 made 4 26 alphabet “Letters arranged An OQ 5x5 matix, whee alphabets TL ard J are Considered to be the’ same when encrypting . ie Different axrangements the tetters in the 23 mabix can cle CIRO |aeet ey | Ene wx 67 — as Beare encryption dee make #00 ries pur in the plaintert frm enning fowards endl, Ty in a pair ethers ae 4ume dn we inenata wo irext another bogus character tn the end 4 the plaintex& to make 2£ even, “Cheeks” CA eX ek AX” Examp! Now the Cipher oe Avec rushes 7 encyption oa] > Ty) the two setters Mn a pair axe fotated in the same Hou) 4 Ahe key, the corres poneliin enciypted character fe each Letter Ai lt be the next setter 40 AL Slight in dhe sume row, Gore Lonapping fo Me _bepinning 4 Ae tow the plaintert pee Ly Dre bast "character ty the HOW.) I—> Lf Hu two letters in a pair axe located in the game Column dhe specret Key, the Cones porcliiag enerypled character ee cach Letter Sih be the Fl: Bis. the two Ietlers in a poir ae not An @ same How wr same column 4 the decvet key , Ahe corresponcling enti p teal Chastacter Jue tach beter a setter Mat U in ib pwn tow but in Lhe Column the ahr feller sf the palr. Example p+ axe in dome clepinecl xi order. seiret Key, 4 | I { olzolel= N Ww DPA # a Some more av Yange ments 4 deters dhe matix canbe : Arrangement oe ye ra dea Q@ Vignere Cipher 3° _ 1 Vigenere Cepher was designeot by Blatieabe Vigne @ diets century French Mathematidan Tn Vignere Cepher , we creaté a tntheal key sheam 4 Ahe foun Ok) Ke, Ka Pats) ane | + Ber Guven initial Key = “PASCAL” Tnitiat key deam wilt be? aE), 6, @, De he final key sheam pused fare enoyp ption witt be Ahe et tion vA dM bnistial Key dheam (as rnany Aires as neded ). { Ye Aecieet) Ph 5 Plainterts She ts Liste ning Ps voluss wind? Ak B18) W894 p13 ¢ key steam $+ IS 0 @ 2 0 IB 0 1@ 2 0 NI Iso 8 at 19.26 cs volus 7 SR RSS uiciae) jw k Ss wx eo hee LU Cipher +> x Hill Cipher was implemented by desler: S Hill, In case a Hill Giphor , we alivide the plaintext into equal dige blocks . Then the plaintert ty sepramted in a | mative order Lxm whee L A Zhe number 4 boa “ml iy the Sige ¥ the Voth Coa g Charaders tn a block) | Te secvet key in HU ciphex 4 taken as a doplare rab) 4 Age mx | upeu om YU the Ale Y blocks, Here plainteyt wilt be repracntedos shown An the matin 3 PAR ----B,]+ From 3” block P= | eh --- Pols From a Lok Pr fe fy —~- Pra Io From 1% blouk Thus we get a Lx™m mahix for Ane plaintext where LO 4 blocks) ‘yepresend the wuss and ‘m' (size of block ) Yepretent phe Columns . key aces As dhe key ig a mem mab 3 ka Note ; In HU cibheou 0 i Can be delectecl ag a key “, whith Q multtp bicative inyoue in Zee. Suppose the given key mating O94 OF VE, 07 0S 06

You might also like