The mathematical algorithms used to encrypt data are called ciphers. The public key encrypts data, but it cannot decrypt the same data. Only the private key can decrypt material that is encrypted with the public key. A host publishes its public key so that anyone can use it to encrypt material directed to that host. The host uses its private key to decrypt the material, and guards this key carefully.
Symmetric cryptography requires only one key.
Under this scheme, the sender and the recipient share the same key and use it for both encryption and decryption. In order for two parties to share the same key, one must communicate it to the other privately. To do so, they use a public key algorithm to encrypt the symmetric key in a way that only a specific recipient can decipher. Symmetric algorithms are faster than asymmetric ones, but asymmetric algorithms are required to maintain privacy during the exchange of the faster symmetric keys. To preserve both efficiency and privacy, secure Web transactions begin with a public key exchange, followed by the exchange of a session key that follows a faster, symmetric algorithm.