I have this exercise and I'm stuck on the last question (I'm translating it from French so excuse me if I use incorrect terms) :
Lets assume an El Gamal cryptosystem. Alice choose $p = 11$ and $g = 3$. She also choose $ a = 4 \\$
What is Alice public key : $(11, 3, 3^4)$
Bob wants to send Alice the message $m = 2$, he choose $b = 5$. What is the encrypted message ? : $(3^5, 2 \times 3^{4 \times 5}) $
How does Alice decrypts the message ? Retrieve the original message
i'm stuck at question 3
i know i must find $(g^b)^a$ inverse which is $ g^{-ab}$. Which i can calculate by raising $g^b$ to the power $a(p-2)$
because
$\forall y \in \mathbb{Z/pZ} \neq 0, y^{p-1} = 1$
then $\\ y^{-1} = y^{p-2} $ in $\mathbb{Z/pZ}$
Then all i have to do is multiply $g^{-ab} \times mg^{ab}$ to find m but I'm ending with too high numbers.
Am I calculating the inverse wrong or is my mistake somewhere else? If somebody could pinpoint it I'd be glad