CS556 Midterm Exam
October 17, 2012
Professor Ming-Deh Huang
Duration: 80 minutes. Closed books and notes. Calculators allowed.
1. Consider the following variant of one-time pad with the message space, the key space and
the ciphertext space all equal to c
CS556 HW 5 Solution- Fall 2012
9.3 Alice outputs k . Bob outputs
w t = (u r) t = (s t) r) t = (k r) t) r) t = k
An adversary who listens to the protocol has access to s, u and w. He can
thus compute
s u w = (k r) u (u r) = k
and thus obtain the key. The s
CS556 HW 4 Solution- Fall 2012
7.5) Observe that 3 Z as gcd(3, 100) = 1.
100
Further, (100) = 2.1.4.5 = 40. Thus
31000 = 340.25 = (340 )25 = 125 = 1
mod 100
As 31000 = 1 mod 100, the nal two digits of 31000 are 01.
7.8) Let m = X mod N with 0 n N and n =
CS556 HW 3 Solution- Fall 2012
4.3. The adversary queries for the message m1 |m2 and recieves the tag
< Fk (m1 ), Fk (Fk (m2 ) >. He then queries for the message Fk (m1 )|m2 and
receives the tag Fk (Fk (m1 ), Fk (Fk (m2 ). Now, he can compute the tag of
t
CS556 Homework 2 solution
3.16 (b) (YES) Observe that G(s) = G (s|r), where r cfw_0, 1n .
Here | denotes concatenation. Assume that G is not pseuodorandom.
Thus, there exists a polynomial time distinguisher D that distinguishes
G (s|r), s|r cfw_0, 12n fro
cs556 Homework 1 solution
1.3. Breaking the improved Vigenere cipher: As with the original Vigenere
cipher, once the length t of the key is known, the cipher can be broken
the same way a normal mono-alphabetic substitution cipher is broken, say
by using c
CS556 Midterm Solution- Spring 2010
1.) The decryption function is Deck (c) := c k mod 2n .
Deck (c) = (m + k mod 2n ) k ) mod 2n = m + k k mod 2n =
m mod 2n .
Pr[C = c|M = m] = Pr[c = M + K
mod 2n |M = m]
= Pr[c = m + K
mod 2n ]
= Pr[K = c m
1
=
2n
mod 2
CS556 Midterm Exam
Spring 2010
Professor Ming-Deh Huang
Duration: 80 minutes
Closed books and notes. Calculators allowed. Each question carries 20 points.
In the following questions, whenever an encryption scheme is concerned, M will denote the
message sp