Note: It was assumed that each student would start with 8 points. Each wrong answer took away from the 8 points, and an exceptional answer added to the 8 points.
1. (9.8.2)--(Courtesy of Rafael Bonilla)
The Ceasar cipher is the widely known cipher in which letters are shifted using the formula:
ci = E(pi) = pi
+ k
Given the ciphertext TEBKFKQEBZLROPBLCERJXKBSBKQP. A Statistical Analysis of Frequency shows us that B is the most common letter in the ciphertext. Using the table in page 29 of [2] (basically this table shows that e is the most common letter in plain English) we can find the correspondence B = e in plaintext. From this we realize that B has been shifted 3 position so k = 3 with high probability.
Given that k = 3 we construct the following table.
Plaintext |
a |
b |
c |
d |
e |
f |
g |
h |
i |
j |
k |
l |
m |
|
Ciphertext |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
P |
|
Plaintext |
n |
o |
p |
q |
r |
s |
t |
u |
v |
w |
x |
y |
z |
|
Ciphertext |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z |
A |
B |
C |
|
Now, using this table to find the correspondences for each letter of the ciphertext with the plaintext we can decipher the message. For example T in the ciphertext is q in plaintext. By doing the same with each letter we have:
TEBKFKQEBZLROPBLCERJXKBSBKQP
wheninthecourseofhumanevents
Inserting spaces in all the appropriate places we have the final plaintext
When in the course of human events
Standard deductions were:
2. (9.8.3)--(Courtesy of Ahmet Burak Can, and Wen Bian)
There are some
technical difficulties in using one-time pad:
Standard deductions were:
Note from TA:
Many people also said that one-time-pads don’t provide any authentication. I do not believe this is a significant problem; DES keys don’t provide authentication either (see 10.10.6) and are used regularly.
3. (9.8.9)--(Courtesy of Haiya Zou)
The Diffie-Hellman Key exchange protocol works like the following:
1)Two users agree on a common large
p and a constant value g.
2)in
and compute
3)Bob select a private key in
and compute
4) to bob, and bob send
to
5), and Bob compute
,
Then:
Since , so
. Alice and Bob can choose certain agreed-upon bits from
(or
) to use as their share keys. Thus two users will have the
same shared key.
Standard deductions were:
4. (9.8.13)--(Courtesy of Ather Imran Nawaz)
Ciphertext corresponding to 0,1 and n-1 is the same as the message. Hence RSA encipherment function is an example of an unconcealed
function (a function f(x) for which at least one x exists for which x = f(x))
RSA function is Me mod
n, where M is the message and e is the public key of the recipient.
For 0, (0)e mod n = 0
mod n = 0
For 1, (1)e mod n = 1
mod n = 1
For proving (n-1)e mod n
= n – 1, we give the following argument.
(n-1)e = ne + ane-1 + …. + bn + (-1)e
where a and b are constants. As we are
moving to the right, the power of the constant term increases while that of n
decreases. a and b are abstracted as constants that
represent the entire constant term evaluation.
We note that each term other than the last term has n to
some power greater than 1. Hence when such expansion is used and each term is
evaluated mod n, the nk factor of the term
will force it to be 0.
We are only left with the last term which is (-1)e. Note that in RSA, e is a term which is
relatively prime to Ф(n). Ф(n) is equal to
(p-1)(q-1) where p and q are the two secret primes of RSA. Ф(n)
is an even number since (p-1) and (q-1) are even. Hence e has to be odd. (-1)e will always be -1.
Hence,
(n-1)e mod n = (-1) mod
n = n – 1
There do exist other messages that produce the same ciphertext
as themselves. Such messages are called unconcealed messages. The number of
unconcealed messages in an RSA system depends on the values e, p and q. A
formula exists that determines the number of unconcealed messages in an RSA
system. The formula is:
# of unconcealed messages = (1 + gcd(e-1, p-1))(1 + gcd(e-1, q-1))
Standard deductions were:
Note from TA:
I gave credit for any attempt at the second part, as the question may have been unclear. Yes there do exists other cases where messages produce the same cipher text as plain text; however, not for all keys. So the answer could be yes or no depending on how the question was read.
5. (10.10.6)--(Courtesy of Ziad El Bizri)
This protocol does not authenticate Bob and is very dangerous to use, it fails very badly to the man-in-the-middle attack. Assume the following scenario:
Mallory
contacts
Mallory receives the message and forwards it to Bob
Bob receives the message and sends $\{r+1\}k$ to Mallory
Mallory
receives the message and forwards it to
Mallory
is now authenticated as Bob for
>From this attack, we see how this authentication protocol fails.
Also, it can be even more dangerous: assume that the ``classical'' cryptosystem is based on exponentiation with a public modulus $p$ (such as RSA, Diffie-Hellman, ...). Then after another round of messages Mallory will have accumulated $r_1^k$ mod $p$, $(r_1+1)^k$ mod $p$, $r_2^k$ mod $p$, $(r_2+1)^k$ mod $p$.
Using these four messages, since $(r_1+1)^k$ mod $p$ can be rewritten as $r_1^k + kr_1^{k-1}+...+kr_1+1$ mod $p$ and $r_1^k$ mod $p$ is known, Mallory can compute $x_1 = (r_1+1)^k - r_1^k - 1$ mod $p$ which would be $x_1 = kr_1^{k-1}+...+kr_1$ mod $p$. He can do the same thing to compute $x_2 = (r_2+1)^k - r_2^k - 1$ mod $p$, or $x_2 = kr_2^{k-1}+...+kr_2$ mod $p$.\\
He can now compute $k$ by performing $k = gcd(x_1,x_2)$.
Also, if the encryption scheme uses instead a synchronous stream cipher, then assuming the last bit in $r$ is 0 (an average of two messages is needed for Mallory to find such an $r$), then this addition of 1 would be considered as a bit flipping, and this can also be used by Mallory to do an attack on the authentication scheme.
Standard deductions were:
Note from TA:
The problem here is that
There is a subtle difference between Eve pretending to be Bob, and Eve intercepting and relaying messages between Alice and Bob. In the first case, Eve is authenticated as Bob. In the second, Bob is authenticated as Bob. A number of people confused the two cases.
Also, in the future, please include a yes or no answer in your response. Arguing both ways can make grading difficult.
Also, please excuse the
6. (10.10.9) (Courtesy of John Woodfin)
If
(M^da mod na)^eb mod nb
Bob can decrypt the message using
7. (11.8.3)
a) (courtesy Dan Aiello)
n = number of bits per key
l = length of ciphertext c0
Since the key length is n bits, then the number of possible keys is 2^n. If there are 2^n entries on the table, and each is of length l, then it would take l*2^n bits of memory to store. It takes 1 unit of time to do each encryption, and since we do it for 2^n keys, it takes 2^n time units to calculate the table.
c) (courtesy of Saumya
Agarwal)
He can confirm this by using the other plaintext, ciphertext pair m1,c1 by verifying that c1 = Ex'(Ex(m1)) for x and x' got in part (b). If so, x and x' are the desired key pair, else they are incorrect.
d) (courtesy of Mercan
Karahan)
This attack depends on keeping X in memory and sorting them according to Ex(m0) and then searching for generated Dx'(c0) in the sorted list for every (X', Dx'(c0)) pair.
Maximum time spent is, time spent for generation (X, Ex(m0)) pairs plus generation of (X', Dx'(c0)) pairs and search (it is 0(1) after generation). This makes:
maxt = 2^n + 2^n = 2^(n+1)
Expected time depends on average time of search for a matching pair between Ex(m0) and Dx'(c0), which is 2^n / 2. Thus expt = 2^n + 2^(n-1)
Memory usage for both worst and expected case is the same, n* 2^n, each line has a key.