EE 595 (PMP) Introduction to Security and Privacy Homework 1 Solutions

Size: px
Start display at page:

Download "EE 595 (PMP) Introduction to Security and Privacy Homework 1 Solutions"

Transcription

1 EE 595 (PMP) Introduction to Security and Privacy Homework 1 Solutions Assigned: Tuesday, January 17, 2017, Due: Sunday, January 28, 2017 Instructor: Tamara Bonaci Department of Electrical Engineering University of Washington, Seattle Problem 1 For each of the following pairs of integers (x, y), first determine whether x 1 mod y exists. Then find x 1 (mod y) if it exists. Show all work. (a) x = 5, y = 25 (b) x = 24, y = 35 (c) x = 17, y = 101 Solution: (a) x = 5, y = 25 There does not exist an inverse x 1 (mod y) for a pair x = 5, y = 25, since x = 5 y = 25 = 5 2, hence gcd(x = 5, y = 25) = 5 1 (b) x = 24, y = 35 There does exist an inverse x 1 (mod y) for a pair x = 24, y = 35, since gcd(x = 24, y = 35) = 1. Let s show that by factorizing x and y: x = y = 5 7 (1) From (1), it follows that x and y do not have any common factors, hence gcd(x = 24, y = 35) = 1. Let s now use the Extended Euclidean Algorithm to find the inverse x 1 (mod y) for a pair x = 24, y = 35: 24 = 0(35) = 1(24) = 35 1(24) 24 = 2(11) = 24 2(11) 11 = 5(2) = 11 5(2) From (2), it follows that: 1 = 11 5(2) = 11 5[(24) 2(11)] = 11(11) 5(24) = 11[(35) (24)] 16(24) = 11(35) 16(24) (2) 24 1 = 16 (mod 35) = 19 (mod 35) x = 17, y = 101 There does exist an inverse x 1 (mod y) for a pair x = 17, y = 101, since both 17 and 101 are prime numbers. Using the Extended Euclidean Algorithm to find the inverse x 1 (mod y) for a pair x = 17, y = 101 we get that 17 1 mod (101) = 6. 1

2 Problem 2 If an encryption function e K is identical to the decryption function d K, then the key K is said to be an involutory key. Find all the involutory keys in the Shift cipher over Z 26. Solution: In order to find all involutory keys in Shift cipher over Z 26, let s first represent the 5-tuple that defines the cipher: P = C = K = Z 26 y = e K (x) = (x + K) mod 26 By definition, a cryptographic key K is involutory key, if: From equation (4), if follows that: x = d K (y) = (y K) mod 26 (3) x = e K (e K (x)) e K (x) = d K (y) (4) = e K [(x + K) mod 26] = [(x + K) mod 26 + K] mod 26 = (x + 2K) mod 26 (5) From equation (5), the condition for a key to be an involutory key in Shift cipher over Z 26 is given as: 2 K mod 26 = 0 (6) From equation(6), we conclude that there are two involutory keys in Shift cipher over Z 26 : K 1 = 0; K 2 = 13 Problem 3 Suppose K = (5, 21) is a key in an Affine cipher over Z 29. (a) Express the decryption function d K (y) in the form d K = a y + b, where a, b Z 29. (b) Prove that d K (e K (x)) = x for all x Z 29. Solution: An Affine cipher over Z 29 is defined by the following 5-tuple: P = C = Z 29 K = {(a, b) : a Z 29 and gcd(a, 29) = 1, b Z 29 } y = e K (x) = (ax + b) mod 29 x = d K (y) = a 1 (y b) mod 29 (7) 2

3 Solution: (a) In order to express the decryption rule (equation (7)) in the form: d K (y) = a y + b, where a, b Z 29 (8) let s first find the multiplicative inverse of a = 5 over Z 29 using Extended Euclidean Algorithm: 29 = 5(5) = 1(4) = 5 1(4) 1 = 5 1(29 5(5)) From equation (9), it follows that a 1 = 6. We can now write: 1 = 6(5) 29 (9) d K (x) = a 1 (y b) mod 29 = (a 1 y a 1 b) mod 29 = (6y 126) mod 29 (6y + 19) mod 29 (10) Therefore, decryption rule d K (y) can be expressed as d K (y) = (6y + 19) mod 29 (b)we next prove that d K (e K (x)) = x for all x Z 29. In order to prove that d K (e K (x)) = x, let s express d K (e K (x)) in the following way: Equation (11) completes the proof. d K (e K (x)) = d k [(5x + 21) mod 29] = 6[(5x + 21) mod 29] + 19 (mod 29) = 30x (mod 29) = 30x (mod 29) = 30x x (mod 29) (11) Problem 4 The following ciphertext was encrypted using an Affine cipher: edsgickxhuklzveqzvkxwkzukcvuh The first two letter of the plaintext are if. Please decrypt. The plaintext is: if you can read this thank a teacher Let s recall that the first two ciphertext letters, ed (4,3) correspond to plaintext if (8,5). We can apply that to the definition of affine decryption, d k (y) = a 1 (y b) mod 26, to get the following system of equations: 8 = a 1 (4 b) 5 = a 1 (3 b) 3

4 Multiplying both sides with a, we get: 8a = (4 b) mod 26 5a = (3 b) mod 26 3a = 1 mod 26 We observe that a 1 = 3, and substitute that back into 5 = a 1 (3 b), which allows us to solve for b = 10. Using the key (a, b) = (3, 10), we can use any software to increase the decryption speed. Below is an example of Matlab code. ciphertext str = 'edsgickxhuklzveqzvkxwkzukcvuh'; ciphertext = converttonumbers(ciphertext str); a inv = 3; b = 10; plaintext = mod(a inv*(ciphertext b),26); plaintext str = converttostring(plaintext); plaintext str function numarray = converttonumbers(s) a = uint8('a'); s = lower(s); for i=1:length(s) t = uint8(s(i)); if t < a numarray(i) = 1; else numarray(i) = double(t a); end end %numarray = uint8(s) a; numarray = double(numarray); function str = converttostring(x) a = uint8('a'); %x = x + a; str = char(uint8(x)+a); Problem 5 Alice is sending a message to Bob using the Vigenére cryptosystem. At some point, Alice gets bored, and starts sending plaintext that consists of a single letter (known only to her) repeated a few hundred times. Eve knows that the Vigenére cipher is being used, and that the plaintext consists of a single letter, repeated. Show how Eve can deduce the key. 4

5 Solution: Let s assume that Alice sends some number, and let s denote that number as x. Let s now assume that the key length is equal to m. Now we have the following case. plaintext: x x x x x x x x x x x x... ciphertext: c 1 c 2... c m c 1 c 1... Since Alice is constantly encrypting the same number x, eventually we will observe that the ciphertext is some periodic sequence. The period indicates the length m of the Vigenere cipher. Another feature we can observe is the fixed difference between c i and c i+1, where i = 1... m 1. Therefore, we can represent any c i in term of c 1. As the result, the size of key space is reduced to 26. For any new ciphertext, we can then try at most 26 times to encrypt the message. Problem 6 Evan, an attacker, is on a mission. He is given a (plaintext, ciphertext) pair (relation, ORIENTAL), and his task is to determine the complete cryptographic key (table), if the given pair is generated using: (a) Permutation cipher, (b) Substitution cipher. Please put your black hat on, and show Evan how to accomplish this mission, or show why it is impossible. In doing so, please assume that the set of possible plaintexts is equal to the set of possible ciphertexts, and that it is equal to Z 26. Solution: (a) The mission is possible if the given (plaintext, ciphertext) pair is obtained using the Permutation cipher. To see that, let s recall that with this cipher, the ciphertext is generated by altering the positions of the characters in the plaintext, i.e., rearranging the alphabets using a permutation. The given mission might be slightly harder, if we assume that Evan doesn t know the key length, where the key length determines the number of letters that are considered when determining the permutation. However, even if the key length is unknown, Evan can still proceed, by finding the key length via a trial-and-error method. In doing so, we can make Evan s job significantly simpler by observing that the length of the given plaintext needs to be divisible (without a remainder) with the key length. In Evan s case, the only meaningful key would be those of length 2, 4 and 8, and the actual key length is 8. The obtained permutation table is given below, in Table 1. (b) The mission at hands is impossible if the given (plaintext, ciphertext) pair is obtained using the Substitution cipher. To see that, let s recall that the main idea of the substitution cipher is to replace each letter of the plaintext alphabet with an alphabet at an arbitrary distance. It is important to note that we need to be able to replace every plaintext alphabet. Since our (plaintext, ciphertext) pair is rather short (only eight letters), we can only determine a part of the key (a part of the substitution table), but not the whole table. The partial table looks as follows: j π(j) Table 1: Permutation table obtained as a solution in Problem 4. x a e i l n o r t π(x) E R T I L A O N Table 2: Partial encryption table for Substitution cipher. 5

6 Problem 7 Consider the DES cryptosystem. Suppose that the key scheduling algorithm (the algorithm used to compute the round keys) is as follows. For a given key K, the algorithm first computes round keys K 1,..., K 8 for the first eight rounds. The algorithm then sets K 9 = K 8, K 10 = K 7,..., K 16 = K 1, so that K i = K 16 i+1 for all i = 1,..., 16. (Note that the DES key scheduling algorithm does not actually work this way.) Suppose that you are given a ciphertext Y. Show how to determine the plaintext x using a chosen plaintext attack. Recall that in a chosen plaintext attack, an attacker is given a ciphertext Y. The attacker is allowed to choose a plaintext x x and receives the ciphertext Y = E K (x ). The attacker then attempts to compute the plaintext x satisfying Y = E K (x). Solution: The approach is to choose the plaintext (L 0, R 0) equal to (R 16, L 16 ), i.e., to reverse the blocks of the ciphertext. Consider the first round of the encryption. By definition of the DES encryption, L 1 = R 0 and R 1 = f(k 1, R 0) L 0. Substituting the values of L 0 and R 0 gives L 1 = L 16 R 1 = f(k 1, L 16 ) R 16 On the other hand, consider the DES decryption of the original ciphertext (L 16, R 16 ). By definition, we have R 15 = L 16 L 15 = R 16 f(l 16, K 16 ) = R 16 f(l 16, K 1 ) Hence L 1 = R 15 and R 1 = L 15. Proceeding inductively, we have that L i = R 16 i and R i = L 16 i. In particular, L 0 = R 16 and R 0 = L 16. The original plaintext is therefore given by (R 16, L 16), where (L 16, R 16) is the output from inputting (R 16, L 16 ) to the encryption box. Problem 8 In the CBC mode of encryption, suppose that there is a bit error in one block of ciphertext. If the error occurs in the first block of ciphertext Y 1, which blocks of the plaintext will be decrypted incorrectly? Solution: Let Ŷ1 denote the ciphertext with the bit error. The first block of plaintext (x 1 ) will be decrypted incorrectly, while the remaining blocks will be decrypted correctly. This is because all subsequent blocks will be encrypted and decrypted using the same block Ŷ1. To see that, the corrupted ciphertext is used for xor operation, so as long as current blocks xor the same ciphertext, the result does not depend on the ciphertext content itself, since x x = 0, and y 0 = y. Since D K (Ŷ1) x 1, however, the first block will be decrypted incorrectly. so only the first block has an error. Problem 9 In this exercise, we will see how a cryptosystem can fail if the encryption function is a linear function of the plaintext. Consider a cryptosystem that encrypts a 128-bit plaintext x with a 128-bit key K to get a 128-bit ciphertext Y. Let E K (x) denote the encryption function, and suppose that E K (x 1 x 2 ) = E K (x 1 ) E K (x 2 ) for all keys K and plaintexts x 1 and x 2. Consider an attacker mounting a chosen ciphertext attack, in which the attacker chooses 128 ciphertexts Y 1,..., Y 128 and receives the plaintexts x 1,..., x 128 with Y i = E K (x i ) for i = 1,..., 128. Show how the attacker can choose Y 1,..., Y 128 so that (s)he can decrypt any message Y without knowledge of the secret key. 6

7 Solution: Suppose that the attacker chooses ciphertexts Y 1,..., Y 128, where Y i has i-th bit equal to 1 and all other bits equal to 0, and obtains the plaintexts x 1 = D K (Y 1 ),..., x 128 = D K (Y 128 ). Given a ciphertext Y, let {i 1,..., i k } denote the indices of Y that have bit 1. Hence Y = Y i1 Y i2 Y ik. Letting x denote the plaintext satisfying y = E K (x), we then have E K (x) = Y = Y i1 Y ik = E K (x i1 ) E K (x ik ) = E K (x i1 x ik ) (12) where (12) follows from linearity of E K. Since E K (x) = E K (x i1 x ik ) and the encryption operation is one-to-one, we must have x = x i1 x ik. Since x i1,..., x ik are known to the attacker, the plaintext x can then be obtained. Note that a chosen plaintext attack using plaintexts x 1,..., x 128, where x i is the i-th unit vector, will also enable the decryption of any message under this cryptosystem. 7

Classic Cryptography: From Caesar to the Hot Line

Classic Cryptography: From Caesar to the Hot Line Classic Cryptography: From Caesar to the Hot Line Wenyuan Xu Department of Computer Science and Engineering University of South Carolina Overview of the Lecture Overview of Cryptography and Security Classical

More information

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

L2. An Introduction to Classical Cryptosystems. Rocky K. C. Chang, 23 January 2015 L2. An Introduction to Classical Cryptosystems Rocky K. C. Chang, 23 January 2015 This and the next set of slides 2 Outline Components of a cryptosystem Some modular arithmetic Some classical ciphers Shift

More information

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING ENEE 457 Computer Systems Security Instructor: Charalampos Papamanthou Homework 2 Out: 09/23/16 Due: 09/30/16 11:59pm Instructions

More information

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

Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet. Substitution Ciphers, continued 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet. Non-periodic case: Running key substitution ciphers use a known text (in a standard

More information

Introduction to Cryptology Dr. Sugata Gangopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Roorkee

Introduction to Cryptology Dr. Sugata Gangopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Roorkee Introduction to Cryptology Dr. Sugata Gangopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Roorkee Lecture 09 Cryptanalysis and its variants, linear attack Welcome

More information

Nature Sunday Academy Lesson Plan

Nature Sunday Academy Lesson Plan Title Computer Security Description: Nature Sunday Academy Lesson Plan 2013-14 The objective of the lesson plan aims to help students to understand the general goals of security, the essential concerns

More information

Classical Cryptography

Classical Cryptography Classical Cryptography Chester Rebeiro IIT Madras STINSON : chapter 1 Ciphers Symmetric Algorithms Encryption and Decryption use the same key i.e. K E = K D Examples: Block Ciphers : DES, AES, PRESENT,

More information

Cryptosystems. Truong Tuan Anh CSE-HCMUT

Cryptosystems. Truong Tuan Anh CSE-HCMUT Cryptosystems Truong Tuan Anh CSE-HCMUT anhtt@hcmut.edu.vn 2 In This Lecture Cryptography Cryptosystem: Definition Simple Cryptosystem Shift cipher Substitution cipher Affine cipher Cryptanalysis Cryptography

More information

Senior Math Circles Cryptography and Number Theory Week 1

Senior Math Circles Cryptography and Number Theory Week 1 Senior Math Circles Cryptography and Number Theory Week 1 Dale Brydon Feb. 2, 2014 1 One-Time Pads Cryptography deals with the problem of encoding a message in such a way that only the intended recipient

More information

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

CRYPTOLOGY KEY MANAGEMENT CRYPTOGRAPHY CRYPTANALYSIS. Cryptanalytic. Brute-Force. Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext CRYPTOLOGY CRYPTOGRAPHY KEY MANAGEMENT CRYPTANALYSIS Cryptanalytic Brute-Force Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext 58 Types of Cryptographic Private key (Symmetric) Public

More information

Cryptography Worksheet

Cryptography Worksheet Cryptography Worksheet People have always been interested in writing secret messages. In ancient times, people had to write secret messages to keep messengers and interceptors from reading their private

More information

Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 24

Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 24 Assume encryption and decryption use the same key. Will discuss how to distribute key to all parties later Symmetric ciphers unusable for authentication of sender Lecturers: Mark D. Ryan and David Galindo.

More information

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa ICT 6541 Applied Cryptography Hossen Asiful Mustafa Basic Communication Alice talking to Bob Alice Bob 2 Eavesdropping Eve listening the conversation Alice Bob 3 Secure Communication Eve listening the

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 7 January 30, 2012 CPSC 467b, Lecture 7 1/44 Public-key cryptography RSA Factoring Assumption Computing with Big Numbers Fast Exponentiation

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Lecture 6 Michael J. Fischer Department of Computer Science Yale University January 27, 2010 Michael J. Fischer CPSC 467b, Lecture 6 1/36 1 Using block ciphers

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 3 January 13, 2012 CPSC 467b, Lecture 3 1/36 Perfect secrecy Caesar cipher Loss of perfection Classical ciphers One-time pad Affine

More information

CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 11 October 4, 2017 CPSC 467, Lecture 11 1/39 ElGamal Cryptosystem Message Integrity and Authenticity Message authentication codes

More information

SOLUTIONS FOR HOMEWORK # 1 ANSWERS TO QUESTIONS

SOLUTIONS FOR HOMEWORK # 1 ANSWERS TO QUESTIONS SOLUTIONS OR HOMEWORK # 1 ANSWERS TO QUESTIONS 2.4 A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. A block cipher is one in which a block of plaintext is treated

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 6 January 25, 2012 CPSC 467b, Lecture 6 1/46 Byte padding Chaining modes Stream ciphers Symmetric cryptosystem families Stream ciphers

More information

CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 8 September 28, 2015 CPSC 467, Lecture 8 1/44 Chaining Modes Block chaining modes Extending chaining modes to bytes Public-key Cryptography

More information

Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy Homework 2 Due: Friday, 10/28/2016 at 11:55pm PT Will be posted on

More information

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

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography Security+ Guide to Network Security Fundamentals, Third Edition Chapter 11 Basic Cryptography Objectives Define cryptography Describe hashing List the basic symmetric cryptographic algorithms 2 Objectives

More information

Math236 Discrete Maths with Applications

Math236 Discrete Maths with Applications Math236 Discrete Maths with Applications P. Ittmann UKZN, Pietermaritzburg Semester 1, 2012 Ittmann (UKZN PMB) Math236 2012 1 / 1 Block Ciphers A block cipher is an encryption scheme in which the plaintext

More information

Public Key Cryptography and the RSA Cryptosystem

Public Key Cryptography and the RSA Cryptosystem Public Key Cryptography and the RSA Cryptosystem Two people, say Alice and Bob, would like to exchange secret messages; however, Eve is eavesdropping: One technique would be to use an encryption technique

More information

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

S. Erfani, ECE Dept., University of Windsor Network Security. 2.3-Cipher Block Modes of operation 2.3-Cipher Block Modes of operation 2.3-1 Model of Conventional Cryptosystems The following figure, which is on the next page, illustrates the conventional encryption process. The original plaintext is

More information

Introduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption

Introduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption Introduction to Cryptography and Security Mechanisms: Unit 5 Public-Key Encryption Learning Outcomes Explain the basic principles behind public-key cryptography Recognise the fundamental problems that

More information

How many DES keys, on the average, encrypt a particular plaintext block to a particular ciphertext block?

How many DES keys, on the average, encrypt a particular plaintext block to a particular ciphertext block? Homework 1. Come up with as efficient an encoding as you can to specify a completely general one-to-one mapping between 64-bit input values and 64-bit output values. 2. Token cards display a number that

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 7 February 5, 2013 CPSC 467b, Lecture 7 1/45 Stream cipher from block cipher Review of OFB and CFB chaining modes Extending chaining

More information

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

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages. Telling Secrets Secret Writing Through the Ages William Turner Department of Mathematics & Computer Science Wabash College Crawfordsville, IN 47933 Tuesday 4 February 2014 W. J. Turner Telling Secrets

More information

CS61A Lecture #39: Cryptography

CS61A Lecture #39: Cryptography Announcements: CS61A Lecture #39: Cryptography Homework 13 is up: due Monday. Homework 14 will be judging the contest. HKN surveys on Friday: 7.5 bonus points for filling out their survey on Friday (yes,

More information

CS 161 Computer Security

CS 161 Computer Security Raluca Popa Spring 2018 CS 161 Computer Security Homework 2 Due: Wednesday, February 14, at 11:59pm Instructions. This homework is due Wednesday, February 14, at 11:59pm. No late homeworks will be accepted.

More information

Block Ciphers Tutorial. c Eli Biham - May 3, Block Ciphers Tutorial (5)

Block Ciphers Tutorial. c Eli Biham - May 3, Block Ciphers Tutorial (5) Block Ciphers Tutorial c Eli Biham - May 3, 2005 146 Block Ciphers Tutorial (5) A Known Plaintext Attack on 1-Round DES After removing the permutations IP and FP we get: L R 48 K=? F L R c Eli Biham -

More information

Chapter 9 Public Key Cryptography. WANG YANG

Chapter 9 Public Key Cryptography. WANG YANG Chapter 9 Public Key Cryptography WANG YANG wyang@njnet.edu.cn Content Introduction RSA Diffie-Hellman Key Exchange Introduction Public Key Cryptography plaintext encryption ciphertext decryption plaintext

More information

CS Network Security. Nasir Memon Polytechnic University Module 7 Public Key Cryptography. RSA.

CS Network Security. Nasir Memon Polytechnic University Module 7 Public Key Cryptography. RSA. CS 393 - Network Security Nasir Memon Polytechnic University Module 7 Public Key Cryptography. RSA. Course Logistics Homework 2 revised. Due next Tuesday midnight. 2/26,28/02 Module 7 - Pubic Key Crypto

More information

Using block ciphers 1

Using block ciphers 1 Using block ciphers 1 Using block ciphers DES is a type of block cipher, taking 64-bit plaintexts and returning 64-bit ciphetexts. We now discuss a number of ways in which block ciphers are employed in

More information

Channel Coding and Cryptography Part II: Introduction to Cryptography

Channel Coding and Cryptography Part II: Introduction to Cryptography Channel Coding and Cryptography Part II: Introduction to Cryptography Prof. Dr.-Ing. habil. Andreas Ahrens Communications Signal Processing Group, University of Technology, Business and Design Email: andreas.ahrens@hs-wismar.de

More information

Algorithms (III) Yijia Chen Shanghai Jiaotong University

Algorithms (III) Yijia Chen Shanghai Jiaotong University Algorithms (III) Yijia Chen Shanghai Jiaotong University Review of the Previous Lecture Factoring: Given a number N, express it as a product of its prime factors. Many security protocols are based on the

More information

A Tour of Classical and Modern Cryptography

A Tour of Classical and Modern Cryptography A Tour of Classical and Modern Cryptography Evan P. Dummit University of Rochester May 25, 2016 Outline Contents of this talk: Overview of cryptography (what cryptography is) Historical cryptography (how

More information

An overview and Cryptographic Challenges of RSA Bhawana

An overview and Cryptographic Challenges of RSA Bhawana An overview and Cryptographic Challenges of RSA Bhawana Department of CSE, Shanti Devi Institute of Technology & Management, Israna, Haryana India ABSTRACT: With the introduction of the computer, the need

More information

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

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 08. Cryptography Part II Paul Krzyzanowski Rutgers University Spring 2018 March 23, 2018 CS 419 2018 Paul Krzyzanowski 1 Block ciphers Block ciphers encrypt a block of plaintext at a

More information

Algorithms (III) Yu Yu. Shanghai Jiaotong University

Algorithms (III) Yu Yu. Shanghai Jiaotong University Algorithms (III) Yu Yu Shanghai Jiaotong University Review of the Previous Lecture Factoring: Given a number N, express it as a product of its prime factors. Many security protocols are based on the assumed

More information

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d) Outline AIT 682: Network and Systems Security 1. Introduction 2. RSA 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard Topic 5.2 Public Key Cryptography Instructor: Dr. Kun Sun 2 Public Key

More information

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

Basic Concepts and Definitions. CSC/ECE 574 Computer and Network Security. Outline CSC/ECE 574 Computer and Network Security Topic 2. Introduction to Cryptography 1 Outline Basic Crypto Concepts and Definitions Some Early (Breakable) Cryptosystems Key Issues 2 Basic Concepts and Definitions

More information

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

2/7/2013. CS 472 Network and System Security. Mohammad Almalag Lecture 2 January 22, Introduction To Cryptography CS 472 Network and System Security Mohammad Almalag malmalag@cs.odu.edu Lecture 2 January 22, 2013 Introduction To Cryptography 1 Definitions Cryptography = the science (art) of encryption Cryptanalysis

More information

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Chapter 8 Security A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you see the animations; and can add,

More information

Chapter 3 Traditional Symmetric-Key Ciphers 3.1

Chapter 3 Traditional Symmetric-Key Ciphers 3.1 Chapter 3 Traditional Symmetric-Key Ciphers 3.1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Objectives To define the terms and the concepts of symmetric

More information

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

CIS 3362 Final Exam 12/4/2013. Name: CIS 3362 Final Exam 12/4/2013 Name: 1) (10 pts) Since the use of letter frequencies was known to aid in breaking substitution ciphers, code makers in the Renaissance added "twists" to the standard substitution

More information

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL Transpositional Ciphers-A Review Decryption 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Encryption 1 2 3 4 5 6 7 8 A G O O D F R I E N D I S A T R E

More information

P2_L6 Symmetric Encryption Page 1

P2_L6 Symmetric Encryption Page 1 P2_L6 Symmetric Encryption Page 1 Reference: Computer Security by Stallings and Brown, Chapter 20 Symmetric encryption algorithms are typically block ciphers that take thick size input. In this lesson,

More information

ISA 562: Information Security, Theory and Practice. Lecture 1

ISA 562: Information Security, Theory and Practice. Lecture 1 ISA 562: Information Security, Theory and Practice Lecture 1 1 Encryption schemes 1.1 The semantics of an encryption scheme. A symmetric key encryption scheme allows two parties that share a secret key

More information

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography CSCI 454/554 Computer and Network Security Topic 5.2 Public Key Cryptography Outline 1. Introduction 2. RSA 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard 2 Introduction Public Key Cryptography

More information

Secure Multiparty Computation

Secure Multiparty Computation CS573 Data Privacy and Security Secure Multiparty Computation Problem and security definitions Li Xiong Outline Cryptographic primitives Symmetric Encryption Public Key Encryption Secure Multiparty Computation

More information

CS669 Network Security

CS669 Network Security UNIT II PUBLIC KEY ENCRYPTION Uniqueness Number Theory concepts Primality Modular Arithmetic Fermet & Euler Theorem Euclid Algorithm RSA Elliptic Curve Cryptography Diffie Hellman Key Exchange Uniqueness

More information

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

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography CSCI 454/554 Computer and Network Security Topic 2. Introduction to Cryptography Outline Basic Crypto Concepts and Definitions Some Early (Breakable) Cryptosystems Key Issues 2 Basic Concepts and Definitions

More information

Some Stuff About Crypto

Some Stuff About Crypto Some Stuff About Crypto Adrian Frith Laboratory of Foundational Aspects of Computer Science Department of Mathematics and Applied Mathematics University of Cape Town This work is licensed under a Creative

More information

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA CSCI 454/554 Computer and Network Security Topic 5.2 Public Key Cryptography 1. Introduction 2. RSA Outline 3. Diffie-Hellman Key Exchange 4. Digital Signature Standard 2 Introduction Public Key Cryptography

More information

2 What does it mean that a crypto system is secure?

2 What does it mean that a crypto system is secure? Cryptography Written by: Marius Zimand Notes: On the notion of security 1 The One-time Pad cryptosystem The one-time pad cryptosystem was introduced by Vernam and Mauborgne in 1919 (for more details about

More information

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

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 08r. Pre-exam 2 Last-minute Review Cryptography Paul Krzyzanowski Rutgers University Spring 2018 March 26, 2018 CS 419 2018 Paul Krzyzanowski 1 Cryptographic Systems March 26, 2018 CS

More information

Lecture 07: Private-key Encryption. Private-key Encryption

Lecture 07: Private-key Encryption. Private-key Encryption Lecture 07: Three algorithms Key Generation: Generate the secret key sk Encryption: Given the secret key sk and a message m, it outputs the cipher-text c (Note that the encryption algorithm can be a randomized

More information

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

Outline. Cryptography. Encryption/Decryption. Basic Concepts and Definitions. Cryptography vs. Steganography. Cryptography: the art of secret writing Outline CSCI 454/554 Computer and Network Security Basic Crypto Concepts and Definitions Some Early (Breakable) Cryptosystems Key Issues Topic 2. Introduction to Cryptography 2 Cryptography Basic Concepts

More information

Lecture IV : Cryptography, Fundamentals

Lecture IV : Cryptography, Fundamentals Lecture IV : Cryptography, Fundamentals Internet Security: Principles & Practices John K. Zao, PhD (Harvard) SMIEEE Computer Science Department, National Chiao Tung University Spring 2012 Basic Principles

More information

Homework 1 CS161 Computer Security, Spring 2008 Assigned 2/4/08 Due 2/13/08

Homework 1 CS161 Computer Security, Spring 2008 Assigned 2/4/08 Due 2/13/08 Homework 1 CS161 Computer Security, Spring 2008 Assigned 2/4/08 Due 2/13/08 This homework assignment is due Wednesday, February 13 at the beginning of lecture. Please bring a hard copy to class; either

More information

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

Introduction to Cryptography and Security Mechanisms. Abdul Hameed Introduction to Cryptography and Security Mechanisms Abdul Hameed http://informationtechnology.pk Before we start 3 Quiz 1 From a security perspective, rather than an efficiency perspective, which of the

More information

Cryptography Math/CprE/InfAs 533

Cryptography Math/CprE/InfAs 533 Unit 1 January 10, 2011 1 Cryptography Math/CprE/InfAs 533 Unit 1 January 10, 2011 2 Instructor: Clifford Bergman, Professor of Mathematics Office: 424 Carver Hall Voice: 515 294 8137 fax: 515 294 5454

More information

Kurose & Ross, Chapters (5 th ed.)

Kurose & Ross, Chapters (5 th ed.) Kurose & Ross, Chapters 8.2-8.3 (5 th ed.) Slides adapted from: J. Kurose & K. Ross \ Computer Networking: A Top Down Approach (5 th ed.) Addison-Wesley, April 2009. Copyright 1996-2010, J.F Kurose and

More information

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

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell 1 Cryptography Merriam-Webster Online Dictionary: 1. secret writing 2. the enciphering and deciphering

More information

CS573 Data Privacy and Security. Cryptographic Primitives and Secure Multiparty Computation. Li Xiong

CS573 Data Privacy and Security. Cryptographic Primitives and Secure Multiparty Computation. Li Xiong CS573 Data Privacy and Security Cryptographic Primitives and Secure Multiparty Computation Li Xiong Outline Cryptographic primitives Symmetric Encryption Public Key Encryption Secure Multiparty Computation

More information

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

Lecture 02: Historical Encryption Schemes. Lecture 02: Historical Encryption Schemes What is Encryption Parties involved: Alice: The Sender Bob: The Receiver Eve: The Eavesdropper Aim of Encryption Alice wants to send a message to Bob The message should remain hidden from Eve What distinguishes

More information

Introduction to Cryptology. Lecture 2

Introduction to Cryptology. Lecture 2 Introduction to Cryptology Lecture 2 Announcements Access to Canvas? 2 nd Edition vs. 1 st Edition HW1 due on Tuesday, 2/7 Discrete Math Readings/Quizzes on Canvas due on Tuesday, 2/14 Agenda Last time:

More information

CS 332 Computer Networks Security

CS 332 Computer Networks Security CS 332 Computer Networks Security Professor Szajda Last Time We talked about mobility as a matter of context: How is mobility handled as you move around a room? Between rooms in the same building? As your

More information

Public Key Algorithms

Public Key Algorithms Public Key Algorithms CS 472 Spring 13 Lecture 6 Mohammad Almalag 2/19/2013 Public Key Algorithms - Introduction Public key algorithms are a motley crew, how? All hash algorithms do the same thing: Take

More information

Security: Cryptography

Security: Cryptography Security: Cryptography Computer Science and Engineering College of Engineering The Ohio State University Lecture 38 Some High-Level Goals Confidentiality Non-authorized users have limited access Integrity

More information

Lecture 3 Algorithms with numbers (cont.)

Lecture 3 Algorithms with numbers (cont.) Advanced Algorithms Floriano Zini Free University of Bozen-Bolzano Faculty of Computer Science Academic Year 2013-2014 Lecture 3 Algorithms with numbers (cont.) 1 Modular arithmetic For cryptography it

More information

Cryptography Introduction to Computer Security. Chapter 8

Cryptography Introduction to Computer Security. Chapter 8 Cryptography Introduction to Computer Security Chapter 8 Introduction Cryptology: science of encryption; combines cryptography and cryptanalysis Cryptography: process of making and using codes to secure

More information

L3. An Introduction to Block Ciphers. Rocky K. C. Chang, 29 January 2015

L3. An Introduction to Block Ciphers. Rocky K. C. Chang, 29 January 2015 L3. An Introduction to Block Ciphers Rocky K. C. Chang, 29 January 2015 Outline Product and iterated ciphers A simple substitution-permutation network DES and AES Modes of operations Cipher block chaining

More information

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculty of Mathematics and Computer Science Exam Cryptology, Tuesday 31 October 2017

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculty of Mathematics and Computer Science Exam Cryptology, Tuesday 31 October 2017 Faculty of Mathematics and Computer Science Exam Cryptology, Tuesday 31 October 2017 Name : TU/e student number : Exercise 1 2 3 4 5 6 total points Notes: Please hand in this sheet at the end of the exam.

More information

Lecture 1 Applied Cryptography (Part 1)

Lecture 1 Applied Cryptography (Part 1) Lecture 1 Applied Cryptography (Part 1) Patrick P. C. Lee Tsinghua Summer Course 2010 1-1 Roadmap Introduction to Security Introduction to Cryptography Symmetric key cryptography Hash and message authentication

More information

Jordan University of Science and Technology

Jordan University of Science and Technology Jordan University of Science and Technology Cryptography and Network Security - CPE 542 Homework #III Handed to: Dr. Lo'ai Tawalbeh By: Ahmed Saleh Shatnawi 20012171020 On: 8/11/2005 Review Questions RQ3.3

More information

Classical Encryption Techniques. CSS 322 Security and Cryptography

Classical Encryption Techniques. CSS 322 Security and Cryptography Classical Encryption Techniques CSS 322 Security and Cryptography Contents Terminology and Models Requirements, Services and Attacks Substitution Ciphers Caesar, Monoalphabetic, Polyalphabetic, One-time

More information

ח'/סיון/תשע "א. RSA: getting ready. Public Key Cryptography. Public key cryptography. Public key encryption algorithms

ח'/סיון/תשע א. RSA: getting ready. Public Key Cryptography. Public key cryptography. Public key encryption algorithms Public Key Cryptography Kurose & Ross, Chapters 8.28.3 (5 th ed.) Slides adapted from: J. Kurose & K. Ross \ Computer Networking: A Top Down Approach (5 th ed.) AddisonWesley, April 2009. Copyright 19962010,

More information

Fundamentals of Computer Security

Fundamentals of Computer Security Fundamentals of Computer Security Spring 2015 Radu Sion Ciphers 2005-15 Portions copyright by Matt Bishop and Wikipedia. Used with permission Overview m 3 m 2 m 1 cipher c i Bob Alice cipher -1 m 1 m 2

More information

Assignment 9 / Cryptography

Assignment 9 / Cryptography Assignment 9 / Cryptography Michael Hauser March 2002 Tutor: Mr. Schmidt Course: M.Sc Distributed Systems Engineering Lecturer: Mr. Owens CONTENTS Contents 1 Introduction 3 2 Simple Ciphers 3 2.1 Vignère

More information

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

CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY. Badran Awad Computer Department Palestine Technical college CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY Badran Awad Computer Department Palestine Technical college CHAPTER 1 Introduction Historical ciphers Information theoretic security Computational security Cryptanalysis

More information

Goals of Modern Cryptography

Goals of Modern Cryptography Goals of Modern Cryptography Providing information security: Data Privacy Data Integrity and Authenticity in various computational settings. Data Privacy M Alice Bob The goal is to ensure that the adversary

More information

What did we talk about last time? Public key cryptography A little number theory

What did we talk about last time? Public key cryptography A little number theory Week 4 - Friday What did we talk about last time? Public key cryptography A little number theory If p is prime and a is a positive integer not divisible by p, then: a p 1 1 (mod p) Assume a is positive

More information

Encryption à la Mod Name

Encryption à la Mod Name Rock Around the Clock Part Encryption à la Mod Let s call the integers,, 3,, 5, and the mod 7 encryption numbers and define a new mod 7 multiplication operation, denoted by, in the following manner: a

More information

CS 556 Spring 2017 Project 3 Study of Cryptographic Techniques

CS 556 Spring 2017 Project 3 Study of Cryptographic Techniques CS 556 Spring 2017 Project 3 Study of Cryptographic Techniques Project Due Dates: Part A: Due before class on CANVAS by Thursday, March 23, 2017 Part B: Due before class on CANVAS by Thursday April 6,

More information

Symmetric Key Cryptosystems. Definition

Symmetric Key Cryptosystems. Definition Symmetric Key Cryptosystems Debdeep Mukhopadhyay IIT Kharagpur Definition Alice and Bob has the same key to encrypt as well as to decrypt The key is shared via a secured channel Symmetric Ciphers are of

More information

Secret Key Cryptography

Secret Key Cryptography Secret Key Cryptography General Block Encryption: The general way of encrypting a 64-bit block is to take each of the: 2 64 input values and map it to a unique one of the 2 64 output values. This would

More information

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings Key Exchange References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings Outlines Primitives Root Discrete Logarithm Diffie-Hellman ElGamal Shamir s Three Pass

More information

Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls

Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls Overview Cryptography functions Secret key (e.g., DES) Public key (e.g., RSA) Message

More information

1 One-Time Pad. 1.1 One-Time Pad Definition

1 One-Time Pad. 1.1 One-Time Pad Definition 1 One-Time Pad Secure communication is the act of conveying information from a sender to a receiver, while simultaneously hiding it from everyone else Secure communication is the oldest application of

More information

Lecture 2: Secret Key Cryptography

Lecture 2: Secret Key Cryptography T-79.159 Cryptography and Data Security Lecture 2: Secret Key Cryptography Helger Lipmaa Helsinki University of Technology helger@tcs.hut.fi 1 Reminder: Communication Model Adversary Eve Cipher, Encryption

More information

Other Topics in Cryptography. Truong Tuan Anh

Other Topics in Cryptography. Truong Tuan Anh Other Topics in Cryptography Truong Tuan Anh 2 Outline Public-key cryptosystem Cryptographic hash functions Signature schemes Public-Key Cryptography Truong Tuan Anh CSE-HCMUT 4 Outline Public-key cryptosystem

More information

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

Traditional Symmetric-Key Ciphers. A Biswas, IT, BESU Shibpur Traditional Symmetric-Key Ciphers A Biswas, IT, BESU Shibpur General idea of symmetric-key cipher The original message from Alice to Bob is called plaintext; the message that is sent through the channel

More information

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

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

More information

Public Key Algorithms

Public Key Algorithms Public Key Algorithms 1 Public Key Algorithms It is necessary to know some number theory to really understand how and why public key algorithms work Most of the public key algorithms are based on modular

More information

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

Cryptographic Techniques. Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building Cryptographic Techniques Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building Outline Data security Cryptography basics Cryptographic systems DES RSA C. H. HUANG IN CML 2 Cryptography

More information

Algorithms (III) Yijia Chen Shanghai Jiaotong University

Algorithms (III) Yijia Chen Shanghai Jiaotong University Algorithms (III) Yijia Chen Shanghai Jiaotong University Review of the Previous Lecture Factoring: Given a number N, express it as a product of its prime factors. Many security protocols are based on the

More information

An IBE Scheme to Exchange Authenticated Secret Keys

An IBE Scheme to Exchange Authenticated Secret Keys An IBE Scheme to Exchange Authenticated Secret Keys Waldyr Dias Benits Júnior 1, Routo Terada (Advisor) 1 1 Instituto de Matemática e Estatística Universidade de São Paulo R. do Matão, 1010 Cidade Universitária

More information