Cryptographic Primitives for Lattices