CS 4953 -- Cryptography
Mid-term Exam
Wednesday, 20 March 2002
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
- Exclusive-Or:
Start with a and b, and set
c = a xor b, where the variables are single
booleans or bit strings. Show a simple way to write a in
terms of b and c using xor.
Show why your formula works using properties of xor.
- Logarithms:
Calculate about how many binary bits are required to represent a
12-digit
number? For full credit you must explain briefly why your answer
is correct. (Use your knowledge of
log10(1012),
and the fact that log102 = 0.3. Actually
log102 = 0.3010299... but
0.3 is close enough.)
- The integers mod n as a group,
Zn:
Find the additive inverse of the element 10
in the group Z14.
- The integers mod p as a field,
Zp:
Assuming that p is a prime, does every element of
Zp have a multiplicative inverse?
(Yes or no). If "no", which element or elements do not have a
multiplicative inverse?
- The Extended Euclidean Algorithm:
Find integers x and y such that
x*8 + y*19 = 1. (Big hint: y = -5.)
Use this result to find the multiplicative inverse of
8 in Z19.
- Fermat's Theorem:
If p is a prime, what is
ap mod p equal to?
Find the value of 143737 mod 19.
- Euler's Theorem:
Find the value of 25802 mod 15.
- The Fast Exponentiation Algorithm:
For a random n-bit exponent, approximately how many
multiplications (including squarings) are needed on the average,
using one of the fast exponentiation algorithms?
- The Simple Test:
Suppose the following is true for a large random integer
n:
3n-1 mod n is not equal
to 1.
What does this say about n?
Part II: Coding and Information
Theory
- Entropy: Suppose there are 3 messages
with probabilities 0.5, 0.25,
and 0.25. What is the entropy in this case?
- Channel Capacity: Using the binary symmetric (noisy) channel,
assume that the channel capacity is 0.25.
Intuitively, what does this imply about the performance of the channel?
In particular, using a 56K bit per second channel, how much information
could you get through this channel?
- ISBN Decimal Error Detection:
The ISBN number of a book uses the following check equation:
(10*a0 + 9*a1 + 8*a2 +
7*a3 + 6*a4 + 5*a5 +
4*a6 + 3*a7 + 2*a8 +
a9) mod 11 = 0.
Suppose the data digits of an ISBN number are 014004656.
Determine the value of the final digit, labeled
a9 above, so that the check equation is true.
- Verhoeff's Decimal Error Detection:
Using # as the group operation, the group
used in Verhoeff's scheme has the property
that 2 # 9 = 6, while 9 # 2 = 7.
What is the name of this property? Is it true that
a # b and b # a are different
for any two distinct group elements a and
b?
Part III: Introduction to
Cryptography
- Cryptograms:
Is it hard to break a cryptogram? Give at least two facts about
cryptograms that make it easier to break them.
- Cryptography terminology:
Briefly explain the difference between a
known plaintext attack and a chosen plaintext attack.
- Caesar cipher, Beale cipher, One-time Pad:
For each of these three example ciphers, say how hard it is to break?
- Block ciphers:
Consider the CBC mode of operation. What is the
initialization vector?
Give two important properties of the CBC mode.
Part IV: Public Key
Cryptography
- Merkle's Puzzles:
Suppose Bob is using this to communicate with Alice, and that
Boris is listening in. Bob sends Alice a large number of puzzles.
Why is it that Alice only needs to break (or solve) one of the
puzzles, but Boris has to break half of them on the average?
- The Diffie-Hellman Distribution System:
This system essentially uses exponentiation as a cryptosystem,
so that if M is a message, then the ciphertext
is computed as C = aM mod p for some
public integer a and public prime p.
What essential property does this cipher have that allows
it to be used in this distribution system?
- Public Key Cryptography:
Explain how Alice uses a public key cryptosystem to send a secret
message to Bob, and how Bob reads the message.
- The RSA Cryptosystem:
Various details about RSA:
- Basic parameters for RSA:
Each RSA user chooses large random primes p and
q and calculates the product n = p*q.
- What simple value is commonly used for the encryption exponent? ____________
- With this exponent, what must then be true about
p-1 and q-1?
- What equation does the decryption exponent satisfy?
- How do you encrypt? (Give equation) _________________________
- How do you decrypt? (Give equation) _________________________
- How is the extended Euclidean algorithm used in RSA?
- How does the speed of RSA compare with that of a conventional
block cipher such as the AES?
- By what factor does the variation of RSA using the
Chinese Remainder Theorem speed up ordinary RSA? _______________