Security II: Cryptography – exercises [PDF]

Security II: Cryptography. – exercises. Markus Kuhn. Lent 2014 – Part II. Exercise 1: Show that an encryption scheme

16 downloads 33 Views 108KB Size

Recommend Stories


[PDF] Cryptography and Network Security
Never let your sense of morals prevent you from doing what is right. Isaac Asimov

PDF Cryptography and Network Security
Just as there is no loss of basic energy in the universe, so no thought or action is without its effects,

[PDF] Cryptography and Network Security
Be grateful for whoever comes, because each has been sent as a guide from beyond. Rumi

Download PDF Cryptography And Network Security
Where there is ruin, there is hope for a treasure. Rumi

Read PdF Cryptography and Network Security
Don't be satisfied with stories, how things have gone with others. Unfold your own myth. Rumi

Read PDF Cryptography and Network Security
Don't count the days, make the days count. Muhammad Ali

Security Issues on Cryptography and Network Security
Those who bring sunshine to the lives of others cannot keep it from themselves. J. M. Barrie

Public Key Cryptography (II)
Live as if you were to die tomorrow. Learn as if you were to live forever. Mahatma Gandhi

Certificateless Cryptography II
It always seems impossible until it is done. Nelson Mandela

Calculus II Practice Exercises
Learning never exhausts the mind. Leonardo da Vinci

Idea Transcript


Security II: Cryptography – exercises Markus Kuhn Lent 2014 – Part II Exercise 1: Show that an encryption scheme (Gen, Enc, Dec) over a message space M is perfectly secret if and only if (a) for every probability distribution over M, every message M ∈ M, and every ciphertext C ∈ C with P (C) > 0 we have P (C|M ) = P (C). (b) for every probability distribution over M, every message pair M0 , M1 ∈ M, and every ciphertext C ∈ C with P (C) > 0 we have P (C|M0 ) = P (C|M1 ). Exercise 2: In the CBC mode of operation, the initial vector (IV) is chosen uniformly at random, using a secure source of random bits. Show that CBC would not be CPA secure if the initial vector could be anticipated by the adversary, for example because it is generated instead using a counter or a time-stamp. Exercise 3: Show that CTR mode is not CCA secure. Exercise 4: Your colleagues have invented a new authenticated encryption scheme that they call AES-CBC+CMAC. Their key generating function outputs a 128-bit AES key K, and their encryption function outputs CkT = EncK (M )kMacK (M ), where EncK (M ) shall be the AES-CBC encryption of M with key K (with random IV each time), and MacK (M ) shall be the AES-CMAC of M with key K. Show that this construct lacks CPA security. Exercise 5: Use Euclid’s algorithm to calculate gcd(36, 24). Exercise 6: Use Euler’s theorem to calculate the inverse (a) 5−1 mod 7 (b) 5−1 mod 12 (c) 5−1 mod 15

1

Exercise 7: Given an abelian group (G, •), let H be the set of its quadratic residues, that is H = {g 2 | g ∈ G}. Show that (H, •) is a subgroup of (G, •). Exercise 8: With RSA encryption, it is common practice to choose e as a small number (e.g., 3, 17, 216 + 1). (a) How does this affect the speed of encryption? (b) If you wanted to make decryption faster, could you simply set d to one of these three values instead? (c) How else can RSA decryption be calculated more efficiently using the Chinese Remainder Theorem and Fermat’s little theorem? Exercise 9: In the textbook RSA encryption scheme, with n = pq being a product of two different primes and ed mod ϕ(n) = 1, the identity med mod n = m, which states that we obtain the same plaintext m after encryption and decryption, is only guaranteed by Euler’s theorem for any m ∈ Z∗n , that is if gcd(n, m) = 1. (a) Show that it actually also holds for any m ∈ Zn . [Hint: CRT] (b) Conversely, if we instead had chosen n = p2 being the square of a prime number (i.e., p = q), show a simple example for the fact that in this case ed mod ϕ(n) = 1 does not imply med mod n = m for all m ∈ Zn .

2

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.