# Hybrid Encryption

Hybrid in simple terms is the combination of two or more things. Here, as the name depicts Hybrid encryption is the combination of symmetric and Asymmetric encryption.

## **Symmetric key algorithm:**

It is a type of algorithm that uses only one key to encrypt and decrypt the data.

**Example Algorithms:** AES, DES, Blowfish, RC4, RC5 etc.

### **Encryption:**

![](https://lh5.googleusercontent.com/XWpCEX1TFif27V9RhyV8YkQzdPKm6HZ_LmyGwG473QSQEPBZrla9-b3Kh3lCEtZxNlJu2O6vNMXrtI-R_-3sXpQwa0XdbXkT6JGUwDbAJmsMCFFFYQ4i6vd8hN894RlxG8ia7LFBVOpmYGMP2A-I35dmbxKcqiXvhPK5K6lLsB058BD6VvIkfOkv1K27vQ align="center")

### **Decryption:**

![](https://lh4.googleusercontent.com/Ux5NKCLQOD0eiHvgmNq40GzeLDXI17QPXyQ6wgREeNuP7X_2quEU8FSeNKO4GsDXZq76x8eiRw6M55Blq1G2lSySrM9ItDDwBWjd3lo2SCXujxNkyUDOCNFsj0tvb0OcA1I9YsC_jM6oz6piBRmdnJTi_9dZD1_ezKFLqA06upxSgFHfZ1p0TQxcw2I34A align="center")

## **Asymmetric key algorithm:**

It is a type of algorithm that uses different keys to encrypt and decrypt the data. An asymmetric algorithm uses public keys to encrypt and private keys to decrypt the data.

**Example Algorithms:** RSA, DSA, Diffie Helmen key exchange, Elliptic curve cryptography etc.

### **Encryption:**

![](https://lh3.googleusercontent.com/85fz8xUPEYY3FlZiXE2yABdyQxuq3zA2lUl2C0plEzt8AABXRLP_F62rJDmJFC-ppYk1VkhM3JTPPzHbG3CXQvEbrZV6GSqfp1nBa9Ynv8hqCiSSb8nnCH3CKieUWW5kQglfJULXfW45XsWBNGttgl0MLcpEm4YjSC-0Cpfssycr6huf5E8CKFOVPBKhzw align="center")

### **Decryption:**

![](https://lh5.googleusercontent.com/0GDmwI6riUhYOsqkVM4_q-cSf_-TOSqdzgNnkrGbrv4LvGVPtYpwN7ZPJnfLmuxCz_6nz8Fq6CkFjkhZMXLW51MfwJ91Bsxh9cucZjUOTxU0IrwUeln_5njRZYb_o8buEwnkWnJ5acvPZgu-Q624onp59jy7YhrfohLSmOzBJWWIOTqoaIi_t-jYWV7MjA align="center")

## **Hybrid encryption:**

In this illustration, **RSA**(Asymmetric key algorithm) and **AES**(Symmetric key algorithm) algorithms are hybridized to ensure a double layer of security.

### **Encryption:**

* Encrypt the data using AES secret key
    
* Encrypt the AES secret key with the recipient’s RSA public key.
    
    ![](https://lh6.googleusercontent.com/XRmabv2XySfvG-CG3n7yjBBFBfWkmoVKYfdbnKGLDX46A8xdxVWWEIlO8ZMRVcQzR2pTvZZLQETPUToOozR0Q7O8-4yfK8UMoc4zP82HyDAKqKagHIW8dkQX5SCfntAFCdp6QzN6WF0JHh7ZuS-imnZllY4wSvSqy40yabhid5hylS_Ps4RNvj-JEvYwHQ align="center")
    

### **Decryption:**

* Decrypt the encrypted AES secret key with the recipient’s RSA private key to get the original AES secret key.
    
* With the original AES secret key, decrypt the encrypted data.
    
    ![](https://lh3.googleusercontent.com/bZWXECXlsAK1vJMfz_48z1OKJChqWTCDnq9ve4bRdnITYARzDOxq6Lpbi8XEKW4GOQqDvVTSOmDfk0JK7yPVU_6-HEBuuboWH1f-8gq-Frs1yGPK0iev1gdRXrkeDHlMUxxSvTnHhl_8d3h_8uZcyJJ0Hft06maRwRtWedphBX7wou5cLkJWh8f80yescQ align="center")
    

Instead of encrypting and decrypting the data with the same AES secret key, a layer of protection is added with asymmetric algorithms to prevent any attacks.

## **Advantages of Hybrid encryption:**

* AES’s fastest ability and RSA’s complex mathematics together make the hybrid encryption very strong and secure.
    
* No need to share the AES secret key. Instead, RSA public key is shared.
