I am a student in computer science currently working on a problem set in cryptography (practical problem but stuck on the math part).
Basically, suppose we receive a message that has been encrypted using ElGamal's crypto system and our goal is to decrypt and completely recover the message.
The initial plaintext is a sequence $p_1p_2\ldots p_m$. We are given a hashed version of the public key SHA256$(g^s)$ (so $s$ is the private key and $g^s$ the public one). For the encryption, it is said that an $r_1$ value is sampled uniformly at random and then for some given value $u\in\mathbb{Z}_q$, $r_i=u^{i-1}r_1$ for all the remaining $i$'s. The cipher text is then $c_i=(g^{r_i},p_ig^{r_is})_{i\in[m]}$.
Overall, we are given $p$, $q$, $g$, $u$, the hashed public key $H$ and the cipher text $c_i$ as a tuple.
The problem I have is that I don't really see what computations we have to do in order to recover the entire original sequence. One of the assistants told me to find some $p_i$'s and then use them to decrypt the cipher but I don't see where that brings me.
The $r$'s are unknown and even if we know $g^{r_i}$, as we are given rather huge values, we can't compute the log.
I am a little lost here to be honest (I don't have an enormous background in algebra) so if someone has some advice on what I should do, I would truly appreciate it.
Thanks :)