Reputation: 127
In many websites and textbooks they say that public key is always used for encryption and private key is used for decryption.In RSA algorithm ,this is true.But in digital signatures,the sender signs(I believe that this is a somewhat similar to encryption,please correct me if this was wrong)the document using his private key and receiver uses the public key contained in the document to decrypt(verify) it.So,can this be generalized that public /private keys maybe either used for encryption or decryption based on our application? Or is there some other concept involved here?
Upvotes: 0
Views: 607
Reputation: 39291
Digital signature and encryption use similar cryptographic operations (not equals) but they have a different purpose:
encryption: hide the data
digital signature: integrity of the data and identity of the signatory
Answering your question, a digital signature operation "signs" the data with the private key. It is not encrypted in any way (the content is not hidden). The public key is used to verify that the signature corresponds with the original data and the signatory.
Upvotes: 1
Reputation: 5207
Sure. This is how digital signature works. If the answer is too short, let me know, I provide more details.
Upvotes: 1