Assuming that Elgamal is used as an encryption cipher, where lets say $p$ is 2048bit prime. Is it possible for an attacker to figure out $x$, a secret key, if any part of 2048 bits ciphertext and plaintext pair is known. Or the pattern of remaining ciphertext.
Would it be prevent if RSA is used instead ? (let's assume no padding is used for diffusion)