Cryptography is a science of coding and decoding messages for secrecy. Confident and secret messages are sent from one party to another. An enemy can intercept the messenger and can access the message content. To avoid such an incident, messages are normally coded.

There is an old story of a king who send a message to his army general in a very special way. The messenger's head was shaved and a message is painted on his head. He was sent to the general with the message on his head after a month time !.

In public key crypto system, the keys for encryption (coding) and decryption (decoding) are different. e.g. - RSA (Rivest Shamir Adleman) public key system.