Elgamal attack example with ciphertexts I am a beginner in cryptography. I studied the Elgamal algorithm.
I know that:

p = A big prime number
g = Generator of p
a = 0&lt;a&lt;p-1
B = g^a mod p
secret key= (p,g,a)
public key= (p,g,B)
Encryption= c1=(g^k mod p) , c2=(m.B^k mod p) // 0&lt;k&lt;p-1


Now, I want to solve an exercise.

pk =9789467
g =10895499
n =16777216

c1 =C763515DF26161E21BAB53C35CE2B3B12419B5F5835D1B7B2FE761C9DF5149F4734C149944EA0B4637BBA71EB163CBA99F87611915038DEBA37650E1D69E1380CE6310D7114FD58BC605F1AF334B7044B1

c2 =C57120363903E441B7C90BEB72AFC48AD13D48D5DBF440602DB5C54CE1B490E1604251A1FF47A1D969831C05FFF7D55EAEE120EE7AECDCB0BDF9C5C9B634CACC79EA34485DAC8449D19947E70F1A276EDD


If g is generator, what is pk and n? pk and n are not prime numbers!
The exercise is not about ElGamal in the slightest. I would even call it bogus:


"$n$" would be the modulus, which is clearly not prime, being divisible by $2$.
The values $pk,g,n$ seem to be in decimal, the values $c_1,c_2$ in hexadecimal - but nowhere stated what kind of encoding is used.
It looks like exponentiation in the integers was used, but $c_1$ isn't a power of $g$
Trying around in WolframAlpha how those values were generated I got nothing, but $c_1$ isn't divisible by $n,pk$ or $g$ when considering them as decimal or hexadecimal encoding.
Is it a coincidence, that if you want to do some WolframAlpha computations with these numbers in decimal, the input field is just not long enough? $c_1$ alone fits, but it leaves you just with 5 more input characters. Using all numbers in hex works, tho.


Since the source you quoted is another question how to interpret this, this is definitely not the author.

At this point I can only suggest looking for reliable sources, e.g. exercise material from universities, textbooks or examples on Wikipedia. Looking at any kind of material where you don't know the author and the background has the potential to actually damage your learning progress.