CS 4953 -- Cryptography
Final Exam
Wednesday, 8 May 2002, 8 am - 10:15 am
Please try to give your answers on the lines provided below.
In each case you should show your work for full credit.
(An incorrect answer with proper work might get full credit.)
Part I: Preliminaries
- In the field consisting of the integers mod 37, what is
the definition of the multiplicative inverse of 14?
- In the integers mod 37, state how you would use the
Extended Euclidean Algorithm to find the multiplicative
inverse of 14. (Don't actually find the inverse, just say how you
would do the calculations. There is no credit for just writing
down the inverse.)
- State Fermat's Theorem and verify that it is true
for a = 3 and p = 7. (Show your work.)
- By any method, find 21024 mod 7?
(But you must show your method, and not just write down an answer.)
Part II: Coding and Information
Theory
- Contrast the two kinds of coding: source coding (compression)
and channel coding (coding for errors).
- What does the entropy of a message say about compression?
(In the absense of noise.)
- What special property does Verhoeff's Decimal Error Detection
scheme have that the other simple decimal error detection schemes
do not have (those using a single decimal check digit)?
Part III: Introduction to
Cryptography
- A question about the One-time Pad:
- What is the major disadvantage of the one-time pad?
- Why might one want to use the one-time pad anyway?
Part IV: Public Key
Cryptography
- (This question is somewhat similar to Rabin's public key
cryptosystem.) Bob wants to flip a coin with Alice, where
there should be only two possible outcomes: Bob "wins the toss"
or Bob "loses the toss", each with probability 0.5.
Unfortunately, Alice and Bob are connected only by a communications
line, they have no friend to flip for them, and they don't trust each other.
Use the following protocol:
- Alice selects large primes p and q, each
with remainder 3 when divided by 4. Alice calculates
n = p*q and sends n to Bob.
- Bob picks a random number a (between 1 and n),
and sends x = a2 mod n to Alice.
- Alice uses Rabin's formulas to find the 4 square roots
of x, and picks one of them at random (call it y), and sends
y to Bob.
- If y is either the original a or is n - a,
then Bob knows he has lost the toss. He asks Alice to send him the two
factors of n, and
Alice wins once Bob can verify that they are indeed the factors
and that she has not cheated.
- Otherwise, Bob calculates
gcd(x + y, n). This will be a factor
of n, and so Bob can determine both p and q,
and he sends the factors of n to Alice, winning the toss.
Consider the "toy" specific case of p = 7, and q = 11.
- Do these values meet the criteria above?
What does Alice send to Bob in this case?
- Suppose Bob chooses a = 31.
What value x does Bob send to Alice?
- It turns out that the four square roots of x are
24, 31, 46, and 53. What might Alice send back to Bob?
- Which two cases are the ones listed above in which
Bob loses the toss?
- Show that in the two remaining cases, Bob can calculate
a factor of n using the method above, and so in these
cases he will win the toss.
Part V: Random Number
Generation
- What is the general form of a linear congruence generator?
(Just show what it looks like, without specific numbers.)
Part VI: The Advanced Encryption
Standard
- This question concerns the AES key.
- Explain briefly how the key is used during AES encryption.
(You should include the terms key expansion and
round in your explanation.)
- How is the action in part a. reversed during decryption?
Part IX: Identification and Key
Distribution
- Suppose that H is a one-way function, and that
Pi is a collection of passwords for
1 <= i <= n.
- In a typical Unix setting,
explain what is stored in the password file.
- Explain how to search efficiently for passwords that match entries
in an online dictionary.
- Explain what a salt is and how to use it to make
the search for passwords much harder.
- Your company has its own new proprietary block cipher SLAM
with characteristics similar to the AES: 128-bit blocks and keys.
You say you're worried about SLAM's security, but they say they have
to use SLAM to justify the expense of developing it (the developer of
SLAM is the nephew of the CEO). They propose the following:
they will use ECB mode and encrypt the first block of a message
with SLAM, the second with AES, and so on alternating, using the
same key for both ciphers.
- There are at least three major things wrong with this idea.
Give as many as you can, and explain why each aspect is bad.
- What should they do instead, assuming they have to use SLAM
(to keep the CEO happy)?
- Suppose A ("Alice") has registered her public RSA key with
a public trusted server T. A then wants to prove to
B ("Bob") that she really is A.
- Exactly what will A be leaving with T ?
- What is the simplest thing A could do to prove to
B that she is really A?
- What is a replay attack in this setting?
- What can A and B do to protect against replay attacks?
- This question is concerned with threshold schemes.
- Explain in complete detail how a user A can use a
threshold scheme to maintain
two shares of a secret password "aragorn" on two separate
systems, where both shares are needed to recover the password.
- Assuming an opponent cannot obtain both shares, how secure
is the password?