basic ciphers
play

Basic Ciphers Computer Security: Ensure security of data kept on - PowerPoint PPT Presentation

8.10.2019 Information Security Basic Ciphers Computer Security: Ensure security of data kept on the computer Ahmet Burak Can Network Security: Hacettepe University Ensure security of communication over insecure medium


  1. 8.10.2019 Information Security Basic Ciphers � Computer Security: ◦ Ensure security of data kept on the computer Ahmet Burak Can � Network Security: Hacettepe University ◦ Ensure security of communication over insecure medium abc@hacettepe.edu.tr � Approaches to Secure Communication ◦ Steganography � hides the existence of a message ◦ Cryptography � hide the meaning of a message Information Security 1 Information Security 2 Steganography Sample Text Steganography Sample � Least significant bit values of pixels can be used to hide � The message: a secret message ◦ Below images seem to be same but right picture store 5 PRESIDENT'S EMBARGO RULING SHOULD HAVE IMMEDIATE NOTICE. GRAVE SITUATION AFFECTING INTERNATIONAL LAW. STATEMENT Shakespeare games. FORESHADOWS RUIN OF MANY NEUTRALS. YELLOW JOURNALS UNIFYING NATIONAL EXCITEMENT IMMENSELY. � Take the first letters of the message: PERSHINGSAILSFROMNYJUNEI � When you parse it, you will get the real message: PERSHING SAILS FROM NY JUNE I Hamlet, Macbeth, Julius Caesar Merchant of Venice, King Lear Information Security 3 Information Security 4 1

  2. 8.10.2019 Basic Terminology in Cryptography – 1 Basic Terminology in Cryptography – 2 � Cryptography �� the study of mathematical techniques � Encryption (encipherment): the process of transforming related to aspects of providing information security information (plaintext) using an algorithm (cipher) to services. make it unreadable to anyone except those possessing special knowledge � Cryptanalysis �� the study of mathematical techniques for attempting to defeat information security services. � Decryption (decipherment): the process of making the encrypted information readable again � Cryptology �� the study of cryptography and cryptanalysis. � Key: the special knowledge shared between communicating parties � Plaintext: the data to be concealed. � Ciphertext: the result of encryption on the plaintext Information Security 5 Information Security 6 Encryption & Decryption Breaking Ciphers B 1 � There are different methods of breaking a cipher, depending on: Key Key ◦ the type of information available to the attacker ◦ the interaction with the cipher machine ◦ the computational power available to the attacker Encryption Decryption Plaintext Ciphertext Original Plaintext Information Security 7 Information Security 8 2

  3. 8.10.2019 Breaking Ciphers B 2 Breaking Ciphers B 3 � CiphertextBonly attack � The cryptanalyst knows only � ChosenBplaintext attack �� The cryptanalyst can choose a the ciphertext. Sometimes the language of the plaintext number of messages and obtain the ciphertexts for is also known. them ◦ The goal is to find the plaintext and the key. ◦ The goal is to deduce the key used in the other encrypted messages or decrypt any new messages using that key. ◦ Any encryption scheme vulnerable to this type of attack is considered to be completely insecure. � ChosenBciphertext attack ��� Similar to the chosenB plaintext attack, but the cryptanalyst can choose a � KnownBplaintext attack � The cryptanalyst knows one or number of ciphertexts and obtain the plaintexts � several pairs of ciphertext and the corresponding plaintext. ◦ The goal is to find the key used to encrypt these messages or a way to decrypt any new messages that use that key. Information Security 9 Information Security 10 Today’s Ciphers Shift Cipher � Shift Cipher � A substitution cipher � Transposition Cipher � The Key Space: ◦ [1 .. 25] � MonoBalphabetical Substitution Cipher � Encryption given a key K: � Polyalphabetic Substitution Ciphers ◦ each letter in the plaintext P is replaced with the K’th letter � Rotor Machine following corresponding number (shift right) � Enigma � Decryption given K: ◦ shift left � History: K = 3, Caesar’s cipher Information Security 11 Information Security 12 3

  4. 8.10.2019 Shift Cipher: An Example Shift Cipher: Cryptanalysis � Can an attacker find K? ������������������������������������������������������������������ �������� �!�"�#�$�%�������������� ��!��"��#��$��%�������������� ��! ◦ YES: exhaustive search, ◦ key space is small (<= 26 possible keys) P = ����������������� ◦ the attacker can search all the key space in very short time K = 11 � Once K is found, very easy to decrypt C = ����������������� C → 2 2+11 mod 26 = 13 → N R → 17 17+11 mod 26 = 2 → C … N → 13 13+11 mod 26 = 24 → Y Information Security 13 Information Security 14 Transposition Cipher Transposition Cipher: Cryptanalysis � Write the plaintext horizontally in fixed number � Can an attacker decrypt a transposed text? columns and read vertically to encypt. ◦ Do exhaustive search on number of columns ◦ The ancient Spartans used a form of transposition cipher ◦ Since the key space is small, the attacker can search all the key space in very short time � Example: � Once the number of columns is guessed, very easy to ◦ P = ‘meet me near the clock tower at twelve midnight tonite’ decrypt m e e t m e n e a r t h e c l o c k t o w e r a t t w e l v e m i d n i g h t t o n i t e C =‘metowteioenhcewmgneeekreihitactaldttmrlotvnte’ ◦ Information Security 15 Information Security 16 4

  5. 8.10.2019 General MonoBalphabetical Substitution General Substitution Cipher: Cryptanalysis Cipher � The key space: all permutations of Σ = {A, B, C, …, Z} � Exhaustive search is infeasible � Encryption given a key ̟: ◦ for the letter A, there are 26 probabilities ◦ for the letter B, there are 25 probabilities ◦ each letter X in the plaintext P is replaced with ̟(X) ◦ for the letter C, there are 24 probabilities � Decryption given a key ̟: ◦ … and so on ◦ each letter Y in the ciphertext P is replaced with ̟ B1 (Y) � Key space size is 26! ≈ 4*10 26 �������� 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 Z π=B A D C Z H W Y G O Q X S V T R N M L K J I P F E U BECAUSE → AZDBJLZ Information Security 17 Information Security 18 Cryptanalysis of Substitution Ciphers: Frequency Features of English Frequency Analysis � Basic ideas: ◦ Each language has certain features: frequency of letters, or of groups of two or more letters. ◦ Substitution ciphers preserve the language features. ◦ Substitution ciphers are vulnerable to frequency analysis attacks. � History of frequency analysis: ◦ Earliest known description of frequency analysis is in a book by � Vowels, which constitute 40 % of plaintext, are often separated by the ninthBcentury scientist alBKindi consonants. ◦ Rediscovered or introduced from the Arabs in the Europe � Letter A is often found in the beginning of a word or second from during the Renaissance last. � Letter I is often third from the end of a word. � Letter Q is followed only by U � Some words are more frequent, such as the, and, at, is, on, in Information Security 19 Information Security 20 5

  6. 8.10.2019 Cryptanalysis using Frequency Analysis Improve the Security of Substitution Cipher � The number of different ciphertext characters or � Using nulls combinations are counted to determine the frequency ◦ e.g., using numbers from 1 to 99 as the ciphertext alphabet, of usage. some numbers representing nothing are inserted randomly � Deliberately misspell words � The cipher text is examined for patterns, repeated series, and common combinations. ◦ e.g., “Thys haz thi ifekkt off diztaughting thi ballans off frikwenseas” � Replace ciphertext characters with possible plaintext � Homophonic substitution cipher equivalents using known language characteristics. ◦ each letter is replaced by a variety of substitutes � Frequency analysis made substitution cipher insecure � These make frequency analysis more difficult, but not impossible Information Security 21 Information Security 22 Summary Polyalphabetic Substitution Ciphers � Shift ciphers are easy to break using brute force attacks, � Main weaknesses of monoalphabetic substitution they have small key space. ciphers � Substitution ciphers preserve language features and are ◦ each letter in the ciphertext corresponds to only one letter in the plaintext letter vulnerable to frequency analysis attacks. � Idea for a stronger cipher (1460’s by Alberti) ◦ use more than one cipher alphabet, and switch between them when encrypting different letters ◦ Developed into a practical cipher by Vigenère (published in 1586) Information Security 23 Information Security 24 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend