YALE UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE
CPSC 467b: Cryptography and Computer Security | Handout #9 | |
Xueyuan Su | February 16, 2010 | |
Solution to Problem Set 2
Due on Monday, February 15, 2010
In this problem set, we consider a variant of the Caesar cipher which we call the “Happy-2010” cipher
(named after the venerable “Happy Hacker” of CPSC 223 fame). Happy-2010 (E,D) is defined as follows:
Let =
=
= {0,…,25}. Define
We also consider Double Happy (E2,D2). Here, 2 =
×
, and E(k1,k2)2 = Ek1(Ek2(m)).
Feel free to write programs to help you solve these problems. If you do, include the programs and their output along with your solutions, and say how the computer was used.
Problem 1: Happy Encryption (5 points)
Encrypt the plaintext “i am a secret message” using Happy with key k = 3. (As usual, we will ignore spaces.)
Solution: IAMASECXEZMESSAGE.
Problem 2: Happy Decryption (5 points)
Describe the Happy decryption function Dk(c).
Solution:
Problem 3: Security (10 points)
Solution:
Problem 4: Equivalent Key Pairs (10 points)
Suppose m0 = c0 = 4.
Solution:
Problem 5: Group Property (10 points)
Is Happy a group? Why or why not?
Solution: No. There are two ways to think about this problem.
and
However, for any single key k
, it either gives Ek(m0) = m0 or Ek(m1) = m1.
Therefore, for any k
, we have
Thus, Happy is not a group.