Just started learning about Cryptography and Network Security in general, and I can't seem to grasp the understanding of the following question. Please correct me if I am misunderstanding anything.
Imagine that there exists a Pseudorandom Generator that simply doubles all key length, G(n) = {0,1}^n -> {0,1}^2n
. If I have a key k
and send it over to G, I now have an encrypted G(k) = k'
, and k'
is twice the length of k
. If I have a message m
, encrypt it with k'
with m XOR k'
, is it CPA secure or not?
I understand that with a CPA attack, the attacker can send any plaintext into the encryption mechanism and receive a ciphertext out of it.
My confusion is that, in the case above, what exactly is the attacking sending the plaintext into? Is it the Pseudorandom generator? Does the attacker know what type of pseudorandom generator it is? But since the attacker doesn't even have the original cipher-text or the original key, what use is it for the attacker to keep on sending his own plain-texts and get back his own cipher-texts?
Sorry if this is very confusing, but I really want to understand this before moving onto more advance topics.
k
(because they are attacking the mechanism in general), or can generate ciphertexts from a complete system including a secretk
that they wish to attack. I suspect the question assumes the latter. $\endgroup$