Player Index and Keys

Each MPC node in the TSM is identified by a unique integer, called the player index, which is read from the configuration file. In the above example, the three MPC nodes have player indices 0, 1, 2. Each configuration file must also contain a base64 encoded private key, which the MPC node uses for secure communication with the other MPC nodes. The other MPC nodes must know the corresponding public key.

As an example, if an MPC node has player index 2, then it's configuration file must contain:

[Player]
  Index = 2
  PrivateKey = "BA3E64=="

The BA3E64== should be replaced by the base64 encoding of the node's private key.

The private key, along with the corresponding public key, can be generated using the following OpenSSL commands:

openssl ecparam -name P-256 -genkey -param_enc named_curve -outform DER -out private.key
openssl base64 -A -in private.key; echo
openssl ec -inform DER -in private.key -pubout -outform DER -out public.key
openssl base64 -A -in public.key; echo

Instead of P-256 you can use P-384 or P-521 depending on the desired security level (128, 192, or 256 bits).