1
$\begingroup$

Possible Duplicate:
CPA Secure Chosen plaintext scheme

The example for IND-CPA secure schemes given is generally:

for a random r,

$Enc_k(m) =(r|| E_k(r)$ $XOR$ $m)$ where $E$ is a $PRF$

But does the role of r and k really matter--i.e. isn't this equally secure?

$Enc_k(m) =(r|| E_r(k)$ $XOR$ $m)$ ?

$\endgroup$