Principles of Lattice Cryptography, and cryptanalysis by lattice reduction