Encryption/Decryption working with randomly generated keys