-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Updates docs for Core 0.3.0 release. (#238)
* joining the network * key reshare * registering * signing * jumpstart * validators * Update content/concepts/TDX.md Co-authored-by: Johnny <[email protected]> * reshare extra explanation * Consolidates pages. Adds better lead text. Adds redirects. --------- Co-authored-by: Jesse Abramowitz <[email protected]> Co-authored-by: JesseAbram <[email protected]>
1 parent
b1d2910
commit 6a0055d
Showing
10 changed files
with
138 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "TDX" | ||
lead: "" | ||
draft: true | ||
--- | ||
|
||
TODO |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: "Key management" | ||
lead: "This page explains the process for periodically substituting signers, swapping keyshares, and other processes the network uses to manage keys." | ||
aliases: | ||
- key-reshare | ||
--- | ||
|
||
## Key reshare | ||
|
||
The idea here is that when validators join the network they may be selected to the signing comittee. A smaller randomly selected group of validators that is responsible for holding the parent network key. Every session, which consists of 2400 blocks (equivalent to 4 hours), the chain will notify the TSSs (Threshold Signature Servers) that a reshare is taking place. The chain will also reandomly select a validator to join the netowrk and remove the oldest signer from the comittee. | ||
|
||
The selected TSSs will connect to each other and execute the key reshare protocol on the parent network key, generating a new set of key shares. This protocol is similar to the distributed key generation protocol used during jump starting the network. Upon receiving a new key share, the recipients will hold the new key share in a secondary slot and rotate them to the current parent network key when everyone in the signing group has agreed that the rotation was succeful. All previous key shares will be incompatible with the refreshed key shares. However, the public validating key of the parent network key signing keypair never changes. This means all child keys will also remain the same. | ||
|
||
For information on chain randomness used see (here)[https://docs.substrate.io/build/randomness/] | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Entropy Chain->>+Validator TSS: Tells selected validator to do Reshare (with new signer to add and old to remove). | ||
Validator TSS->>+Validator TSS: Does Reshare with other selected validators stores new share in holding slot. | ||
Validator TSS->>+Entropy Chain: Tells chain everything was A-OK | ||
Entropy Chain->>+Validator TSS: When everyone is done tells all signers to rotate their holding key to the new parent key. | ||
``` | ||
|
||
### Negative pathways | ||
|
||
- The above describes the happy pathway this part is for edge cases | ||
|
||
#### A failure of reshare protocol | ||
|
||
- There are multiple ways this process can fail, if that were to happen the offending party would be known as everyone in the new signing party needs to participate | ||
- Since the process is two steps the current signing party would remain the offending party would be moved to slashing and the chain would initate a new reshare (not implemented yet) | ||
- All parties are unable to unbond until leaving the singing party so their funds would be at risk and able to be slashed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: "Network setup" | ||
lead: "This page covers how the Entropy network functions from a conceptual standpoint. For techincal and actionable information on the various Entropy networks, check out the [Networks reference page](../reference/networks.md)." | ||
aliases: | ||
- joining-the-network | ||
--- | ||
|
||
## Joining the network | ||
|
||
This section explains the process for validator nodes to join the network. The process works something like this: | ||
|
||
1. The new validator operates an Entropy chain node and a threshold server. | ||
1. This new validator registers with the chain. | ||
1. If the stake is enough and the node gets selected to be a validator, it will act as a relayer and be eligible to be added to the signer set. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
title Joining The Network | ||
participant NV as New_Validator | ||
participant C as Chain | ||
NV->>NV: Spins up chain instance | ||
NV->>NV: Starts threshold server | ||
C->>NV: Places NV in validator set | ||
CV->>NV: Validates validator's subgroup, then encrypts and sends keys | ||
``` | ||
|
||
{{< callout type="info" >}} | ||
The network is not currently accepting public/user-ran validator nodes. We will [announce](https://github.com/entropyxyz/community/discussions/categories/announcements) when we plan to start allowing new nodes to join the network. | ||
{{< /callout >}} | ||
|
||
### Required information | ||
|
||
Each validator node requires the following information before it can join the network: | ||
|
||
- **Endpoint**: The IP address of its threshold server. | ||
- **X25519 Public Key**: Its public encryption key for encrypting messages to and from other validators. | ||
- **Threshold Server Signing Account**: The account for the threshold server to submit transactions to the Entropy chain. | ||
|
||
## Jumpstart | ||
|
||
The network needs a "jump start" to be in a usefull state. Pretty much this means we need to do a network wide DKG to create the network parent key. This is started through a blockchain call which informs the selected TSSs to do a dkg. These TSSs will create the network parent key and create the first signing comittee. | ||
|
||
Through reshares TSSs will get subbed in and out of the signing comittee. At registration user's are given a derivation off of the parent key and during signing we have a just in time key derivation to allow for singing for a given account. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
participant Anyone | ||
participant Chain | ||
participant Validator Alice | ||
participant Validator Bob | ||
participant Validator Charlie | ||
participant Validator David | ||
Anyone ->> Chain: Calls jumpstart_network(). | ||
Note over Chain: Selects validators for distributed-key-generation (DKG). | ||
Chain ->> Validator Alice: do DKG message sent. | ||
Chain ->> Validator Bob: do DKG message sent. | ||
Note over Validator Alice, Validator Bob: Perform DKG. | ||
Validator Alice ->> Chain: Confirms network is jumpstarted. | ||
Validator Bob ->> Chain: Confirms network is jumpstarted. | ||
Note over Chain: Network is jumpstarted, Alice and Bob are signers. | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
...pts/node-encryption-and-authentication.md → content/concepts/security.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,37 @@ | ||
--- | ||
title: "Signing" | ||
lead: "Getting a signature from the network is the main purpose of Entropy. Once you have this signature you can apply it onto whatever cryptographic process you need, like signing a PGP message or submitting an Ethereum transaction. This page covers how signing works." | ||
lead: "This section delves into the technical details of the signing process, including the interaction between users, relayer nodes, and the signing committee, as well as the underlying threshold signature scheme." | ||
--- | ||
|
||
## Signing process | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Alice->>Alice: Creates transaction. | ||
Alice->>Validator Bob: Sends transaction through private means. | ||
Alice->>Validator Charlie: Sends transaction through private means. | ||
Validator Bob->> Validator Bob: Determines whether they are a member of the signing committee. | ||
Validator Charlie->> Validator Charlie: Determines whether they are a member of the signing committee. | ||
Validator Bob->> Signing Committee: Requires constraints pass and the transaction matches the hash to sign. | ||
Validator Charlie->> Signing Committee: Requires constraints pass and the transaction matches the hash to sign. | ||
Signing Committee->> Signing Committee: Generates signature. | ||
Signing Committee->> Alice: Sends completed signature. | ||
Alice->>Relayer Validator: Sends transaction through private means. | ||
Relayer Validator->>Signing Validator Bob: Sends transaction through private means (requires constraint pass). | ||
Relayer Validator->>Signing Validator Charlie: Sends transaction through private means. | ||
Signing Validator Bob->> Signing Committee: Requires constraints pass | ||
Signing Validator Charlie->> Signing Committee: Requires constraints pass | ||
Signing Committee->> Signing Committee: Derives user's key based on their derivation path, Generates signature. | ||
Signing Committee->> Relayer Validator: Sends completed signature. | ||
Relayer Validator->> Alice: Sends completed signature. | ||
``` | ||
|
||
1. The user computes the hash of the message they wish to sign and selects a signing committee by deterministically selecting a member of each signing group based on this hash. They can get the details of the signing groups as they were published on-chain when the user [registered]({{< relref "./registering" >}}). | ||
1. The user contacts all threshold servers in the signing committee and makes a POST to `/user/sign_tx` with the message to be signed (encrypted for that node). | ||
1. On receiving a message, each node checks that it is a member of the signing committee for that message using the hash. | ||
1. The Threshold server retrieves the latest version of the associated program from the entropy chain, and executes it with the message to be signed as input. Only on getting successful program output do they continue to the next step. | ||
1. The user computes the message they wish to sign and selects a Relayer node to send their message to `/user/relay_tx`. A relayer node is a validator that is not a signer | ||
1. The relayer nodes does some checks, then randomly selects T of the signing commitee to pass the message to. | ||
1. The Relayer contacts all threshold servers in the signing committee and makes a POST to `/user/sign_tx` with the message to be signed (encrypted for that node). | ||
1. On receiving a message, each node checks that it is a member of the signing committee and is being contactacted by a validator. | ||
1. The Threshold server retrieves the latest version of the associated program from the entropy chain, and executes it with the message to be signed as input. Only on getting successful program output do they continue to the next step (this is also done by the relayer before relaying a message). | ||
1. The Threshold server sets up websocket connections to or from the rest of the committee to use for threshold signing protocol messages. They decide whether to make an outgoing connection, or accept an incoming one by comparing account IDs. These connections are secured using the [noise protocol](https://noiseprotocol.org/noise.html). Signing protocol messages can be either 'broadcast' to all of the committee or 'p2p' to a specific member. | ||
1. Once all members of the signing committee have subscribed, nodes participate in the signing protocol to produce a signature using the key-shares retrieved from their key-value store. | ||
1. If the signing process fails, nodes broadcast who the malicious/faulty signer was, which is included in the next block. Following that, the next block contains details of a new signing committee. The misbehaving signer will be 'slashed' (not yet implemented). | ||
1. If the process is successful, the signature is returned to the user. Currently, this requires the user to repeatedly poll POST `signer/signature` with the signature hash until it successfully retrieves a signature. | ||
1. If the process is successful, the signature is returned to the relayer then the user. | ||
|
||
The signing process can only take place when a user is already registered on Entropy. The process involves the user and a committee of validators collectively performing the signing. The committee requires one Validator from each signing group as well as the user. The current version of the program will be executed here to determine whether or not to proceed with the signing protocol. | ||
The signing process can only take place when a user is already registered on Entropy. The process involves the user and a committee of validators collectively performing the signing. The current version of the program will be executed here to determine whether or not to proceed with the signing protocol. | ||
|
||
For details on how signatures are actually created, see [Threshold Signature Scheme]({{< relref "./threshold-signature-scheme.md" >}}). | ||
|
||
## Signing Group Selection | ||
|
||
Signing groups are chosen and held on-chain. Every time a new validator joins or gets removed, the chain will place or remove them from a subgroup such that: | ||
- Subgroups do not shuffle current validators. | ||
- Subgroups remain the same size or off by one. | ||
|
||
## Messages | ||
|
||
Currently the only restrictions for a message is that it's content is less than `1 MB` in size. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters