Defense against adversarial attacks using machine learning and cryptography