I have been presented with a problem where I need to find a key $k$, which is the element of a Multiplicative Group $\Bbb Z_p^*$, where p is known. I further have three pairs of the form $(a_i, k*g^{a_i})$, where g is another element of $\Bbb Z_p^*$. The values of $a_i$ and $r_i = \langle k*g^{a_i}\rangle_p$ for $i \in \{1, 2, 3\}$ are known.
I believe that once $g$ is known, one can determine the value of $k$ using the fact that $\langle g^{p-1}\rangle_p = 1$ (Fermat's little theorem). Hence $k = \langle r_1*\langle g^{p-1-a_1}\rangle_p\rangle_p$.
Need help in finding out the value of $g$, or another method which yeilds the values of $g$ and $k$.