Skip to main content

Co-Signer Server Configuration Requirements

Minimum CPU Requirement: AMD64 or ARM64 architecture, 8 cores, 2.0 GHzMemory: 64GBDisk: 256GBOS: Ubuntu-22.04

Co-Signer Deployment Process

Obtain Co-Signer

  • Regular Version
  1. Run the program to download
File address: https://github.com/Key-secure/mpc-co-signer/releases, select co-signer-linux-(version)-static version, this version can run directly on Linux.
Take version v1.3.1 as an example. Please replace the relevant version when actually using it.
  1. Modify the program’s executable permissions
  • SGX Version
1

Purchase Microsoft Azure SGX Server

For Microsoft Azure SGX servers, please refer to the documentation:https://learn.microsoft.com/zh-cn/azure/confidential-computing/virtual-machine-solutions-sgx
2

Install ego Environment

3

Create a working directory

Take the directory /data/co-signer/ as an example. Please replace the relevant working directory in actual use.
4

Switch to the working directory

5

Download the program

Take version v1.3.1 as an example. Please replace the relevant version when actually using it.
File address: https://github.com/Key-secure/mpc-co-signer/releases, select version co-signer-linux-(version), please follow the subsequent steps to compile and package using ego.
Note: Support for SGX is available after v1.1.0.
6

Add the configuration file enclave.json in the working directory, with the following content

Important Note
  1. The value of exe in the configuration file: co-signer-linux-v1.3.1 (example). If the executable program name is modified, the value of exe needs to be changed to the custom name.
  2. The configuration file specifies that Co-Signer can only run under the directory /data/co-signer/ (example). If you need to customize the running directory, please modify all occurrences of /data/co-signer/ in the configuration to the custom directory.
  3. Heap memory, heapSize configuration is recommended to be set to: 60G (61440).
7

Re-sign and package to obtain a runnable SGX executable program

Take version v1.3.1 as an example. Please replace the relevant version when actually using it.

Running Co-Signer

To view the help for the executable program: co-signer -h. The result is as follows:
Adding Configuration and Starting Co-Signer
1

Create a Folder in the Same Directory as the Executable Program

2

Add Configuration File in the conf Directory, File Name: config.yaml

Configuration file content as follows:
3

Configure the Rsa Private Key Used by Co-Signer

Method One: Co-Signer Generates Rsa Public and Private Keys
After executing the above command, enter the Co-Signer startup password as prompted. After successful execution, the keystore.json file is generated/updated in the conf directory.The private key is used to encrypt request parameters when requesting Keysecure service, and the corresponding public key needs to be configured to system. System uses this public key to decrypt Co-Signer request data.Method Two: Client Generates Rsa Private Key and Imports into Co-Signer
After executing the above command, enter the Co-Signer startup password as prompted. After successful execution, the keystore.json file is generated/updated in the conf directory.The private key is used to encrypt request parameters when requesting Keysecure service, and the corresponding public key needs to be configured to Keysecure. Keysecure uses this public key to decrypt Co-Signer request data
4

Configure public key for Co-Signer

After executing the above command, enter the Co-Signer startup password as prompted. After successful execution, the keystore.json file is generated/updated in the conf directory.This public key is provided by system, and Co-Signer uses this public key to decrypt the returned data from Keysecure services.
5

[Optional] Configure the Public Key Used for Sign Verification (sign) When Co-Signer Does Not Callback the Client System

Client generates RSA public keyAfter executing the above command, enter the Co-Signer startup password as prompted. After successful execution, the keystore.json file is generated/updated in the conf directory.After import, Co-Signer will verify the withdrawal and web3 transaction signatures (sign), see Co-Signer transaction signature for sign generation method details.
  • Example of Shell Script for Starting the Program
To start the Co-Signer, it’s recommended to use a shell script for startup (to avoid password leakage to the terminal).
  • Complete initialization after startup
1

Verification and next steps

👉 After the Co designer completes configuration and successfully starts, the service is still in an uninitialized state. Please go to the APP to perform the private key refresh operation. The service can only be used normally after completion。
2

Log in to the APP for Configuration

Log in to the APP, and choose Co-Signer to start configuration after entering the security page.

Co-Signer Quick Deploy Script (Recommend)

Keysecure also provides a more convenient deployment method, using scripts to generate configuration information and operating environments with one click
Please Obtain Co-Signer program first, and place the program and sh file in the same directory before performing script operations.

install.sh

Execute the install.sh script, follow the prompts, and import the necessary information and configurations to run Co-Signer.

sgx-build.sh

When deploying Co-Signer in an SGX environment: Execute the sgx-build.sh script, follow the prompts, and install the necessary environment and related configurations for running Co-Signer under SGX

Add Co-Signer Server to the Whitelist

Keysecure needs access to the Co-Signer to create coequal private keys and generate addresses. Therefore, it’s necessary to add the IP of the Co-Signer server to the security group or whitelist of the Keysecure server. Below are the IP addresses for Custody:
  1. Inbound: Allow access from the Keysecure server (IP: 54.254.7.206) to the Co-Signer server on port 28888. Note that port 28888 is the listening port for the Co-Signer program and can be customized.
  2. Outbound: The Co-Signer server needs to access the Keysecure server, so grant permission to access 54.251.87.91:443.