This is a small application you can use to understand how Elgamal encryption works. This is a toy implementation so please don't try huge numbers or use for serious work.
Source code and Reporting Bugs
The complete source for this application is available on
GitHub.
Please report any bugs on the Github
issue tracker.
Alice's Machine
You have no messages.
You received a message from Bob.
Message is decrypted using
\[s = c{_1}^x\ mod\ p\]
\[m = c{_2}\ .\ s^{-1}\ mod\ p\] which can be rewritten \(\dagger\) as
\[m = c{_2}\ .\ s^{p-2}\ mod\ p\]
\(\dagger\) See Euler's Theorem