Server Node

Silent Shard Duo Server SDK Documentation

Server Node is the server participant in the 2-party setup. Once the user authenticates with the Admin and obtains a user token user and server can start the key generation phase in order to further sign messages.

To give some intuition about how an MPC action looks like, here's an example of how key generation takes place for ECDSA. The flow is similar for other operations and signing algorithms (EdDSA).

Communication with the Server Node is done with Silent Shard Duo JS SDK.

Deployment

The server is provided as a docker image: rhonstin/sigpair:v2

The sigpair node instance needs a connection to a Postgres Database. The database is used to manage the keyshares and user information.

An example docker-compose file to run the node:

docker-compose.yml
version: '3.1'

services:
  db:
    image: postgres:14
    restart: always
    environment:
      POSTGRES_PASSWORD: YOUR_DB_PWD
      POSTGRES_USER: YOUR_DB_USER
      POSTGRES_DB: YOUR_DB
    ports:
      - 5432:5432

  sigpair:
    image: rhonstin/sigpair:v2
    restart: always
    environment:
      PGHOST: db
      PGUSER: YOUR_DB_USER
      PGDATABASE: YOUR_DB
      PGPASSWORD: YOUR_DB_PWD
      ADMIN_KEY: '64 char (32 bytes) secret hex string'
    ports:
      - 8080:8080
    depends_on:
      - db

Here we use a sample Postgres DB, in a real scenario the company will provide the DB url and credentials.

Environment variables

PGHOST, PGUSER, PGDATABASE, PGPASSWORD are Postgres related variables used to connect to the database.

ADMIN_KEY : This is shared secret between the admin and the node. It MUST be kept secret and managed securely. This is used as the JWT key to verify claims signed by the Sigpair Admin.

Last updated