This shows you the differences between two versions of the page.
sasc:laboratoare:04 [2017/03/15 08:04] marios.choudary |
sasc:laboratoare:04 [2017/03/16 16:21] (current) marios.choudary |
||
---|---|---|---|
Line 20: | Line 20: | ||
The advantage $\mathsf{Adv}$ captures the adversary’s ability to distinguish the two experiments. If the advantage is $0$ then the adversary behaves exactly the same in both experiments and therefore does not distinguish between them. If the advantage is $1$ then the adversary can tell perfectly what experiment it is in. If the advantage is negligible for all efficient adversaries (as defined in class) then we say that the two experiments are indistinguishable. | The advantage $\mathsf{Adv}$ captures the adversary’s ability to distinguish the two experiments. If the advantage is $0$ then the adversary behaves exactly the same in both experiments and therefore does not distinguish between them. If the advantage is $1$ then the adversary can tell perfectly what experiment it is in. If the advantage is negligible for all efficient adversaries (as defined in class) then we say that the two experiments are indistinguishable. | ||
- | a. Calculate the advantage of each of the following adversaries: | + | Calculate the advantage of each of the following adversaries: |
* A1: Always output $1$. | * A1: Always output $1$. | ||
* A2: Ignore the result reported by the challenger, and randomly output $0$ or $1$ with even probability. | * A2: Ignore the result reported by the challenger, and randomly output $0$ or $1$ with even probability. | ||
Line 27: | Line 27: | ||
* A5: If HEADS was received, output $1$. If TAILS was received, randomly output $0$ or $1$ with even probability. | * A5: If HEADS was received, output $1$. If TAILS was received, randomly output $0$ or $1$ with even probability. | ||
- | b. What is the maximum advantage possible in distinguishing these two experiments? Explain why. | ||
==== Exercise 2 (4p) ==== | ==== Exercise 2 (4p) ==== | ||
Line 37: | Line 36: | ||
* c) Let $K_3 = \{0, 1\}^{n+1}$. Construct a new PRF $F_3 : K_3 \times X \to Y$ with the following property: the PRF $F_3$ is secure, however if the adversary learns the last bit of the key then the PRF is no longer secure. This shows that leaking even a single bit of the secret key can completely destroy the PRF security property. | * c) Let $K_3 = \{0, 1\}^{n+1}$. Construct a new PRF $F_3 : K_3 \times X \to Y$ with the following property: the PRF $F_3$ is secure, however if the adversary learns the last bit of the key then the PRF is no longer secure. This shows that leaking even a single bit of the secret key can completely destroy the PRF security property. | ||
<note tip> | <note tip> | ||
- | Hint: Let $k_3 = k \| b$ where $k \in \{0,1\}^{n}$ and $b \in \{0,1\}$. Set $F_3(k_3,x)$ to be the same as $F (k, x)$ for all $x \neq 0^{n}$. Define $F_3\left(k_3, 0^{n}\right)$ so that $F_3$ is a secure PRF, but becomes easily distinguishable from a random function if the last bit of the secret key $k_3$ is known to the adversary. Prove that your $F_3$ is a secure PRF by arguing the contra-positive, as in part (b). | + | Hint: Let $k_3 = k \| b$ where $k \in \{0,1\}^{n}$ and $b \in \{0,1\}$. Set $F_3(k_3,x)$ so that $F_3$ is a secure PRF, but becomes easily distinguishable from a random function if the last bit of the secret key $k_3$ is known to the adversary. Prove that your $F_3$ is a secure PRF by arguing the contra-positive, as in part (b). |
</note> | </note> | ||
- | * d) Construct a new PRF $F_4 : K_3 × X \to Y$ that remains secure if the attacker learns any single bit of the key. Your function $F_4$ may only call $F$ once. Briefly explain why your PRF remains secure if any single bit of the key is leaked. | ||
==== Exercise 3 (2p) ==== | ==== Exercise 3 (2p) ==== | ||
Line 54: | Line 52: | ||
We defined security of encryption scheme E against an eavesdropper in two ways: | We defined security of encryption scheme E against an eavesdropper in two ways: | ||
- | * $|Pr[A(c_b)=b]| \le negl(n)$ | + | * $Pr[A(c_b)=b] \le \frac{1}{2} + negl(n)$ |
- | * $|Pr[A(c_1)=1] - Pr[A(c_0)=0] \le \frac{1}{2} + negl(n)$ | + | * $|Pr[A(c_1)=1] - Pr[A(c_0)=1]| \le negl(n)$ |
where $A(c_i) = j$ means that when the adversary receives the encryption of message $i$ he returns the bit $b'=j$. | where $A(c_i) = j$ means that when the adversary receives the encryption of message $i$ he returns the bit $b'=j$. | ||
Show that the two are equivalent. | Show that the two are equivalent. | ||
+ | |||
+ | <hidden> | ||
+ | Hint: start from the first form ($Pr[A(c_b)=b] \le negl(n)$) and develop the probability as | ||
+ | $\frac{1}{2}Pr[A(c_0)=0] + \frac{1}{2}Pr[A(c_1)=1]$. | ||
+ | Then replace $Pr[A(c_0)=0]$ by $1 - Pr[A(c_0)=1]$. | ||
+ | </hidden> | ||