Network Security - Lecture 13
We discussed transposition ciphers and a couple of examples such as Rail Fence Cipher was discussed.
We have also explored the Hill Cipher and have seen how this technique can ensure security.
29 trang |
Chia sẻ: dntpro1256 | Lượt xem: 562 | Lượt tải: 0
Bạn đang xem trước 20 trang tài liệu Network Security - Lecture 13, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Network SecurityLecture 13Presented by: Dr. Munam Ali Shah Part 2 (b)Cryptography as a Network Security ToolSummary of the previous lectureWe discussed more examples of Shift/Ceaser CipherWe also discussed examples of mono-alphabetic cipher and poly-alphabetic cipherMore precisely, we explored how strong or weak a certain cryptographic scheme/algorithm can be.Outlines of today’s lectureOur discussion on more cryptographic schemes will continue. Poly-alphabetic cipher will also be discussedWe will explore One Time Pad and OTP.The security and practicality of OTP will also be discussed.Transposition Cipher with an example of Rail Fence Cipher will form part of our today’s lecture.ObjectivesYou would be able to present an understanding of transposition cipher.You would be able use Rail Fence cipherPolyalphabetic CiphersImprove security using different cipher letters for different occurrences of same plaintext letter Make cryptanalysis harder with more letters to guess and flatter frequency distribution Use a key to select which cipher letter is used for each letter of the message Repeat from start after end of key is reached Vigenère CipherSimplest polyalphabetic substitution cipherEffectively multiple Caesar ciphers Key is multiple letters long K = k1 k2 ... kd ith letter specifies ith alphabet to use Repeat from start after d letters in messageDecryption simply works in reverse Example of Vigenère CipherWrite the plaintext out Write the keyword repeatedUse each key letter as a Caesar cipher key Encrypt the corresponding plaintext letterEg using keyword deceptiveplaintext: wearediscoveredsaveyourselfkey: deceptivedeceptivedeceptiveciphertext: zicvtwqngrzgvtwavzhcqyglmgj Security of Vigenère CipherMuch more secure than the ciphers we discussed earlierHave multiple ciphertext letters for each plaintext letterHence letter frequencies are obscuredBut not totally lostSecurity of Vigenère CiphersNeed to determine key size, since then can attack each Caesar cipher Repetitions in ciphertext give clues to period Find same plaintext an exact period apart which results in the same ciphertextE.g, repeated “VTW” in previous example is at a distance of 9 (zicvtwqngrzgvtwavzhcqyglmgj)One-Time PadIf a truly random key as long as the message is available, we can build an unbreakable cipher called a one-time padIt is unconditionally secure since ciphertext bears no statistical relationship to the plaintextOne-Time Pad: ExampleSuppose that we are using a Vigenère scheme with 27 charactersTwenty-seventh character is the space characterThe table of Vigenere cipher must be expanded to 27 x 27One-Time Pad: ExampleCiphertext: ankyodkyurepfjbyojdsplreyiunofdoiuerfpluytsKey: pxlmvmsydofuyrvzwc tnlebnecvgdupahfzzlmnyihPlaintext: mr mustard with the candlestick in the hallCiphertext: ankyodkyurepfjbyojdsplreyiunofdoiuerfpluytsKey: pftgpmiydgaxgoufhklllmhsqdqogtewbqfgyovuhwtPlaintext: miss scarlet with the knife in the librarySecurity of One Time PadSuppose that a cryptanalyst had managed to find these two keys How to decide which is the correct key? If the actual key were produced in a truly random fashion, none is more likely than the other Given any plaintext of equal length to the ciphertext, there is a key that produces that plaintext Security of One Time PadAn exhaustive search of all possible keys ends up in many legible plaintexts, with no way of knowing which was the intended plaintextTherefore, the code is unbreakableProblems with OTPKey must be as long as the plaintextGenerating large quantities of random keys is an issueKey cannot be repeatedDistribution of keys is an even bigger issueSo, OTP is unbreakable but impracticalTransposition CiphersTransposition Ciphers hide the message by rearranging the letter orderNo substitution takes placeRelative letter frequency remains unchanged so these are good candidates for frequency analysis attackRail Fence CipherWrite message letters out diagonally over a number of rows Then read off cipher row by rowEg. Write message “Meet me after the toga party” as:m e m a t r h t g p r y e t e f e t e o a a tGiving ciphertextmematrhtgpryetefeteoaatkey=?Depth of rail fence (no. of rows)Easy to attack using frequency analysisRow Transposition CiphersA more complex transpositionWrite letters of message out in rows over a specified number of columnsThen reorder the columns according to some key and read column by columnKey: 3 4 2 1 5 6 7Plaintext : attack postponed until two amPlaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y zCiphertext: ttnaaptmtsuoaodwcoixknlypetz Product CiphersCiphers using either substitutions or transpositions are not secure because of language characteristicsWe can use combinationsTwo substitutions make a more complex substitution Two transpositions make more complex transposition But a substitution followed by a transposition makes a new much harder cipher (product cipher) This is bridge from classical to modern ciphersAutokey cipherKeyword is concatenated with plaintext key: deceptivewearediscoveredsav Also vulnerable to cryptanalysisKeyword and plaintext share the same frequency of letterStatistical technique can be applied22Hill CipherEncryption algo takes m plaintext letter and substitute for them m ciphertext lettersThe system can be describe as C = KP mod 26 P = K-1C mod 26 23ExampleConsider the message 'ACT', and the key below (or GYBNQKURP in letters):Since 'A' is 0, 'C' is 2 and 'T' is 19, the message is the vector:Thus the enciphered vector is given by:which corresponds to a ciphertext of 'POH‘.24Row transpositionWrite message row by row in rectangle and read message column by column, but permute the order of column.254312567meetmeafterthetogapartyvwxyzCiphertext: eegv traw etoy mftt mtpx ehay aerz Row transpositionMore than one stage of transposition is more secureCiphertext: eegv traw etoy mftt mtpx ehay aerz4312567eegvtrawetoymfttmtpxehayaerzSummary of today’s lectureWe discussed transposition ciphers and a couple of examples such as Rail Fence Cipher was discussed.We have also explored the Hill Cipher and have seen how this technique can ensure security.Next lecture topicsOur discussion on public key cryptography will continue and we will see some real life examples of this techniqueWe will explore block ciphers and stream ciphers with some examples.The End
Các file đính kèm theo tài liệu này:
- network_security_12_1371_2027055.pptx