A Cryptographic Perspective on Mitigation vs. Detection in Machine Learning