Logo
    Muppets: Maintainable Updatable Tree-based Vector Commitments
    Muppets: Maintainable Updatable Tree-based Vector Commitments

    Muppets: Maintainable Updatable Tree-based Vector Commitments

    Problem:

    In Merkle Tree we have a way to trade time for space when it comes to opening commitments, prover can be very efficient by storing part of the tree.

    What are the equivalent possibilities in constant-size vector commitments? Let’s look at LVC construction we recently published here.

    DRI: Anca Nitulescu

    Talk is available here.

    Muppets: New Maintainable VC from LVC

    Tree-based VC: High-level description

    We have two novel maintainable VC constructions that can be instantiated from any underlying VC scheme with homomorphic proofs.

    We show how to achieve a stronger, more flexible form of maintainability: our schemes allow to arbitrary tune the memory used to save on the opening time.

    One construction is based on multivariate polynomials, the other on univariate polynomials:

    1. The multivariate case is a generalisation of Hyperproofs that uses binary trees:
      • we allow for any arity for the trees,
      • therefore proofs are shorter
      • the leaves can be commitments from any LVC scheme
      • the aggregation/subvector openings are made via IPA
    2. The univariate construction:
      • only for binary trees
      • reusable setup: powers of tau
      • additional feature: setup is independent of the trade-off tuning
      • the memory/time used can be decided by the prover on the fly
      • different provers might have different tradeoffs in the same application
      • to save online verifier work one can preprocess n elements (Lagrange polynomials)
      • each node in the tree can be computed independent of parents and children nodes
      • computing one level of the tree: O(2n)O(2^{n})O(2n) for vectors of size 2n2^n2n
      • aggregation/subvector openings are also made via IPA

    Univariate Muppets: Construction

    How it works:

    We divide the vector vvv (size 2n2^n2n) in small chunks vjv_jvj​ of size 2k2^k2k. We have 2n=2m+k+12^n=2^{m+k+1}2n=2m+k+1

    We then arrange these chunks in a tree as follows:

    • each chunk corresponds to a leaf of the tree
    • each node is a succinct representation of its children (because we have structured keys)
    • the root of the tree is the committed value.
    image

    More of how to compute each level:

    As we know the opening (a subvector of vvv), the node computation are independent of one another:

    • each node is of the form C(vi)=ΛhwC(v_i) = \Lambda^h wC(vi​)=Λhw where
      • www is the opening containing all the leaves below node C(vi)C(v_i)C(vi​)
      • Λh\Lambda^hΛh is the Lagrange interpolation of some coset
    • we don’t even need the parent nodes, just the position in the tree to pick the correct coset

    An opening proof only involves the elements in the path from the root to the leaf containing the position to be opened. That is, if we want to open value aaa in position iii of vvv, we prove that:

    1. cjc_jcj​ is the leaf that contains the commitment to the jjj chunk containing iii —> storage cost linear in mmm,
    2. cjc_jcj​ opens to aaa in the position corresponding to iii —> time cost operations linear in 2k2^k2k.

    The former part can be pre-computed and efficiently maintained, with a storage cost linear in mmm, while the latter involves operations that are linear in 2k2^k2k.

    image

    Reusable setup and Parameters for trade-off:

    Muppets for univariate polynomials is an optimized construction that achieves memory-time tradeoffs from Powers of tau setup.

    This scheme is limited to binary trees since it leverages the fact that the cardinal of the set of roots of unity is a power of 2.

    For vectors of size N=2nN=2^nN=2n, we offer the following trade-off:

    • for any m,km, km,k, such that N=2m+k+1=2MKN=2^{m+k+1}=2MKN=2m+k+1=2MK, one can derive openings of size m+4m+4m+4 group elements.
    • The prover can pre-compute and store 2m−12^m-12m−1 proofs, and then compute proofs by performing O(2k)O(2^k)O(2k) group operations and O(k2k)O(k2^k)O(k2k) field operations.
    • We show also how to compute all proofs with O(mN)=O(log(M)N)O(m N)=O(log(M)N)O(mN)=O(log(M)N) group operations ( + O(n(m+k))O(n(m+k))O(n(m+k)) field operations).
    • The proofs are maintainable: an update in a position requires recomputing O(m)O(m)O(m) nodes.
    • The trusted setup depends only on NNN (the number of powers of τ\tauτ) and not on m,km, km,k, so the tradeoff can be decided on the fly.

    Relations with Verkle and Hyperproofs

    Verkle trees: The tree-based construction has a similar structure to Verkle trees. Each node can be considered as a succinct “commitment” to its children and proving involves (in some sense) sending this “commitments” and evidence they are well formed.

    The difference with Verkle trees is that the “commitment” does not satisfy a binding notion; indeed there are efficient ways to express each node in more than one way by manipulating group elements. This allow us to get around the recursivity problem of committing to commitments when building the tree, that Verkle trees have.

    Hyperproofs: In this work, pre-computing all proofs of opening (for one position) can be done in quasi-linear time in the dimension n of the vector, instead of the trivial quadratic time n^2. Furthermore, the homomorphic properties allow to efficiently, in logarithmic time update all proofs after a position update. Hyperproofs use a binary interpolating set for their polynomials: {0,1}N\{0,1\}^N{0,1}N. We extend these techniques to construct a multi-variate vector commitment scheme with the same properties while reducing proof size. Specifically, we observe that evaluating all openings in any set of the form ΣN={0,1}NΣ^N =\{0,1\}^NΣN={0,1}N for small N has lower amortized cost than computing the evaluations individually. Using ΣΣΣ of size l>2l>2l>2(or equivalently using a low degree instead of a multilinear encoding) results in smaller proof size.

    Concretely, the proof size depends on the dimension of the hypercube. Setting l=O(1)l= O(1)l=O(1) results in proof size loglnlog_l nlogl​n instead of log2nlog_2 nlog2​n, reducing the proof size by a constant factor.

    image

    Our Univariate construction, generalises further Hyperproofs, by getting rid of multiple variables in the polynomial representation for each node.

    image

    Univariate Muppets - Detailed Description

    Bilinear groups notation:

    • A bilinear group is given by a description gk=(p,G1,G2,GT,e)gk = (p, \mathbb{G}_1, \mathbb{G}_2, \mathbb{G}_T , e)gk=(p,G1​,G2​,GT​,e)
    • G1,G2,GT\mathbb{G}_1, \mathbb{G}_2, \mathbb{G}_TG1​,G2​,GT​ are additive groups of order ppp prime, so F=Fp\mathbb{F} = \mathbb{F}_pF=Fp​ is a field
    • We use notation [a]1,[b]2,[c]t[a]_1, [b]_2, [c]_t[a]1​,[b]2​,[c]t​ for elements in G1,G2\mathbb{G}_1, \mathbb{G}_2G1​,G2​ and GT\mathbb{G}_TGT​ respectively
    • The bilinear map or pairing e:G1×G2→GTe : \mathbb{G}_1 \times \mathbb{G}_2 \to \mathbb{G}_Te:G1​×G2​→GT​ is such that
    • ∀a,b∈Fp,e([a]1,[b]2)=[ab]t\forall a, b ∈ \mathbb{F}_p, \quad e([a]_1, [b]_2) = [ab]_t∀a,b∈Fp​,e([a]1​,[b]2​)=[ab]t​

    • We implicitly have that [1]t=e([1]1,[1]2)[1]_t= e([1]_1, [1]_2)[1]t​=e([1]1​,[1]2​) generates GT\mathbb{G}_TGT​
    • We use [a]1,2[a]_{1,2}[a]1,2​ to refer to 2 group elements [a]1∈G1, [a]2∈G2[a]_1 \in \mathbb{G}_1, ~ [a]_2 \in \mathbb{G}_2[a]1​∈G1​, [a]2​∈G2​

    Building a tree of commitments to a vector vvv of size N=2nN=2^nN=2n:

    • The root of the tree is a commitment C=[λ]1vC = [λ]_1vC=[λ]1​v, where λ=([λ1(τ)]1,...,[λN(τ)]1)λ = ([λ_1(τ )]_1, . . . , [λ_N(τ )]_1)λ=([λ1​(τ)]1​,...,[λN​(τ)]1​), computed from the powers of τ setup:
    • Let H={ωj}j=0,N−1H=\{ω^j\}_{j=0, N-1}H={ωj}j=0,N−1​ be the set of NNN-th roots of unity ωjω^jωj.
    • The polynomials {λj(X)}j=1,N\{λ_j (X)\}_{j=1,N}{λj​(X)}j=1,N​ are the Lagrange basis interpolation polynomials for set HHH
    • The two children will be c0=[λ0]1v0c_0 = [λ_0]_1v_0c0​=[λ0​]1​v0​ and c1=[λ1]1v1,c_1 = [λ_1]_1v_1,c1​=[λ1​]1​v1​, which are commitments to v0v_0v0​ and v1v_1v1​ with keys λ0λ_0λ0​ and λ1λ_1λ1​ of half the size.
    • The two children of c_0 will be c00=[λ10]1v10,C10=[λ10]1v10c_{00} = [λ_{10}]_1v_{10}, C_{10} = [λ_{10}]_1v_{10}c00​=[λ10​]1​v10​,C10​=[λ10​]1​v10​ and so on.
    • The leaves are commitments cbc_bcb​, b=(bν,...,b0)∈{0,1}ν+1b = (b_ν, . . . , b_0) ∈ \{0, 1\}^{ν+1}b=(bν​,...,b0​)∈{0,1}ν+1 vectors of size 2k2^k2k.
    • For a leaf index b=(bν,...,b0)∈{0,1}ν+1b = (b_ν, . . . , b_0) ∈ \{0, 1\}^{ν+1}b=(bν​,...,b0​)∈{0,1}ν+1, we denote b∣j=(bj...b0)b_{|j} = (b_j . . . b_0)b∣j​=(bj​...b0​) the suffix of size j.
    • Notethat cb∣jc_{b_{|j}}cb∣j​​ for j=0,...,ν−1j = 0, . . . , ν − 1j=0,...,ν−1 denotes all the commitments from the root to the leaf cbc_bcb​.
    • The division into vectors of half the size is done according to the least significant bit of the binary representation of the index, b0b_0b0​.
    • At the first level, there will be two vectors v0,v1v_0, v_1v0​,v1​ of size N/2=2n−1N/2=2^{n-1}N/2=2n−1 containing all positions of vvv with suffix b0b_0b0​.
    • At the next level, there will be four vectors v00,v01,v10,v11v_{00}, v_{01}, v_{10}, v_{11}v00​,v01​,v10​,v11​ of size N/4N/4N/4
    • vb1b0v_{b_1b_0}vb1​b0​​ indicates all the positions of vvv (in the natural order) that have as suffix b1b0{b_1b_0}b1​b0​ and so on.
    • The division into commitment keys of half the size will follow a similar pattern:
    • At level 1, roots of unity will be split into H0H_0H0​ and H1H_1H1​, according to the least significant bit of the binary representation of the index of the root,
    • H0H_0H0​ consists of all even and H1H_1H1​ all odd powers of ωωω.
    • In particular, H0H_0H0​ are the roots of unity of size N/2N/2N/2, and H0=ωH1H_0 = ωH_1H0​=ωH1​
    • At level 2, the commitment keys will be associated to H00,H01,H10,H11H_{00}, H_{01}, H_{10}, H_{11}H00​,H01​,H10​,H11​
    • By the same reasoning, H00H_{00}H00​ are the roots of unity of size N/4N/4N/4.
    • H10=ω2H00,H01=ωH00H_{10} = ω^2H_{00}, H_{01} = ωH_{00}H10​=ω2H00​,H01​=ωH00​ and H11=ω3H00H_{11} = ω^3H_{00}H11​=ω3H00​
    • More generally, we note that for any 0≤j≤ν0 ≤ j ≤ ν0≤j≤ν and any string (bj,...,b0)∈{0,1}j+1(b_j, . . . , b_0) ∈ \{0, 1\}^{j+1}(bj​,...,b0​)∈{0,1}j+1,
      • Hb∣j=ωsHr,H_{b|j} = ω^sH_r,Hb∣j​=ωsHr​, for
      • s=∑i=0jbi2ij,r=N/2j+1=2n−j−1s =\sum_{i=0}^j b_i 2^ij, \quad r =N/2^{j+1}= 2^{n-j-1}s=∑i=0j​bi​2ij,r=N/2j+1=2n−j−1
    • The Lagrange basis polynomials associated to the interpolation set Hb∣jH_{b|j}Hb∣j​ with the natural order is
      • λb∣j(X)=(λb∣j1(X),...,λb∣jr(X))λ_{b|j}(X) = (λ_{b|j}^1 (X), . . . , λ_{b|j}^r(X))λb∣j​(X)=(λb∣j1​(X),...,λb∣jr​(X))

    The construction leverages the fact that vanishing and Lagrange polynomials corresponding to cosets of roots of unity ωωω are sparse, so we minimize precomputation, storage and verifier work.

    More in detail, because of the way subsets are chosen, there is a simple relation between the parent and the children nodes.

    • observe that if c(X)=λ(X)v,c(X) = λ(X)v,c(X)=λ(X)v, then cb(X)=λb(X)vc_b(X) = λ_b(X)vcb​(X)=λb​(X)v for b=0,1b=0,1b=0,1 and
    • c(X)=12(c0(X)t1(X)−c1(X)t0(X))c(X) = \frac{1}{2} (c_0(X)t_1(X) − c_1(X)t_0(X))c(X)=21​(c0​(X)t1​(X)−c1​(X)t0​(X))
      • where t0t_0t0​ and t1t_1t1​ are vanishing polynomials for H0H_0H0​ and H1H_1H1​
      • observe that evaluating at H0H_0H0​, the second term in the right hand side disappears,
      • while t1(η)=2t_1(η) = 2t1​(η)=2 for any η∈H0η ∈ H_0η∈H0​
      • so both sides take the same value at H0H_0H0​, and similarly for H1H_1H1​

    Towards an MVP for Univariate Muppets

    An implementation would roughly consist of three components:

    1. the Lagrange basis construction from the LVC paper
      • (as presented above, our maintainable construction relies on an underlying ”non maintainable” subvector commitment construction for Lagrange basis from the LVC paper (Section 5.2))
    2. integration of (1) with the “tree-based” maintainability parts above
    3. integrating (1) and (2) with Inner Product Arguments for subvector opening

    ‣
    Hidden

    CryptoNet is a Protocol Labs initiative.