Information Security IT423

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Classical Encryption Techniques Week 6-wend. One-Time Pad if a truly random key as long as the message is used, the cipher will be secure called a One-Time.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
Block Ciphers and the Data Encryption Standard
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Introduction to Cryptography and Security Mechanisms Dr Keith Martin McCrea
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
CSE 651: Introduction to Network Security
IT 221: Classical and Modern Encryption Techniques Lecture 2: Classical and Modern Encryption Techniques For Educational Purposes Only Revised: September.
Chapter 2 – Classical Encryption Techniques
Cryptography Week-6.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
CSCI 5857: Encoding and Encryption
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
Security in Computing Chapter 12, Cryptography Explained Part 6
One-Time Pad Or Vernam Cipher Sayed Mahdi Mohammad Hasanzadeh Spring 2004.
Lec. 5 : History of Cryptologic Research II
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Bit Cipher 1. Example of bit Cipher 2 Practical Stream Cipher 3.
Symmetric-Key Cryptography
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
CSCI 5857: Encoding and Encryption
Data Security and Encryption (CSE348) 1. Lecture # 6 2.
Classical Encryption techniques
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami.
Introduction to Ciphers Breno de Medeiros. Cipher types From “Cipher”, Wikipedia article.
Cryptography Part 1: Classical Ciphers Jerzy Wojdyło May 4, 2001.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Stream Ciphers and Block Ciphers A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. Examples of classical stream.
Traditional Symmetric-Key Ciphers
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Introduction to Modern Symmetric-key Ciphers
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Network Security Lecture 13 Presented by: Dr. Munam Ali Shah.
Module :MA3036NI Symmetric Encryption -3 Lecture Week 4.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher.
Chapter Two: Classic Cryptography
@Yuan Xue CS 285 Network Security Block Cipher Principle Fall 2012 Yuan Xue.
@Yuan Xue CS 285 Network Security Cryptography Overview and Classical Encryption Algorithms Fall 2012 Yuan Xue.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 4. Traditional and Modern.
3.1 Chapter 3 Traditional Symmetric-Key Ciphers Part2.
Lecture 4 Data Encryption Standard (DES) Dr. Nermin Hamza
@Yuan Xue Quick Review.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
Chapter 2 Basic Encryption and Decryption
Classical Encryption techniques
Cryptography and Network Security
Polyalphabetic Ciphers
Cryptography.
Outline Some Basic Terminology Symmetric Encryption
- Stream Cipher and Block Cipher - Confusion & Diffusion
NET 311 Information Security
Cryptography and Network Security Chapter 3
PART VII Security.
Introduction to Modern Symmetric-key Ciphers
Block Ciphers and the Data Encryption Standard (DES)
Chapter -2 Block Ciphers and the Data Encryption Standard
Computer Security IT423 Semester II
Traditional Symmetric-Key Ciphers
Running Key Cipher The security of polyalphabetic substitution cipher reside in key length. In running-key cipher, the length of key must be equal the.
Florida State University
Presentation transcript:

Information Security IT423 Semester II 2017 - 2018 Dr. Saman Mirza Abdullah saman.mirza@ishik.edu.iq

Class Objective The main objective of this class is to learn more classical ciphering techniques. Playfair Ciphering Hill Cipher. Polyaplphabetic cipher One Time Pad (OTP) system Vigenere. AutoKey. Computer Security - Ishik

Playfair Ciphering The Playfair Cipher is a simple transposition cipher offering a relatively weak method of encryption. It is based around a 5x5 matrix, a copy of which is held by both communicating parties, into which The 25 of the 26 letters of the alphabet (normally either j and i are represented by the same letter or x is ignored) are placed in a random fashion. Computer Security - Ishik

Playfair Ciphering Playfair is now regarded as insecure for any purpose because modern hand-held computers could easily break the cipher within seconds The first published solution of the Playfair cipher was published in 1914 Computer Security - Ishik

Playfair Ciphering Preparation Preparing the plaintext. Preparing the key alphabet esquire. Computer Security - Ishik

Playfair Ciphering Preparation Preparing the plaintext All the letters should be written in capital letter, in pairs, without punctuation, All Js are replaced with Is. SHE WENT TO THE STORE SH EW EN TT OT HE ST OR E Computer Security - Ishik

Playfair Ciphering Preparation Preparing the plaintext But, we are not allowed to encipher any double letters. So, in this case, we will insert an Q into the plaintext. (If Q is a double letter, then insert another infrequent letter, say X.) SH EW EN TT OT HE ST OR E SH EW EN TQ TO TH ES TO RE Computer Security - Ishik

Playfair Ciphering Preparation Preparing the key alphabet squire Pick a keyword (without repetition) such as "PROBLEMS": P R O B L E M S A C D F G H I/J K N Q T U V W X Y Z Computer Security - Ishik

Playfair Ciphering Rules Three Rules If the two letters are on the same row of the chart, like "ES", then replace each letter by the letter to the right. (If necessary, wrap around to the left end of the row. So "ES" encrypts to "MA". If the two letters are on the same column of the chart, like, "TH", then replace each letter by the letter below it. (If necessary, wrap around to the top end of the column.) So "TH" encrypts to "YT". If two letters are on a different row and column, like, "SH", then replace each letter by another letter on its same row, but in the column of the other letter. So "SH" encrypts to "AG". Computer Security - Ishik

Playfair Ciphering Example Using these rules, here is the encryption of the plaintext above:   Plaintext : SH EW EN TQ TO TH ES TO RE Ciphertext: AG MV MK UT QB YT MA QB PM Computer Security - Ishik

Playfair Decipher For decryption, if two ciphertext letters are on the same row or column, replace them with the two letters to the left or above, respectively. Otherwise, for each letter choose the letter on the same row and the other letter's column for decryption. (So this is the original operation, it is the reverse of itself.) Computer Security - Ishik

Cryptanalyze Playfair To cryptanalyze Playfair, we first might want to try to determine if a ciphertext is using Playfair. Here are some clues that it is: There must be an even number of characters in the cipher text. The rare consonants (j,k,q,x,z) will appear more frequently in the plaintext. When divided into digraphs, no repeated letters will appear. The frequency distribution of digraphs will approximate that of plaintext. Computer Security - Ishik

Cryptanalyze Playfair Here are some other unique characteristics of the Playfair cipher:   No single letter ever encrypts to itself. Two reversed digraphs in the plaintext will always be represented by reverse digraphs in the ciphertext. Every single letter from the plaintext can be enciphered by one of only five other letters – the one directly below it in the Playfair square or the other four in its row. Computer Security - Ishik

Ask yourself? If I know the Ciphertext, can I determine the followings: The plaintext The square ( 5 x 5) keyword alphabets Computer Security - Ishik

Hill Ciphering The Hill cipher uses matrix multiplication, mod 26. In particular, the encryption key is an nxn matrix with an inverse mod 26, where n is the block size. Suppose we have below 2 x 2 key matrix Computer Security - Ishik

Hill Ciphering To encrypt a plaintext, group the plaintext in pairs. “MATH” will be convert to "MA" and "TH", for example. Convert each letter to its numerical equivalent, mod 26, and write it in a nx1 matrix as follows Stands for MA Computer Security - Ishik

which corresponds to the ciphertext KU. Now, multiply the encryption key by the plaintext and reduce mod 26 to get the ciphertext: which corresponds to the ciphertext KU. Computer Security - Ishik

Here is the encryption of "TH": Which corresponds to the ciphertext MT. Computer Security - Ishik

Polyalphabetic Ciphers Vigenere

Main Idea Use multiple monoalphabetic ciphers Change alphabet every letter Variations possible, but simple version seems to have been commonly used (even though it can be broken)

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 --------------------------------------------------- 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 C D E F G H I J K L M N O P Q R S T U V W X Y Z A C D E F G H I J K L M N O P Q R S T U V W X Y Z A B D E F G H I J K L M N O P Q R S T U V W X Y Z A B C E F G H I J K L M N O P Q R S T U V W X Y Z A B C D F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H I J K L M N O P Q R S T U V W X Y Z A B C D E F G I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z 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

Vigenere Scheme Keyword (or phrase) used to indicate which alphabet to use for encoding (by first letter) Keyword repeated over plaintext. The key-letter over each plaintext letter determines the alphabet used to encipher that letter Example: use cryptology as keyword

Vigenere Example CRYPTOLOGYCRYPTOLOGY computerscienceisthe studyofdatastructure sandalgorithmsandthe CRYPTOLOGYCRYPTOLOGYCRYPTOLO irimplementationsoncomputers

Vigenere Example CRYPTOLOGYCRYPTOLOGY computerscienceisthe EFKENHPFYAKVLRXWDHNC studyofdatastructure UKSSRCQRGRCJRGNQEIXC sandalgorithmsandthe URLSTZRCXGVYKHTBOHNC CRYPTOLOGYCRYPTOLOGYCRYPTOLO irimplementationsoncomputers KIGBIZPAKLVRRXHBDCTAQDNJMSCG

OTP System The one-time pad, which is a provably secure cryptosystem, was developed by Gilbert Vernam in 1918. The message is represented as a binary string (a sequence of 0’s and 1’s using a coding mechanism such as ASCII coding. The key is a truly random sequence of 0’s and 1’s of the same length as the message. The encryption is done by adding the key to the message modulo 2, bit by bit. This process is often called exclusive or, and is denoted by XOR. The symbol  is used

Exclusive or Operator a b c = a  b 1

Example Message =‘IF’ Then its ASCII code =(1001001 1000110) Key = (1010110 0110001)

Example Encryption: Decryption: 1001001 1000110 plaintext 1010110 0110001 key 0011111 1110110 ciphertext Decryption: 0011111 1110110 ciphertext 1001001 1000110 plaintext

Vigenere Cipher The idea is as follows: Pick a keyword, such as “COMPUTER”. Now, to encrypt a message, do the following. Essentially, to encrypt, you line up the plaintext with the keyword written down repeatedly (until you get to the end of the message), and then you add the numeric values of both letters (0 to 25) and take the result mod 26 to obtain the corresponding ciphertext letter Computer Security - Ishik

Autokey Cipher In order to prevent this repetition, one idea was the Autokey cipher, which uses either part of the plaintext or part of the ciphertext as the key, after the key has been exhausted. Computer Security - Ishik

Autokey Cipher For example, if the key is "HOUSE" and the message is "IAMCOMINGHOME", then we encrypt as follows:   Plaintext : IAMCOMINGHOME Key : HOUSEIAMCOMIN Ciphertext: POGUSUIZIVAUR Computer Security - Ishik

Autokey Cipher Unlike Vigenere, the same letter is not used to encrypt every fifth plaintext letter.   Alternatively, we can use the ciphertext as the key as well in a similar manner: Plaintext : IAMCOMINGHOME Key : HOUSEPOGUSBWT Ciphertext: POGUSBWTAZPIX Computer Security - Ishik

QUIZ What Keyword is used in the following matrix? L U N D A M O R B C I/J K P Q S T V W X Y Z Computer Security - Ishik

Assignment Code the Vigenere classical cipher and decipher technique. Use any programming language you prefer. The class preferred Matlab. Computer Security - Ishik

Cryptography -- Block Ciphers

A few terms block cipher stream cipher block of plaintext is treated as a whole & used to produce a ciphertext block of equal length typical size: 64 bits most modern ciphers are block ciphers stream cipher digital data is encrypted one bit (or one unit) at a time In both cases, plaintext is transformed incrementally

Symmetric suggests ONE key Secret key shared by sender & receiver Symmetric ciphers Symmetric suggests ONE key Secret key shared by sender & receiver

Background ideally want one extremely large substitution not practical since would need a table with 264 entries in it for a 64-bit block so approximate the ideal by constructing from smaller building blocks 2**40 is 1 trillion – and I stopped computing 2**10 = ~1000 2**20 =~1M

Basis of modern ciphers Claude Shannon (‘45) - information theory product cipher perform two or more ciphers in sequence so that result (product) is cryptographically stronger than any component cipher alternate confusion & diffusion virtually all significant symmetric block ciphers currently in use are of this type

Shannon’s strategy Stop cryptanalysis that is based on statistical analysis hacker has some knowledge of statistical characteristic of plaintext if statistics are reflected in ciphertext, then analyst may be able to deduce encryption key, or part of it in Shannon’s ideal cipher, statistics of ciphertext are independent of plaintext

Shannon’s building blocks confusion make relation between statistics of ciphertext and the value of the encryption key as complex as possible diffusion diffuse statistical property of plaintext digit across a range of ciphertext digits i.e. each plaintext digits affects value of many ciphertext digits Caesar cipher is bad wrt confusion – if a cryptanalyst breaks part of the code – it is very clear how to break the rest. Polyalphabetic substitution with a key longer than the message length provides good confusion September, 2006

Shannon’s building blocks Shannon proposed product ciphers with two components S-Boxes -- substitution providing confusion of input bits P-Boxes -- permutation providing diffusion across S-box inputs n rounds of S-P boxes September, 2006

S-box (substitution) 3 bit input 3 bit output 1 1 2 2 3 3 1 4 4 5 5 6 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 1 1 E(2)  6 Note that mapping can be reversed Word size of 3 bits => mapping of 23 = 8 values Note: mapping can be reversed September, 2006

P-box (permutation) 4 bit input 1 1 1 1 1 1 1 1 1 1 1 1 Example 1 1 1 1 1 1 1 1 Note that mapping can be reversed Example 1 Note: reversible Example 2 - swap two halves of input September, 2006

Block Ciphers - Definition 2 bit block cipher, 2 bit key with encryption function defined by: Key 00 Key 01 Key 10 Key 11 P C 00 10 01 11 P C 00 11 01 10 P C 00 11 01 10 P C 00 01 10 11 secret key 01 In practice, infeasible to store representation of block cipher as tables: example: 2128 01 00 Encryption

S-P networks Alternate S and P boxes BUT, in practice we must decrypt as well as encrypt so define the sequence of boxes so that precisely the same system will decrypt as well as encrypt just run it backwards September, 2006

Class End Computer Security - Ishik

Class End Computer Security - Ishik