I read the following about PKI:
Using a public key system, a user may encrypt a portion of a document using his or her private key. This message will later be decrypted by the recipient using the sender’s public key. Assuming that the sender’s private key is secure, the recipient can assume basic authenticity of the encrypted portion of the document in that only the sender holds the private key used to encrypt the message. Thus, the encrypted portion of the message is said to have been “digitally signed” by the sender.
I have a few questions about the following line:
This message will later be decrypted by the recipient using the sender’s public key
Let's say I have the sender's public key. And let's say I have "satan's" public key also (which does not belong to the original sender).
I thought that the private key is used for signing and deciphering/decrypting, so why does it say that "a user may encrypt a portion of a document using his or her private key"?
If I try to decrypt with the sender's public key (as written above), how do I know that the message hasn't been altered? And how do I know that the decryption has succeeded?
What will be the result if I try to decrypt the message using "satan's" public key?
No data ?
Error indicating incorrect key?
Gibberish data?