External Random Source

As default, an MPC node in Builder Vault obtains its randomness from the operation system:

  • Linux, FreeBSD: getrandom(2) if available, /dev/urandom otherwise
  • OpenBSD: getentropy(2)
  • Unix-like systems: /dev/urandom
  • Windows: CryptGenRandom API

As an alternative, you can enable the following section in the MPC node configuration file:

[Randomness]
	Device = "/dev/urandom"

When enabled, the MPC node will read its randomness from the specified file, e.g., when generating new key shares.

It is recommended to leave this section out of the configuration file, unless you have a specific reason to use an external source.

Examples

Examples of how to generate a HSM Entropy source based on an PKCS #11 compliant HSM are located in the TSM Demo project here: https://gitlab.com/Blockdaemon/tsm-demo/-/tree/main/tools/hsm-generated-entropy

The folder contains a README that goes into details on different options when running the tool, and a Quick start guide that just shows the commands needed to get everything up and running and validating that it is working.

There are four different runtime set ups described:

  • Manually running a generating on the host system.
  • Running the generation as a service on the host system.
  • Running the generation on a docker instance next to Builder Vault.
  • Running the generation inside the same docker instance as the TSM.