03Cryptographic foundations
  1. 01Introduction
  2. 02System overview
  3. 03Cryptographic foundations
  4. 04The confidential Ledger
  5. 05Trusted execution and attestation
  6. 06Threshold keys and the Escape
  7. 07The Crossing engine
  8. 08Unlinkability
  9. 09Solana program engineering
  10. 10The Coprocessor and the off-chain stack
  11. 11Selective disclosure and Receipts
  12. 12Economics and $PRV

Chapter 3

Cryptographic foundations

Privium is built from a small set of standard primitives: a prime-order group, Pedersen commitments, twisted ElGamal encryption, Fiat-Shamir sigma protocols and Bulletproofs range proofs, AES-256-GCM, HPKE, binary Merkle trees, and two signature schemes. Each one is already deployed at scale, and most of them are the same objects Solana’s ZK ElGamal proof stack verifies on chain today. This chapter fixes their exact form, states the security notions Privium uses, and proves the reductions on which the later chapters build: the confidential Ledger (Chapter 4), attestation (Chapter 5), threshold decryption and the Escape (Chapter 6), and Receipts (Chapter 11).

3.1 Conventions and hardness assumptions

Throughout, λ=128\lambda = 128 is the security parameter, an algorithm is efficient when it runs in probabilistic polynomial time (PPT) in λ\lambda, and a function ff is negligible, f=negl(λ)f = \mathsf{negl}(\lambda), when f(λ)<λ−cf(\lambda) < \lambda^{-c} for every constant cc and all large enough λ\lambda. We write x←RSx \xleftarrow{R} S for uniform sampling and ∥\| for unambiguous concatenation of fixed-length or length-prefixed encodings. Every hash call carries a distinct ASCII domain tag of the form privium/<purpose>/v1, so that no two uses of H\mathsf{H} in this paper can be confused with one another.

Let G\mathbb{G} be a cyclic group of prime order ℓG\ell_{\mathbb{G}} written additively, with scalars in Zℓ\mathbb{Z}_{\ell} where in this chapter ℓ=ℓG\ell = \ell_{\mathbb{G}}. Privium relies on three standard problems in G\mathbb{G}.

Definition 3.1 (DL, CDH, DDH). For a generator BB of G\mathbb{G} and α,β,γ←RZℓ\alpha, \beta, \gamma \xleftarrow{R} \mathbb{Z}_\ell:

  • the discrete logarithm problem is to compute α\alpha from (B,αB)(B, \alpha B);
  • the computational Diffie-Hellman problem is to compute αβB\alpha\beta B from (B,αB,βB)(B, \alpha B, \beta B);
  • the decisional Diffie-Hellman problem is to distinguish (B,αB,βB,αβB)(B, \alpha B, \beta B, \alpha\beta B) from (B,αB,βB,γB)(B, \alpha B, \beta B, \gamma B).

The advantage of an adversary B\mathcal{B} against DDH is AdvGddh(B)=∣Pr⁡[B(B,αB,βB,αβB)=1]−Pr⁡[B(B,αB,βB,γB)=1]∣\mathsf{Adv}^{\mathrm{ddh}}_{\mathbb{G}}(\mathcal{B}) = |\Pr[\mathcal{B}(B,\alpha B,\beta B,\alpha\beta B)=1] - \Pr[\mathcal{B}(B,\alpha B,\beta B,\gamma B)=1]|. Each assumption states that every efficient adversary has negligible advantage. DDH implies CDH implies DL. Because G\mathbb{G} has prime order, all three problems are random self-reducible: one instance can be turned into any polynomial number of independent, uniformly distributed instances at the cost of a few scalar multiplications, which we use in Chapter 4.

Where a proof uses a hash function as a random oracle, we say so. Elsewhere H\mathsf{H} is only assumed collision resistant: no efficient adversary outputs x≠x′x \neq x' with H(x)=H(x′)\mathsf{H}(x) = \mathsf{H}(x') except with probability negl(λ)\mathsf{negl}(\lambda).

3.2 The group: ristretto255

Why a prime-order group

Curve25519 in its twisted Edwards form (edwards25519) has a group of order 8⋅ℓ8 \cdot \ell, where the cofactor 88 introduces small-order points. Protocols written for a prime-order group can fail on such a curve: two encodings can name the same logical point, a point can be multiplied by a torsion element without changing any check that compares only the prime-order part, and a zero-knowledge proof can verify for a statement that is false modulo the torsion. Ristretto255 removes this class of problems by construction. It defines G\mathbb{G} as a quotient of the edwards25519 group by its small torsion, together with a canonical 32-byte encoding that is injective on the quotient and a decoding that rejects every non-canonical string [3]. The resulting group has prime order

ℓG=2252+27742317777372353535851937790883648493,(3.1)\ell_{\mathbb{G}} = 2^{252} + 27742317777372353535851937790883648493, \tag{3.1}

so every non-identity element generates G\mathbb{G} and every 32-byte string either decodes to exactly one element or is rejected [3]. Equality of encodings is equality of group elements, which is the property every check in Chapters 4 and 6 needs.

Generators

Privium uses the same two generators as Solana’s ZK ElGamal SDK. GG is the ristretto255 base point. HH is obtained by hashing the compressed encoding of GG with SHA3-512 and mapping the 64-byte digest into G\mathbb{G} with the ristretto255 one-way map [4]:

G=Bristretto255,H=MapToGroup(SHA3-512(enc(G))).(3.2)G = B_{\mathrm{ristretto255}}, \qquad H = \mathsf{MapToGroup}\big(\mathrm{SHA3\text{-}512}(\mathsf{enc}(G))\big). \tag{3.2}

Using Solana’s (G,H)(G, H) unchanged means Privium commitments and ciphertexts are byte-compatible with the ZK ElGamal proof program, so any of its verifiers can check statements about Ledger values (Section 3.5).

Lemma 3.1 (Independent generators). Model MapToGroup∘SHA3-512\mathsf{MapToGroup} \circ \mathrm{SHA3\text{-}512} as a random oracle into G\mathbb{G}. Then an efficient adversary that outputs η\eta with H=ηGH = \eta G yields an efficient algorithm for DL in G\mathbb{G} with the same success probability, up to a polynomial loss in the number of oracle queries.

Proof. Given a DL instance (G,Y)(G, Y), program the oracle so that the query on enc(G)\mathsf{enc}(G) returns YY; every other query returns a fresh uniform element. The adversary’s view is distributed exactly as in the real experiment, because YY is uniform in G\mathbb{G}. If it outputs η\eta with H=ηGH = \eta G, then η\eta is the discrete logarithm of YY. When the adversary may also query the oracle on other points that it later treats as generators, guess the relevant query index, which loses a factor equal to the number of queries. □\square

No party, including Solana, the Privium developers or the Coprocessor, knows log⁡GH\log_G H. Every binding argument below rests on this lemma.

3.3 Security definitions

This section collects the notions referred to throughout the paper. The games are standard; we fix them so that the reductions in Chapters 4 to 6 have a single reference point.

Definition 3.2 (IND-CPA and IND-CCA2). Let Π=(KeyGen,Enc,Dec)\Pi = (\mathsf{KeyGen}, \mathsf{Enc}, \mathsf{Dec}) be a public-key encryption scheme. In the IND-CPA game the challenger samples (sk,pk)←KeyGen(sk, pk) \leftarrow \mathsf{KeyGen} and gives pkpk to A\mathcal{A}; A\mathcal{A} outputs equal-length messages m0,m1m_0, m_1; the challenger samples b←R{0,1}b \xleftarrow{R} \{0,1\} and returns c∗=Enc(pk,mb)c^* = \mathsf{Enc}(pk, m_b); A\mathcal{A} outputs b′b'. The advantage is AdvΠind-cpa(A)=∣2Pr⁡[b′=b]−1∣\mathsf{Adv}^{\mathrm{ind\text{-}cpa}}_\Pi(\mathcal{A}) = |2\Pr[b'=b] - 1|. In the IND-CCA2 game, A\mathcal{A} additionally has a decryption oracle before and after the challenge, which it may query on any ciphertext other than c∗c^*. Π\Pi is IND-CPA (respectively IND-CCA2) secure if every efficient A\mathcal{A} has negligible advantage.

Definition 3.3 (EUF-CMA and SUF-CMA). For a signature scheme Σ=(KeyGen,Sign,Verify)\Sigma = (\mathsf{KeyGen}, \mathsf{Sign}, \mathsf{Verify}), the adversary receives pkpk and a signing oracle. It wins the EUF-CMA game if it outputs (m,σ)(m, \sigma) with Verify(pk,m,σ)=1\mathsf{Verify}(pk, m, \sigma) = 1 for a message mm it never queried. It wins the SUF-CMA game if the pair (m,σ)(m,\sigma) was never returned by the oracle, so that even a fresh signature on a queried message counts as a forgery.

Definition 3.4 (Commitment hiding and binding). A commitment scheme Com(m;r)\mathsf{Com}(m; r) is perfectly hiding if for all m0,m1m_0, m_1 the distributions of Com(m0;r)\mathsf{Com}(m_0; r) and Com(m1;r)\mathsf{Com}(m_1; r) over uniform rr are identical. It is computationally binding if no efficient adversary outputs (m,r)≠(m′,r′)(m, r) \neq (m', r') with Com(m;r)=Com(m′;r′)\mathsf{Com}(m; r) = \mathsf{Com}(m'; r') except with negligible probability.

Definition 3.5 (AEAD security). A nonce-based AEAD scheme AE=(Enc,Dec)\mathsf{AE} = (\mathsf{Enc}, \mathsf{Dec}) with key kk, nonce nn, associated data adad and message mm provides IND-CPA security against nonce-respecting adversaries (no nonce is used twice under one key) and INT-CTXT: no efficient adversary with an encryption oracle produces a fresh (n,ad,c)(n, ad, c) that decrypts to a value other than ⊥\bot. By the Bellare-Namprempre composition theorem, IND-CPA together with INT-CTXT implies IND-CCA2 for the symmetric setting [5].

Definition 3.6 (Sigma protocol). A three-move public-coin protocol (Y,c,z)(Y, c, z) for a relation R\mathcal{R} is a sigma protocol if it is complete; has special soundness, meaning that from two accepting transcripts (Y,c,z)(Y, c, z) and (Y,c′,z′)(Y, c', z') with c≠c′c \neq c' an efficient extractor computes a witness; and is special honest-verifier zero knowledge (SHVZK), meaning that for any given challenge cc a simulator outputs transcripts distributed identically to honest ones.

3.4 Pedersen commitments

Definition 3.7 (Pedersen commitment). For a value x∈Zℓx \in \mathbb{Z}_\ell and opening r←RZℓr \xleftarrow{R} \mathbb{Z}_\ell,

Com(x;r)=xG+rH.(3.3)\mathsf{Com}(x; r) = xG + rH. \tag{3.3}

This is the commitment of Pedersen [6] and the one Solana’s SDK computes as a two-term multiscalar multiplication over (G,H)(G, H) [4].

Theorem 3.1. Pedersen commitments are perfectly hiding, and computationally binding under the DL assumption in G\mathbb{G} and Lemma 3.1.

Proof. Hiding: write H=ηGH = \eta G with η≠0\eta \neq 0 (unknown to everyone, but well defined). For fixed xx, the map r↦xG+rH=(x+ηr)Gr \mapsto xG + rH = (x + \eta r)G is a bijection from Zℓ\mathbb{Z}_\ell to G\mathbb{G}, so a uniform rr yields a uniform commitment whatever xx is. Binding: suppose an adversary outputs (x,r)≠(x′,r′)(x, r) \neq (x', r') with xG+rH=x′G+r′HxG + rH = x'G + r'H. Then r≠r′r \neq r' (otherwise x=x′x = x'), and η=(x−x′)(r′−r)−1\eta = (x - x')(r' - r)^{-1} is the discrete logarithm of HH to base GG, contradicting Lemma 3.1. □\square

Pedersen commitments are additively homomorphic: Com(x1;r1)+Com(x2;r2)=Com(x1+x2;r1+r2)\mathsf{Com}(x_1; r_1) + \mathsf{Com}(x_2; r_2) = \mathsf{Com}(x_1 + x_2; r_1 + r_2). Chapter 4 uses this to check asset conservation over the whole Ledger with a single group equation per asset. Two facts about integer values make that check meaningful. First, Ledger balances are integers in [0,264)[0, 2^{64}), and any sum of at most 2322^{32} of them is below 296<ℓ2^{96} < \ell, so equality in Zℓ\mathbb{Z}_\ell implies equality over the integers. Second, a range proof (Section 3.6) is what ties a commitment to an integer in [0,264)[0, 2^{64}) rather than to an arbitrary element of Zℓ\mathbb{Z}_\ell.

3.5 ElGamal and twisted ElGamal

Exponential ElGamal

ElGamal encryption [7] with key pair (s,sB)(s, sB) encrypts a group element MM as (rB,M+r⋅sB)(rB, M + r \cdot sB). Encrypting a scalar xx “in the exponent” as M=xGM = xG makes the scheme additively homomorphic, and decryption returns xGxG, from which xx is recovered by a discrete logarithm search. That search is efficient only for small xx, which is why every confidential balance system, Solana’s included, bounds the plaintexts it must decrypt (below).

Twisted ElGamal

Twisted ElGamal, introduced for the PGC confidential payment system [8] and adopted by Solana’s confidential transfer extension [9], rearranges the ciphertext so that one component is exactly a Pedersen commitment.

Definition 3.8 (Twisted ElGamal). A secret key is s←RZℓ∗s \xleftarrow{R} \mathbb{Z}_\ell^{*} and the public key is P=s−1HP = s^{-1}H. To encrypt xx under PP, sample r←RZℓr \xleftarrow{R} \mathbb{Z}_\ell and output

ct=(C,D)=(xG+rH, rP).(3.4)\mathsf{ct} = (C, D) = (xG + rH,\ rP). \tag{3.4}

Decryption computes C−sD=xG+rH−srs−1H=xGC - sD = xG + rH - s r s^{-1} H = xG and then xx by bounded discrete logarithm. Solana’s SDK implements exactly these formulas: the public key is the inverse of the secret times HH, the ciphertext is a Pedersen commitment plus a decryption handle D=rPD = rP, and decryption subtracts s⋅Ds \cdot D from the commitment [4]. The commitment CC is independent of the key and the handle DD is independent of the message [9], which is what allows proofs about Pedersen commitments to apply to ciphertexts directly.

Definition 3.9 (Grouped ciphertext). To encrypt one value to mm keys P1,…,PmP_1, \dots, P_m with a single commitment, reuse rr across handles: (C,D1,…,Dm)=(xG+rH,rP1,…,rPm)(C, D_1, \dots, D_m) = (xG + rH, rP_1, \dots, rP_m). The holder of sjs_j decrypts with C−sjDjC - s_j D_j. Solana’s confidential transfers encrypt each transfer amount this way to the source, the destination and the optional auditor, and its proof program verifies validity of grouped ciphertexts with two and three handles [10][11].

Theorem 3.2 (IND-CPA of grouped twisted ElGamal). For every adversary A\mathcal{A} against the IND-CPA security of grouped twisted ElGamal with mm handles there is an adversary B\mathcal{B} against DDH in G\mathbb{G} with essentially the same running time such that

Advind-cpa(A)≤2⋅AdvGddh(B).(3.5)\mathsf{Adv}^{\mathrm{ind\text{-}cpa}}(\mathcal{A}) \le 2 \cdot \mathsf{Adv}^{\mathrm{ddh}}_{\mathbb{G}}(\mathcal{B}). \tag{3.5}

Proof. B\mathcal{B} receives (H,X,Y,Z)(H, X, Y, Z) with X=αHX = \alpha H, Y=βHY = \beta H, and ZZ either αβH\alpha\beta H or uniform; DDH relative to the fixed generator HH is equivalent to DDH relative to any generator, since G\mathbb{G} has prime order. B\mathcal{B} samples ρ1,…,ρm←RZℓ∗\rho_1, \dots, \rho_m \xleftarrow{R} \mathbb{Z}_\ell^{*} and publishes the keys Pj=ρjXP_j = \rho_j X. These are distributed as honest keys: Pj=(ρjα)HP_j = (\rho_j \alpha) H, so sj=(ρjα)−1s_j = (\rho_j \alpha)^{-1} is uniform in Zℓ∗\mathbb{Z}_\ell^{*} and independent across jj. On challenge messages x0,x1x_0, x_1, B\mathcal{B} picks b←R{0,1}b \xleftarrow{R}\{0,1\} and returns

(C,D1,…,Dm)=(xbG+Y, ρ1Z,…,ρmZ),(C, D_1, \dots, D_m) = (x_b G + Y,\ \rho_1 Z, \dots, \rho_m Z),

then outputs 11 if A\mathcal{A} guesses bb. If Z=αβHZ = \alpha\beta H, set r=βr = \beta: then C=xbG+rHC = x_b G + rH and Dj=ρjαβH=rPjD_j = \rho_j \alpha \beta H = r P_j, a correctly distributed ciphertext, so B\mathcal{B} outputs 11 with exactly A\mathcal{A}‘s success probability. If Z=γHZ = \gamma H for uniform γ\gamma, the handles depend only on γ\gamma, and Y=βHY = \beta H is uniform and independent of them, so C=xbG+YC = x_b G + Y is uniform and independent of bb, and B\mathcal{B} outputs 11 with probability exactly 1/21/2. The difference of the two probabilities is 12Advind-cpa(A)\frac{1}{2}\mathsf{Adv}^{\mathrm{ind\text{-}cpa}}(\mathcal{A}). □\square

The proof covers randomness reuse across handles, the setting analysed in general by Bellare, Boldyreva and Staddon [12]. Theorem 3.2 is what Chapter 4 invokes for the Council handle carried by each Ledger leaf, and what Chapter 6 invokes for the Council’s joint key.

How Solana deploys it

The confidential transfer extension of Token-2022 stores an account’s available balance twice: as a twisted ElGamal ciphertext, used to generate proofs, and as an AES-GCM-SIV ciphertext (decryptable_available_balance) that the owner decrypts directly in routine use [9]. Incoming credits accumulate in a separate pending balance, split into a low and a high ciphertext, until the owner applies them. Transfer amounts are restricted to 48 bits, encrypted as a 16-bit low part and a 32-bit high part, because discrete logarithm decryption cost grows exponentially with the plaintext and already takes seconds for 32-bit values [9]. Privium takes the same two-layer pattern (a homomorphic layer that proofs and the Council act on, and a symmetric layer that the owner and the Coprocessor read) and drops the need for discrete logarithm decryption entirely: in the Ledger, the plaintext always travels alongside in an AEAD ciphertext, so the ElGamal layer only ever has to confirm a claimed value xx by checking C−sD=xGC - sD = xG, never to find it (Chapter 4, Chapter 6).

The ZK ElGamal proof program, which verifies these proofs on chain, was disabled at the start of mainnet epoch 805 on 19 June 2025 after a researcher reported a soundness flaw in its Fiat-Shamir transcript [13][14]. Confidential transfers were restored on mainnet in June 2026 after a competitive audit and a patched validator release [14], and the proof program is live alongside the BN254 and BLS12-381 syscalls delivered with Agave 4.0 [15].

3.6 Sigma protocols, Fiat-Shamir and range proofs

The template

Every proof in the confidential transfer stack apart from range proofs is a sigma protocol over G\mathbb{G} made non-interactive with Fiat-Shamir. Solana’s documentation lists the ones its proof program verifies: public key validity, ciphertext validity for two and three handles, zero ciphertext, ciphertext-commitment equality, ciphertext-ciphertext equality and percentage-with-cap, plus batched range proofs over 64, 128 and 256 bits [10][11]. None of them needs a trusted setup [10]. The simplest is Schnorr’s proof of knowledge of a discrete logarithm [16]; we give the ciphertext-commitment equality proof in full because the Ledger’s batched validity proof follows its template (Chapter 4, Definition 4.4).

Protocol 3.1 (Ciphertext-commitment equality). Public input: a key PP, a ciphertext (CE,D)(C_E, D) under PP, and a Pedersen commitment CPC_P. Witness: (s,x,r′)(s, x, r') with sP=HsP = H, CE−sD=xGC_E - sD = xG and CP=xG+r′HC_P = xG + r'H.

  1. The prover samples ys,yx,yr←RZℓy_s, y_x, y_r \xleftarrow{R} \mathbb{Z}_\ell and sends Y0=ysPY_0 = y_s P, Y1=yxG+ysDY_1 = y_x G + y_s D, Y2=yxG+yrHY_2 = y_x G + y_r H.
  2. The verifier sends c←RZℓc \xleftarrow{R} \mathbb{Z}_\ell.
  3. The prover sends zs=cs+ysz_s = cs + y_s, zx=cx+yxz_x = cx + y_x, zr=cr′+yrz_r = cr' + y_r.

The verifier accepts if

zsP=cH+Y0,zxG+zsD=c CE+Y1,zxG+zrH=c CP+Y2.(3.6)z_s P = cH + Y_0, \qquad z_x G + z_s D = c\,C_E + Y_1, \qquad z_x G + z_r H = c\,C_P + Y_2. \tag{3.6}

Lemma 3.2. Protocol 3.1 is a sigma protocol for its relation.

Proof. Completeness: the first and third equations are immediate. For the second, sD=srP=rHsD = s r P = rH, so xG+sD=xG+rH=CExG + sD = xG + rH = C_E, and zxG+zsD=c(xG+sD)+yxG+ysD=c CE+Y1z_x G + z_s D = c(xG + sD) + y_x G + y_s D = c\,C_E + Y_1. Special soundness: from accepting transcripts with challenges c≠c′c \neq c' and the same (Y0,Y1,Y2)(Y_0, Y_1, Y_2), subtracting the equations gives (zs−zs′)P=(c−c′)H(z_s - z_s')P = (c - c')H, (zx−zx′)G+(zs−zs′)D=(c−c′)CE(z_x - z_x')G + (z_s - z_s')D = (c-c')C_E and (zx−zx′)G+(zr−zr′)H=(c−c′)CP(z_x - z_x')G + (z_r - z_r')H = (c-c')C_P. Setting s^=(zs−zs′)/(c−c′)\hat s = (z_s - z_s')/(c-c'), x^=(zx−zx′)/(c−c′)\hat x = (z_x - z_x')/(c - c') and r^=(zr−zr′)/(c−c′)\hat r = (z_r - z_r')/(c-c') yields s^P=H\hat s P = H, CE−s^D=x^GC_E - \hat s D = \hat x G and CP=x^G+r^HC_P = \hat x G + \hat r H, a valid witness. SHVZK: given cc, sample zs,zx,zrz_s, z_x, z_r uniformly and solve (3.6) for Y0,Y1,Y2Y_0, Y_1, Y_2; in an honest run the responses are uniform and the commitments are determined by them, so the distributions are identical. □\square

The Chaum-Pedersen proof of discrete logarithm equality, which shows log⁡B1Q1=log⁡B2Q2\log_{B_1} Q_1 = \log_{B_2} Q_2, is the one-equation special case of the same template and is what each Council member attaches to a partial decryption (Chapter 6).

Fiat-Shamir done strongly

The non-interactive form replaces cc by H(tag ∥ statement ∥ Y0 ∥ Y1 ∥ Y2)\mathsf{H}(\mathsf{tag} \,\|\, \text{statement} \,\|\, Y_0 \,\|\, Y_1 \,\|\, Y_2). In the random oracle model, the forking lemma of Pointcheval and Stern turns any prover that convinces the verifier with non-negligible probability into two accepting transcripts with the same first message and distinct challenges, hence into a witness by special soundness [17]. That argument needs the hash input to contain the entire statement. When it omits part of the statement (the weak Fiat-Shamir transform), a prover can choose the unhashed part after seeing the challenge and prove false statements, a failure mode documented by Bernhard, Pereira and Warinschi [18] and the same class of defect that took Solana’s proof program offline in 2025 [14]. Privium’s rule is therefore mechanical: every transcript absorbs the domain tag, the program id, every public key, every ciphertext and commitment of the statement, and every first-round message, in a fixed order, before the challenge is squeezed.

Range proofs

A range proof shows that a commitment V=vG+γHV = vG + \gamma H opens to v∈[0,2n)v \in [0, 2^n). Solana’s stack uses Bulletproofs [11], which prove the bit decomposition of vv with an inner-product argument and need no trusted setup [19]. An aggregated proof for mm values of nn bits each consists of 2⌈log⁡2(nm)⌉+42\lceil \log_2(nm) \rceil + 4 group elements and 55 scalars [19]; with 32-byte encodings its size is

∣πrange(n,m)∣=32⋅(2⌈log⁡2(nm)⌉+9) bytes.(3.7)|\pi_{\mathrm{range}}(n, m)| = 32 \cdot \big(2\lceil \log_2(nm)\rceil + 9\big) \text{ bytes}. \tag{3.7}

For n=64n = 64 this gives 672 bytes for one value and 1,312 bytes for 1,024 values aggregated. Logarithmic growth is what lets the Ledger publish a range proof for every balance it rewrites in a Crossing at a cost of about one kilobyte per asset (Chapter 4, Section 4.9).

3.7 Authenticated encryption and HPKE

AES-256-GCM

AE\mathsf{AE} is AES-256-GCM as specified in NIST SP 800-38D: a 256-bit key, a 96-bit nonce and a 128-bit authentication tag [20]. GCM is IND-CPA and INT-CTXT secure, hence IND-CCA2 by Definition 3.5, for every adversary that never repeats a nonce under one key [20]. The Ledger therefore never draws nonces at random. It derives each nonce from the leaf position and the leaf’s monotone version counter (Chapter 4, Section 4.8), which makes nonce uniqueness a structural invariant rather than a probabilistic one. AES-256-GCM is also the symmetric layer the Encifher coprocessor reports at more than one million operations per second [2].

HPKE for Intents

Intents are encrypted to the Coprocessor with Hybrid Public Key Encryption, RFC 9180 [21], in base mode with the suite

KEM=DHKEM(X25519, HKDF-SHA256),KDF=HKDF-SHA256,AEAD=AES-256-GCM,\mathsf{KEM} = \text{DHKEM(X25519, HKDF-SHA256)}, \quad \mathsf{KDF} = \text{HKDF-SHA256}, \quad \mathsf{AEAD} = \text{AES-256-GCM},

whose RFC identifiers are 0x0020, 0x0001 and 0x0002 [21]. The Coprocessor holds an X25519 key pair (dkC,ekC)(dk_C, ek_C) generated inside the enclave for each key epoch and bound to its measurement through the attestation report (Chapter 5); ekCek_C is distinct from the Ed25519 signing key pkCpk_C. An HPKE ciphertext is the 32-byte encapsulated key followed by the AEAD output, so it is 48 bytes longer than its plaintext [21].

Theorem 3.3 (Intent confidentiality). Under the Gap Diffie-Hellman assumption on X25519, with HKDF modeled as a random oracle and AES-256-GCM IND-CPA and INT-CTXT secure, HPKE base mode with the suite above is IND-CCA2 secure [22].

This is the result of Alwen et al.’s analysis of the HPKE standard [22]; we use it as stated. Two Privium-specific choices sit on top of it. The HPKE info string binds every ciphertext to the deployment and to the attested key epoch, so that an Intent sealed for one enclave key is rejected by any other:

info=privium/intent/v1 ∥ idprog ∥ e ∥ H(quotee),(3.8)\mathsf{info} = \texttt{privium/intent/v1} \,\|\, \mathsf{id}_{\mathrm{prog}} \,\|\, e \,\|\, \mathsf{H}(\mathsf{quote}_e), \tag{3.8}

where ee is the key epoch and quotee\mathsf{quote}_e the attestation quote registered for it. And the plaintext has a fixed length: the Intent i=(u,π,s,x,ℓ,τ,ν)i = (u, \pi, s, x, \ell, \tau, \nu) is serialized into fixed-width fields together with the trader’s Ed25519 signature over those fields and zero padding to 128 bytes, so every Intent ciphertext is 176 bytes and its length says nothing about the order. The signature inside the ciphertext authenticates the trader to the enclave without appearing on chain.

import { CipherSuite, DhkemX25519HkdfSha256, HkdfSha256, Aes256Gcm } from "@hpke/core";
import { ed25519 } from "@noble/curves/ed25519";

const suite = new CipherSuite({
  kem: new DhkemX25519HkdfSha256(),
  kdf: new HkdfSha256(),
  aead: new Aes256Gcm(),
});

export const INTENT_PT_LEN = 128;

export async function sealIntent(
  intent: IntentFields,          // u, pair, side, size, limit, expiry, nonce
  authority: Uint8Array,         // trader's Ed25519 secret key
  enclave: AttestedKey,          // ek_C, epoch e, quote hash, from the Registry
): Promise<Uint8Array> {
  const body = encodeIntent(intent);                  // 45 bytes, fixed width
  const sig = ed25519.sign(body, authority);          // 64 bytes
  const pt = new Uint8Array(INTENT_PT_LEN);           // zero padded
  pt.set(body, 0);
  pt.set(sig, body.length);

  const sender = await suite.createSenderContext({
    recipientPublicKey: await suite.kem.importKey("raw", enclave.ekC),
    info: intentInfo(enclave.programId, enclave.epoch, enclave.quoteHash),
  });
  const ct = await sender.seal(pt);                   // 128 + 16 bytes
  return concat(new Uint8Array(sender.enc), new Uint8Array(ct)); // 176 bytes
}

The listing is the SDK’s sealing routine. encodeIntent writes the trader’s record position, the two asset indices of the pair, the side, the size, the limit price as a fixed-point integer, the expiry slot and the nonce in a fixed order; Chapter 10 shows where the SDK obtains the attested key and how privium.trade(...) calls this function.

3.8 Merkle trees and inclusion proofs

The Ledger is committed on chain as the root of a binary Merkle tree [23] of fixed depth dd over ciphertext leaves (Chapter 4). Privium uses the domain separation of RFC 6962 [24], which prefixes leaf hashes and interior hashes with different bytes, and SHA-256 for H\mathsf{H}, which Solana programs compute through a runtime syscall [25].

Definition 3.10 (Ledger tree). For a leaf encoding LL and children h0,h1h_0, h_1,

Hleaf(L)=H(0x00 ∥ L),Hnode(h0,h1)=H(0x01 ∥ h0 ∥ h1).(3.9)\mathsf{H}_{\mathrm{leaf}}(L) = \mathsf{H}(\texttt{0x00} \,\|\, L), \qquad \mathsf{H}_{\mathrm{node}}(h_0, h_1) = \mathsf{H}(\texttt{0x01} \,\|\, h_0 \,\|\, h_1). \tag{3.9}

An empty position holds z0=Hleaf(ε)z_0 = \mathsf{H}_{\mathrm{leaf}}(\varepsilon), and an empty subtree of height j+1j+1 hashes to zj+1=Hnode(zj,zj)z_{j+1} = \mathsf{H}_{\mathrm{node}}(z_j, z_j). An inclusion proof for position ι∈[0,2d)\iota \in [0, 2^d) is the list of dd sibling hashes (σ0,…,σd−1)(\sigma_0, \dots, \sigma_{d-1}); the verifier recomputes h0=Hleaf(L)h_0 = \mathsf{H}_{\mathrm{leaf}}(L) and hj+1=Hnode(hj,σj)h_{j+1} = \mathsf{H}_{\mathrm{node}}(h_j, \sigma_j) or Hnode(σj,hj)\mathsf{H}_{\mathrm{node}}(\sigma_j, h_j) according to bit jj of ι\iota, and accepts if hd=ρh_d = \rho.

Theorem 3.4 (Position binding). If an efficient adversary outputs a root ρ\rho, a position ι\iota, and two accepting inclusion proofs for distinct leaf encodings L≠L′L \neq L' at ι\iota, then a collision for H\mathsf{H} can be computed from its output in time O(d)O(d).

Proof. Let (hj)j=0d(h_j)_{j=0}^{d} and (hj′)j=0d(h'_j)_{j=0}^{d} be the two recomputed paths. Both follow the bits of the same ι\iota, so at every level the recomputed value sits on the same side, and both end at hd=hd′=ρh_d = h'_d = \rho. If h0=h0′h_0 = h'_0, the distinct strings 0x00∥L\texttt{0x00}\|L and 0x00∥L′\texttt{0x00}\|L' collide. Otherwise let j∗<dj^* < d be the largest index with hj∗≠hj∗′h_{j^*} \neq h'_{j^*}. Then hj∗+1=hj∗+1′h_{j^*+1} = h'_{j^*+1}, while the interior inputs 0x01∥hj∗∥σj∗\texttt{0x01}\|h_{j^*}\|\sigma_{j^*} and 0x01∥hj∗′∥σj∗′\texttt{0x01}\|h'_{j^*}\|\sigma'_{j^*} (in the order fixed by bit j∗j^*) differ in the block holding hj∗h_{j^*}: a collision. Both cases take one pass over the path. The prefixes make every leaf input differ from every interior input as strings, so a leaf can never be passed off as an interior node or the reverse. □\square

With d=32d = 32 (Chapter 4 sets it), a proof is 32×32=1,02432 \times 32 = 1{,}024 bytes and verification costs 33 hash evaluations.

pub const DEPTH: usize = 32;

pub fn leaf_hash(leaf: &[u8]) -> [u8; 32] {
    hashv(&[&[0x00], leaf]).to_bytes()
}

pub fn node_hash(l: &[u8; 32], r: &[u8; 32]) -> [u8; 32] {
    hashv(&[&[0x01], l, r]).to_bytes()
}

/// Recomputes the root for `leaf` at `index` from its sibling path.
pub fn root_from_path(leaf: &[u8], index: u32, path: &[[u8; 32]; DEPTH]) -> [u8; 32] {
    let mut h = leaf_hash(leaf);
    for (j, sib) in path.iter().enumerate() {
        h = if (index >> j) & 1 == 0 { node_hash(&h, sib) } else { node_hash(sib, &h) };
    }
    h
}

hashv is the Solana SHA-256 helper over a list of slices, which lowers to the sol_sha256 syscall on chain [25]; the same function runs in the Coprocessor and in the SDK, so the root that the enclave signs, the root that a trader checks and the root that the Escape verifies are computed by one piece of code.

3.9 Signatures: Ed25519 and ECDSA-P256

Two signature schemes appear in Privium, each where its ecosystem already uses it.

Ed25519 (RFC 8032 [26]) signs every Commit with skCsk_C and every Intent with the trader’s authority key. Brendel et al. prove that Ed25519 with the verification rules of RFC 8032 is SUF-CMA in the random oracle model under the DL assumption on edwards25519, provided the verifier rejects non-canonical encodings of the signature scalar, which is the setting that rules out signature malleability [27]. Privium needs strong unforgeability because the Commit signature is the only thing that authorizes a new Ledger root: a second valid signature on an old message must not be usable as a fresh authorization, and in Privium it cannot be, because the signed message includes the Crossing index (Chapter 4, Section 4.8). Solana verifies Ed25519 signatures through its native precompile; Chapter 5 gives the verification pattern and Chapter 9 the instruction layout.

ECDSA over P-256 (FIPS 186-5 [28]) signs the attestation material produced by trusted execution hardware. Privium does not choose it; it inherits it from the hardware vendor’s chain of trust, and verifies it once per enclave key registration, not per Commit (Chapter 5). ECDSA is EUF-CMA in the generic group model, and it is malleable: (r,s)(r, s) and (r,ℓP256−s)(r, \ell_{P256} - s) verify together. Registration is keyed on the signed content, never on the signature bytes, so malleability changes nothing.

Every signed message in the protocol starts with its own domain tag and the program id, so a signature produced for one purpose cannot be replayed for another, and a signature produced for one Privium deployment cannot be replayed on another. Formally, the tags make the message spaces of distinct purposes disjoint, so an adversary that wins one game against a tagged message family wins EUF-CMA (or SUF-CMA) against the underlying scheme with the same advantage.

3.10 What each guarantee rests on

The table states, for every cryptographic guarantee the later chapters use, the primitive that provides it and the assumption under which it holds. Trust in the enclave and in the Council is treated in Chapters 5 and 6; here we list only what the mathematics guarantees.

Guarantee Primitive Rests on Used in
Ledger amounts hidden from observers twisted ElGamal, AES-256-GCM DDH in ristretto255 (Thm 3.2); GCM IND-CPA with unique nonces Ch. 4
Committed balances cannot be reopened to other values Pedersen DL in ristretto255 (Thm 3.1, Lemma 3.1) Ch. 4, 6
Per-asset conservation check is sound Pedersen homomorphism, range proofs DL; Bulletproofs soundness Ch. 4
Intents readable only by the attested enclave HPKE base mode Gap-DH on X25519, ROM (Thm 3.3) Ch. 7, 10
A root names exactly one leaf per position Merkle tree collision resistance of SHA-256 (Thm 3.4) Ch. 4, 6
Only the attested enclave advances the Ledger Ed25519 DL on edwards25519, ROM, SUF-CMA [27] Ch. 4, 5, 9
Enclave key bound to its measurement ECDSA-P256 EUF-CMA of ECDSA; vendor root of trust Ch. 5
Council decrypts only correct shares Chaum-Pedersen special soundness, ROM (Lemma 3.2) Ch. 6
Rewritten leaves are well-formed ciphertexts of in-range balances sigma protocols, range proofs DL, ROM Ch. 4, 6

Each row is a standard reduction; none relies on a new assumption. The composition that matters most, conservation of every asset at every committed root, is proved in Chapter 4 from Theorem 3.1, Theorem 3.4 and the range proofs of Section 3.6.

References

  1. “Solana Privacy Rings”, Helius, 2026. https://www.helius.dev/blog/solana-privacy-rings
  2. N. Lokhande, R. Gupta, R. Chahar, A. Jangra, A. Prajapati, M. Kumari, “Encifher: A Trusted-Execution Coprocessor for Confidential Computation on Solana”, IACR ePrint 2026/1504, July 2026. https://eprint.iacr.org/2026/1504
  3. H. de Valence, J. Grigg, M. Hamburg, I. Lovecruft, G. Tankersley, F. Valsorda, “The ristretto255 and decaf448 Groups”, RFC 9496, IRTF CFRG, December 2023. https://www.rfc-editor.org/rfc/rfc9496
  4. Solana Program, zk-elgamal-proof repository, zk-sdk/src/encryption/pedersen.rs and elgamal.rs, accessed 2026-11-16. https://github.com/solana-program/zk-elgamal-proof
  5. M. Bellare, C. Namprempre, “Authenticated Encryption: Relations among Notions and Analysis of the Generic Composition Paradigm”, ASIACRYPT 2000. https://eprint.iacr.org/2000/025
  6. T. P. Pedersen, “Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing”, CRYPTO 1991. https://doi.org/10.1007/3-540-46766-1_9
  7. T. ElGamal, “A Public Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms”, IEEE Transactions on Information Theory, 1985. https://doi.org/10.1109/TIT.1985.1057074
  8. Y. Chen, X. Ma, C. Tang, M. H. Au, “PGC: Decentralized Confidential Payment System with Auditability”, IACR ePrint 2019/319, 2019. https://eprint.iacr.org/2019/319
  9. Solana Program, “Confidential Balances: Encryption”, accessed 2026-11-16. https://www.solana-program.com/docs/confidential-balances/encryption
  10. Solana Program, “Confidential Balances: Zero-Knowledge Proofs”, accessed 2026-11-16. https://www.solana-program.com/docs/confidential-balances/zkps
  11. Anza, “ZK ElGamal Proof Program”, Agave documentation, accessed 2026-11-16. https://docs.anza.xyz/runtime/zk-elgamal-proof
  12. M. Bellare, A. Boldyreva, J. Staddon, “Randomness Re-use in Multi-recipient Encryption Schemes”, PKC 2003. https://doi.org/10.1007/3-540-36288-6_7
  13. Solana Foundation, “Post-mortem: June 25, 2025”, June 2025. https://solana.com/news/post-mortem-june-25-2025
  14. Solana Compass, “Confidential Transfers Return to Solana Mainnet After Year-Long Security Pause”, 18 June 2026. https://solanacompass.com/news/confidential-transfers-return-to-solana-mainnet-after-year-long-security-pause
  15. Solana Compass, “Solana Activates BN254, BLS12-381 and ZK ElGamal: Three Cryptographic Primitives Now Live”, 7 August 2026. https://solanacompass.com/news/solana-activates-bn254-bls12-381-and-zk-elgamal-three-cryptographic-primitives-now-live
  16. C. P. Schnorr, “Efficient Signature Generation by Smart Cards”, Journal of Cryptology, 1991. https://doi.org/10.1007/BF00196725
  17. D. Pointcheval, J. Stern, “Security Arguments for Digital Signatures and Blind Signatures”, Journal of Cryptology, 2000. https://doi.org/10.1007/s001450010003
  18. D. Bernhard, O. Pereira, B. Warinschi, “How Not to Prove Yourself: Pitfalls of the Fiat-Shamir Heuristic and Applications to Helios”, ASIACRYPT 2012. https://eprint.iacr.org/2016/771
  19. B. Bünz, J. Bootle, D. Boneh, A. Poelstra, P. Wuille, G. Maxwell, “Bulletproofs: Short Proofs for Confidential Transactions and More”, IEEE S&P 2018. https://eprint.iacr.org/2017/1066
  20. M. Dworkin, “Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC”, NIST SP 800-38D, November 2007. https://csrc.nist.gov/pubs/sp/800/38/d/final
  21. R. Barnes, K. Bhargavan, B. Lipp, C. Wood, “Hybrid Public Key Encryption”, RFC 9180, February 2022. https://www.rfc-editor.org/rfc/rfc9180
  22. J. Alwen, B. Blanchet, E. Hauck, E. Kiltz, B. Lipp, D. Riepel, “Analysing the HPKE Standard”, EUROCRYPT 2021. https://eprint.iacr.org/2020/1499
  23. R. C. Merkle, “A Digital Signature Based on a Conventional Encryption Function”, CRYPTO 1987. https://doi.org/10.1007/3-540-48184-2_32
  24. B. Laurie, A. Langley, E. Kasper, “Certificate Transparency”, RFC 6962, June 2013. https://www.rfc-editor.org/rfc/rfc6962
  25. Anza, solana-sha256-hasher crate documentation, accessed 2026-11-16. https://docs.rs/solana-sha256-hasher
  26. S. Josefsson, I. Liusvaara, “Edwards-Curve Digital Signature Algorithm (EdDSA)”, RFC 8032, January 2017. https://www.rfc-editor.org/rfc/rfc8032
  27. J. Brendel, C. Cremers, D. Jackson, M. Zhao, “The Provable Security of Ed25519: Theory and Practice”, IEEE S&P 2021. https://eprint.iacr.org/2020/823
  28. NIST, “Digital Signature Standard (DSS)”, FIPS 186-5, February 2023. https://csrc.nist.gov/pubs/fips/186-5/final