The main challenge is getting the sender and receiver to agree on the secret key without anyone else finding out. They must use some creative and difficult means to prevent the unwanted from intercepting the key. In order to solve this problem the concept of public-key cryptography was introduced in 1976. Public-key cryptosystems have two primary uses, encryption and digital signatures. In this system, each person gets a pair of keys, one called the public key and the other called the private key.
All communications involve only public keys, and no private key is ever transmitted or shared.
When Alice wishes to send a secret message to Bob, she looks up Bob s public key in a directory, uses it to encrypt the message and sends it off. Bob then uses his private key to decrypt the message and read it. No one listening in can decrypt the message. The output is called a digital signature and is attached to the message. To verify the signature, Bob does a computation involving the message, the purported signature, and Alice s public key.