Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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?

share|improve this question

closed as unclear what you're asking by figlesquidge, e-sushi, John Deters, owlstead, CodesInChaos Jan 29 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.

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

1 Answer 1

up vote 2 down vote accepted

No, that does not work for ElGamal. If you look at ElGamal encryption and signatures you will see that they are fairly different.

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.

That is the reason for why there exists the bad practice oft teaching signatures as "encrypting with the private key" for signing and "decrypting with the public key" for verification, since the above holds for RSA and people tend to generalize that. But thats not the general case, and, as said, is a bad practice.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.