Cryptography and its types