COMM1003. Information Theory. Dr. Wassim Alexan Spring Lecture 4

Similar documents
Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics of Cryptography

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

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

Channel Coding and Cryptography Part II: Introduction to Cryptography

Cryptography Introduction to Computer Security. Chapter 8

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

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl

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

CSC 474/574 Information Systems Security

Some Stuff About Crypto

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

2.1 Basic Cryptography Concepts

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

Cryptography Worksheet

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

Chapter 3 Traditional Symmetric-Key Ciphers 3.1

APNIC elearning: Cryptography Basics

Classical Encryption Techniques. CSS 322 Security and Cryptography

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Introduction to Cryptography ECE 597XX/697XX. Part 1.

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

Classical Cryptography. Thierry Sans

CCNA Security 1.1 Instructional Resource

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

Lecture IV : Cryptography, Fundamentals

CRYPTOGRAPHY. BY, Ayesha Farhin

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

Cryptography and Network Security

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

Hardware Design and Software Simulation for Four Classical Cryptosystems

Nature Sunday Academy Lesson Plan

CIS 3362 Final Exam 12/4/2013. Name:

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

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

Classical Encryption Techniques

PROTECTING CONVERSATIONS

OVE EDFORS ELECTRICAL AND INFORMATION TECHNOLOGY

Information Systems Security

ENCRYPTION USING LESTER HILL CIPHER ALGORITHM

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

Cryptographic Concepts

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

Introduction to Cryptography. Vasil Slavov William Jewell College

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

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

Classical Encryption Techniques

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

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa

Lecture 2. Cryptography: History + Simple Encryption,Methods & Preliminaries. Cryptography can be used at different levels

Cryptography. Submitted to:- Ms Poonam Sharma Faculty, ABS,Manesar. Submitted by:- Hardeep Gaurav Jain

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

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

Chapter 19a Pronominal Suffixes Introduction

Cryptography Lesson Plan

Classic Cryptography: From Caesar to the Hot Line

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

CSC 580 Cryptography and Computer Security

Great Theoretical Ideas in Computer Science. Lecture 27: Cryptography

Cryptosystems. Truong Tuan Anh CSE-HCMUT

CS 332 Computer Networks Security

CSCE 813 Internet Security Symmetric Cryptography

Digital Communications. Basic Concepts in Cryptography

Cryptography Introduction

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

A simple approach of Peer-to-Peer E-Cash system

Name of chapter & details.

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

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

Introduction to Cryptography. Lecture 1

Worksheet - Reading Guide for Keys and Passwords

Cryptanalysis. Ed Crowley

CS61A Lecture #39: Cryptography

Classical Cryptography

Introduction to Cryptology. Lecture 2

Cryptography ThreeB. Ed Crowley. Fall 08

Cryptography BITS F463 S.K. Sahay

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

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

Study Guide to Mideterm Exam

Principles of Information Security, Fourth Edition. Chapter 8 Cryptography

The Design of an Anonymous and a Fair Novel E-cash System

Security: Cryptography

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

Key Exchange. Secure Software Systems

EEC-484/584 Computer Networks

Fall 2017 CIS 3362 Final Exam. Last Name: First Name: 1) (10 pts) Decrypt the following ciphertext that was encrypted using the shift cipher:

CSC/ECE 774 Advanced Network Security

CLASSICAL CRYPTOGRAPHY. A Brief Reference for Self Build Crypto assignment

Cryptography MIS

Lecture 02: Historical Encryption Schemes. Lecture 02: Historical Encryption Schemes

Other Topics in Cryptography. Truong Tuan Anh

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

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

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

Module 13 Network Security. Version 1 ECE, IIT Kharagpur

A Proposed Method for Cryptography using Random Key and Rotation of Text

1.264 Lecture 27. Security protocols Symmetric cryptography. Next class: Anderson chapter 10. Exercise due after class

Public-Key Cryptography

Lecture 4: Symmetric Key Encryption

Transcription:

COMM1003 Information Theory Dr. Wassim Alexan Spring 2018 Lecture 4

Cryptology Cryptology is the most general term and it splits into two parts: Cryptography and Cryptanalysis Cryptography is the science of secret writing with the goal of hiding the meaning of a message Cryptanalysis is the science (and sometimes art) of breaking cryptosystems Fig. 1. An overview of the field of Cryptology. (Paar and Pelzl, Cryptography-A Textbook for Students and Practitioners) Wassim Alexan 2

Cryptology A naive thinking would be that only intelligence agencies or organized crime would be involved in cryptanalysis, however most cryptanalysis is done by researchers in academia nowadays Cryptanalysis is of paramount importance for modern cryptosystems: Without people who try to break our crypto methods, we will never know whether they are really secure or not Symmetric ciphers are what many people assume cryptography is about: Two parties have an encryption and decryption method for which they share a secret key All cryptography from ancient times until 1976 was exclusively based on symmetric methods Symmetric ciphers are still in widespread use, especially for data encryption and integrity check of messages Wassim Alexan 3

Cryptology Asymmetric (or Public Key) ciphers are an entirely different type of ciphers, introduced in 1976 by Whitfield Diffie, Martin Hellman and Ralph Merkle In public key cryptography, a user possess a secret key as in symmetric cryptography but also a public key Asymmetric algorithms can be used for applications such as digital signatures and key establishment, and also for classical data encryption Cryptographic Protocols are protocols that deal with the application of cryptographic algorithms Symmetric and Asymmetric algorithms can be viewed as building blocks with which applications such as secure Internet communication can be realized The Transport Layer Security (TLS) scheme, which is used in every Web browser, is an example of a cryptographic protocol Wassim Alexan 4

Cryptology A third class of ciphers is called Hash Functions, nevertheless this class shares some properties with symmetric functions In practice, the majority of cryptographic applications involve the use of symmetric, asymmetric as well as hash functions. Such cryptosystems are referred to as hybrids schemes Wassim Alexan 5

Symmetric Cryptography Symmetric cryptography is usually divided into three subclasses: Classical ciphers Mechanical ciphers Modern ciphers Furthermore, classical ciphers can be classified into a number of smaller subclasses: substitution and transposition ciphers For mechanical ciphers we will consider the Enigma machine For modern ciphers we will consider the Data Encryption Standard (DES) and its variants, as well as the Advanced Encryption Standard (AES) Wassim Alexan 6

Symmetric Cryptography Assume we have two users, Alice and Bob, communicating over an insecure channel The problem is that Oscar is eavesdropping on their communication In this situation, symmetric cryptography offers a powerful solution Fig. 2. Communication over an insecure channel. (Paar and Pelzl, Cryptography-A Textbook for Students and Practitioners) Wassim Alexan 7

Symmetric Cryptography Alice encrypts her message x using a symmetric algorithm, yielding the ciphertext y Bob receives the ciphertext and decrypts the message Oscar receives the ciphertext and is unable to decrypt the message Fig. 3. Symmetric key cryptosystem (Paar and Pelzl, Cryptography-A Textbook for Students and Practitioners) Wassim Alexan 8

Symmetric Cryptography The advantage is that if we have a strong encryption algorithm, the ciphertext will look like random bits to Oscar and will contain no information whatsoever that is useful to him x is called the plaintext, y is called the ciphertext, k is called the key and finally, the set of all possible keys is called the key space This cryptosystem needs a secure channel for the distribution of the key between Alice and Bob This could be done by a human messenger, which is then of course a cumbersome method An example where this method works nicely is the pre shared keys used in WiFi Protected Access (WPA) encryption in wireless LANs Wassim Alexan 9

Substitution Ciphers These are probably the most common forms of classical ciphers They are implemented by replacing each letter of the plaintext (and sometimes punctuation marks and spaces) with another letter (or even a random symbol) A mono alphabetic substitution cipher relies on a fixed replacement structure. Such that every letter is only replaced with another letter, throughout the message Examples of mono alphabetic substitution ciphers: The Caesar Cipher The Atbash Cipher The Pigpen Cipher The Affine Cipher The Baconian Cipher Wassim Alexan 10

Substitution Ciphers A poly alphabetic substitution cipher does not rely on a fixed replacement structure. Thus allows for each letter in the alphabet to take on different substitutions Examples of poly alphabetic substitution ciphers: The Hill Cipher The Homophonic Cipher Wassim Alexan 11

The General Case Consider the following substitution key, as in Fig. 4 Using this substitution, we can encode the plaintext: the c building is the best building in the guc The ciphertext would be 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 V G Q K M N A D Z C W S E O Y F J X H T L P U I R Fig. 4. An example of a simple substitution cipher key. HAK G VTDWQDEN DX HAK VKXH VTDWQDEN DE HAK NTG Removing the spaces, we get HAKGVTDWQDENDXHAKVKXH VTDWQDENDEHAKNTG Wassim Alexan 12

The Caesar Cipher In the Caesar cipher there is no key We simply shift each letter by 3 places Fig. 5. An illustration of the 3 place shifting in the Caesar cipher. 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 Fig. 6. The full Caesar cipher substitution table. Wassim Alexan 13

Exercise 1 You received the following ciphertext which was encoded with the Caesar cipher WREHRUQRWWREHWKDWLVWKHTXHVWLRQ Can you perform an attack on it, revealing the message? Wassim Alexan 14

Exercise 1 Solutions Being told that a Caesar cipher generated the given ciphertext, it is very easy to get back the plaintext as tobeornottobethatisthequestion Adding spaces where appropriate, the plaintext is to be or not to be that is the question Wassim Alexan 15

The Atbash Cipher A mono alphabetic cipher originally used for the Hebrew alphabet א ב ג ד ה ו ז ח ח ט י כ ל מ נ ס ע פ צ ק ר ש ת ת ש ר ק צ פ ע ס נ מ ל כ י ט ח ח ז ו ה ד ג ב א Fig. 7. The original Atbash cipher substitution table. It is one of the earliest known substitution ciphers to have been used It is very simple to implement: The first letter is exchanged with the last letter; the second letter is exchanged with the next to last letter;... 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 Z Y X W V U T S R Q P O N M L K J I H G F E D C B A Fig. 8. The Latin alphabet version of the Atbash cipher substitution table. Wassim Alexan 16

Exercise 2 You received the following ciphertext which was encoded with the Atbash cipher RHYFITVIPRMTGSVYVHGYFITVIIVHGZFIZMGRMXZRIL? Can you perform an attack on it, revealing the message? Wassim Alexan 17

Exercise 2 Solutions Being told that an Atbash cipher generated the given ciphertext, it is very easy to get back the plaintext as isburgerkingthebestburgerrestaurantincairo? Adding spaces where appropriate, the plaintext is is burger king the best burger restaurant in cairo? Wassim Alexan 18

The Pigpen Cipher This cipher is also often referred to as the Freemasons Cipher Letters are not replaced by letters, but rather by symbols, as in Fig. 9 This cipher can be made much harder to break, by using it with a key Multiple variants could be introduced to this cipher, for example, by using (grid X grid X), instead of the shown arrangement in Fig. 9 (grid grid X X) Fig. 9. An illustration of the Pigpen cipher. Wassim Alexan 19

Exercise 3 You read the following ciphertext on one of the walls of the B building. Do you think it is just a nice graffiti or a secret message? Can you perform an attack on it, revealing the message? Wassim Alexan 20

Exercise 3 Solutions A quick look at the ciphertext reveals right away that it is an encoded message using the Freemasons/Pigpen cipher. It is very easy to get back the plaintext as wheredidiparkmycar Adding spaces where appropriate, the plaintext is where did i park my car Wassim Alexan 21

The Affine Cipher A mono alphabetic cipher where the encryption process is based on a mathematical formula E(x) = (a x + b) mod m (1) where the integer parameters a and b are the key for this cipher and m is the length of the alphabet For each letter in the plaintext, we multiply it by a and add the result to b, then we divide it by m and only take the remainder This remainder value is the reference to the letter in the ciphertext Wassim Alexan 22

The Affine Cipher: An Example Consider the following plaintext that we are interested in applying the Affine cipher onto Let a = 5 and b = 8 and thus affine cipher E(x) = (a x + b) mod m (2) The first step is to write up a table matching the letters in the English language with their corresponding reference values, starting with 0 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 Fig. 10. The Latin alphabet and the reference values corresponding to every plaintext letter. where the integer parameters a = 5 and b = 8 are the key for this cipher Wassim Alexan 23

The Affine Cipher: An Example The second step is to carry out the calculation as in (2), thus assigning a substitute for each of the plaintext letters Plaintext 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 Value 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 5x+8 mod 26 8 13 18 23 2 7 12 17 22 1 6 11 16 21 0 5 10 15 20 25 4 9 14 19 24 3 Ciphertext I N S X C H M R W B G L Q V A F K P U Z E J O T Y D Fig. 11. The substitution table for the Affine cipher with a = 5 and b = 8. Thus, the ciphertext, after removing the spaces, would be IHHWVCSWFRCP Note that we could have started the reference values for the plaintext letters with 1 instead of 0. But choosing to start with 0 allows for easier calculations Wassim Alexan 24

The Keyword Cipher A mono alphabetic cipher where a keyword is used as the key, such that the key determines the letter matchings of the cipher alphabet to the plain alphabet Repeats of letters in the word are removed, then the cipher alphabet is generated with the keyword matching to A, B, C, etc... until the keyword is used up Then, the rest of the ciphertext letters are used in alphabetical order, excluding those already used in the key For example, using the word KRYPTOS as the key, the following substitution table is obtained 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 K R Y P T O S A B C D E F G H I J L M N Q U V W X Z Fig. 12. The Keyword cipher substitution table, with the key KRYPTOS. Wassim Alexan 25

Exercise 4 Using the Keyword cipher with the key CODING, encrypt the following plaintext the midterm exam is going to be easy Wassim Alexan 26

Exercise 4 Solutions We start off by writing down the proper substitution table 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 C O D I N G A B E F H J K L M P Q R S T U V W X Y Z Fig. 13. The Keyword cipher substitution table, with the key CODING. Carrying out the substitution, we get the following ciphertext Removing the spaces, we get TBN KEITNRK NXCK ES AMELA TM ON NCSY TBNKEITNRKNXCKESAMELATMONNCSY Wassim Alexan 27