Cryptography is the most crucial part of the IP Sec. It’s nothing but a simple mathematical algorithm which is used to change the original values so that no one other could understand it. The function or algorithm aka as cipher. With the help of cryptography IP Sec converts the human readable format in mathematical form and forwards over the untrusted network. Once the data is received by receiver, IP Sec decrypts the data from mathematical form to human readable form.
Encryption and Decryption is of two types:-
a) Symmetric Encryption
b) Asymmetric Encryption