You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dart-bp/docs/1.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,48 +209,49 @@ Also, in DART assets can't be transferred unilaterally as the receiver of the as
209
209
210
210
Each investor can have only 1 account per asset id, and it can be seen as a pair $(pk, asset\_id)$. As accounts participate in transactions, their state changes. An account state is a Pedersen commitment in the Pallas curve and the $i$-th account state is:
- $sk$ - the secret key for their affirmation public key, $AK = sk.G_{Aff}$
217
-
- $id$ - their identity $ID$, to which all their public keys are associated
218
-
- $asset\_id$ - id of the asset for which the account is
219
217
- $balance$ - the current account balance
220
218
- $counter$ - This is a number >= 0, and it can change in various settlement related transactions
221
-
- $\rho$ - This is the initial nullifier secret key created during registration.
222
-
- $\rho^{i+2}$ - This is the nullifier secret key for this state and used when revealing the nullifier for this state. The rationale for exponent ${i+2}$ will be given in a later section.
223
-
- $s$ - the randomness of the commitment. The rationale for $s^{2^i}$ will be given in a later section.
224
-
- $ek^{-1}$ - the inverse of the encryption secret key $ek$, where $EK = ek.G_{Enc}$. This is included in the account state so that the prover can prove consistency between its encryption key and commitment during affirmations efficiently.
219
+
- $asset\_id$ - id of the asset for which the account is
220
+
- $\rho$ - This is the initial nullifier secret key created during registration. It remains the same across all state transitions.
221
+
- $\rho^{i+2}$ - This is the current nullifier secret key for this state and used when revealing the nullifier for this state. The rationale for exponent ${i+2}$ will be given in a later section.
222
+
- $s$ - the initial randomness of the commitment, created during registration. Like $\rho$, it remains the same across all state transitions.
223
+
- $s^{i+2}$ - the current randomness value for this state. It evolves in the same way as the nullifier secret key, by linear powers.
224
+
- $id$ - their identity $ID$, to which all their public keys are associated
225
+
- $ek$ - the encryption secret key, where $EK = ek.G_{Enc}$. This is included in the account state so that the prover can prove consistency between its encryption key and commitment during affirmations.
225
226
226
227
227
228
#### Account state transitions
228
229
For updating account state from $State_i$ to $State_{i+1}$, $State_i$ must be invalidated by revealing a **nullifier** $N = \rho^{i+2}.G_5$. The chain records $N$ in a set and does not allow to reveal the same nullifier twice, thus preventing multiple new state transitions from the same old state. The new state will be:
Note that in the new state $State_{i+1}$, fields $sk, asset\_id, \rho, id, ek^{-1}$ don't change. For invalidating state $State_{i+1}$ (to transition to $State_{i+2}$), nullifier will be $\rho^{i+3}.G_5$.
Note that in the new state $State_{i+1}$, fields $sk, asset\_id, \rho, s, id, ek$ don't change. For invalidating state $State_{i+1}$ (to transition to $State_{i+2}$), nullifier will be $\rho^{i+3}.G_5$.
231
232
232
233
During state transition from $State_i$ to $State_{i+1}$, $State_i$ must not be revealed as it allows tracking the investor. $State_{i+1}$, however, is revealed.
233
234
234
-
To allow for certain operations like key recovery, clawback of funds etc., the nullifier secret key $\rho^i$ and randomness $s$ are created for each state in a particular way. Each new account state is supposed to have the exponent of $\rho$ 1 more than the previous state's exponent of $\rho$ and the randomness of new state is supposed to square of the randomness of previous state.
235
+
To allow for certain operations like key recovery, clawback of funds etc., the nullifier secret key $\rho^i$ and randomness $s^i$ are created for each state in a particular way. Each new account state is supposed to have the exponent of $\rho$ and $s$ each 1 more than the previous state's.
235
236
236
237
The starting state of an account is (balance and counter are 0 in initial state)
The nullifier secret keys form these powers $\rho^2, \rho^3, \rho^4, ...$ and randomness forms these powers $s, s^2, s^4, s^8, ...$ and anyone knowing $rho$ or $s$ can predict subsequent values. The reason for not constructing nullifier secret key $\rho^i$ as $\rho^2, \rho^4, \rho^8$ is because $\rho^i.G_5$ is revealed which reduces security if squares are used, as per [this paper](https://www.iacr.org/archive/eurocrypt2006/40040001/40040001.pdf).
253
-
During account registration, i.e. creating $State_0$, if asset has a trustee, then the value $s$ is encrypted for $pk_T$ and published on chain.
253
+
The nullifier secret keys form these powers $\rho^2, \rho^3, \rho^4, ...$ and randomness forms these powers $s^2, s^3, s^4, ...$ and anyone knowing $\rho$ or $s$ can predict subsequent values. The reason for not constructing these as squares, e.g. $\rho^2, \rho^4, \rho^8, ...$, is because $\rho^i.G_5$ is revealed as the nullifier which reduces security if squares are used, as per [this paper](https://www.iacr.org/archive/eurocrypt2006/40040001/40040001.pdf). The same rationale applies to the randomness $s$.
254
+
During account registration, i.e. creating $State_0$, if asset has a trustee, then the values $s$ and $\rho$ are encrypted for $pk_T$ and published on chain.
254
255
255
256
#### Settlements
256
257
Asset transfers in DART are done through settlements. A settlement is a transfer of 1 or more assets between 2 or more accounts. A settlement lifecycle for transfer of a single asset from party (account) $A$ to $B$ is typically like this:
The state is a Pedersen commitment as well, but contrary to non fee paying accounts, this doesn't have $counter$, $id$, $ek^{-1}$ and also nullifier secret keys are simpler.
273
+
The state is a Pedersen commitment as well, but contrary to non fee paying accounts, this doesn't have $counter$, $id$, $ek$ and also nullifier secret keys are simpler.
273
274
274
275
Reason for this simplicity will be given later.
275
276
@@ -304,7 +305,7 @@ The system uses curve trees as accumulator and has 3 curve trees.
304
305
3. Main account curve tree: Each leaf of this tree corresponds to an account state for a non-fee paying asset. As corresponding transactions are done, existing states of those accounts are invalidated by revealing the nullifier (more on that later) and new states are added. A leaf of this tree is an account state as:
This is also an append only tree and leaves once added are never removed. And states of all non-fee paying accounts regardless of the asset-id are captured in this tree.
0 commit comments