rand: the thox random and entropy production daemon#

Todo

Describe how this daemon manages its entropy and everything; and see Randomness and entropy for more information.

Todo

Write about randomness and entropy generation in ComputerCraft, use sources currently listed in OPUS and OneOS protocols’ description. Mersenne Twister as well?

Also add information about pure Lua cryptography, used algorithms amongst protocols, how effective they are, how proved they are or not, which LuaRocks modules they depend on, etc.

rand RPC calls#

The RPC calls provided by rand are the following:

os.rpc.random.random()#
Returns:

A random number within the [0.0, 1.0[ range.

Return type:

number

os.rpc.random.randint(min, max)#
Parameters:
  • min (number) – Minimum value, included in the interval.

  • max (number) – Maximum value, excluded from the interval.

Returns:

A random integer within the [min, max[ range.

Return type:

number