Programs, secrets and lattices