YALE UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE

 CPSC 467: Cryptography and Computer SecurityHandout #4
Professor M. J. Fischer   September 3, 2014



 

Problem Set 1

Due by 11:59 pm on Wednesday, September 10, 2014

Please submit your solutions in electronic form as you did for Problem Set 0. (See handout 3.) Give “1” as the first argument to submit so that your submission goes into the right folder, e.g.,

/c/cs467/bin/submit 1 my.name_ps1_solutions.pdf

Please ask me or the TA if you have any questions.

___________________________________________________________________________________

Problem 1: Affine Cipher

Happy Hacker read about the affine cipher. He liked that it had a bigger key space than the Caesar cipher, but he thought it should be bigger still, so he invented the double affine cipher. Here’s how it works.

  1. How large his Happy’s key space?
  2. Suppose k1 = (7,12) and k2 = (3,8). What is Happy’s encryption of the letter “D”? Show your work.
  3. Let c be a ciphertext. Describe how to decrypt c, and show why one recovers the original plaintext letter. Work through the decryption for the ciphertext you found in part (b).
  4. Smarty Sam told Happy that his scheme was no better than the original affine cipher because the substitution specified by Happy’s double key ((α11),(α22)) was the same as the affine substitution E(α,β) specified by a single key pair (α,β). Happy couldn’t understand how that can be. Help Happy by finding an affine key pair (α,β) that defines the same substitution as the one specified by Happy’s double key ((7,12),(3,8)). Show your work.

Problem 2: Playfair

Consider the Playfair cipher with passphrase

ALL HOMEWORK IN THIS COURSE SHOULD BE SUBMITTED ON TIME

  1. Construct the Playfair matrix.
  2. Prepare the message, “janet loves ian” for encryption.
  3. Encrypt the message using the matrix from part (a).

Problem 3: Cryptanalysis

Read chapter 1 of the Paar and Pelzl textbook, Understanding Cryptography. Then solve problem 1.1 on book page 24. (The PDF page number may differ.)

You are free to make any use of computers that you wish for this problem, using any programming language or tools that you are comfortable with. As with any problem set, show your work. That means if you wrote a program to help you solve the problem, then submit the code as well as your answers. The code will not be graded, but in case your answer differs from the correct one, it will help with the grading. If you make use of somebody else’s code, then be sure to properly acknowledge the source of that code.