• Reading the docs…
Start trading

Security

The Council

The Council’s key, its members’ verification keys, the whole transcript of its key generation, every rotation and every share a member posts are on chain, so anyone can recompute the Council from its transcript, confirm it is the one installed, follow each rotation to the current members, and re-verify each share. What the Council is and when it acts is on Council.

Where the Council is recorded#

The CouncilConfig account holds the Council epoch, the Council key PCP_{\mathcal{C}}, the member count nn, the threshold tt, one verification key Sj=sjPCS_j = s_j P_{\mathcal{C}} per member, where sjs_j is that member’s share of the Council secret, and one Ed25519 signing key per member. With n=9n = 9 and t=5t = 5: any four members together learn nothing about the secret, and the Escape completes with four offline. initialize_council wrote it once at epoch 0, and only rotate_council changes it (Checking a rotation).

/trust shows nn, tt and each verification key. The account layout is in Accounts, and the API serves the same values in Registry, Council and liveness. The Council’s transcript is listed under the same address: every council_log transaction names it.

The Council never decrypts in public. It only re-encrypts, toward a key the chain has verified.

A check from the account alone#

The verification keys are shares of one secret ss, with sPC=Hs P_{\mathcal{C}} = H for the second ristretto255 generator HH, which is derived by hashing so that no one knows its discrete logarithm to base GG. For any tt members QQ, with Lagrange coefficients γjQ\gamma^Q_j:

math
∑j∈QγjQ Sj=H\sum_{j \in Q} \gamma^Q_j \, S_j = H

A set of keys for which every choice of QQ gives HH is a tt-of-nn sharing of the secret behind PCP_{\mathcal{C}}. The program runs this check itself: initialize_council and rotate_council accept a set only if the first tt keys interpolate to HH, every other key lies on the same sharing, and 2t>n2t > n. The key came from a distributed key generation in which no party ever held ss, and the next section recomputes it from its transcript.

Checking the key generation transcript#

Every message of key generation is a council_log payload under the Council’s address, signed by the member that sent it. The transcript alone yields the Council key and every verification key, so a checker compares them with the Council initialize_council installed without trusting any node.

Reading it#

List the transactions under the Council’s address with getSignaturesForAddress and read each with getTransaction. In each council_log instruction’s payload argument, or the same bytes in its CouncilTranscript event, a payload that starts with PVCD1 is one chunk of a message:

Bytes Holds
0..5 PVCD1
5..37 SHA256 of the whole message
37..41 chunk index, u32
41..45 message length in bytes, u32
45.. the chunk, up to 1,600 bytes

The chunks of one digest join in index order. The message stands when its length and SHA256 match, and it lands at the latest slot of its chunks. A message is JSON { "member", "body", "signature" }: body holds kind, phase (the sharing, secret, mask or zero, or null), session, deadline (a slot) and data, and signature is the member’s Ed25519 signature over privium/council-transcript/v1 followed by body as compact JSON with its keys sorted. Byte strings are arrays of numbers.

kind Per sharing data
deal yes The dealer’s Pedersen commitments and one HPKE-sealed share pair per member
complaints yes The dealers whose pair failed for this member
answers yes The pairs a dealer posts in answer to complaints against it
qualified yes The qualified dealers, as this member computed them
reveal yes The dealer’s Feldman commitments
reveal-complaints yes Pairs this member discloses against a reveal its pair fails
reconstruction yes This member’s pairs from dealers proven to have revealed falsely
finished yes The reveals after reconstruction
product no The member’s masked product wjw_j with its proof
verification no The member’s SjS_j with its proof
installed no The Council as the member installed it

What it proves#

  1. Authenticate each message#

    Member jj‘s key is signer_keys[j - 1] in CouncilConfig. A message counts when its signature verifies under its member’s key, it carries the run’s one session id, it landed no later than its deadline slot, and its data is the member’s own: the dealer of its deal, reveal and answers, the recipient of its complaints, reveal complaints and reconstruction shares, the member of its product and verification. No member has two different messages of one kind and phase; the nodes themselves stop on a transcript where one does.

  2. Fix the qualified sets#

    For each sharing, a dealer is qualified when every complaint against it has an answer whose pair (f(j),f′(j))(f(j), f'(j)) satisfies its Pedersen commitments, f(j) G+f′(j) H=∑mjmEmf(j)\,G + f'(j)\,H = \sum_m j^m E_m for the secret, with GG and HH swapped for the mask and the zero sharing. Every member’s qualified message states the same set.

  3. Rebuild the public shares#

    Each qualified dealer’s reveal gives Feldman commitments CmC_m on the sharing’s base: GG for the secret, HH for the mask and the zero sharing. A pair in reveal-complaints that satisfies the dealer’s Pedersen commitments while f(j)f(j) times the base differs from ∑mjmCm\sum_m j^m C_m marks the dealer, whose coefficients the reconstruction pairs rebuild by interpolation; the finished messages state the corrected reveals. Summing over the qualified dealers gives sjGs_j G, ϰjH\varkappa_j H and ojHo_j H for every member, and ϰH\varkappa H from the mask’s constant terms. The zero sharing’s constant commitment is the identity.

  4. Recompute the Council key#

    Each product carries wj=sjϰj+ojw_j = s_j \varkappa_j + o_j and a Chaum-Pedersen proof that log⁡G(sjG)=log⁡ϰjH(wjH−ojH)\log_G (s_j G) = \log_{\varkappa_j H} (w_j H - o_j H). Interpolating all nn values wjw_j at zero gives u=sϰu = s\varkappa, and PC=u−1(ϰH)P_{\mathcal{C}} = u^{-1} (\varkappa H) equals the joint_key that initialize_council installed.

  5. Match the verification keys#

    Each verification carries SjS_j and a Chaum-Pedersen proof that log⁡G(sjG)=log⁡PCSj\log_G (s_j G) = \log_{P_{\mathcal{C}}} S_j, and each SjS_j equals verification_keys[j - 1] in initialize_council’s arguments. The installed messages state the Council every member installed: epoch 0, nn, tt, the Council key, the verification keys and the members’ signing keys.

Both proofs take their challenge from SHA256 over a domain tag (privium/council-product/v1, privium/council-key/v1), the two bases, the two images, the two commitments and the session id, reduced to a scalar.

Checking a rotation#

initialize_council and every rotate_council name the Council’s address and carry the Council they install as CouncilArgs in their instruction data: the epoch, the Council key, the verification keys, the signing keys and tt. Listing the address with getSignaturesForAddress therefore gives the Council’s whole history in order. Check each rotate_council against the Council before it:

  1. Check the signers#

    At least tt of the previous Council’s signing keys sign the transaction, with tt the previous Council’s threshold.

  2. Check the epoch and the key#

    epoch is the previous epoch plus one, and joint_key is the previous Council key.

  3. Check the new sharing#

    The new verification keys pass the check from the account alone with the new tt. With PCP_{\mathcal{C}} unchanged, interpolating to HH again shows that the new shares are shares of the same secret ss.

The last Council in the history equals CouncilConfig. An Escape records the Council epoch when it is triggered, rotate_council fails from then on, and every Escape share is checked against that epoch’s verification keys.

Checking the data key release#

The wrapped Ledger data key and every release of it are in the same transcript (The Ledger data key).

  • The wrapper is one payload: JSON { "kind": "ledger-wrapper", "data": { "wrapper", "enclave" }, "signature" }, with signature an Ed25519 signature over privium/ledger-wrap/v1 followed by the JSON of data, under the signing key of the EnclaveKey account that enclave names. A valid wrapper comes from a record admitted at stage 2 whose interval holds the slot the wrapper landed in, names this program and joint_key, carries a handle c1c_1 that is a valid point other than the identity, and seals a 48-byte ciphertext. The first valid wrapper is the Pool’s.
  • Each release is a key-release message signed by its member, with no session or deadline: the member’s AjA_j, BjB_j and proof toward the enclave’s YEY_E. The transcript shows which members released the key and at which slot; the enclave checks each proof against the member’s SjS_j before it combines tt of them.
  • Its recipients hold a YEY_E from an admitted Registry record, bound by the quote that admitted it (Attestation).

What a share proof proves#

A member’s share toward a recipient key YY (an owner’s escape key YuY_u, or an enclave’s YEY_E) for a handle DD (a leaf’s Council handle, or the wrapper’s c1c_1) is the pair

math
Aj=κjG,Bj=sjD+κjYA_j = \kappa_j G, \qquad B_j = s_j D + \kappa_j Y

with a fresh random κj\kappa_j, and a proof of knowledge of (sj,κj)(s_j, \kappa_j) satisfying Sj=sjPCS_j = s_j P_{\mathcal{C}}, Aj=κjGA_j = \kappa_j G and Bj=sjD+κjYB_j = s_j D + \kappa_j Y. The proof is commitments R1,R2,R3R_1, R_2, R_3 and responses z1,z2z_1, z_2, checked by

math
z1PC=R1+εSj,z2G=R2+εAj,z1D+z2Y=R3+εBjz_1 P_{\mathcal{C}} = R_1 + \varepsilon S_j, \qquad z_2 G = R_2 + \varepsilon A_j, \qquad z_1 D + z_2 Y = R_3 + \varepsilon B_j

where the challenge ε\varepsilon hashes a domain tag, the whole statement (PC,G,D,Y,Sj,Aj,Bj,R1,R2,R3)(P_{\mathcal{C}}, G, D, Y, S_j, A_j, B_j, R_1, R_2, R_3) and a context: in an Escape, the program id and the request’s address; in a data key release, the program id, the enclave’s record, the wrapper and the enclave’s fresh challenge. An accepted share therefore:

  • was made with the member’s registered share sjs_j and no other value;
  • re-encrypts toward exactly this recipient key, for exactly this request;
  • tells nothing about the balance to anyone without the recipient’s secret key.

Shares that fail their proof are rejected one by one, so any tt valid shares complete the combination. Combined with the Lagrange coefficients of their members, they give A=κGA = \kappa G and B=sD+κYB = sD + \kappa Y, from which only the holder of YY‘s secret recovers the value.

Checking an Escape’s shares#

Everything an Escape uses is on chain, so anyone can re-verify a payout end to end:

  1. Read the request#

    The EscapeRequest account holds the leaf’s commitment CC and Council handle DD, the owner’s escape key YuY_u and the leaf index, all verified against the frozen root when the request opened.

  2. Verify each share#

    Each escape_share transaction carries a member’s AjA_j, BjB_j and proof. Recompute ε\varepsilon with the request’s address in the context, and check the three equations against that member’s SjS_j in CouncilConfig and the request’s DD and YuY_u.

  3. Recombine#

    Combine the first tt valid shares with their Lagrange coefficients and compare the result with the (A,B)(A, B) the program stored on the request.

  4. Check the claim#

    The escape_claim transaction carries the amount bb, the destination, and the owner’s proof that log⁡GYu=log⁡AZ\log_G Y_u = \log_A Z for Z=bG−(C−B)Z = bG - (C - B), with the program, the request, its mint and the destination in its context. A passing proof shows that bb is the leaf’s committed balance and that the holder of the escape key chose the destination. The payout follows the settlement rule on Escape.

While an Escape is active, /trust shows its state, and the Escape panel on /account shows the shares arriving against tt.