How private key is different from public key??
A public key is only used to encrypt messages not decrypt. A public key is published so that anyone can send a particular receiver a secure message. A private key can be used to decrypt messages encrypted with a matching public key. As the term suggests, private keys are intended to be secret.