1. Apparatus for computation, comprising: a processor, which is configured to expand input seed values into respective output data values using an approximated expansion process such that the output data values are not guaranteed to satisfy a required output data criterion; and a non-volatile memory, which is programmed to store a seed value, which is selected so that an output data value generated by the processor by application of the approximated expansion process to the stored seed value yields an output data value that satisfies the required output data criterion; wherein the approximated expansion process comprises finding a vector basis of a lattice using the seed value, and deriving the output data value from the vector basis by applying a modified Lenstra-Lenstra-Lovasz (LLL) algorithm to the lattice without swapping two vectors of the basis.