You can use the \(\text{TRNG64}\) function to obtain a cryptographically secure random 64-bit unsigned integer.

You can use the \trng64 backslash command to insert this function.

The following variants of this function are available:

  • \(\text{integer } \text{TRNG64} \left ( \text{<any value>} \right )\)

The \(\text{TRNG64}\) function requires an arbitrary parameter that will be ignored.

The function returns a cryptographically secure random number over the range [-9223372036854775808, 9223372036854775807].

The \(\text{TRNG64}\) function uses the operating system’s cryptographic source of entropy. Note that the OS cyptographic entropy sources may be slow due to the underlying algorithms and available entropy.

\[a = \text{TRNG64 } 0 \;\;\;\;\; \text{a = -7750958375645433701}\]