Lattice Cryptography: From Cryptanalysis To New Foundations