In this chapter, we discuss set commitments, which are the first in the hierarchy with a partial opening mechanism.

The mathematical object to be committed to, which will consitute our message

m, is a set
m={m1,m2,...,mn}
of variable size
nnmax
. Being a set, its elements are unique, i.e.
ijmimj
and indexing of the elements is arbitrary.

In practice, commitments to sets are usually simulated by vector commitments. However, there is an important commitment primitive called an accumulator that is invariant to the arbitrary indexing of the set's elements (order/permutation invariance). Accumulators are not vector commitments, as they do not commit to a particular positioning of the elements. We will discuss accumulators through a specific example.


Accumulators with groups of known order DL

Let us assume that the elements of the sets to be committed to belong to the set

S. In other words, the sets to be committed to are elements of the power set of
S
,
m2S
.

Further, let us assume that there exists a one-to-one mapping function

λ:SPpmax that transforms each element
sS
to a distinct prime number
λ(s)pmax
. This mapping is easy to create for any finite cardinality
S
.

  • Similar to the single-element commitment scheme that were based on groups of known order, the setup algorithm outputs the group generator, and the group order, based on some security parameters
    s
    , such as the size of the group to be used, along with the mapping
    λ
    ,
    Φ(s)=ρ=(p,g,λ)
    .
  • The commitment algorithm maps each element of the message set
    m={m1,m2,...,mn}
    into their prime number counterparts
    λ(mi)
    and computes the product
    i=1nλ(mi)
    . This accumulator is unique for each message set in
    2S
    due to the prime mapping. Then, the digest is simply the group encrypted accumulator,
    d=C(ρ,m)=gi=0nλ(mi)=gi=0nλ(mi)modp
    .
  • The opening algorithm computes the proof for the
    i
    th element of the message
    i(m)=mi
    by first computing the inverse element
    gλ(mi)modp
    and group multiplying it with the digest, $
    O(ρ,m,i)=πi=dgλ(mi)modp=gjinλ(mj)
    . Note that
    πi
    contains (in an encrypted manner) all the information from the set
    m
    that is needed in addition to
    mi
    to arrive at the digest
    d
    , since
    d=πigλ(mi)
    for any
    i
    .
  • Therefore, the verification algorithm simply checks that the above relationship holds for candidate message
    mi
    ,
    V(ρ,d,i,πi,mi)=(πigλ(mi)=?d)
    .

The prime number mapping

λ makes this commitment scheme impractical and in general accumulators replace this mapping with a more interactive map such as
λ(mi)=mi+β
where
β
is determined by a verifier. This makes the mapping pseudo-unique, meaning that it is hard to replicate its results without knowing
β
beforehand.


Efficiency: The space/communication complexity of the digest

d and any opening proof
πi
are single group elements (whose size depends on the group size and representation).

The complexity of the commitment algorithm is

O(log(i=0nλ(mi)modp)) group operations in
G
, using fast exponentiation such as the square & multiply algorithm.

The complexity of the opening algorithm is

O(log(λ(mi)modp)) group operations in
G
using fast exponentiation.

The scheme does not require a trusted-setup algorithm, as the parameters of the group and

λ are completely public.


Reduction to single-element commitments

Given a set commitment

(Φ+,C+,O+,V+), it is straightforward to simulate a single-element commitment
(Φ,C,O,V)
through the following reduction:

  • The setup algorithm is the same, i.e.
    Φ(s)=Φ+(s)=ρ
    .
  • The commitment algorithm creates a digest from a single-element message
    m
    by creating a single element set
    {m}
    and committing to it through
    C+
    ,
    C(ρ,m)=C+(ρ,{m})=d
    .
  • The opening algorithm
    O
    for the entire message
    i(m)=m
    produces the opening proof for the first element of the set with
    O+
    ,
    O(ρ,m,i)=O+(ρ,{m},1)=πi
    . Note that in the reduction, the opening proof is no longer empty as was the case in single-element commitment schemes of the previous chapter.
  • The verification algorithm for a candidate message
    mi
    is simulated as
    V(ρ,d,i,πi,mi)=V+(ρ,d,1,πi,mi)
    .

This is extremely simplistic, as we are just wrapping the single-element message

m as a set and using the set commitment algorithms to simulate the single-element commitment. This will be a common theme, but the reductions become a bit more complex and will require additional algorithms in later chapters.


Remarks

As we mentioned, commitments to sets are usually simulated through practical and efficient vector commitments, which we discuss in the next chapter. However, accumulators (with some slight modifications to the presented version) are important components in some state-of-the-art zero-knowledge proof systems.

Intro: A Hierarchical View of Cryptographic Commitment Schemes
Previous: Single-element Commitments
Next: Vector Commitments