Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Navigating Electronic Signature Law... by ClientSide 1198 views
- Cryptography by Sidharth Mohapatra 25175 views
- Cns Chapter 2 by Ram Dutt Shukla 871 views
- Classical cipher by Hoang Nguyen 6587 views
- Secret key cryptography by Prabhat Goel 1191 views
- Mobility And Mobile I Pv4 by Ram Dutt Shukla 1137 views

1,321 views

Published on

No Downloads

Total views

1,321

On SlideShare

0

From Embeds

0

Number of Embeds

1

Shares

0

Downloads

114

Comments

0

Likes

2

No embeds

No notes for slide

- 1. Chapter 1:Chapter 1:Chapter 1:Chapter 1:----Conventional Encryption:Classical Encryption TechniquesBy:- Sarthak Patel (www.sarthakpatel.in)
- 2. OutlineConventional Encryption ModelSteganographyClassical EncryptionTechniquesSarthak Patel (www.sarthakpatel.in)2
- 3. Classical encryption techniquesAs opposed to modern cryptographyGoals:to introduce basic concepts & terminology of encryptionto prepare you for studying modern cryptographySarthak Patel (www.sarthakpatel.in)3
- 4. Principles of SecuritySecurity Goals:ConfidentialityIntegrityAuthenticationNon-repudiationSarthak Patel (www.sarthakpatel.in)4Non-repudiationAccess ControlAvailability
- 5. Loss of Confidentiality• SecretA BSarthak Patel (www.sarthakpatel.in)5CAttack:-Interception
- 6. Absence of AuthenticationBA I am User ASarthak Patel (www.sarthakpatel.in)6CAttack:-Fabrication
- 7. Loss of Integrity• Ideal RouteA BSarthak Patel (www.sarthakpatel.in)7CAttack:-Modification
- 8. Non-repudiationA BI never sent that message,which you claim to havereceivedSarthak Patel (www.sarthakpatel.in)8A B
- 9. Access ControlThe principles of access control determines who should be ableto access what.Access control is broadly related to two areas: rolemanagement and rule management.Sarthak Patel (www.sarthakpatel.in)9
- 10. Loss of AvailabilityA BSarthak Patel (www.sarthakpatel.in)10A BAttack:-InterruptionC
- 11. Basic terminologyPlaintext: original message to be encryptedCiphertext: the encrypted messageEnciphering or encryption: the process of convertingplaintext into ciphertextSarthak Patel (www.sarthakpatel.in)11plaintext into ciphertextEncryption algorithm: performs encryptionTwo inputs: a plaintext and a secret key
- 12. Symmetric Cipher ModelSarthak Patel (www.sarthakpatel.in)12
- 13. Contd…Deciphering or decryption: recovering plaintext from ciphertextDecryption algorithm: performs decryptionTwo inputs: ciphertext and secret keySarthak Patel (www.sarthakpatel.in)13Secret key: same key used for encryption and decryptionAlso referred to as a symmetric key
- 14. Contd…Cipher or cryptographic system : a scheme for encryption anddecryptionCryptography: science of studying ciphersSarthak Patel (www.sarthakpatel.in)14Cryptanalysis: science of studying attacks against cryptographicsystemsCryptology: cryptography + cryptanalysis
- 15. CiphersSymmetric cipher: same key used for encryption anddecryptionBlock cipher: encrypts a block of plaintext at a time (typically 64 or128 bits)Sarthak Patel (www.sarthakpatel.in)15128 bits)Stream cipher: encrypts data one bit or one byte at a timeAsymmetric cipher: different keys used for encryptionand decryption
- 16. Symmetric Encryptionor conventional / secret-key / single-keysender and recipient share a common keyall classical encryption algorithms are symmetricThe only type of ciphers prior to the invention ofasymmetric-key ciphers in 1970’sSarthak Patel (www.sarthakpatel.in)16asymmetric-key ciphers in 1970’sby far most widely used
- 17. Symmetric EncryptionMathematically:Y = EK(X) or Y = E(K, X)X = DK(Y) or X = D(K, Y)X = plaintextY = ciphertextK = secret keySarthak Patel (www.sarthakpatel.in)17K = secret keyE = encryption algorithmD = decryption algorithmBoth E and D are known to public
- 18. CryptanalysisObjective: to recover the plaintext of aciphertext or, more typically, to recover the secretkey.Kerkhoff’s principle: the adversary knows all detailsabout a cryptosystem except the secret key.Sarthak Patel (www.sarthakpatel.in)18about a cryptosystem except the secret key.Two general approaches:brute-force attacknon-brute-force attack (cryptanalytic attack)
- 19. Brute-Force AttackTry every key to decipher the ciphertext.On average, need to try half of all possible keysTime needed proportional to size of key spaceKey Size (bits) Number of AlternativeKeysTime required at 1decryption/µsTime required at 106decryptions/µsSarthak Patel (www.sarthakpatel.in)19Keys decryption/µs decryptions/µs32 232 = 4.3 × 109 231 µs = 35.8 minutes 2.15 milliseconds56 256 = 7.2 × 1016 255 µs = 1142 years 10.01 hours128 2128 = 3.4 × 1038 2127 µs = 5.4 × 1024 years 5.4 × 1018 years168 2168 = 3.7 × 1050 2167 µs = 5.9 × 1036 years 5.9 × 1030 years26 characters(permutation)26! = 4 × 1026 2 × 1026 µs = 6.4 × 1012 years 6.4 × 106 years
- 20. Cryptanalytic AttacksMay be classified by how much information needed by theattacker:Ciphertext-only attackKnown-plaintext attackSarthak Patel (www.sarthakpatel.in)20Known-plaintext attackChosen-plaintext attackChosen-ciphertext attack
- 21. Ciphertext-only attackGiven: a ciphertext cQ: what is the plaintext m?An encryption scheme is completely insecure if it cannotresist ciphertext-only attacks.Sarthak Patel (www.sarthakpatel.in)21
- 22. Known-plaintext attackGiven: (m1,c1), (m2,c2), …, (mk,ck) and a new ciphertext c.Q: what is the plaintext of c?Q: what is the secret key in use?Sarthak Patel (www.sarthakpatel.in)22
- 23. Chosen-plaintext attackGiven: (m1,c1), (m2,c2), …, (mk,ck), where m1,m2, …, mk arechosen by the adversary; and a new ciphertext c.Q: what is the plaintext of c, or what is the secret key?Sarthak Patel (www.sarthakpatel.in)23Q: what is the plaintext of c, or what is the secret key?
- 24. Example: chosen-plaintext attackIn 1942, US Navy cryptanalysts discovered that Japan was planningan attack on “AF”.They believed that “AF” means Midway island.Pentagon didn’t think so.Sarthak Patel (www.sarthakpatel.in)24Pentagon didn’t think so.US forces in Midway sent a plain message that their freshwatersupplies were low.Shortly, US intercepted a Japanese ciphertext saying that “AF” waslow on water.This proved that “AF” is Midway.
- 25. Chosen-ciphertext attackGiven: (m1,c1), (m2,c2), …, (mk,ck), where c1,c2, …, ck arechosen by the adversary; and a new ciphertext c.Q: what is the plaintext of c, or what is the secret key?Sarthak Patel (www.sarthakpatel.in)25
- 26. Classical CiphersPlaintext is viewed as a sequence of elements (e.g.,bits or characters)Substitution cipher: replacing each element of theplaintext with another element.Sarthak Patel (www.sarthakpatel.in)26Transposition (or permutation) cipher: rearrangingthe order of the elements of the plaintext.Product cipher: using multiple stages of substitutionsand transpositions
- 27. Caesar CipherEarliest known substitution cipherInvented by Julius CaesarEach letter is replaced by the letter three positions further down thealphabet.• Plain: 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 zSarthak Patel (www.sarthakpatel.in)27• Plain: 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 zCipher: D E F G H I J K L M N O P Q R ST UVW XY ZA B CExample: ohio state RKLRVWDWH
- 28. Caesar CipherMathematically, map letters to numbers:a, b, c, ..., x, y, z0, 1, 2, ..., 23, 24, 25Then the general Caesar cipher is:c = E (p) = (p + k) mod 26Sarthak Patel (www.sarthakpatel.in)28c = EK(p) = (p + k) mod 26p = DK(c) = (c – k) mod 26Can be generalized with any alphabet.
- 29. Cryptanalysis of Caesar CipherKey space: {0, 1, ..., 25}Vulnerable to brute-force attacks.E.g., break ciphertext “KHOOR“Answer is:“HELLO”Sarthak Patel (www.sarthakpatel.in)29Answer is:“HELLO”
- 30. Monoalphabetic Substitution CipherShuffle the letters and map each plaintext letter to a differentrandom ciphertext letter:Plain letters: abcdefghijklmnopqrstuvwxyzCipher letters: DKVQFIBJWPESCXHTMYAUOLRGZNSarthak Patel (www.sarthakpatel.in)30Cipher letters: DKVQFIBJWPESCXHTMYAUOLRGZNPlaintext: ifwewishtoreplacelettersCiphertext:WIRFRWAJUHYFTSDVFSFUUFYAWhat does a key look like?
- 31. Monoalphabetic Cipher SecurityNow we have a total of 26! = 4 x 1026 keys.With so many keys, it is secure against brute-force attacks.But not secure against some cryptanalytic attacks.Problem is language characteristics.Sarthak Patel (www.sarthakpatel.in)31Problem is language characteristics.
- 32. Language Statistics andCryptanalysisHuman languages are not random.Letters are not equally frequently used.In English, E is by far the most common letter, followedbyT,A, R, N, I, O, S.Sarthak Patel (www.sarthakpatel.in)32byT,A, R, N, I, O, S.Other letters like Z, J, K, Q, X are fairly rare.There are tables of single, double & triple letterfrequencies for various languages
- 33. English Letter FrequenciesSarthak Patel (www.sarthakpatel.in)33
- 34. Statistics for double & triple lettersIn decreasing order of frequencyDouble letters:to he an in re on, …Sarthak Patel (www.sarthakpatel.in)34Triple letters:the and for nab, …
- 35. Use in CryptanalysisKey concept: monoalphabetic substitution does not changerelative letter frequenciesTo attack, weSarthak Patel (www.sarthakpatel.in)35To attack, wecalculate letter frequencies for ciphertextcompare this distribution against the known one
- 36. Example CryptanalysisGiven ciphertext:UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZVUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSXEPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQCount relative letter frequencies (see next page)Guess {P, Z} = {e, t}Sarthak Patel (www.sarthakpatel.in)36Guess {P, Z} = {e, t}Of double letters, ZW has highest frequency, so guessZW = th and hence ZWP = theProceeding with trial and error finally get:it was disclosed yesterday that several informal butdirect contacts have been made with politicalrepresentatives of the viet cong in moscow
- 37. Letter frequencies in ciphertextP 13.33 H 5.83 F 3.33 B 1.67 C 0.00Z 11.67 D 5.00 W 3.33 G 1.67 K 0.00S 8.33 E 5.00 Q 2.50 Y 1.67 L 0.00U 8.33 V 4.17 T 2.50 I 0.83 N 0.00Sarthak Patel (www.sarthakpatel.in)37U 8.33 V 4.17 T 2.50 I 0.83 N 0.00O 7.50 X 4.17 A 1.67 J 0.83 R 0.00M6.67
- 38. Polyalphabetic Substitution CiphersA sequence of monoalphabetic ciphers (M1, M2, M3, ...,Mk) is used in turn to encrypt letters.A key determines which sequence of ciphers to use.Each plaintext letter has multiple correspondingciphertext letters.Sarthak Patel (www.sarthakpatel.in)38ciphertext letters.This makes cryptanalysis harder since the letterfrequency distribution will be flatter.
- 39. Example(Poly): Vigenère CipherSimplest polyalphabetic substitution cipherConsider the set of all Caesar ciphers:{ Ca, Cb, Cc, ..., Cz }Key: e.g. securityEncrypt each letter using C , C , C , C ,C , C , C , C inSarthak Patel (www.sarthakpatel.in)39Encrypt each letter using Cs, Ce, Cc, Cu,Cr, Ci, Ct, Cy inturn.Repeat from start after Cy.Decryption simply works in reverse.
- 40. Example of Vigenère CipherKeyword: deceptivekey:deceptivedeceptivedeceptiveplaintext: wearediscoveredsaveyourselfSarthak Patel (www.sarthakpatel.in)40plaintext: wearediscoveredsaveyourselfciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
- 41. Key Plain TextSarthak Patel (www.sarthakpatel.in)41
- 42. Playfair CipherNot even the large number of keys in a monoalphabeticcipher provides security.One approach to improving security is to encrypt multipleletters at a time.The Playfair Cipher is the best known such cipher.Sarthak Patel (www.sarthakpatel.in)42The Playfair Cipher is the best known such cipher.Invented by CharlesWheatstone in 1854, but named after hisfriend Baron Playfair.
- 43. Playfair Key MatrixUse a 5 x 5 matrix.Fill in letters of the key (w/o duplicates).Fill the rest of matrix with other letters.E.g., key = MONARCHY.Sarthak Patel (www.sarthakpatel.in)43E.g., key = MONARCHY.MM OO NN AA RRCC HH YY BB DDEE FF GG I/JI/J KKLL PP QQ SS TTUU VV WW XX ZZ
- 44. Encrypting and DecryptingPlaintext is encrypted two letters at a time.1. If a pair is a repeated letter, insert filler like X’.2. If both letters fall in the same row, replace each with the letter toits right (circularly).3. If both letters fall in the same column, replace each with the theSarthak Patel (www.sarthakpatel.in)443. If both letters fall in the same column, replace each with the theletter below it (circularly).4. Otherwise, each letter is replaced by the letter in the same row butin the column of the other letter of the pair.
- 45. Example of Playfair CipherKey: MONARCHYPlaintext: BALLOONMM OO NN AA RRCC HH YY BB DDEE FF GG I/JI/J KKLL PP QQ SS TTUU VV WW XX ZZSarthak Patel (www.sarthakpatel.in)45oBA LX LO ONCiphertext: IB SU PM NAUU VV WW XX ZZ
- 46. Security of Playfair CipherSecurity is much improved over the simplemonoalphabetic cipher.Was widely used for many decadeseg. by US & British military inWW1 and earlyWW2Sarthak Patel (www.sarthakpatel.in)46Once thought to be unbreakable.Actually, it can be broken, because it still leaves somestructure of plaintext intact.
- 47. Rotor Cipher MachinesBefore modern ciphers, rotor machines were most common complexciphers in use.Widely used inWW2.Used a series of rotating cylinders.Sarthak Patel (www.sarthakpatel.in)47Implemented a polyalphabetic substitution cipher of period K.With 3 cylinders, K = 263 =17,576.With 5 cylinders, K = 265 =12 x 106.What is a key?If the adversary has a machineIf the adversary doesn’t have a machine
- 48. Sarthak Patel (www.sarthakpatel.in)48
- 49. German secret setting sheetsSarthak Patel (www.sarthakpatel.in)49DateWhich rotors to use (there were 10 rotors)Ring settingPlugboard setting
- 50. The RotorsSarthak Patel (www.sarthakpatel.in)50
- 51. Enigma Rotor MachineSarthak Patel (www.sarthakpatel.in)51
- 52. Enigma Rotor MachineSarthak Patel (www.sarthakpatel.in)52
- 53. Transposition CiphersAlso called permutation ciphers.Shuffle the plaintext, without altering the actual letters used.Example: i) ColumnarTransposition Ciphersii) Rail FenceTechniqueSarthak Patel (www.sarthakpatel.in)53ii) Rail FenceTechnique
- 54. Columnar Transposition CiphersPlaintext is written row by row in a rectangle.Ciphertext: write out the columns in an orderspecified by a key.C O M E H OSarthak Patel (www.sarthakpatel.in)54Key: 3 4 2 1 5 6Plaintext:Ciphertext: MTOR EOWN OERE CMRT HMAOOOFAC O M E H OM E T O M OR R O W A FT E R N O O
- 55. Rail Fence TechniqueRail fence technique involves writing plain text as sequenceof diagonals and then reading it row-by-row to producecipher text.PlainText: COME HOMETOMORROWC M H M T M R OSarthak Patel (www.sarthakpatel.in)55C M H M T M R OO E O E O O R WCipherText: CMHMTMRO OEOEOORW
- 56. Product CiphersUses a sequence of substitutions and transpositionsHarder to break than just substitutions or transpositionsThis is a bridge from classical to modern ciphers.Sarthak Patel (www.sarthakpatel.in)56
- 57. SteganographyHide a message in another message.Invisible ink,Tiny pin punctures or minute variations betweenhandwritten characters, pencil marks etc.E.g., hide your plaintext in a graphic imageSarthak Patel (www.sarthakpatel.in)57Each pixel has 3 bytes specifying the RGB colorThe least significant bits of pixels can be changed w/o greatly affectingthe image qualitySo can hide messages in these LSBs
- 58. SummaryHave considered:classical cipher techniques and terminologymonoalphabetic substitution cipherscryptanalysis using letter frequenciesSarthak Patel (www.sarthakpatel.in)58cryptanalysis using letter frequenciesPlayfair cipherpolyalphabetic cipherstransposition ciphersproduct ciphers and rotor machinesSteganography
- 59. Symmetric AsymmetricSymmetric cryptography uses the same secret(private) key to encrypt and decrypt its dataAsymmetric uses both a public and private keySymmetric requires that the secret key be knownby the party encrypting the data and the partyAsymmetric allows for distribution of your publickey to anyone with which they can encrypt theSarthak Patel (www.sarthakpatel.in)59by the party encrypting the data and the partydecrypting the datakey to anyone with which they can encrypt thedata they want to send securely and then it canonly be decoded by the person having the privatekeyFaster than Asymmetric The issue with asymmetric is that it is about 1000times slower than symmetric encryption whichmakes it impractical when trying to encrypt largeamounts of dataLess Security compare to Asymmetric Stronger Security compare to Symmetric

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment