Cryptography and Network Security 2. Symmetric Ciphers. Lectured by Nguyễn Đức Thái

Similar documents
10/3/2017. Cryptography and Network Security. Sixth Edition by William Stallings

PART I Symmetric Ciphers

CSCE 715: Network Systems Security

Cryptography and Network Security

Introduction to Network Security Missouri S&T University CPE 5420 Cryptology Overview

Cryptography and Network Security. Lecture 02 Symmetric Encryption. Ediz ŞAYKOL

Cryptography and Network Security Chapter 2

Classical Encryption Techniques

Chapter 2: Classical Encryption Techniques

Information Systems Security

2

Overview of Conventional Encryption Techniques

Classical Encryption Techniques

Classical Encryption Techniques. CSS 322 Security and Cryptography

Cryptography Symmetric Encryption Class 2

UNIT 2 CLASSICAL ENCRYPTION TECHNIQUES

CLASSICAL CRYPTOGRAPHY. A Brief Reference for Self Build Crypto assignment

Classical Cryptography. Thierry Sans

Traditional Symmetric-Key Ciphers. A Biswas, IT, BESU Shibpur

CRYPTOLOGY KEY MANAGEMENT CRYPTOGRAPHY CRYPTANALYSIS. Cryptanalytic. Brute-Force. Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext

Chapter 3 Traditional Symmetric-Key Ciphers 3.1

Block Encryption and DES

Conventional Encryption Principles Conventional Encryption Algorithms Cipher Block Modes of Operation Location of Encryption Devices Key Distribution

Introduction to Cryptography CS 136 Computer Security Peter Reiher October 9, 2014

JNTU World JNTU World. JNTU World. Cryptography and Network Security. Downloaded From JNTU World ( )( )JNTU World

Outline Basics of Data Encryption CS 239 Computer Security January 24, 2005

Module 13 Network Security. Version 1 ECE, IIT Kharagpur

Cryptography MIS

EEC-484/584 Computer Networks

Unit-II. Symmetric Ciphers. To emphasize the 2 categories of traditional ciphers:substitution and transposition ciphers.

Behrang Noohi. 22 July Behrang Noohi (QMUL) 1 / 18

Introduction to Software Security Crypto Basics (Chapter 2)

2/7/2013. CS 472 Network and System Security. Mohammad Almalag Lecture 2 January 22, Introduction To Cryptography

L2. An Introduction to Classical Cryptosystems. Rocky K. C. Chang, 23 January 2015

Sankalchand Patel College of Engineering, Visnagar B.E. Semester V (CE/IT) INFORMATION SECURITY Practical List

ENGR/CS 101 CS Session Lecture 5

Nature Sunday Academy Lesson Plan

CSCE 813 Internet Security Symmetric Cryptography

Cryptography Introduction to Computer Security. Chapter 8

CSC 580 Cryptography and Computer Security

CSEC 507: APPLIED CRYPTOLOGY Historical Introduction to Cryptology

UNIT - II Traditional Symmetric-Key Ciphers. Cryptography & Network Security - Behrouz A. Forouzan

Basic Concepts and Definitions. CSC/ECE 574 Computer and Network Security. Outline

T H E U N I V E R S I T Y O F B R I T I S H C O L U M B I A. Introduction to Cryptography

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography

Cryptography Part II Introduction to Computer Security. Chapter 8

A New Symmetric Key Algorithm for Modern Cryptography Rupesh Kumar 1 Sanjay Patel 2 Purushottam Patel 3 Rakesh Patel 4

Cryptography and Network Security Block Ciphers + DES. Lectured by Nguyễn Đức Thái

Module 1: Classical Symmetric Ciphers

Cryptography ThreeB. Ed Crowley. Fall 08

Network Security 網路安全. Lecture 3 March 16, 2015 洪國寶

CPSC 467b: Cryptography and Computer Security

Cryptographic Techniques. Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building

Department of Computer Science and Engineering. CSE 3482 Introduction to Computer Security. Instructor: N. Vlajic Date: Mar 1, 2017

Introduction to Cryptology. Lecture 2

Classical Encryption Techniques

Cryptography and Network Security

CSC 474/574 Information Systems Security

Cryptanalysis. Ed Crowley

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa

CPSC 467b: Cryptography and Computer Security

Lecture IV : Cryptography, Fundamentals

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

S. Erfani, ECE Dept., University of Windsor Network Security. 2.3-Cipher Block Modes of operation

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

OVE EDFORS ELECTRICAL AND INFORMATION TECHNOLOGY

Some Stuff About Crypto

Outline. Cryptography. Encryption/Decryption. Basic Concepts and Definitions. Cryptography vs. Steganography. Cryptography: the art of secret writing

Computers and Security

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages.

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Cryptography. Historical Encoding. Encryption Media. Intro to Encryption 8/24/2010. COMP620 Information Privacy & Security 1

Textbook: Ahmet Burak Can Hacettepe University. Supplementary books:

SKP Engineering College

Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet.

CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY. Badran Awad Computer Department Palestine Technical college

A Modified Playfair Encryption Using Fibonacci Numbers

CSE 484 / CSE M 584 Computer Security. TA: Jared Moore

Chapter 3 Public Key Cryptography

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

Enhanced Play Fair Cipher

Hardware Design and Software Simulation for Four Classical Cryptosystems

File and Disk Encryption

EEC-682/782 Computer Networks I

Chapter 1. Introduction

Principles of Information Security, Fourth Edition. Chapter 8 Cryptography

Cryptography Math/CprE/InfAs 533

Innovation and Cryptoventures. Cryptology. Campbell R. Harvey. Duke University and NBER

Computer Security: Principles and Practice

Introduction to Cryptography. Lecture 1. Benny Pinkas. Administrative Details. Bibliography. In the Library

Introduction to Cryptography. Lecture 1

3D (6 X 4 X 4) - Playfair Cipher

Cryptography Introduction

Introduction to Cryptography

LECTURE 4: Cryptography

2.3 SUBTITUTION CIPHERS.

Multi-Level Encryption using SDES Key Generation Technique with Genetic Algorithm

Cryptosystems. Truong Tuan Anh CSE-HCMUT

Introduction to Cryptology ENEE 459E/CMSC 498R. Lecture 1 1/26/2017

Cryptographic Concepts

Transcription:

Cryptography and Network Security 2. Symmetric Ciphers Lectured by Nguyễn Đức Thái

Outline Symmetric Encryption Substitution Techniques Transposition Techniques Steganography 2

Symmetric Encryption There are two requirements for secure use of conventional encryption: We need a strong encryption algorithm. Sender and receiver must have obtained copies of the secret key in a secure fashion and must keep the key secure. If someone can discover the key and knows the algorithm, all communication using this key is readable. 3

Symmetric Cipher Model 4

Symmetric Encryption: Requirements Two requirements for secure use of symmetric encryption: a strong encryption algorithm a secret key known only to sender / receiver Mathematically have: Y = E(K, X) = E K (X) = {X} K X = D(K, Y) = D K (Y) Assume encryption algorithm is known Kerckhoff s Principle: security in secrecy of key alone, not in obscurity of the encryption algorithm Implies a secure channel to distribute key Central problem in symmetric cryptography 5

Cryptography Cryptographic systems are characterized by: type of encryption operations used o o o substitution transposition product: involve multiple stages of substitutions and transpositions. number of keys used o o single-key or private two-key or public way in which plaintext is processed o o block stream 6

Model of Symmetric Cryptosystem 7

Cryptographic Systems The type of operations used for transforming plaintext to ciphertext The number of keys used The way in which the plaintext is processed Substitution Symmetric, singlekey, secret-key, conventional encryption Block cipher Transposition Asymmetric, twokey, or public-key encryption Stream cipher 8

Cryptanalysis and Brute-Force Attacks Cryptanalysis Attack relies on the nature of the algorithm plus some knowledge of the general characteristics of the plaintext Attack exploits the characteristics of the algorithm to attempt to deduce a specific plaintext or to deduce the key being used Brute-force attack Attacker tries every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained On average, half of all possible keys must be tried to achieve success 9

Cryptanalysis Attacks 10

Cipher Strength Unconditionally secure no matter how much computer power or time is available, the cipher cannot be broken since the ciphertext provides insufficient information to uniquely determine the corresponding plaintext Computationally secure given limited computing resources (e.g. time needed for calculations is greater than age of universe), the cipher cannot be broken 11

Brute-Force Attacks Involves trying every possible key until an intelligible translation of the ciphertext into plaintext is obtained On average, half of all possible keys must be tried to achieve success To supplement the brute-force approach, some degree of knowledge about the expected plaintext is needed, and some means of automatically distinguishing plaintext from garble is also needed 12

Substitution Technique Is one in which the letters of plaintext are replaced by other letters or by numbers or symbols If the plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns 13

Transposition Techniques All the techniques examined so far involve the substitution of a ciphertext symbol for a plaintext symbol. A very different kind of mapping is achieved by performing some sort of permutation on the plaintext letters. This technique is referred to as a transposition cipher. 14

Transposition Techniques Rail Fence The simplest such cipher is the rail fence technique, in which the plaintext is written down as a sequence of diagonals and then read off as a sequence of rows. For example, to encipher the message meet me after the toga party with a rail fence of depth 2, we write the following: m e m a t r h t g p r y e t e f e t e o a a t The encrypted message is: MEMATRHTGPRYETEFETEOAAT 15

Caesar Cipher Simplest and earliest known use of a substitution cipher Used by Julius Caesar Involves replacing each letter of the alphabet with the letter standing three places further down the alphabet Alphabet is wrapped around so that the letter following Z is A plain: meet me after the toga party cipher: PHHW PH DIWHU WKH WRJD SDUWB 16

Caesar Cipher Algorithm Can define transformation as: 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 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 Mathematically give each letter a number 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 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Algorithm can be expressed as: c = E(3, p) = (p + 3) mod (26) A shift may be of any amount, so that the general Caesar algorithm is: C = E(k, p) = (p + k) mod 26 Where k takes on a value in the range 1 to 25; the decryption algorithm is simply: p = D(k, C) = (C - k) mod 26 17

Sample of Compressed Text 18

Monoalphabetic Ciphers Permutation Of a finite set of elements S is an ordered sequence of all the elements of S, with each element appearing exactly once If the cipher line can be any permutation of the 26 alphabetic characters, then there are 26! possible keys This is 10 orders of magnitude greater than the key space for DES Approach is referred to as a monoalphabetic substitution cipher because a single cipher alphabet is used per message 19

Relative Freq of Letters in English Text 20

Monoalphabetic Ciphers Easy to break because they reflect the frequency data of the original alphabet Countermeasure is to provide multiple substitutes (homophones) for a single letter Digram Two-letter combination Most common is th Trigram Three-letter combination Most frequent is the 21

Playfair Ciphers Best-known multiple-letter encryption cipher Treats digrams in the plaintext as single units and translates these units into ciphertext digrams Based on the use of a 5 x 5 matrix of letters constructed using a keyword Invented by British scientist Sir Charles Wheatstone in 1854 Used as the standard field system by the British Army in World War I and the U.S. Army and other Allied forces during World War II 22

Playfair Key Matrix Using the keyword MONARCHY Fill in letters of keyword from left to right and from top to bottom, then fill in the remainder of the matrix with the remaining letters in alphabetic order M O N A R C H Y B D E F G I/J K L P Q S T U V W X Z 23

Encrypting and Decrypting Plaintext is encrypted two letters at a time If a pair is a repeated letter, insert filler like 'X If both letters fall in the same row, replace each with letter to right (wrapping back to start from end) If both letters fall in the same column, replace each with the letter below it (wrapping to top from bottom) Otherwise each letter is replaced by the letter in the same row and in the column of the other letter of the pair 24

Playfair Example Message = Move forward Plaintext = mo ve fo rw ar dx message is padded and segmented x is just a filler Cipher Positions Ciphertext mo same rows mo ON ve diffent rows and columns ve UF fo same column fo PH rw diffent rows and columns rw NZ ar same row ar RM dx diffent rows and columns dx BZ Ciphertext = ON UF PH NZ RM BZ 25

Security of Playfair Ciphers Security much improved over monoalphabetic Since have 26 x 26 = 676 digrams Would need a 676 entry frequency table to analyze (versus 26 for a monoalphabetic) and Correspondingly more ciphertext was widely used for many years eg. by US & British military in WW1 It can be broken, given a few hundred letters Since still has much of plaintext structure 26

Vigenère Cipher Best known and one of the simplest polyalphabetic substitution ciphers In this scheme the set of related monoalphabetic substitution rules consists of the 26 Caesar ciphers with shifts of 0 through 25 Each cipher is denoted by a key letter which is the ciphertext letter that substitutes for the plaintext letter a 27

Vigenère Table 28

Example of Vigenère Cipher To encrypt a message, a key is needed that is as long as the message Usually, the key is a repeating keyword For example, if the keyword is deceptive, the message we are discovered save yourself is encrypted as: key: plaintext: d e c e p t i v e d e c e p t i v e d e c e p t i v e w e a r e d i s c o v e r e d s a v e y o u r s e l f ciphertext: Z I C V T WQNGRZGVTWAVZHCQYGLMGJ It works as follows: (look into Vigenère table) Row d + column w Z Row e + column e I 29

Steganography An alternative to encryption Hides existence of message using only a subset of letters/words in a longer message marked in some way using invisible ink hiding in LSB in graphic image or sound file hide in noise Has drawbacks high overhead to hide relatively few info bits Advantage is can obscure encryption use 30

Summary (1/2) Symmetric encryption is a form of cryptosystem in which encryption and decryption are performed using the same key. Symmetric encryption transforms plaintext into ciphertext using a secret key and an encryption algorithm. Using the same key and a decryption algorithm, the plaintext is recovered from the ciphertext. The two types of attack on an encryption algorithm are cryptanalysis, based on properties of the encryption algorithm, and brute-force, which involves trying all possible keys. 31

Summary (2/2) Traditional (precomputer) symmetric ciphers use substitution and/or transposition techniques. Substitution techniques map plaintext elements (characters, bits) into ciphertext elements. Transposition techniques systematically transpose the positions of plaintext elements. Steganography is a technique for hiding a secret message within a larger one in such a way that others cannot discern the presence or contents of the hidden message. 32

References Cryptography and Network Security, Principles and Practice, William Stallings, Prentice Hall, Sixth Edition, 2013 33