## Data Encryption

#### What is Data Encryption?

A DBMS can use encryption to protect the information in certain situations where the normal security mechanisms of the DBMS are not adequate. For example, an intruder may steal tapes containing some data or tap a communication line. By storing and transmitting data in an encrypted form, the DBMS ensures that such stolen data is not intelligible to the intruder. Thus, encryption is a technique to provide privacy of data.

#### How does Data Encryption work?

In encryption, the message to be encrypted is known as plaintext. The plaintext is transformed by a function that is parameterized by a key. The output of the encryption process is known as ciphertext. The ciphertext is then transmitted over the network. The process of converting the plaintext to ciphertext is called Encryption and the process of converting the ciphertext to plaintext is called Decryption. Encryption is performed at the transmitting end and decryption is performed at the receiving end. For the encryption process, we need the encryption key and for the decryption process, we need the decryption key as shown in the figure. Without the knowledge of the decryption, the key intruder cannot break the ciphertext to plaintext. This process is also called Cryptography.

#### Types

Here are two types of symmetric and asymmetric encryption. The name derives from whether or not the same key is used for encryption and decryption.

Symmetric encryption

In symmetric encryption, the same key is used for encryption and decryption. It is therefore critical that a secure method is considered to transfer the key between sender and recipient.

Asymmetric encryption

Asymmetric encryption uses the notion of a key pair: a different key is used for the encryption and decryption process. One of the keys is typically known as the private key and the other is known as the public key.