The confidentiality and privacy may be accomplished through encryption. Encryption may be:
Private-key or symmetric: This is based on a single key. This needs the sender and the receiver to share the same key. Both must have the key. The sender encrypts his code with a private key and the receiver decrypts the code with his own private key. This system is not suitable for large number of end users because it needs a key for every pair of individuals who require communicating privately.
Public-key infrastructure or asymmetric (PKI): This is relying on a pair of mathematically related keys. One is a public key, which is distributed to all the end users, and the other key is a private key, which is kept secretly hidden on the server. So this needs only two keys to talk to 1000 customers. This is also called Asymmetric encryption because the code encrypted by public key can only be decrypted by the private key and the code encrypted by the private key may only be decrypted by the public key.