AMDG On 04/18/2014 02:00 AM, Thijs van den Berg wrote:
This algorithm is what they call the 4x64 variant. The paper also talks about a 2x64 and 4x32 variants (but e.g. not 8x32, 2x32). However I’m not sure if we need to implement all the variant the’ve studied (maybe yes, maybe no). They recommend 4x64 with 20 rounds as the best choice for CPU’s and that’s the main one I want to provide.
If the algorithm is basically the same and only differs by some constants in the mixing function, then these constants can be turned into template parameters. If the differences are more significant, then it should be handled by a separate engine template, and there's no need to worry about it at this point.
AFAIK the state and the return_type need not be the same. Any 32 bit engine can be turned into a 64 engine by patching two returns together.
This can be done outside of threefry by independent_bits_engine. In Christ, Steven Watanabe