In: Computer Science
Each person's public key is known to others; Each one's private key is only known to the owner.
a. Randy sends a Plaintext P to James secretly.
Randy, first encrypts the Plain text using his private key Kr-1 , then the encrypted ciphertext is again encrypted using James' Public key Kj. Now only James can decrypt the text using his(James') private key Kj-1.
b. James verify if a Plaintext P is sent from Randy
When James receives a message, first it should be decrypted using James' private key Kj-1. To verify the received text was sent by Randy, James should again decrypt using Randy's public key Kr.
c. Randy verify if a plaintext P is sent from James and at the same time P is sent secretly from James to Randy
When James sends plaintext P to Randy, first he encrypts using his(James') private key Kj-1. Then he again encrypts using Randy's Public key Kr.
When Randy receives a message, he first decrypts using his private key Kr-1. Then to verify it was sent from James he again decrypts using James public key Kj.