Laid out functions necessary for decryption func