Tillämpad Datasäkerhet

advertisement
Applied Security DAVC17– Assignments Cryptography
If the information needed to solve these questions cannot be found in the course literature
or in the lecture notes (available from afternoon 13/4). Feel free to use other sources of
information, e.g. Internet, for additional information. If you encounter problems with the
assignments, feel free to contact the teacher
1) Different modes of encryption
a) What’s the main difference between a block cipher and a stream cipher?
b) What is the difference between ciphers based on substitution and
transposition, respectively?
c) What is the main difference between ciphers and codebooks? What is the
general weakness of codebooks?
d) Consider electronic code book mode (ECB) for encryption. Why is it called
an electronic code book? Describe a weakness in this scheme that a
cryptoanalyst could exploit.
e) Consider cipher block chaining mode (CBC). What is the primary difference
between CBC and ECB?
2) Diffusion, Confusion, Feistel Cipher Structure
a) What is the idea of diffusion in the context of symmetric ciphers?
b) What is the idea of confusion in the context of symmetric ciphers?
c) What is the Feistel Cipher Structure? Describe one nice feature of the Feistel
cipher structure regarding the encryption/decryption algorithms. Is DES and
AES Feistel ciphers? Motivate.
3) Basic hash functions
a) One simple hash algorithm is based on bit-wise XOR (see Stalling, page 60).
Use this algorithm to calculate a 4 bit hash value for the following bit string.
Draw your solution.
0010 1001 1110 1010 1110 0110
b) What is the main weakness with this simple hash algorithm?
c) What properties are required from a cryptographic Hash algorithm
4) Entropy and perfect confidentiality
Entropy is a measure of the uncertainty in a message. In cryptography this
measure is used to determine how well cryptographic transformations on a
message obscure the meaning of the message.
a)
Define the term entropy.
b) What does it entropy measure?
c)
Define perfect confidentiality in terms of entropy.
d) The one-time pad is a perfect cipher. Explain why a brute-force attack (trying
all possible keys on the ciphertext) does not work with the one-time pad. Also
briefly describe two important reasons why the one-time pad does not work in
practice.
5) Asymmetric encryption
a) What is the key exchange problem in symmetric cryptography?
b) How can this be solved in a simple way with asymmetric encryption?
c) What mathematical assumptions underlie the RSA algorithm?
d) What mathematical assumptions underlie the DSA algorithm?
6) Classical cryptoanalysis
a) The Caesar cipher is a substitution cipher, which was used by Caesar’s
military troops in ancient Rome. Use your skills of cryptoanalysis to decrypt
the following English message encrypted with Caesar cipher with general
shift.
PDEO EO W OAYNAP IAOOWCA
Hint: the underlined parts of the encrypted message can help you solve this
problem very fast.
b) What is the key space of the Caesar cipher (with general shift)? Is this enough
against a cryptoanalyst equipped with modern computers?
c) What kind of cryptographic technique could you use to break monoalphabetic
substitution ciphers, like the Caesar cipher?
7) Applied Diffie-Hellman Key Exchange Example
The Diffie-Hellman Key Exchange is described in the Network Security
Essentials (p. 75 and onwards) course book.
In the same manner as the applied example of Diffie-Hellman Key Exchange in
the book, show how to users A, and B can exchange keys using prime number q =
97, and as a primitive root of 97, use α = 5. A and B have the following two secret
keys: XA = 36 and XB = 58.
8) Applied RSA Example
The RSA algorithm is described in the Network Security Essentials (p. 72 and
onwards) course book.
In the same manner as the applied example of RSA in the book, show how the
plaintext message M = 19 is encrypted. Use p = 7 and q = 17 as prime numbers.
Download