# ElGamal encryption with private key [closed]

Does the encryption with a private key and decryption with a public key works in ElGamal likewise what is done when we use RSA for sender authentication?

-

## closed as unclear what you're asking by figlesquidge, e-sushi, John Deters, Maarten Bodewes, CodesInChaos♦Jan 29 '14 at 21:00

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Did you do any research before posting this question? (just wondering...) – e-sushi Jan 28 '14 at 1:00

That works for RSA because RSA is commutative, i.e., $f_{d,n}(f_{e,n}(m))=f_{e,n}(f_{d,n}(m))$ for all $m\in Z_n$ holds, where $f_{e,n}(m):=m^e \mod n$ is the enryption function and $f_{d,n}(m):=m^d \mod n$ the decryption function. You can easily convince yourself that this holds.