In conventional encryption/decryption methods, the decryption algorithm is always the inverse of the encryption algorithm and uses the same key. Anyone who knows the encryption algorithm and key can deduce the decryption algorithm.
For this reason, security can be assured only if the entire process is kept secret. In cases where there are many senders and one receiver, however, this level of secrecy can be inconvenient. For example, imagine that a bank wants to give customers remote access to their accounts. To limit each customer's access to only his or her own account using conventional encryption, the bank would have to create millions of encryption algorithms and keys. This solution is impractical, particularly with old customers leaving and new customers joining the bank all the time. On the other hand, if the bank were to give the same encryption algorithm and key to every customer, it could not guarantee the privacy of any customer.
The solution is public key encryption. With this method, every user has the same encryption algorithm and key. The decryption algorithm and key, however, are kept secret. Anyone can encrypt information, but only an authorized receiver can decrypt it. The decryption algorithm is designed in such a way that it is not the inverse of the encryption algorithm. The encryption and decryption algorithms use completely different functions, and knowing one does not enable a user to know the other. In addition, the keys are different. Even with this encryption algorithm and encryption key, an intruder still will be unable to decipher the code (at least not easily).
With public keys, the encryption algorithm and key are publicly announced. Every customer can use them. The decryption algorithm and key are kept secret and used only by the parties involved. The RSA technique (in the following section) provides an example of the steps involved with public key encryption.