New answers tagged


Is it safe to use the cyclic group of order $p-1$ instead of one with order $q$ in ElGamal encryption? No, for small values of $p$. This is the only security issue in the question's example. For modern security, $p$ should be in the order of $2048$‑bit (rather than $4$‑bit for $p=11$ in the question), and not close to a prime power. Anything below says $512$...


The answer to your question can be found in the paper Why Textbook ElGamal and RSA Encryption Are Insecure by Boneh et al. It is an easy paper to read and worthwhile going through the details there.

Top 50 recent answers are included