mirror of
https://github.com/zama-ai/fhevm-solidity.git
synced 2026-04-17 03:00:47 -04:00
Add overloads of TFHE.randEuint() methods that accept an upper bound, e.g. TFHE.randEuint32(uint32 upperBound). The returned integer will be in the [0, upperBound) range. Moreover, upperBound must be a power of 2 - that is a design choice for performance reasons. Note that, as of now, the random numbers are generated in the plain and are completely public and predictable. An FHE version is coming soon. Add tests to cover above functionality.