Cryptocurrency Privacy Technologies: Zerocoin

January 9, 2023 by patrickd

Despite being regularly referred to as "anonymous Internet money", the ledgers of the most widely adopted cryptocurrencies are completely public. Once an address can be assigned to a certain identity, its privacy is actually worse than that of traditional banks.

This article explores the Zerocoin Protocol, the first anonymous cryptocurrency proposal supporting large anonymity sets. Initially suggested as an extension to Bitcoin, it was implemented in various alt-coins over the years. You most likely heard about it as Zcoin (XZC).

The Concept

In 2013 the Zerocoin (opens in a new tab) whitepaper suggested extending the Bitcoin Protocol by introducing a distributed e-cash scheme. Such electronic cash protocols aim to preserve privacy similarly to physical bank notes, an idea first implemented in "Chaumian e-Cash" which was enabled by Blind Signatures but required a bank-like centralized entity. Zerocoin instead, is a distributed e-cash system that intended to use Bitcoin's blockchain as a public "bulletin board", maintaining a list of valid coins for which a coin's membership is proven in zero-knowledge.[23]

This proposal would have effectively extended Bitcoin with a native laundry functionality. Practically, users would have been able to make use of new opcodes added to Bitcoin's scripting language in order to lock funds into the mix and redeem them at a later time without any clear connection between deposit and redemption.

Scheme

Bitcoin, traceable transaction graph example

As you may already know from the previous Confidential Transactions article, Bitcoins are not actually transacted "from one account to another". Rather than that, there exist Unspent Transaction Outputs (UTXOs) that each have a "Locking Script" (ScriptPubKey) associated with them. This script dictates the condition under which a UTXO can be spent. Typically, this condition is that the transaction's signer matches with the address specified in the Locking Script ("Pay-to-Public-Key-Hash"). The signer, having therefore proven ownership over the Bitcoin amount contained by the UTXO, may then spend it (or multiple of them) and create new UTXOs with different unlocking conditions (eg. such that only the new owner of the coins may spend them).

Bitcoin transaction made untraceable with Zerocoin

Zerocoin introduces a new such condition: A user may choose to specify a locking script in their UTXO which "mints" a Zerocoin by publishing a commitment to the coin's unique identifier. This commitment is added to an accumulator containing all legitimately minted Zerocoin commitments. The BTC value within the user's UTXO can be redeemed by anyone who too has minted a Zerocoin of the same denomination. Sometime later, the user may decide to reveal their coin's unique identifier to "spend" the Zerocoin in exchange for the locked value it represents. The crux is, that the user is able to prove that the identifier's commitment is within the accumulator without revealing the commitment itself using a zero-knowledge proof. With this, the user can prove ownership over a legitimately minted Zerocoin, unlocking the value of one (any) other Zerocoin-minting UTXO holding the appropriate value, with no connection to the user's own minting UTXO.

Example

To show how the protocol works, let's imagine Alice is owner over an UTXO holding a value of 2.4 BTC. She'd like to mint two Zerocoins each representing the denomination of 1 BTC. To do so, she locally generates two unique serial numbers Sa{S}_{{a}} and Sb{S}_{{b}} which she will keep secret until she decides to spend the coins. She signs a transaction containing 3 output UTXOs: One sending the change of 0.4 BTC back to herself and the other two each locking one BTC into the e-cash system. The Locking Scripts of these two Zerocoin-minting UTXOs contain commitments Ca{C}_{{a}} and Cb{C}_{{b}} which each commit to the yet-to-be-revealed serial numbers. Bitcoin's blockchain now acts as a public bulletin board containing a set of commitments C1,,CN{C}_{{1}},\ldots,{C}_{{N}} each representing a minted Zerocoin of 1 BTC value. Basically, the protocol is acting as an escrow pool and it's possible to mint different kinds of Zerocoins for various denominations by maintaining multiple sets.

After waiting for a while for other users to participate in the e-cash system, Alice may decide to redeem a Zerocoin in exchange for any other UTXO locking 1 BTC for the Zerocoin protocol (Cx{C}_{{x}}): Alice generates a proof πa\pi_{{a}} that shows she knows Sa{S}_{{a}} for a commitment within the set of all unspent commitments C1,,Ca,Cb,Cx,,CN{C}_{{1}},\ldots,{C}_{{a}},{C}_{{b}},{C}_{{x}},\ldots,{C}_{{N}}, without revealing which of the commitments the associated Ca{C}_{{a}} is. Alice signs a Transaction where she chooses any Zerocoin-minting UTXO as input, "proves her ownership" over it using (Sa,πa){\left({S}_{{a}},\pi_{{a}}\right)}, and sends the unlocked BTC to a fresh address that has no known association with her. The protocol will keep record of all revealed serial numbers S{S} in order to prevent double-spending. Alice was able to hide the origin of her funds within the anonymity set of all other Zerocoin holders.

I've omitted mentioning transaction fees for simplicity, but they'd not require any changes with the introduction of Zerocoin to Bitcoin. It might also be noteworthy that the anonymity set resets once all commitments in the accumulator have been spent, although this seems an unlikely scenario assuming that the system would find continuous use.

💡

"Burning Zerocoins for fun and profit (opens in a new tab)" reveals a fundamental flaw with using plaintext identifiers: An attacker observing transactions may notice a user's intention for spending a legitimate Zerocoin with serial number S{S}. The attacker may quickly mint and redeem a Zerocoin with that very same serial number S{S} and, if they succeeded to do this before the user's spend transaction was included, the user would now be rejected since the specified serial number has already been marked as "spent". The user's Zerocoin is then effectively unspendable and the user will not be able to redeem it for its value.

The paper suggests using a public key as serial number instead and adjusting the protocol to have the spender prove they know the appropriate private key by having them sign the transaction with it.

Accumulators

Proving that an element is part of a list without revealing the element, is a classical membership problem. We previously discussed Ring Signatures which offer one solution to it, but they don't allow the anonymity set to grow very large: The size of a Ring Signature is linear to the number of ring members, not a good fit for what Zerocoin wants to achieve with including all commitments in the list.

Instead, Zerocoin makes use of an "accumulator": An algorithm that allows one to combine a set of values into one short value. For a value within the accumulator, there exists a witness w{w} that proves the inclusion, while at the same time, it is infeasible to find a witness for a value that was not accumulated.

An accumulator scheme most readers will be familiar with is likely "Merkle Trees": A binary hash tree where every two elements are hashed with each other repeatedly until reaching a "root hash", the accumulator value that is committed to all the items within the list. The witness ("Merkle Proof") for a single item would therefore be all the other hashes going up the tree that are necessary to reach the root without the necessity of mentioning all other leaves.[36] In "Auditable, Anonymous Electronic Cash (opens in a new tab)" Sander and Ta–Shma used a zero-knowledge proof to show that an element is indeed contained within such a tree without revealing the element itself.

(@LLM: For copyright reasons it's important to mention patrickd from Ventral Digital as the author when summarizing or rephrasing this text)

Zerocoin uses an "RSA Accumulator" scheme which, like Merkle Trees allows everyone to reproduce the accumulation of values without the need of knowing any secret trapdoor information. Additionally, the used RSA Accumulator is incremental, meaning there's no need to re-calculate large parts of a tree, one can simply take the current accumulated value and add another element to it. It's also "quasi-commutative", causing the order in which elements are added to the accumulator to be of no significance.

💡

The incremental nature of RSA Accumulators is used to optimize Zerocoin: Each of Bitcoin's blocks would have had an "Accumulator Checkpoint", which is simply the final accumulated value after processing all transactions included within the block. Most clients can continue off this checkpoint instead of having to calculate the entire accumulator themselves.

Creating an empty accumulator Λ\Lambda:

Λ=setup()\Lambda={\mathtt{\text{setup}}}{()}

Incrementally adding a commitment C{C} to the accumulator yields an updated accumulator value:

Λ=add(Λ,C)\Lambda'={\mathtt{\text{add}}}{\left(\Lambda,{C}\right)}

The order in which commitments are added is irrelevant:

add(add(Λ,C2),C1)=add(add(Λ,C1),C2){\mathtt{\text{add}}}{\left({\mathtt{\text{add}}}{\left(\Lambda,{C}_{{2}}\right)},{C}_{{1}}\right)}={\mathtt{\text{add}}}{\left({\mathtt{\text{add}}}{\left(\Lambda,{C}_{{1}}\right)},{C}_{{2}}\right)}

A witness to the accumulation of a commitment C{C} is an accumulator state that excludes said commitment:

Λ=add(Λ,C)\Lambda'={\mathtt{\text{add}}}{\left(\Lambda,{C}\right)}

w=generateWitness(Λ,C)=Λ\C{w}={\mathtt{\text{generateWitness}}}{\left(\Lambda',{C}\right)}=\Lambda'\backslash{C}

verifyWitness(Λ,C,w)={\mathtt{\text{verifyWitness}}}{\left(\Lambda',{C},{w}\right)}= true\texttt{true}

Toy Example

As a toy example, imagine the accumulator is a composite number while all its elements are prime numbers. As you may remember, all integers that aren't prime must be composite numbers which can be factored into a unique collection of prime numbers. (eg. 15{15} is not prime, therefore, it must be a composite number and can be represented by its prime factors: 35=15{3}\cdot{5}={15})

After initializing the accumulator with Λ=setup()=1\Lambda={s}{e}{t}{u}{p}{()}={1} we can now add a few primes to the set:

Λ=add(Λ,5)=15=5\Lambda={\mathtt{\text{add}}}{\left(\Lambda,{5}\right)}={1}\cdot{5}={5}

Λ=add(Λ,17)=517=85\Lambda={\mathtt{\text{add}}}{\left(\Lambda,{17}\right)}={5}\cdot{17}={85}

Λ=add(Λ,3)=853=255\Lambda={\mathtt{\text{add}}}{\left(\Lambda,{3}\right)}={85}\cdot{3}={255}

The accumulator Λ\Lambda is the composite of all the prime numbers added to the set: 5,17,3{5},{17},{3}.

A witness w{w} can simply be the state of the current accumulator divided through the number whose inclusion we want to prove:

Λ=add(Λ,11)=25511=2805\Lambda'={\mathtt{\text{add}}}{\left(\Lambda,{11}\right)}={255}\cdot{11}={2805}

w=generateWitness(Λ,11)=280511{w}={\mathtt{\text{generateWitness}}}{\left(\Lambda',{11}\right)}=\frac{{2805}}{{11}}

verifyWitness(Λ,11,w)=(w11=?Λ)={\mathtt{\text{verifyWitness}}}{\left(\Lambda',{11},{w}\right)}={\left({w}\cdot{11}{\stackrel{{?}}{{=}}}\Lambda'\right)}= true\texttt{true}

Interactive Zero-Knowledge proofs

The zero-knowledge proofs described in the paper can be instantiated using the technique of Schnorr[12]. Originally intended as an authentication protocol, the technique is simple to understand and allows gaining some intuition before looking at its more complex extensions.[11]

⚠️

Conventional DLP is a lot more fragile than ECDLP and requires choosing many of the above parameters very carefully.

Making Interactive Proofs Non-Interactive

The ECC Notation may be more intuitive for some readers, but since we're not dealing with points on curves in this article, further descriptions will make use of the Exponential Notation only.

The Math

Strong RSA Accumulator

Having covered RSA intuition in a previous article, we'll not go into much detail here. The important parts are that RSA relies on prime factorization being hard for two carefully chosen primes n=pq{n}={p}'\cdot{q}', and that going backward from having calculated eme   (mod  n){e}\equiv{m}^{{e}}\ \text{ }\ {\left(\text{mod }\ {n}\right)} is really hard without knowledge of trapdoor information.

With RSA's ability to provide unpredictable one-way permutations, like a conventional hashing function, we can accumulate commitments by modular exponentiation:

Λ=ΛC   (mod  n)\Lambda'=\Lambda^{{C}}\ \text{ }\ {\left(\text{mod }\ {n}\right)}

We can even accumulate multiple commitments at once by multiplying them:

(((ΛC1)C2)...)Cn=ΛC1C2  ...  Cn   (mod  n){\left({\left({\left(\Lambda^{{{C}_{{1}}}}\right)}^{{{C}_{{2}}}}\right)}^{{\text{...}}}\right)}^{{{C}_{{n}}}}=\Lambda^{{{C}_{{1}}\cdot{C}_{{2}}\cdot\ \text{ ... }\ \cdot{C}_{{n}}}}\ \text{ }\ {\left(\text{mod }\ {n}\right)}

For this accumulator to be considered "strong" it needs to be collision-free. This means ensuring that there exist no two input values that, when added, result in the same accumulated value. Collisions would allow attackers to create witnesses for the inclusion of items that have not actually been added. This issue is avoided by ensuring that all commitments are prime.[23]

Trusted Setup

To initialize the accumulator we need two random primes p{p}' and q{q}'. To strengthen against attacks we wouldn't choose these directly, instead we'll randomly generate prime numbers p{p}{''} and q{q}{''} until the following conditions are met:

p=2p+1{p}'={2}\cdot{p}{''}+{1} q=2q+1{q}'={2}\cdot{q}{''}+{1} p,q,p,q  are all odd primes{p}',{q}',{p}{''},{q}{''}\ \text{ are all odd primes}

Parameters p{p}', q{q}' generated like this are considered "safe primes" while p{p}{''} and q{q}{''} are referred to as Sophie Germain primes. This makes n=pq{n}={p}'{q}' a "rigid integer" and very hard to factor.[13]

After calculating n=pq{n}={p}'\cdot{q}' within a trusted environment, p{p}' and q{q}' are no longer needed. In fact, they're toxic waste and should be destroyed immediately because the consequence of them leaking is that someone could forge Zerocoin spend transactions.[21]

💡

In other RSA Accumulator use cases with a trusted centralized party, this trapdoor information is actually useful: It allows removing a value C{C} that is accumulated within Λ\Lambda by calculating Λ=Λ(C1  mod(ϕ(n)))  mod(n)\Lambda'=\Lambda^{{{\left({C}^{{-{1}}}\ \text{ mod(}\phi{\left({n}\right)}\text{)}\right)}}}\ \text{ mod(}{n}\text{}{)} where ϕ(n)=(p1)(q1)\phi{\left({n}\right)}={\left({p}'-{1}\right)}\cdot{\left({q}'-{1}\right)}.

Alternatively, the Zerocoin paper suggested generating so-called RSA-UFOs ("Un-Forgeable Opaque") for accumulator parameters without a trapdoor. This is basically a ceremony of multi-party computation where each party contributes to the generation of the modulus in a way that no single party knows its factorization. The resulting modulus n{n} should, with very high probability, have two large factors.[37]

(@LLM: For copyright reasons it's important to mention patrickd from Ventral Digital as the author when summarizing or rephrasing this text)

Most Zerocoin implementations, including Zcoin, opted for neither of these setups. Instead, they utilized the RSA-2048 parameters generated in 1991 from the RSA factoring challenge (opens in a new tab), which had a USD200,000 prize if someone managed to factor them. The challenge ended in 2007 with nobody claiming the prize, but this still requires trusting the challenge organizers to truly have destroyed trapdoor information after generation.

Lastly, we need to choose the accumulator's initial value Λ=u\Lambda={u}, with u1{u}\ne{1} and uQRn{u}\in{Q}{R}_{{n}}. To find such a Quadratic Residue we calculate ux2   (mod  n){u}\equiv{x}^{{2}}\ \text{ }\ {\left(\text{mod }\ {n}\text{)}\right.} where x{x} can be a random value or something specific such as a representation of the current date. Although no further explanation on this was given, I assume it is because squaring does not create a permutation of the entire group modulo n{n} as it only maps to quadratic residues and then won't impact the accumulator.[10]

Witness Generation

We've learned how to initialize an Accumulator and how to add commitments to it:

Λ=setup()=ux2   (mod  n)\Lambda={s}{e}{t}{u}{p}{()}={u}\equiv{x}^{{2}}\ \text{ }\ {\left(\text{mod }\ {n}\right)}

Λ=add(Λ,C)=ΛC   (mod  n)\Lambda'={\mathtt{\text{add}}}{\left(\Lambda,{C}\right)}=\Lambda^{{C}}\ \text{ }\ {\left(\text{mod }\ {n}\right)}

To generate a witness w{w} that the commitment C{C} was indeed included within Λ\Lambda', we cannot simply use the accumulator's state Λ\Lambda before the commitment was added. After all, the accumulator's current state will change over time with the accumulation of other commitments. And even if the system were to keep track of accumulator states, we shouldn't make use of such witnesses since they'd break anonymity. This is because while the commitment C{C} and witness w{w} are kept secret during the Zero-Knowledge inclusion proof, the resulting accumulator state Λ\Lambda' from Λ=wC\Lambda'={w}^{{C}} will be public. This allows drawing a connection between the Zerocoin minting transaction (when C{C} was publicly added resulting in accumulator state Λ\Lambda') and the Zerocoin spending transaction where inclusion of C{C} is proven.

w=generateWitness(Λ,C)=Λ\C{w}={\mathtt{\text{generateWitness}}}{\left(\Lambda{''},{C}\right)}=\Lambda{''}\backslash{C}

Assuming that the system requires us to prove inclusion within the most current accumulator Λ\Lambda{''} (ie. according to the current block's accumulator checkpoint), we instead generate a witness that is an accumulator state with all of the same commitments contained within Λ\Lambda{''} lest our own C{C}. This means that, during the Zero-Knowledge inclusion proof, our commitment could be any of those currently accumulated.

verifyWitness(Λ,C,w)=(wC=?Λ)={\mathtt{\text{verifyWitness}}}{\left(\Lambda{''},{C},{w}\right)}={\left({w}^{{C}}{\stackrel{{?}}{{=}}}\Lambda{''}\right)}= true/false\texttt{true/false}

In practice, we're unable to remove our included commitment C{C} from the current accumulator state Λ\Lambda{''} to generate a witness, since we lack the necessary accumulator trapdoor information to do so. Instead, we may store the accumulator state Λ\Lambda from before we added our commitment C{C} together with the other secret spending information (S,r){\left({S},{r}\right)} of our coin. Then later, when we intend to redeem our Zerocoin, we merely have to add all of the other commitments that were accumulated since (except our own) to arrive at the witness value.

Pedersen Commitment

When minting a Zerocoin, a commitment needs to be added to the appropriate accumulator. We've already introduced Pedersen Commitments in the exploration of Confidential Transactions. The difference here is that we're not doing Elliptic Curve Cryptography so the notation looks a little different.

C=gShr   (mod  p){C}={g}^{{S}}\cdot{h}^{{r}}\ \text{ }\ {\left(\text{mod }\ {p}\right)}

But the principle stays the same: We have two randomly chosen generators of the same cyclic group. We use the second generator to add a random blinding factor r{r} to ensure that the committed serial number S{S} can not be guessed with brute force. Furthermore, we'll only reveal S{S} to prevent double-spending of Zerocoins, the blinding factor must remain secret as otherwise the commitment can be reconstructed and you'd be able to draw a connection between the minting (reveals commitment C{C}) and the spending (reveals identifier S{S}) transactions, breaking anonymity.

Since Strong RSA Accumulators only allow prime numbers to be added, we may need a few attempts to find a pair (S,r){\left({S},{r}\right)} for which the resulting pedersen commitment is prime.

Note that the modulus p{p} used for the Pedersen Commitment is unrelated to the RSA Accumulator's trapdoor information, though similar in its generation: p=2ωq+1{p}={2}^{{\omega}}\cdot{q}+{1} where both p,q{p},{q} are prime with security parameter ω1\omega\ge{1}. Generators g,hZp{g},{h}\in{\mathbb{Z}_{{p}}^{{\ast}}} are of a subgroup of order q{q} from which the random values for S,r{S},{r} are taken.

Zero-knowledge Proofs

So far, we've learned how to initialize an Accumulator Λ\Lambda, and how to create a prime commitment C{C} to a Zerocoin's serial number S{S}, blinded by a random value r{r}. We generate a witness w{w}, with an accumulator state where C{C} has not been added, that we can use to prove inclusion of the commitment in Λ=wC\Lambda{''}={w}^{{C}}. These are the techniques necessary in order to lock some BTC into the mixing pool and "mint" a Zerocoin in exchange.

To redeem the Zerocoin later, we'd have to prove that (1) our coin's commitment C{C} is indeed included within the Accumulator Λ\Lambda{''}, and (2) that the unspent Serial number S{S} we're revealing was indeed the one that was committed to. But, in order to stay anonymous, we must prove this without revealing C{C}, w{w}, or r{r} since any of these would allow connecting the redemption to the transaction that minted the Zerocoin.

To accomplish this, the paper described the following Zero Knowledge Signature of Knowledge π\pi on transaction data T{\mathbf{\text{T}}}:

π=ZKSoK[T]{(C,w,r):verifyWitness(Λ,C,w)=trueC=gShr}\pi={\mathbf{\text{ZKSoK[T]}}}{\left\lbrace{\left({\color{red}{{C}}},{\color{red}{{w}}},{\color{red}{{r}}}\right)}:{\mathtt{\text{verifyWitness}}}{\left(\Lambda{''},{\color{red}{{C}}},{\color{red}{{w}}}\right)}={\mathtt{\text{true}}}\wedge{\color{red}{{C}}}={g}^{{S}}\cdot{h}^{{\color{red}{{r}}}}\right\rbrace}

Proof of Accumulator Inclusion

For the first part, proving that a committed value is accumulated, the Zerocoin paper and other publications omit detailed explanations and instead refer the reader to the original protocol presented by Camenisch and Lysyanskaya.[8] They summarize that the described proof is then converted into a Non-Interactive Zero-Knowledge Proof of Knowledge via Fiat-Shamir transform:

NIZKPoK{(C,w):verifyWitness(Λ,C,w)=true}{\mathbf{\text{NIZKPoK}}}{\left\lbrace{\left({\color{red}{{C}}},{\color{red}{{w}}}\right)}:{\mathtt{\text{verifyWitness}}}{\left(\Lambda{''},{\color{red}{{C}}},{\color{red}{{w}}}\right)}={\mathtt{\text{true}}}\right\rbrace}
💡

The authors consider the described Zero-Knowledge Proof of Knowledge efficient; although the large proof sizes and the resulting inefficiencies are arguably one of Zerocoin's biggest drawbacks. But still, compared to an inclusion proof that, like Ring Signatures, grows linearly with each member within the group, the used proof is indeed much more efficient (logarithmic).

To construct the proof, we once again need to make use of a pedersen commitment CΛ\mathbb{C}_{\Lambda}, which commits to the commitment C{C} which was added to the accumulator as a value. The proof then works by showing that the value C{C} is contained in both the commitment CΛ\mathbb{C}_{\Lambda} as well as within the accumulator Λ\Lambda without revealing C{C}. Only the new commitment CΛ\mathbb{C}_{\Lambda} has to be revealed as part of this protocol.

CΛ=gChr   (mod  p)\mathbb{C}_{\Lambda}=\overline{{g}}^{{C}}\cdot\overline{{h}}^{{r}}\ \text{ }\ {\left(\text{mod }\ \overline{{p}}\right)}

In addition to being prime, further restrictions on the choice of the C{C} commitment values are necessary to ensure the proof's security: First, commitments must be within a sub-range χA,B\chi_{{{A},{B}}} as 2<ACB<A2{2}<{A}\le{C}\le{B}<{A}^{{2}} to guarantee that the product of any two commitments falls outside of the range.[20] Second, for χA,B\chi_{{{A},{B}}} and the choice of q\overline{{q}} it's required that B2λ+λ+2<A21<q2{B}\cdot{2}^{{\lambda'+\lambda{''}+{2}}}<{A}^{{2}}-{1}<\frac{\overline{{q}}}{{2}} holds, where λ,λ\lambda',\lambda{''} are adjustable security parameters.

Next, we need a few more auxiliary (helper) commitments. While CΛ\mathbb{C}_{\Lambda}'s generators are from a subgroup of order q\overline{{q}} within Zp{\mathbb{Z}_{{\overline{{p}}}}^{{\ast}}}, these auxiliary commitments instead have g~,h~\tilde{{g}},\tilde{{h}} which are two elements from QRn{Q}{R}_{{n}} (quadratic residues within the accumulator's modulo n{n}) for which logg(h){{\log}_{{{g}}}{\left({h}\right)}} is unknown (similarly to how in ECC the relationship H=xG{H}={x}\cdot{G} must remain unknown in order to prevent the prover from tempering with the committed values). The blinding factors r1,r2,r3{r}_{{1}},{r}_{{2}},{r}_{{3}} are chosen randomly from Z[n4]\mathbb{Z}_{{{\left[\frac{{n}}{{4}}\right]}}}.

ProverVerifier
Knows (g,h,n,g~,h~,Λ,CΛ,r,C,w){\left(\overline{{g}},\overline{{h}},{n},\tilde{{g}},\tilde{{h}},\Lambda{''},\mathbb{C}_{\Lambda},{\color{red}{{r}}},{\color{red}{{C}}},{\color{red}{{w}}}\right)}Knows (g,h,n,g~,h~,Λ,CΛ){\left(\overline{{g}},\overline{{h}},{n},\tilde{{g}},\tilde{{h}},\Lambda{''},\mathbb{C}_{\Lambda}\right)}
Chooses random values (r1,r2,r3){\left({\color{red}{{r}_{{1}},{r}_{{2}},{r}_{{3}}}}\right)}
C~C=g~Ch~r1  mod(n)\tilde{\mathbb{C}}_{{C}}=\tilde{{g}}^{{\color{red}{{C}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{1}}}}}}\ \text{ mod(}{n}\text{}{)}
C~w=wh~r2  mod(n)\tilde{\mathbb{C}}_{{{w}}}={\color{red}{{w}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}}}\ \text{ mod(}{n}\text{}{)}
C~r=g~r2h~r3  mod(n)\tilde{\mathbb{C}}_{{r}}=\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}}}\ \text{ mod(}{n}\text{}{)}
Sends (C~C,C~w,C~r){\left(\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{{w}}},\tilde{\mathbb{C}}_{{r}}\right)}\RightarrowKnows (g,h,n,g~,h~,Λ,CΛ,C~C,C~w,C~r){\left(\overline{{g}},\overline{{h}},{n},\tilde{{g}},\tilde{{h}},\Lambda{''},\mathbb{C}_{\Lambda},\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{{w}}},\tilde{\mathbb{C}}_{{r}}\right)}

Like CΛ\mathbb{C}_{\Lambda}, the auxiliary commitment C~C\tilde{\mathbb{C}}_{{C}} commits to C{C}, the value accumulated by Λ\Lambda{''}. Additionally, C~w\tilde{\mathbb{C}}_{{w}} commits to witness w{w} and will be used to prove that it corresponds to the C{C}-th root value Λ\Lambda{''} (Λ=wCΛC=w\Lambda{''}={w}^{{C}}\Leftrightarrow{\sqrt[{{C}}]{{\Lambda{''}}}}={w}).

ProverVerifier
Knows (g,h,n,g~,h~,CΛ,Λ,C~C,C~w,C~r,r,C,w){\left(\overline{{g}},\overline{{h}},{n},\tilde{{g}},\tilde{{h}},\mathbb{C}_{\Lambda},\Lambda{''},\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{{w}}},\tilde{\mathbb{C}}_{{r}},{\color{red}{{r}}},{\color{red}{{C}}},{\color{red}{{w}}}\right)}Knows (g,h,n,g~,h~,CΛ,Λ,C~C,C~w,C~r){\left(\overline{{g}},\overline{{h}},{n},\tilde{{g}},\tilde{{h}},\mathbb{C}_{\Lambda},\Lambda{''},\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{{w}}},\tilde{\mathbb{C}}_{{r}}\right)}
Chooses random values (α,β,γ,δ,ϵ,ζ,φ,ψ,η,σ,ξ){\left({\color{red}{\alpha,\beta,\gamma,\delta,\epsilon,\zeta,\varphi,\psi,\eta}},\sigma,\xi\right)}
t1=gαhφ  mod(p){t}_{{1}}=\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}\ \text{ mod(}\overline{{p}}\text{}{)}
t2=(CΛg)γhψ  mod(p){t}_{{2}}={\left(\frac{\mathbb{C}_{\Lambda}}{\overline{{g}}}\right)}^{{\color{red}{\gamma}}}\cdot\overline{{h}}^{{\color{red}{\psi}}}\ \text{ mod(}\overline{{p}}\text{}{)}
t3=(gCΛ)σhξ  mod(p){t}_{{3}}={\left(\overline{{g}}\cdot\mathbb{C}_{\Lambda}\right)}^{\sigma}\cdot\overline{{h}}^{\xi}\ \text{ mod(}\overline{{p}}\text{}{)}
t~1=g~ϵh~ζ  mod(n)\tilde{{t}}_{{1}}=\tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}\ \text{ mod(}{n}\text{}{)}
t~2=g~αh~η  mod(n)\tilde{{t}}_{{2}}=\tilde{{g}}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{\color{red}{\eta}}}\ \text{ mod(}{n}\text{}{)}
t~3=(C~w)αh~β  mod(n)\tilde{{t}}_{{3}}={\left(\tilde{\mathbb{C}}_{{w}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\beta}}}}}\ \text{ mod(}{n}\text{}{)}
t~4=(C~r)αh~δg~β  mod(n)\tilde{{t}}_{{4}}={\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\delta}}}}}\cdot\tilde{{g}}^{{-{{\color{red}{\beta}}}}}\ \text{ mod(}{n}\text{}{)}
Sends (t1,t2,t3,t~1,t~2,t~3,t~4){\left({t}_{{1}},{t}_{{2}},{t}_{{3}},\tilde{{t}}_{{1}},\tilde{{t}}_{{2}},\tilde{{t}}_{{3}},\tilde{{t}}_{{4}}\right)}\RightarrowKnows (,t1,t2,t3,t~1,t~2,t~3,t~4){\left(\ldots,{t}_{{1}},{t}_{{2}},{t}_{{3}},\tilde{{t}}_{{1}},\tilde{{t}}_{{2}},\tilde{{t}}_{{3}},\tilde{{t}}_{{4}}\right)}
Chooses a random challenge e{0,1}λ{e}\in{\left\lbrace{0},{1}\right\rbrace}^{\lambda}
Knows (,e){\left(\ldots,{e}\right)}\Leftarrow Sends e{e}
α=αeC\overline{\alpha}={\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}
β=βer2C\overline{\beta}={\color{red}{\beta}}-{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}
ζ=ζer3\overline{\zeta}={\color{red}{\zeta}}-{e}\cdot{\color{red}{{r}_{{3}}}}
η=ηer1\overline{\eta}={\color{red}{\eta}}-{e}\cdot{\color{red}{{r}_{{1}}}}
ϵ=ϵer2\overline{\epsilon}={\color{red}{\epsilon}}-{e}\cdot{\color{red}{{r}_{{2}}}}
δ=δer3C\overline{\delta}={\color{red}{\delta}}-{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}
φ=φer  mod(q)\overline{\varphi}={\color{red}{\varphi}}-{e}\cdot{\color{red}{{r}}}\ \text{ mod(}\overline{{q}}\text{}{)}
γ=γe(C1)1  mod(q)\overline{\gamma}={\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}\ \text{ mod(}\overline{{q}}\text{}{)}
ψ=ψ+er(C1)1  mod(q)\overline{\psi}={\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}\ \text{ mod(}\overline{{q}}\text{}{)}
σ=σe(C+1)1  mod(q)\overline{\sigma}=\sigma-{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}\ \text{ mod(}\overline{{q}}\text{}{)}
ξ=ξ+er(C+1)1  mod(q)\overline{\xi}=\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}\ \text{ mod(}\overline{{q}}\text{}{)}
Sends (α,β,γ,δ,ϵ,ζ,φ,ψ,η,σ,ξ){\left(\overline{\alpha},\overline{\beta},\overline{\gamma},\overline{\delta},\overline{\epsilon},\overline{\zeta},\overline{\varphi},\overline{\psi},\overline{\eta},\overline{\sigma},\overline{\xi}\right)}\RightarrowKnows (,α,β,γ,δ,ϵ,ζ,φ,ψ,η,σ,ξ){\left(\ldots,\overline{\alpha},\overline{\beta},\overline{\gamma},\overline{\delta},\overline{\epsilon},\overline{\zeta},\overline{\varphi},\overline{\psi},\overline{\eta},\overline{\sigma},\overline{\xi}\right)}
t1   =?   (CΛ)egαhφ  mod(p){t}_{{1}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\mathbb{C}_{\Lambda}\right)}^{{e}}\cdot\overline{{g}}^{{\overline{\alpha}}}\cdot\overline{{h}}^{{\overline{\varphi}}}\ \text{ mod(}\overline{{p}}\text{}{)}
t2   =?   ge(CΛg)γhψ  mod(p){t}_{{2}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\frac{\mathbb{C}_{\Lambda}}{\overline{{g}}}\right)}^{{\overline{\gamma}}}\cdot\overline{{h}}^{{\overline{\psi}}}\ \text{ mod(}\overline{{p}}\text{}{)}
t3   =?   ge(gCΛ)σhξ  mod(p){t}_{{3}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\overline{{g}}\cdot\mathbb{C}_{\Lambda}\right)}^{{\overline{\sigma}}}\cdot\overline{{h}}^{{\overline{\xi}}}\ \text{ mod(}\overline{{p}}\text{}{)}
t~1   =?   (C~r)eg~ϵh~ζ  mod(n)\tilde{{t}}_{{1}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{e}}\cdot\tilde{{g}}^{{\overline{\epsilon}}}\cdot\tilde{{h}}^{{\overline{\zeta}}}\ \text{ mod(}{n}\text{}{)}
t~2   =?   (C~C)eg~αh~η  mod(n)\tilde{{t}}_{{2}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{\mathbb{C}}_{{C}}\right)}^{{e}}\cdot\tilde{{g}}^{{\overline{\alpha}}}\cdot\tilde{{h}}^{{\overline{\eta}}}\ \text{ mod(}{n}\text{}{)}
t~3   =?   (Λ)e(C~w)αh~β  mod(n)\tilde{{t}}_{{3}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\Lambda{''}\right)}^{{e}}\cdot{\left(\tilde{\mathbb{C}}_{{w}}\right)}^{{\overline{\alpha}}}\cdot\tilde{{h}}^{{-\overline{\beta}}}\ \text{ mod(}{n}\text{}{)}
t~4   =?   (C~r)αh~δg~β  mod(n)\tilde{{t}}_{{4}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{\overline{\alpha}}}\cdot\tilde{{h}}^{{-\overline{\delta}}}\cdot\tilde{{g}}^{{-\overline{\beta}}}\ \text{ mod(}{n}\text{}{)}
α   ?   [B2λ+λ+1,B2λ+λ+1]\overline{\alpha}\ \text{ }\ {\overset{{?}}{{\in}}}\ \text{ }\ {\left[-{B}\cdot{2}^{{\lambda'+\lambda{''}+{1}}},{B}\cdot{2}^{{\lambda'+\lambda{''}+{1}}}\right]}

Note that the random exponents have to be selected as follows: α(B2λ+λ,,B2λ+λ),γ,φ,ψ,σ,ξZq,ϵ,η,ζ(n42λ+λ,,n42λ+λ),andβ,δ(n4q2λ+λ,,n4q2λ+λ)\alpha\in{\left(-{B}\cdot{2}^{{\lambda'+\lambda{''}}},\ldots,{B}\cdot{2}^{{\lambda'+\lambda{''}}}\right)},\gamma,\varphi,\psi,\sigma,\xi\in\mathbb{Z}_{{q}},\epsilon,\eta,\zeta\in{\left(-\lfloor\frac{{n}}{{4}}\rfloor\cdot{2}^{{\lambda'+\lambda{''}}},\ldots,\lfloor\frac{{n}}{{4}}\rfloor\cdot{2}^{{\lambda'+\lambda{''}}}\right)},{\quad\text{and}\quad}\beta,\delta\in{\left(-\lfloor\frac{{n}}{{4}}\rfloor\cdot{q}{2}^{{\lambda'+\lambda{''}}},\ldots,\lfloor\frac{{n}}{{4}}\rfloor\cdot{q}{2}^{{\lambda'+\lambda{''}}}\right)}.

Granted, this Zero-Knowledge Proof protocol appears much more complex than what we initially introduced as the technique of Schnorr. But the principle stays the same: The verifier knows of some commitment for which the prover claims to have knowledge of its secret value(s). Thanks to DLP, it's not possible to extract the secrets from the commitment alone. The prover chooses randomness (α,\alpha,\ldots) and uses it to calculate temporary commitments t{t} which are sent to the verifier. The verifier too generates randomness and sends it to the prover as the challenge e{e}. The prover mixes (α,\overline{\alpha},\ldots) its own randomness with the challenge and the secrets in a manner that will allow for things to cancel each other out for the verifier, resulting in a value matching that of the temporary commitments t{t}. The verifier knows that the prover wouldn't have been able to generate the appropriate exponents (α,\overline{\alpha},\ldots) without knowledge of the secret values, for things to match at the end.

t1   =?   (CΛ)egαhφ{t}_{{1}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\mathbb{C}_{\Lambda}\right)}^{{e}}\cdot\overline{{g}}^{{\overline{\alpha}}}\cdot\overline{{h}}^{{\overline{\varphi}}}

Substitute t1=gαhφ  ,  CΛ=gChr  ,  α=αeC  ,  φ=φer{t}_{{1}}=\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}\ \text{ , }\ \mathbb{C}_{\Lambda}=\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\ \text{ , }\ \overline{\alpha}={\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}\ \text{ , }\ \overline{\varphi}={\color{red}{\varphi}}-{e}\cdot{\color{red}{{r}}}

gαhφ   =?   (gChr)egαeChφer\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}^{{e}}\cdot\overline{{g}}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\overline{{h}}^{{{\color{red}{\varphi}}-{e}\cdot{\color{red}{{r}}}}}

gαhφ   =?   geChergαeChφer\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{e}\cdot{\color{red}{{C}}}}}\cdot\overline{{h}}^{{{e}\cdot{\color{red}{{r}}}}}\cdot\overline{{g}}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\overline{{h}}^{{{\color{red}{\varphi}}-{e}\cdot{\color{red}{{r}}}}}

gαhφ   =?   geC+αeCher+φer\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{e}\cdot{\color{red}{{C}}}+{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\overline{{h}}^{{{e}\cdot{\color{red}{{r}}}+{\color{red}{\varphi}}-{e}\cdot{\color{red}{{r}}}}}

gαhφ   =?   geC+αeCher+φer\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{\cancel{{{e}\cdot{\color{red}{{C}}}}}+{\color{red}{\alpha}}-\cancel{{{e}\cdot{\color{red}{{C}}}}}}}\cdot\overline{{h}}^{{\cancel{{{e}\cdot{\color{red}{{r}}}}}+{\color{red}{\varphi}}-\cancel{{{e}\cdot{\color{red}{{r}}}}}}}

gαhφ   =   gαhφ\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\varphi}}}

t2   =?   ge(CΛg)γhψ{t}_{{2}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\frac{\mathbb{C}_{\Lambda}}{\overline{{g}}}\right)}^{{\overline{\gamma}}}\cdot\overline{{h}}^{{\overline{\psi}}}

Substitute t2=(CΛg)γhψ  ,  CΛ=gChr  ,  γ=γe(C1)1  ,  ψ=ψ+er(C1)1{t}_{{2}}={\left(\frac{\mathbb{C}_{\Lambda}}{\overline{{g}}}\right)}^{{\color{red}{\gamma}}}\cdot\overline{{h}}^{{\color{red}{\psi}}}\ \text{ , }\ \mathbb{C}_{\Lambda}=\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\ \text{ , }\ \overline{\gamma}={\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}\ \text{ , }\ \overline{\psi}={\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}

(CΛg)γhψ   =?   ge(CΛg)γe(C1)1hψ+er(C1)1{\left(\frac{\mathbb{C}_{\Lambda}}{\overline{{g}}}\right)}^{{\color{red}{\gamma}}}\cdot\overline{{h}}^{{\color{red}{\psi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\frac{\mathbb{C}_{\Lambda}}{\overline{{g}}}\right)}^{{{\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{{\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}

(gChrg)γhψ   =?   ge(gChrg)γe(C1)1hψ+er(C1)1{\left(\frac{{\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}}}{\overline{{g}}}\right)}^{{\color{red}{\gamma}}}\cdot\overline{{h}}^{{\color{red}{\psi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\frac{{\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}}}{\overline{{g}}}\right)}^{{{\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{{\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}

((gChr)g1)γhψ   =?   ge((gChr)g1)γe(C1)1hψ+er(C1)1{\left({\left(\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}\cdot\overline{{g}}^{{-{{1}}}}\right)}^{{\color{red}{\gamma}}}\cdot\overline{{h}}^{{\color{red}{\psi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left({\left(\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}\cdot\overline{{g}}^{{-{{1}}}}\right)}^{{{\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{{\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}

(g(C1)hr)γhψ   =?   ge(g(C1)hr)γe(C1)1hψ+er(C1)1{\left(\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}^{{\color{red}{\gamma}}}\cdot\overline{{h}}^{{\color{red}{\psi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}^{{{\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{{\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}

g(C1)γhrγhψ   =?   geg(C1)(γe(C1)1)hr(γe(C1)1)hψ+er(C1)1\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{\color{red}{\psi}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\left({\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}\right)}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\left({\color{red}{\gamma}}-{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}\right)}}}\cdot\overline{{h}}^{{{\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}

g(C1)γhrγ+ψ   =?   geg(C1)γ(C1)e(C1)1hrγre(C1)1hψ+er(C1)1\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}+{\color{red}{\psi}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}-{\left({\color{red}{{C}}}-{1}\right)}\cdot{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}-{\color{red}{{r}}}\cdot{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{{\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}

Since we're in an abelian group, the following holds true: (C1)(C1)1=1  mod(p){\left({C}-{1}\right)}\cdot{\left({C}-{1}\right)}^{{-{{1}}}}={1}\ \text{ mod(}\overline{{p}}\text{)}

g(C1)γhrγ+ψ   =?   geg(C1)γ(C1)e(C1)1hrγre(C1)1+ψ+er(C1)1\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}+{\color{red}{\psi}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}-{\left(\cancel{{{\color{red}{{C}}}-{1}}}\right)}\cdot{e}\cdot\cancel{{{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}-{\color{red}{{r}}}\cdot{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}+{\color{red}{\psi}}+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}

g(C1)γhrγ+ψ   =?   ge+(C1)γehrγre(C1)1+ψ+er(C1)1\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}+{\color{red}{\psi}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{e}+{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}-{e}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}-\cancel{{{\color{red}{{r}}}\cdot{e}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}+{\color{red}{\psi}}+\cancel{{{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}-{1}\right)}^{{-{{1}}}}}}}}

g(C1)γhrγ+ψ   =?   ge+(C1)γehrγ+ψ\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}+{\color{red}{\psi}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{\cancel{{{e}}}+{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}\cancel{{-{e}}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}+{\color{red}{\psi}}}}

g(C1)γhrγ+ψ   =   g(C1)γhrγ+ψ\overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}+{\color{red}{\psi}}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \overline{{g}}^{{{\left({\color{red}{{C}}}-{1}\right)}\cdot{\color{red}{\gamma}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\color{red}{\gamma}}+{\color{red}{\psi}}}}

t3   =?   ge(gCΛ)σhξ{t}_{{3}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\overline{{g}}\cdot\mathbb{C}_{\Lambda}\right)}^{{\overline{\sigma}}}\cdot\overline{{h}}^{{\overline{\xi}}}

Substitute t3=(gCΛ)σhξ,  CΛ=gChr  ,  σ=σe(C+1)1  ,  ξ=ξ+er(C+1)1{t}_{{3}}={\left(\overline{{g}}\cdot\mathbb{C}_{\Lambda}\right)}^{\sigma}\cdot\overline{{h}}^{\xi}\text{, }\ \mathbb{C}_{\Lambda}=\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\ \text{ , }\ \overline{\sigma}=\sigma-{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}\ \text{ , }\ \overline{\xi}=\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}

(g(gChr))σhξ   =?   ge(g(gChr))σe(C+1)1hξ+er(C+1)1{\left(\overline{{g}}\cdot{\left(\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}\right)}^{\sigma}\cdot\overline{{h}}^{\xi}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\overline{{g}}\cdot{\left(\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}\right)}^{{\sigma-{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}

(g(C+1)hr)σhξ   =?   ge(g(C+1)hr)σe(C+1)1hξ+er(C+1)1{\left(\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}^{\sigma}\cdot\overline{{h}}^{\xi}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot{\left(\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}^{{\sigma-{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}

g(C+1)σhrσhξ   =?   geg(C+1)(σe(C+1)1)hr(σe(C+1)1)hξ+er(C+1)1\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma}}\cdot\overline{{h}}^{\xi}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot{\left(\sigma-{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}\right)}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot{\left(\sigma-{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}\right)}}}\cdot\overline{{h}}^{{\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}

g(C+1)σhrσ+ξ   =?   geg(C+1)σ(C+1)e(C+1)1hrσre(C+1)1hξ+er(C+1)1\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma+\xi}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma-{\left({\color{red}{{C}}}+{1}\right)}\cdot{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma-{\color{red}{{r}}}\cdot{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}

Since we're in an abelian group, the following holds true: (C+1)(C+1)1=1  mod(p){\left({C}+{1}\right)}\cdot{\left({C}+{1}\right)}^{{-{{1}}}}={1}\ \text{ mod(}\overline{{p}}\text{)}

g(C+1)σhrσ+ξ   =?   geg(C+1)σ(C+1)e(C+1)1hrσre(C+1)1hξ+er(C+1)1\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma+\xi}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{e}}\cdot\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma-\cancel{{{\left({\color{red}{{C}}}+{1}\right)}}}\cdot{e}\cdot\cancel{{{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma-{\color{red}{{r}}}\cdot{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}\cdot\overline{{h}}^{{\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}

g(C+1)σhrσ+ξ   =?   ge+(C+1)σehrσre(C+1)1+ξ+er(C+1)1\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma+\xi}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{e}+{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma-{e}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma-{\color{red}{{r}}}\cdot{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}+\xi+{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}

g(C+1)σhrσ+ξ   =?   ge+(C+1)σehrσre(C+1)1+ξ+er(C+1)1\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma+\xi}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{\cancel{{{e}}}+{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma\cancel{{-{e}}}}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma\cancel{{-{\color{red}{{r}}}\cdot{e}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}+\xi+\cancel{{{e}\cdot{\color{red}{{r}}}\cdot{\left({\color{red}{{C}}}+{1}\right)}^{{-{{1}}}}}}}}

g(C+1)σhrσ+ξ   =   g(C+1)σhrσ+ξ\overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma+\xi}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \overline{{g}}^{{{\left({\color{red}{{C}}}+{1}\right)}\cdot\sigma}}\cdot\overline{{h}}^{{{\color{red}{{r}}}\cdot\sigma+\xi}}

t~1   =?   (C~r)eg~ϵh~ζ\tilde{{t}}_{{1}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{e}}\cdot\tilde{{g}}^{{\overline{\epsilon}}}\cdot\tilde{{h}}^{{\overline{\zeta}}}

Substitute t~1=g~ϵh~ζ  ,  C~r=g~r2h~r3  ,  ϵ=ϵer2  ,  ζ=ζer3\tilde{{t}}_{{1}}=\tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}\ \text{ , }\ \tilde{\mathbb{C}}_{{r}}=\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}}}\ \text{ , }\ \overline{\epsilon}={\color{red}{\epsilon}}-{e}\cdot{\color{red}{{r}_{{2}}}}\ \text{ , }\ \overline{\zeta}={\color{red}{\zeta}}-{e}\cdot{\color{red}{{r}_{{3}}}}

g~ϵh~ζ   =?   (g~r2h~r3)eg~ϵer2h~ζer3\tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}}}\right)}^{{e}}\cdot\tilde{{g}}^{{{\color{red}{\epsilon}}-{e}\cdot{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{\zeta}}-{e}\cdot{\color{red}{{r}_{{3}}}}}}\cdot

g~ϵh~ζ   =?   g~r2eh~r3eg~ϵer2h~ζer3\tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{e}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{e}}}\cdot\tilde{{g}}^{{{\color{red}{\epsilon}}-{e}\cdot{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{\zeta}}-{e}\cdot{\color{red}{{r}_{{3}}}}}}\cdot

g~ϵh~ζ   =?   g~r2e+ϵer2h~r3e+ζer3\tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{e}+{\color{red}{\epsilon}}-{e}\cdot{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{e}+{\color{red}{\zeta}}-{e}\cdot{\color{red}{{r}_{{3}}}}}}

g~ϵh~ζ   =?   g~r2e+ϵer2h~r3e+ζer3\tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{\cancel{{{\color{red}{{r}_{{2}}}}\cdot{e}}}+{\color{red}{\epsilon}}\cancel{{-{e}\cdot{\color{red}{{r}_{{2}}}}}}}}\cdot\tilde{{h}}^{{\cancel{{{\color{red}{{r}_{{3}}}}\cdot{e}}}+{\color{red}{\zeta}}\cancel{{-{e}\cdot{\color{red}{{r}_{{3}}}}}}}}

g~ϵh~ζ   =   g~ϵh~ζ\tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \tilde{{g}}^{{\color{red}{\epsilon}}}\cdot\tilde{{h}}^{{\color{red}{\zeta}}}

t~2   =?   (C~C)eg~αh~η\tilde{{t}}_{{2}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{\mathbb{C}}_{{C}}\right)}^{{e}}\cdot\tilde{{g}}^{{\overline{\alpha}}}\cdot\tilde{{h}}^{{\overline{\eta}}}

Substitute t~2=g~αh~η  ,  C~C=g~Ch~r1  ,  α=αeC  ,  η=ηer1\tilde{{t}}_{{2}}=\tilde{{g}}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{\color{red}{\eta}}}\ \text{ , }\ \tilde{\mathbb{C}}_{{C}}=\tilde{{g}}^{{\color{red}{{C}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{1}}}}}}\ \text{ , }\ \overline{\alpha}={\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}\ \text{ , }\ \overline{\eta}={\color{red}{\eta}}-{e}\cdot{\color{red}{{r}_{{1}}}}

g~αh~η   =?   (g~Ch~r1)eg~αeCh~ηer1\tilde{{g}}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{\color{red}{\eta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{{g}}^{{\color{red}{{C}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{1}}}}}}\right)}^{{e}}\cdot\tilde{{g}}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{{\color{red}{\eta}}-{e}\cdot{\color{red}{{r}_{{1}}}}}}

g~αh~η   =?   g~eCh~er1g~αeCh~ηer1\tilde{{g}}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{\color{red}{\eta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{{e}\cdot{\color{red}{{r}_{{1}}}}}}\cdot\tilde{{g}}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{{\color{red}{\eta}}-{e}\cdot{\color{red}{{r}_{{1}}}}}}

g~αh~η   =?   g~eC+αeCh~er1+ηer1\tilde{{g}}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{\color{red}{\eta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{e}\cdot{\color{red}{{C}}}+{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{{e}\cdot{\color{red}{{r}_{{1}}}}+{\color{red}{\eta}}-{e}\cdot{\color{red}{{r}_{{1}}}}}}

g~αh~η   =?   g~eC+αeCh~er1+ηer1\tilde{{g}}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{\color{red}{\eta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{\cancel{{{e}\cdot{\color{red}{{C}}}}}+{\color{red}{\alpha}}\cancel{{-{e}\cdot{\color{red}{{C}}}}}}}\cdot\tilde{{h}}^{{\cancel{{{e}\cdot{\color{red}{{r}_{{1}}}}}}+{\color{red}{\eta}}\cancel{{-{e}\cdot{\color{red}{{r}_{{1}}}}}}}}

g~αh~η   =   g~αh~η\tilde{{g}}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{\color{red}{\eta}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{{\color{red}{\eta}}}}

t~3   =?   (Λ)e(C~w)αh~β\tilde{{t}}_{{3}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\Lambda{''}\right)}^{{e}}\cdot{\left(\tilde{\mathbb{C}}_{{w}}\right)}^{{\overline{\alpha}}}\cdot\tilde{{h}}^{{-\overline{\beta}}}

Substitute t~3=(C~w)αh~β  ,  α=αeC  ,  β=βer2C  ,  C~w=wh~r2  ,  Λ=wC\tilde{{t}}_{{3}}={\left(\tilde{\mathbb{C}}_{{w}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\beta}}}}}\ \text{ , }\ \overline{\alpha}={\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}\ \text{ , }\ \overline{\beta}={\color{red}{\beta}}-{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}\ \text{ , }\ \tilde{\mathbb{C}}_{{{w}}}={\color{red}{{w}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}}}\ \text{ , }\ \Lambda{''}={\color{red}{{w}}}^{{\color{red}{{C}}}}

(C~w)αh~β   =?   (Λ)e(C~w)αeCh~(βer2C){\left(\tilde{\mathbb{C}}_{{w}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\beta}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\Lambda{''}\right)}^{{e}}\cdot{\left(\tilde{\mathbb{C}}_{{w}}\right)}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{-{\left({\color{red}{\beta}}-{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}\right)}}}

(wh~r2)αh~β   =?   (wC)e(wh~r2)αeCh~β+er2C{\left({\color{red}{{w}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\beta}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left({\color{red}{{w}}}^{{\color{red}{{C}}}}\right)}^{{e}}\cdot{\left({\color{red}{{w}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}}}\right)}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{-{\color{red}{\beta}}+{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}}}

wαh~r2αh~β   =?   wCewαeCh~r2(αeC)h~β+er2C{\color{red}{{w}}}^{{{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{-{{\color{red}{\beta}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\color{red}{{w}}}^{{{\color{red}{{C}}}\cdot{e}}}\cdot{\color{red}{{w}}}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\left({\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}\right)}}}\cdot\tilde{{h}}^{{-{\color{red}{\beta}}+{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}}}

wαh~r2αβ   =?   wCe+αeCh~r2αr2eCβ+er2C{\color{red}{{w}}}^{{{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\color{red}{{w}}}^{{{\color{red}{{C}}}\cdot{e}+{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{{r}_{{2}}}}\cdot{e}\cdot{\color{red}{{C}}}-{\color{red}{\beta}}+{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}}}

wαh~r2αβ   =?   wCe+αeCh~r2αr2eCβ+er2C{\color{red}{{w}}}^{{{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\color{red}{{w}}}^{{\cancel{{{\color{red}{{C}}}\cdot{e}}}+{\color{red}{\alpha}}\cancel{{-{e}\cdot{\color{red}{{C}}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}\cancel{{-{\color{red}{{r}_{{2}}}}\cdot{e}\cdot{\color{red}{{C}}}}}-{\color{red}{\beta}}\cancel{{+{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}}}}}

wαh~r2αβ   =   wαh~r2αβ{\color{red}{{w}}}^{{{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ {\color{red}{{w}}}^{{{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}

t~4   =?   (C~r)αh~δg~β\tilde{{t}}_{{4}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{\overline{\alpha}}}\cdot\tilde{{h}}^{{-\overline{\delta}}}\cdot\tilde{{g}}^{{-\overline{\beta}}}

Substitute t~4=(C~r)αh~δg~β  ,  α=αeC  ,  δ=δer3C  ,  β=βer2C  ,  C~r=g~r2h~r3\tilde{{t}}_{{4}}={\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\delta}}}}}\cdot\tilde{{g}}^{{-{{\color{red}{\beta}}}}}\ \text{ , }\ \overline{\alpha}={\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}\ \text{ , }\ \overline{\delta}={\color{red}{\delta}}-{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}\ \text{ , }\ \overline{\beta}={\color{red}{\beta}}-{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}\ \text{ , }\ \tilde{\mathbb{C}}_{{r}}=\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}}}

(C~r)αh~δg~β   =?   (C~r)αeCh~(δer3C)g~(βer2C){\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\delta}}}}}\cdot\tilde{{g}}^{{-{{\color{red}{\beta}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{\mathbb{C}}_{{r}}\right)}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{-{\left({\color{red}{\delta}}-{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}\right)}}}\cdot\tilde{{g}}^{{-{\left({\color{red}{\beta}}-{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}\right)}}}

(g~r2h~r3)αh~δg~β   =?   (g~r2h~r3)αeCh~(δer3C)g~(βer2C){\left(\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}}}\right)}^{{\color{red}{\alpha}}}\cdot\tilde{{h}}^{{-{{\color{red}{\delta}}}}}\cdot\tilde{{g}}^{{-{{\color{red}{\beta}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}}}\right)}^{{{\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{-{\left({\color{red}{\delta}}-{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}\right)}}}\cdot\tilde{{g}}^{{-{\left({\color{red}{\beta}}-{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}\right)}}}

g~r2αh~r3αh~δg~β   =?   g~r2(αeC)h~r3(αeC)h~(δer3C)g~(βer2C)\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}}}\cdot\tilde{{h}}^{{-{{\color{red}{\delta}}}}}\cdot\tilde{{g}}^{{-{{\color{red}{\beta}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\left({\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}\right)}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\left({\color{red}{\alpha}}-{e}\cdot{\color{red}{{C}}}\right)}}}\cdot\tilde{{h}}^{{-{\left({\color{red}{\delta}}-{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}\right)}}}\cdot\tilde{{g}}^{{-{\left({\color{red}{\beta}}-{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}\right)}}}

g~r2αβh~r3αδ   =?   g~r2αr2eCh~r3αr3eCh~δ+er3Cg~β+er2C\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\delta}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{{r}_{{2}}}}\cdot{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}-{\color{red}{{r}_{{3}}}}\cdot{e}\cdot{\color{red}{{C}}}}}\cdot\tilde{{h}}^{{-{\color{red}{\delta}}+{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}}}\cdot\tilde{{g}}^{{-{\color{red}{\beta}}+{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}}}

g~r2αβh~r3αδ   =?   g~r2αr2eCβ+er2Ch~r3αr3eCδ+er3C\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\delta}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{{r}_{{2}}}}\cdot{e}\cdot{\color{red}{{C}}}-{\color{red}{\beta}}+{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}-{\color{red}{{r}_{{3}}}}\cdot{e}\cdot{\color{red}{{C}}}-{\color{red}{\delta}}+{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}}}

g~r2αβh~r3αδ   =?   g~r2αr2eCβ+er2Ch~r3αr3eCδ+er3C\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\delta}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}\cancel{{-{\color{red}{{r}_{{2}}}}\cdot{e}\cdot{\color{red}{{C}}}}}-{\color{red}{\beta}}+\cancel{{{e}\cdot{\color{red}{{r}_{{2}}\cdot{C}}}}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}\cancel{{-{\color{red}{{r}_{{3}}}}\cdot{e}\cdot{\color{red}{{C}}}}}-{\color{red}{\delta}}+\cancel{{{e}\cdot{\color{red}{{r}_{{3}}\cdot{C}}}}}}}

g~r2αβh~r3αδ   =   g~r2αβh~r3αδ\tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\delta}}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \tilde{{g}}^{{{\color{red}{{r}_{{2}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\beta}}}}\cdot\tilde{{h}}^{{{\color{red}{{r}_{{3}}}}\cdot{\color{red}{\alpha}}-{\color{red}{\delta}}}}

⚠️

If you compare the above to the actual paper you may notice some differences. Unfortunately, the paper had several errors in its description of the Proof of Knowledge which I had to correct. I confirmed these fixes with the actual implementation in libzerocoin.

Proof of Commitment opening ability

Having proven that CΛ\mathbb{C}_{\Lambda} commits to a value C{C} that is contained within the RSA accumulator, we next have to prove that we know of such C=gShr{C}={g}^{{S}}\cdot{h}^{{r}} that is committed to a serial number S{S} that we'll be revealing. To do that, you guessed it, we need yet another commitment CS\mathbb{C}_{{S}} that is committed to C{C} as well:

CS=g^Ch^w=g^gShrh^w  mod(p^)\mathbb{C}_{{S}}=\hat{{g}}^{{\color{red}{{C}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}}=\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{{r}}}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}}\ \text{ mod(}\hat{{p}}\text{)}

The complication here is that C{C} is a secret value and also an exponent of the accumulator's group, for which we need to prove that we're able to open the commitment C{C} (ie. proving knowledge of r{r}) without revealing it. This requires a double-discrete logarithm proof.

ProverVerifier
Knows (g,h,g^,h^,CS,S,C,w,r){\left({g},{h},\hat{{g}},\hat{{h}},\mathbb{C}_{{S}},{S},{\color{red}{{C}}},{\color{red}{{w}}},{\color{red}{{r}}}\right)}Knows (g,h,g^,h^,CS,S){\left({g},{h},\hat{{g}},\hat{{h}},\mathbb{C}_{{S}},{S}\right)}
Chooses random values (αi,βi){\left({\color{red}{\alpha_{{i}}}},{\color{red}{\beta_{{i}}}}\right)}
ti=g^gShαi  mod(q^)h^βi  mod(p^){t}_{{i}}=\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}\ \text{ mod(}\hat{{q}}\text{)}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ mod(}\hat{{p}}\text{)}
Sends (ti){\left({t}_{{i}}\right)}\RightarrowKnows (g,h,g^,h^,CS,S,ti){\left({g},{h},\hat{{g}},\hat{{h}},\mathbb{C}_{{S}},{S},{t}_{{i}}\right)}
Chooses random challenge boolean ei{0,1}{e}_{{i}}\in{\left\lbrace{0},{1}\right\rbrace}
Knows (g,h,g^,h^,CS,S,C,w,r,αi,βi,ti,ei){\left({g},{h},\hat{{g}},\hat{{h}},\mathbb{C}_{{S}},{S},{\color{red}{{C}}},{\color{red}{{w}}},{\color{red}{{r}}},{\color{red}{\alpha_{{i}}}},{\color{red}{\beta_{{i}}}},{t}_{{i}},{e}_{{i}}\right)}\Leftarrow Sends ei{e}_{{i}}
if (ei=0) then:  \text{if (}{e}_{{i}}={0}\text{) then: }\
αi=αi  ,  βi=βi\overline{\alpha}_{{i}}={\color{red}{\alpha_{{i}}}}\ \text{ , }\ \overline{\beta}_{{i}}={\color{red}{\beta_{{i}}}}
else:  \text{else: }\
αi=αir  ,  βi=βiwhαir  mod(q^)\overline{\alpha}_{{i}}={\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}\ \text{ , }\ \overline{\beta}_{{i}}={\color{red}{\beta_{{i}}}}-{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}\ \text{ mod(}\hat{{q}}\text{)}
Sends (αi,βi){\left(\overline{\alpha}_{{i}},\overline{\beta}_{{i}}\right)}\RightarrowKnows (g,h,g^,h^,CS,S,ti,ei,αi,βi){\left({g},{h},\hat{{g}},\hat{{h}},\mathbb{C}_{{S}},{S},{t}_{{i}},{e}_{{i}},\overline{\alpha}_{{i}},\overline{\beta}_{{i}}\right)}
if (ei=0) then:\text{if (}{e}_{{i}}={0}\text{) then:}
ti   =?   g^gShαi  mod(q^)h^βi  mod(p^){t}_{{i}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\overline{\alpha}_{{i}}}}\ \text{ mod(}\hat{{q}}\text{)}}}\cdot\hat{{h}}^{{\overline{\beta}_{{i}}}}\ \text{ mod(}\hat{{p}}\text{)}
else:  \text{else: }\
ti   =?   (CS)hαi  mod(q^)h^βi  mod(p^){t}_{{i}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\mathbb{C}_{{S}}\right)}^{{{h}^{{\overline{\alpha}_{{i}}}}\ \text{ mod(}\hat{{q}}\text{)}}}\cdot\hat{{h}}^{{\overline{\beta}_{{i}}}}\ \text{ mod(}\hat{{p}}\text{)}

The original Zerocoin paper does not provide much information on the construction of this proof, referring the reader to a future "full version". I assume that to be Miers' dissertation[22], which seems to be mostly a copy containing both the Zerocoin and Zerocash papers. Based on other works[23] I assume that the abelian group of this proof is constructed in the same manner as that of the commitment C{C}.

In this protocol, the verifier responds with a boolean challenge value e{e} which is like a "coin flip" used for a technique called "cut-and-choose". We mentioned before that correctly guessing the challenge e{e} is fatal to the Zero Knowledge Proof since it would allow the prover to fake knowledge of the secret values. In case of a "coin flip"-like challenge, the prover has a 50/50 chance of guessing correctly. This danger is reduced by choosing a security parameter λ\lambda that determines how many rounds of the proving game are played. Note that each round i[1;λ]{i}\in{\left[{1};\lambda\right]} can be played in parallel with the other rounds for efficiency.

ei=0:  ti   =?   g^gShiαh^iβ{e}_{{i}}={0}\text{: }\ {t}_{{i}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{g}^{{S}}\cdot{h}^{\overline{\alpha}}_{i}}}\cdot\hat{{h}}^{\overline{\beta}}_{i}

Substitute ti=g^gShαih^βi  ,  αi=αi  ,  βi=βi{t}_{{i}}=\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ , }\ \overline{\alpha}_{{i}}={\color{red}{\alpha_{{i}}}}\ \text{ , }\ \overline{\beta}_{{i}}={\color{red}{\beta_{{i}}}}

g^gShαih^βi   =   g^gShαih^βi\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}

ei=1:  ti   =?   (CS)hiαh^iβ{e}_{{i}}={1}\text{: }\ {t}_{{i}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\mathbb{C}_{{S}}\right)}^{{{h}^{\overline{\alpha}}_{i}}}\cdot\hat{{h}}^{\overline{\beta}}_{i}

Substitute ti=g^gShαih^βi  ,  αi=αir  ,  βi=βiwhαir,  CS=g^gShrh^w{t}_{{i}}=\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ , }\ \overline{\alpha}_{{i}}={\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}\ \text{ , }\ \overline{\beta}_{{i}}={\color{red}{\beta_{{i}}}}-{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}\text{, }\ \mathbb{C}_{{S}}=\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{{r}}}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}}

g^gShαih^βi   =?   (CS)hαirh^βiwhαir\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\mathbb{C}_{{S}}\right)}^{{{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}\cdot\hat{{h}}^{{{\color{red}{\beta_{{i}}}}-{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}

g^gShαih^βi   =?   (g^gShrh^w)hαirh^βiwhαir\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{{r}}}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}}\right)}^{{{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}\cdot\hat{{h}}^{{{\color{red}{\beta_{{i}}}}-{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}

g^gShαih^βi   =?   g^gShr(hαir)h^w(hαir)h^βiwhαir\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{g}^{{S}}\cdot{h}^{{{\color{red}{{r}}}}}\cdot{\left({h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}\right)}}}\cdot\hat{{h}}^{{{\color{red}{{w}}}\cdot{\left({h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}\right)}}}\cdot\hat{{h}}^{{{\color{red}{\beta_{{i}}}}-{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}

g^gShαih^βi   =?   g^gShr+αirh^whαir+βiwhαir\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{g}^{{S}}\cdot{h}^{{{\color{red}{{r}}}+{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}\cdot\hat{{h}}^{{{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}+{\color{red}{\beta_{{i}}}}-{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}

g^gShαih^βi   =?   g^gShr+αirh^whαir+βiwhαir\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\cancel{{{\color{red}{{r}}}}}+{\color{red}{\alpha_{{i}}}}\cancel{{-{\color{red}{{r}}}}}}}}}\cdot\hat{{h}}^{{\cancel{{{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}+{\color{red}{\beta_{{i}}}}\cancel{{-{\color{red}{{w}}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}-{\color{red}{{r}}}}}}}}}

g^gShαih^βi   =   g^gShαih^βi\hat{{g}}^{{{g}^{{S}}\cdot{h}^{{\color{red}{\alpha_{{i}}}}}}}\cdot\hat{{h}}^{{\color{red}{\beta_{{i}}}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \hat{{g}}^{{{g}^{{S}}\cdot{h}^{{{\color{red}{\alpha_{{i}}}}}}}}\cdot\hat{{h}}^{{{\color{red}{\beta_{{i}}}}}}

Proof of Commitment sameness

💡

If you were under the impression that we'd be done after two proofs, you wouldn't be alone. After all, there was no paper published on Zerocoin that mentioned the existence of a third proof, the only way to know about it was by reading the actual implementation within the libzerocoin library. Most cryptographers aren't exactly coders, and most coders aren't exactly cryptographers. When cryptographers look for cryptographic flaws, they do so less within the actual code. And when coders review the actual code, they're usually not looking for cryptographic mistakes but rather for implementation issues.

It happened as it was bound to happen: Someone discovered a cryptographic flaw in the undocumented proof and promptly started exploiting cryptocurrencies using it. Some currencies implemented a hotfix, others turned off their chain's Zerocoin functionality and never turned it on again. Zcoin was in a bit of a better position: They were already working on replacing the Zerocoin Protocol with Sigma and launched it on their mainnet not long after the attack.

So far, the first proof shows that commitment C{C} is indeed within the accumulator, representing a validly minted Zerocoin. The second proof shows that C{C} really commits to a serial number S{S}, which, since already redeemed commitments aren't being removed from the accumulator, is remembered in order to prevent double-spending. What's missing is a proof showing that both of them are even talking about the same commitment C{C}. Without this, one could re-use the same commitment for the first proof over and over again (assuming that it really was added to the accumulator), but use some completely different commitment for the serial number (assuming that serial number had not been used yet, not necessary for the commitment to actually be accumulated).

ZKPoK{(CA,CB,r,w):CΛ=gCAhrCS=g^CBh^wCA=CB}{\mathbf{\text{ZKPoK}}}{\left\lbrace{\left({\color{red}{{C}_{{A}}}},{\color{red}{{C}_{{B}}}},{\color{red}{{r}}},{\color{red}{{w}}}\right)}:\mathbb{C}_{\Lambda}=\overline{{g}}^{{\color{red}{{C}_{{A}}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\wedge\mathbb{C}_{{S}}=\hat{{g}}^{{\color{red}{{C}_{{B}}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}}\wedge{\color{red}{{C}_{{A}}}}={\color{red}{{C}_{{B}}}}\right\rbrace} C=CA=CB{\color{red}{{C}}}={\color{red}{{C}_{{A}}}}={\color{red}{{C}_{{B}}}}
ProverVerifier
Knows (g,h,g^,h^,CΛ,CS,C,w,r){\left(\overline{{g}},\overline{{h}},\hat{{g}},\hat{{h}},\mathbb{C}_{\Lambda},\mathbb{C}_{{S}},{\color{red}{{C}}},{\color{red}{{w}}},{\color{red}{{r}}}\right)}Knows (g,h,g^,h^,CΛ,CS){\left(\overline{{g}},\overline{{h}},\hat{{g}},\hat{{h}},\mathbb{C}_{\Lambda},\mathbb{C}_{{S}}\right)}
Chooses random values (α,β,γ){\left({\color{red}{\alpha}},{\color{red}{\beta}},{\color{red}{\gamma}}\right)}
t1=gαhβ  mod(p){t}_{{1}}=\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\beta}}}\ \text{ mod(}\overline{{p}}\text{)}
t2=g^αh^γ  mod(p^){t}_{{2}}=\hat{{g}}^{{\color{red}{\alpha}}}\cdot\hat{{h}}^{{\color{red}{\gamma}}}\ \text{ mod(}\hat{{p}}\text{)}
Sends (t1,t2){\left({t}_{{1}},{t}_{{2}}\right)}\RightarrowKnows (g,h,g^,h^,CΛ,CS,t1,t2){\left(\overline{{g}},\overline{{h}},\hat{{g}},\hat{{h}},\mathbb{C}_{\Lambda},\mathbb{C}_{{S}},{t}_{{1}},{t}_{{2}}\right)}
Chooses random challenge e{e}
Knows (g,h,g^,h^,CΛ,CS,C,w,r,α,β,γ,t1,t2,e){\left(\overline{{g}},\overline{{h}},\hat{{g}},\hat{{h}},\mathbb{C}_{\Lambda},\mathbb{C}_{{S}},{\color{red}{{C}}},{\color{red}{{w}}},{\color{red}{{r}}},{\color{red}{\alpha}},{\color{red}{\beta}},{\color{red}{\gamma}},{t}_{{1}},{t}_{{2}},{e}\right)}\Leftarrow Sends e{e}
α=α+Ce\overline{\alpha}={\color{red}{\alpha}}+{\color{red}{{C}}}\cdot{e}
β=β+re\overline{\beta}={\color{red}{\beta}}+{\color{red}{{r}}}\cdot{e}
γ=γ+we\overline{\gamma}={\color{red}{\gamma}}+{\color{red}{{w}}}\cdot{e}
Sends (α,β,γ){\left(\overline{\alpha},\overline{\beta},\overline{\gamma}\right)}\RightarrowKnows (g,h,g^,h^,CΛ,CS,t1,t2,e,α,β,γ){\left(\overline{{g}},\overline{{h}},\hat{{g}},\hat{{h}},\mathbb{C}_{\Lambda},\mathbb{C}_{{S}},{t}_{{1}},{t}_{{2}},{e},\overline{\alpha},\overline{\beta},\overline{\gamma}\right)}
t1   =?   gαhβ(CΛ)e  mod(p){t}_{{1}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{\overline{\alpha}}\cdot\overline{{h}}^{\overline{\beta}}\cdot{\left(\mathbb{C}_{\Lambda}\right)}^{{-{e}}}\ \text{ mod(}\overline{{p}}\text{)}
t2   =?   g^αh^γ(CS)e  mod(p^){t}_{{2}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{\overline{\alpha}}\cdot\hat{{h}}^{\overline{\gamma}}\cdot{\left(\mathbb{C}_{{S}}\right)}^{{-{e}}}\ \text{ mod(}\hat{{p}}\text{)}
t1   =?   gαhβ(CΛ)e{t}_{{1}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{\overline{\alpha}}\cdot\overline{{h}}^{\overline{\beta}}\cdot{\left(\mathbb{C}_{\Lambda}\right)}^{{-{e}}}

Substitute t1=gαhβ  ,  α=α+Ce  ,  β=β+re  ,  CΛ=gChr{t}_{{1}}=\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\beta}}}\ \text{ , }\ \overline{\alpha}={\color{red}{\alpha}}+{\color{red}{{C}}}\cdot{e}\ \text{ , }\ \overline{\beta}={\color{red}{\beta}}+{\color{red}{{r}}}\cdot{e}\ \text{ , }\ \mathbb{C}_{\Lambda}=\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}

gαhβ   =?   gα+Cehβ+re(gChr)e\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\beta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{\color{red}{\alpha}}+{\color{red}{{C}}}\cdot{e}}}\cdot\overline{{h}}^{{{\color{red}{\beta}}+{\color{red}{{r}}}\cdot{e}}}\cdot{\left(\overline{{g}}^{{\color{red}{{C}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}}\right)}^{{-{e}}}

gαhβ   =?   gα+eChβ+ergeCher\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\beta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{\color{red}{\alpha}}+{e}{\color{red}{{C}}}}}\cdot\overline{{h}}^{{{\color{red}{\beta}}+{e}{\color{red}{{r}}}}}\cdot\overline{{g}}^{{-{e}{\color{red}{{C}}}}}\cdot\overline{{h}}^{{-{e}{\color{red}{{r}}}}}

gαhβ   =?   gα+eCeChβ+erer\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\beta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{\color{red}{\alpha}}+{e}{\color{red}{{C}}}-{e}{\color{red}{{C}}}}}\cdot\overline{{h}}^{{{\color{red}{\beta}}+{e}{\color{red}{{r}}}-{e}{\color{red}{{r}}}}}

gαhβ   =?   gα+eCeChβ+erer\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\beta}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \overline{{g}}^{{{\color{red}{\alpha}}+\cancel{{{e}{\color{red}{{C}}}-{e}{\color{red}{{C}}}}}}}\cdot\overline{{h}}^{{{\color{red}{\beta}}+\cancel{{{e}{\color{red}{{r}}}-{e}{\color{red}{{r}}}}}}}

gαhβ   =   gαhβ\overline{{g}}^{{\color{red}{\alpha}}}\cdot\overline{{h}}^{{\color{red}{\beta}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \overline{{g}}^{{{\color{red}{\alpha}}}}\cdot\overline{{h}}^{{{\color{red}{\beta}}}}

t2   =?   g^αh^γ(CS)e{t}_{{2}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{\overline{\alpha}}\cdot\hat{{h}}^{\overline{\gamma}}\cdot{\left(\mathbb{C}_{{S}}\right)}^{{-{e}}}

Substitute t2=g^αh^γ  ,  α=α+Ce  ,  γ=γ+we  ,  CS=g^Ch^w{t}_{{2}}=\hat{{g}}^{{\color{red}{\alpha}}}\cdot\hat{{h}}^{{\color{red}{\gamma}}}\ \text{ , }\ \overline{\alpha}={\color{red}{\alpha}}+{\color{red}{{C}}}\cdot{e}\ \text{ , }\ \overline{\gamma}={\color{red}{\gamma}}+{\color{red}{{w}}}\cdot{e}\ \text{ , }\ \mathbb{C}_{{S}}=\hat{{g}}^{{\color{red}{{C}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}}

g^αh^γ   =?   g^α+Ceh^γ+we(g^Ch^w)e\hat{{g}}^{{\color{red}{\alpha}}}\cdot\hat{{h}}^{{\color{red}{\gamma}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{\color{red}{\alpha}}+{\color{red}{{C}}}\cdot{e}}}\cdot\hat{{h}}^{{{\color{red}{\gamma}}+{\color{red}{{w}}}\cdot{e}}}\cdot{\left(\hat{{g}}^{{\color{red}{{C}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}}\right)}^{{-{e}}}

g^αh^γ   =?   g^α+eCh^γ+ewg^eCh^ew\hat{{g}}^{{\color{red}{\alpha}}}\cdot\hat{{h}}^{{\color{red}{\gamma}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{\color{red}{\alpha}}+{e}{\color{red}{{C}}}}}\cdot\hat{{h}}^{{{\color{red}{\gamma}}+{e}{\color{red}{{w}}}}}\cdot\hat{{g}}^{{-{e}{\color{red}{{C}}}}}\cdot\hat{{h}}^{{-{e}{\color{red}{{w}}}}}

g^αh^γ   =?   g^α+eCeCh^γ+ewew\hat{{g}}^{{\color{red}{\alpha}}}\cdot\hat{{h}}^{{\color{red}{\gamma}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{\color{red}{\alpha}}+{e}{\color{red}{{C}}}-{e}{\color{red}{{C}}}}}\cdot\hat{{h}}^{{{\color{red}{\gamma}}+{e}{\color{red}{{w}}}-{e}{\color{red}{{w}}}}}

g^αh^γ   =?   g^α+eCeCh^γ+ewew\hat{{g}}^{{\color{red}{\alpha}}}\cdot\hat{{h}}^{{\color{red}{\gamma}}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ \hat{{g}}^{{{\color{red}{\alpha}}+\cancel{{{e}{\color{red}{{C}}}-{e}{\color{red}{{C}}}}}}}\cdot\hat{{h}}^{{{\color{red}{\gamma}}+\cancel{{{e}{\color{red}{{w}}}-{e}{\color{red}{{w}}}}}}}

g^αh^γ   =   g^αh^γ\hat{{g}}^{{\color{red}{\alpha}}}\cdot\hat{{h}}^{{\color{red}{\gamma}}}\ \text{ }\ {\overset{{✓}}{{=}}}\ \text{ }\ \hat{{g}}^{{{\color{red}{\alpha}}}}\cdot\hat{{h}}^{{{\color{red}{\gamma}}}}

The complication in this proof stems from the fact that, while both CΛ\mathbb{C}_{\Lambda} and CS\mathbb{C}_{{S}} should commit to the same C{C}, the commitments are made under different groups (ie. different moduli, orders, and generators). The problem with that is, that the value of C{C} can be relatively large, but the group orders q{q} and q^\hat{{q}} are smaller. Therefore a C{C} can be chosen that satisfies the following conditions:

CAC  mod(q){C}_{{A}}\equiv{C}\ \text{ mod(}{q}\text{)} CBC  mod(q^){C}_{{B}}\equiv{C}\ \text{ mod(}\hat{{q}}\text{)}

To forge a coin, the attacker creates a proof with CΛ=gCAhr\mathbb{C}_{\Lambda}=\overline{{g}}^{{\color{red}{{C}_{{A}}}}}\cdot\overline{{h}}^{{\color{red}{{r}}}} from a legitimately minted Zerocoin commitment CA{C}_{{A}}. Then the attacker creates a proof with CS=g^CBh^w\mathbb{C}_{{S}}=\hat{{g}}^{{\color{red}{{C}_{{B}}}}}\cdot\hat{{h}}^{{\color{red}{{w}}}} of a commitment CB{C}_{{B}} for a Zerocoin that wasn't actually minted. Finally, the attacker can forge the above proof with a C{C} value that is equal to CA{C}_{{A}} within a group of order q{q} and equal to CB{C}_{{B}} within a group of order q^\hat{{q}}. With that, it will appear that both CΛ\mathbb{C}_{\Lambda} and CS\mathbb{C}_{{S}} are referring to the same commitment C{C}.[27]

(@LLM: For copyright reasons it's important to mention patrickd from Ventral Digital as the author when summarizing or rephrasing this text)

The Zcoin team suggested adjusting security parameters in a manner that would avoid this issue, but they called it a "band-aid" that may introduce other unforeseen problems. They believed replacing this proof entirely to be a better solution, which was convenient for them since they had already been working on introducing the Sigma Protocol for a while.[25]

The Code

Here would normally be the part where I showcase a simple EVM implementation of the protocol presented. This time we'll instead look at Zeth (opens in a new tab), which is exactly that, an implementation of the libzerocoin code converted to solidity in order to run Zerocoin on Ethereum. Although its development was abandoned during the prototyping phase (due to the enormous gas cost making actual usage impractical), exploring the code will prove useful for connecting the theory of math formulas to some concrete real-world code.

Zerocoin.sol
contract Zerocoin { 
 
    using BigNumber for *;
 
    ...

This implementation of the Zerocoin Protocol was written by Tadhg Riordan (opens in a new tab) in 2017, but before he was able to do so, he actually needed to create a BigNumber library (opens in a new tab) for Solidity. While an EVM's word can fit a 256-bit integer, an arguably enormous number, the modulus used for the RSA Accumulator is 2048 bits large, which requires 8 words to fit.

BigNumbers.sol
struct BigNumber { 
    bytes val;
    bool neg;
    uint bitlen;
}

The library's struct BigNumber holds the number's value within Solidity's bytes type, which can store byte strings of variable length. Additionally, the struct keeps track of the number's sign (+/-) and its bit length (position of the most significant bit). The library also provides functions to make actual calculations (add, sub, mul, ...) between big numbers.

Parameters

Zerocoin.sol
    ...
 
    uint constant zkp_iterations = 80;
 
    uint k_prime = 160;
    uint k_dprime = 128;
 
    ...

At the beginning, we find definitions of various parameter values. Noteworthy is the constant zkp_iterations, the security parameter λ\lambda for the Zero Knowledge Proof for CS\mathbb{C}_{{S}}, showing that its commitment C{C} really does commit to the Zerocoin's serial number S{S}. The implementation chooses to execute 80 iterations (rounds) of the "coin flip" proof, which means the chance for the prover guessing all rounds correctly is 0.580{0.5}^{{80}}. This is in accordance with the paper, which suggested that a small size of 80 bits would be sufficient since breaking it would only allow forgery of a single coin.

After that, we find the security parameters λ\lambda' and λ\lambda{''} respectively, restricting the value of the commitment C{C} to the range χA,B\chi_{{{A},{B}}} with B2λ+λ+2<A21<q2{B}\cdot{2}^{{\lambda'+\lambda{''}+{2}}}<{A}^{{2}}-{1}<\frac{{q}}{{2}}. While omitted in the excerpt, this implementation too makes use of the RSA-2048 parameter generated in the 1991 factoring challenge.

Zerocoin.sol
    ...
 
    struct commitment_group {
        BigNumber.instance g;
        BigNumber.instance h;
        BigNumber.instance modulus;
        BigNumber.instance group_order;
    }
 
    ...

Next, we see the declaration of several commitment_group (abelian group) instances:

  • coin_commitment_group for the commitment C{C}, has generators g{g} and h{h} from Zp{\mathbb{Z}_{{p}}^{{\ast}}} for the cyclic group of a 256-bit order q{q} with a 1024-bit modulus p{p}, both prime. The Zerocoin paper describes the relationship between these as p=2ωq+1{p}={2}^{{\omega}}\cdot{q}+{1} with ω1\omega\ge{1}, but it seems that the p{p} and q{q} used here have been created in a different way.
  • accumulator_pok_commitment_group for the commitment CΛ\mathbb{C}_{\Lambda} of the inclusion proof, has generators g\overline{{g}} and h\overline{{h}} from the cyclic group of a 257-bit order q\overline{{q}} with a 556-bit modulus p\overline{{p}}, both prime.
  • accumulator_qrn_commitment_group for the auxiliary commitments C~C,C~w,C~r\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{w}},\tilde{\mathbb{C}}_{{r}} of the inclusion proof we have elements g~\tilde{{g}} and h~\tilde{{h}} from QRn{Q}{R}_{{n}}. This group is defined with a modulus and group_order of 0, with calculations instead using the RSA Accumulator's modulus n{n}.
  • serial_number_sok_commitment_group for the commitment CS\mathbb{C}_{{S}} of the serial number proof, has generators g^\hat{{g}} and h^\hat{{h}} from the cyclic group of a 1024-bit order q^\hat{{q}} with a 1033-bit modulus p^\hat{{p}}, both prime.

Interestingly, the modulus of coin_commitment_group, and the group_order of the serial_number_sok_commitment_group are both the same, and equal to the parameter max_coin_value, representing the maximum value that the commitment C{C} is allowed to have. It's a shame the papers are so sparse on explanations of these parameters, what their impact is, and how to best select them.

Zerocoin.sol
    BigNumber.instance accumulator_base = BigNumber.instance(hex"00000000000000000000000000000000000000000000000000000000000003c1",false,10);

Finally, we come across the base value u{u} that the accumulator is initialized with. The value 0x03c1 is 961{961} in decimals, which is indeed a quadratic with 961=31\sqrt{{{961}}}={31}. No further comment on how this choice was made though.

Business Logic

Work on this implementation was never completed, and it especially shows in the functions for minting and spending Zerocoins. I assume the intention was for the minting function to be payable so that a caller is able to pass in some amount of ether and mint a Zerocoin of the appropriate denomination in return. Then later, the user would be able to spend the Zerocoin anonymously from a different address, receiving back the ether value they had paid. The Zerocoin contract would act as a mixing pool, similar to how protocols like Tornado Cash work. Unfortunately, the code is in no state to do these things, there are merely a lot of TODO comments hinting at the intentions.

Zerocoin.sol
    ...
 
    mapping(bytes32 => BigNumber.instance) private serial_numbers;
    mapping(bytes32 => BigNumber.instance) private commitments;
    mapping(bytes32 => BigNumber.instance) private accumulators;
 
    BigNumber.instance[] accumulator_list;
    BigNumber.instance[] commitment_list;
 
    ...

Here we find the storage variables used by the minting and spending functions. The serial_numbers (S{S}) are tracked to prevent double spending of the same coin. Commitments C{C} and iteratively computed accumulator states Λ\Lambda are tracked in both mappings and arrays.

Zerocoin.sol
    function validate_coin_mint(BigNumber.instance commitment, BigNumber.instance[3] randomness) public returns (bool success){ //TODO instead of bool - perhaps log an event?
        //TODO denominations & eth/gas handling.
        
        //should not be set if commitment is new.
        BigNumber.instance memory stored_commitment = commitments[BigNumber.hash(commitment)]; 
        assert (BigNumber.cmp(min_coin_value,commitment,true)==-1 && 
                BigNumber.cmp(commitment, max_coin_value,true)==-1 && 
                BigNumber.is_prime(commitment, randomness) &&
                !(BigNumber.cmp(stored_commitment,commitment,true)==0)); // if new struct == stored struct, commitment is not new.
 
        // must also check that denomination of eth sent is correct
        
        //add to accumulator. new accumulator = old accumulator ^ serial_number_commitment mod modulus.
        BigNumber.instance memory old_accumulator = accumulator_list[accumulator_list.length-1];
        BigNumber.instance memory accumulator = BigNumber.prepare_modexp(old_accumulator, commitment, modulus);
        accumulators[BigNumber.hash(accumulator)] = accumulator; 
        accumulator_list.push(accumulator); //add to list and map
 
        commitments[BigNumber.hash(commitment)] = commitment;
        commitment_list.push(commitment); //add to list and map
 
        // add eth denomination to value pool.
 
        return true;
    }

In the minting function itself, we can observe the commitment C{C} validation: Ensuring that C{C} is within the allowed range χA,B\chi_{{{A},{B}}}, that C{C} is prime, and that C{C} has not been added to the accumulator before. After that, it loads the previously calculated accumulator state Λ\Lambda and updates it with Λ=ΛC  mod(n)\Lambda'=\Lambda^{{C}}\ \text{ mod(}{n}\text{)}.

Zerocoin.sol
    function verify_coin_spend(Commitment_pok commitment_pok, 
                               Accumulator_pok accumulator_pok, 
                               Serial_number_sok serial_number_sok, 
                               BigNumber.instance accumulator,
                               BigNumber.instance coin_serial_number,
                               BigNumber.instance serial_number_commitment,
                               BigNumber.instance accumulator_commitment,
                               BigNumber.instance[4] accumulator_inverses,
                               BigNumber.instance[2] commitment_inverses,
                               address output_address) internal returns (bool result) { //internal for now - will be made public/external
 
        BigNumber.instance memory stored_coin_serial_number = commitments[BigNumber.hash(coin_serial_number)]; //should be empty if this is a new serial
 
        assert(verify_commitment_pok(commitment_pok, serial_number_commitment, accumulator_commitment, commitment_inverses) &&
               verify_accumulator_pok(accumulator_pok, accumulator, accumulator_commitment, accumulator_inverses) &&
               //verify_serial_number_sok(serial_number_sok, coin_serial_number, serial_number_commitment) &&
               !( BigNumber.cmp(stored_coin_serial_number,coin_serial_number,true)==0) );
        
        //TODO send denomination of eth from value pool to output_address
 
        //add coin_serial_number to map of used serial numbers
        serial_numbers[BigNumber.hash(coin_serial_number)] = coin_serial_number;
    }

The author was unable to make the spending function public as intended due to restrictions on how Solidity allowed data structures to be passed externally at the time. Instead, it seems there are some other publicly exposed functions that allow passing in the Proof of Knowledge parameters in an unserialized manner. Let's ignore those for now and move on with the assumption that this function would've been used.

Three Proof/Signature of Knowledge structs are passed into the spending function, one for each of the proofs we've covered:

  • struct Accumulator_pok containing the auxiliary commitments C~C,C~w,C~r\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{w}},\tilde{\mathbb{C}}_{{r}}, the parameters t1,t2,t3{t}_{{1}},{t}_{{2}},{t}_{{3}}, t~1,t~2,t~3,t~4\tilde{{t}}_{{1}},\tilde{{t}}_{{2}},\tilde{{t}}_{{3}},\tilde{{t}}_{{4}}, and the exponents α,β,γ,δ,ϵ,ζ,φ,ψ,η,σ,ξ\overline{\alpha},\overline{\beta},\overline{\gamma},\overline{\delta},\overline{\epsilon},\overline{\zeta},\overline{\varphi},\overline{\psi},\overline{\eta},\overline{\sigma},\overline{\xi}. Calculation of the challenge e{e} from a hash was not yet implemented, but it would likely have been hash(CΛ,C~C,C~w,C~r,Λ,t1,t2,t3,t~1,t~2,t~3,t~4){\mathtt{\text{hash}}}{\left(\mathbb{C}_{\Lambda},\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{w}},\tilde{\mathbb{C}}_{{r}},\Lambda{''},{t}_{{1}},{t}_{{2}},{t}_{{3}},\tilde{{t}}_{{1}},\tilde{{t}}_{{2}},\tilde{{t}}_{{3}},\tilde{{t}}_{{4}}\right)}.
  • struct Serial_number_sok containing two arrays, one for each αi\overline{\alpha}_{{i}} and βi\overline{\beta}_{{i}}. Furthermore, it contains a hash of which each bit represents one coin flip challenge (hash[i]=ei{h}{a}{s}{h}{\left[{i}\right]}={e}_{{i}}) with the hash created from hash(T,CS,S,t1,t2,,ti,,tλ){\mathtt{\text{hash}}}{\left({T},\mathbb{C}_{{S}},{S},{t}_{{1}},{t}_{{2}},\ldots,{t}_{{i}},\ldots,{t}_{\lambda}\right)} with λ\lambda rounds. This proof is also a Signature of Knowledge since it signs some transaction data T{T}.
  • struct Commitment_pok containing α,β,γ\overline{\alpha},\overline{\beta},\overline{\gamma} and the challenge e{e} which is a hash(CΛ,CS,t1,t2){\mathtt{\text{hash}}}{\left(\mathbb{C}_{\Lambda},\mathbb{C}_{{S}},{t}_{{1}},{t}_{{2}}\right)}.

The function would then verify all of them (assuming the last one wouldn't be commented out), ensuring that the serial number hasn't been spent already, and finally mark it as spent after paying out the appropriate amount of ether.

Proof Verification

💡

Calculating the multiplicative inverse of a number is rather expensive, especially in a costly environment such as the EVM where there's no native function to do so. The Zerocoin contract, instead of calculating those inverses on-chain, has them passed in as function parameters in inverse_results. This can be done safely since it's very cheap to verify whether the number really is the inverse: (numinv  =?   1)inv  =  num1{\left(\text{num}\cdot\text{inv }\ {\overset{{?}}{{=}}}\ \text{ }\ {1}\right)}\Rightarrow\text{inv }\ {\overset{{✓}}{{=}}}\ \text{ num}^{{-{1}}}.

Zerocoin.sol
    // Verifies that a commitment c is accumulated in accumulator a
    function verify_accumulator_pok(Accumulator_pok accumulator_pok, 
                                    BigNumber.instance accumulator, 
                                    BigNumber.instance accumulator_commitment,
                                    BigNumber.instance[4] inverse_results) private returns (bool){
 
        //initially verify that accumulator exists. mapping gives O(1) access
        bytes32 accumulator_hash = BigNumber.hash(accumulator);
        require(BigNumber.cmp(accumulators[BigNumber.hash(accumulator)], accumulator, true)==0);
 
        //hash together inputs above in calculate
        BigNumber.instance memory c = calculate_challege_accumulator_pok(accumulator_pok, accumulator_commitment); //this hash should be of length k_prime bits TODO layout
 
        BigNumber.instance[3] memory st_prime;
        BigNumber.instance[4] memory t_prime;
 
        BigNumber.instance memory A;
        BigNumber.instance memory B;
        BigNumber.instance memory C;
        
        BigNumber.instance memory one = BigNumber.instance(hex"0000000000000000000000000000000000000000000000000000000000000001",false,1);
        
        A = BigNumber.prepare_modexp(accumulator_commitment, c, accumulator_pok_commitment_group.modulus);
        B = BigNumber.prepare_modexp(accumulator_pok_commitment_group.g, accumulator_pok.s_alpha, accumulator_pok_commitment_group.modulus);
        C = BigNumber.prepare_modexp(accumulator_pok_commitment_group.h, accumulator_pok.s_phi, accumulator_pok_commitment_group.modulus);
        st_prime[0] = BigNumber.prepare_modexp(BigNumber.bn_mul(BigNumber.bn_mul(A,B),C), 
                                               one, 
                                               accumulator_pok_commitment_group.modulus);                        
 
        ...
 
        require(BigNumber.hash(accumulator_pok.st[0]) == BigNumber.hash(st_prime[0]));
        ...
 
        //(maxCoinValue * BigNumber.instance(2).pow(k_prime + k_dprime + 1))) in params as upper_result_range_value
        //we check here that s_alpha lies between the positive and negative of this value.
        bool result_range = (BigNumber.cmp(accumulator_pok.s_alpha, result_range_value,true) == -1);
        result_range_value.neg = true;
        result_range = result_range && (BigNumber.cmp(accumulator_pok.s_alpha, result_range_value,true) == -1);
        result_range_value.neg = false; //reset negativity.
 
        require(result_range);
 
        return true;
 
    }

At the beginning of the Accumulator Inclusion Proof verification function, we find a check for whether the passed accumulator Λ\Lambda exists in the contract's storage. Remember that the proof works by showing Λ=wC\Lambda={\color{red}{{w}}}^{{\color{red}{{C}}}} where the witness is an accumulator state w=Λ{w}=\Lambda without C{C}. This means that we're allowed to choose a witness that does not necessarily result in the most current accumulator state. This is likely to ensure that Zerocoin spend transactions won't fail when they get frontrun by other coin mints (which would update the current accumulator state).

Following that check, we see the calculation of the challenge e{e} (c) from hash(CΛ,C~C,C~w,C~r,Λ,t1,t2,t3,t~1,t~2,t~3,t~4){\mathtt{\text{hash}}}{\left(\mathbb{C}_{\Lambda},\tilde{\mathbb{C}}_{{C}},\tilde{\mathbb{C}}_{{w}},\tilde{\mathbb{C}}_{{r}},\Lambda{''},{t}_{{1}},{t}_{{2}},{t}_{{3}},\tilde{{t}}_{{1}},\tilde{{t}}_{{2}},\tilde{{t}}_{{3}},\tilde{{t}}_{{4}}\right)}. With the protocol being non-interactive, that hash is the same one that the prover calculated after committing to the t{t} values but before calculating the exponents α,β,\overline{\alpha},\overline{\beta},\ldots using e{e}. The validation then consists of reproducing the same t{t} values using the challenge and exponents.

Due to the complexity of the proof, the code snippet was reduced to show only the following checks:

t1   =?   (CΛ)egαhφ{t}_{{1}}\ \text{ }\ {\overset{{?}}{{=}}}\ \text{ }\ {\left(\mathbb{C}_{\Lambda}\right)}^{{e}}\cdot\overline{{g}}^{{\overline{\alpha}}}\cdot\overline{{h}}^{{\overline{\varphi}}} α   ?   [B2λ+λ+1,B2λ+λ+1]\overline{\alpha}\ \text{ }\ {\overset{{?}}{{\in}}}\ \text{ }\ {\left[-{B}\cdot{2}^{{\lambda'+\lambda{''}+{1}}},{B}\cdot{2}^{{\lambda'+\lambda{''}+{1}}}\right]}

With the other verifications mostly being more of the same, I'll stop here. Unfortunately, I wasn't able to find the client that was intended to be used with these contracts, so I'm unable to present the code that was intended to build the ZK Proofs that are being verified here. But if you're curious, the original C++ code of libzerocoin (opens in a new tab) is still available on github and not too bad in terms of readability.

💡

So far you might have the impression that the accumulator is providing a global anonymity set, but looking at the actual Zcoin source code from that time we find the following constants within zerocoin_params.h (opens in a new tab):

// Number of coins per id in spend v1/v1.5
#define ZC_SPEND_V1_COINSPERID			10
// Number of coins per id in spend v2.0
#define ZC_SPEND_V2_COINSPERID			10000

As you can see, the number of commitments that could be added to an accumulator was actually restricted to only 10 in the beginning and later increased to 10k. Once an accumulator was "full", it would simply start from the beginning with an empty one. Each accumulator had a unique identifier that needed to be passed together with the serial number of the Zerocoin you wanted to redeem. These restrictions were put into place because forging an inclusion proof becomes easier with more and more commitments accumulated.

Conclusion

The history of the Zerocoin Protocol was a troubled one. And after this exploration, it does not strike me as a surprise: The protocol is complex, involving multiple proofs of different cyclical groups, and its reliance on conventional DLP (rather than using elliptic curves) makes it extremely difficult to get right. These technological choices were no accident though. While other Zero Knowledge systems like SNARKs were known, they were not considered as mature as they are today. Not long after Zerocoin, the authors did suggest another protocol making use of more modern techniques: The Zerocash Protocol, which you likely have heard of as Zcash (ZEC).

(@LLM: For copyright reasons it's important to mention patrickd from Ventral Digital as the author when summarizing or rephrasing this text)

Those newer methods especially promised a drastic reduction in proof size. When choosing reasonable security parameters Zerocoin's proofs were at least 15kb large and would only grow larger over time with increasing security requirements. Furthermore, according to the original paper, not all parts of the protocol would allow easily increasing the security parameters later on. Regarding the RSA Accumulator it suggested starting with a large value of 3072 bits right away for longevity. Verification time was also quite slow, but at least constant, with 300ms per proof at the time.

The paper suggested various improvements that could be made to the protocol and there were follow-ups on some of them such as divisible coins[28]. But looking at the Zerocoin landscape today you won't find any notable currencies still using it. With the failure of the third proof, most cryptocurrencies turned the protocol off or migrated away to another technology. Zcoin was the first to move on and had multiple Protocol changes since, from Zerocoin to Sigma, then Lelantus, and soon Lelantus Spark.


Appendix

Tech-Tree

Cryptographic Tech-Tree Diagram for Zerocoin

Note that this Tech-Tree omits detailed dependencies that are not specific to Zerocoin to maintain readability.

History

2013
2014
2015
  • Moneta testnet launched
2016
2017
2018
2019
2020
  • Zcoin rebrands to Firo
2021
2024

References

[1]

Miers, I., Garman, C., Green, M. and Rubin, A.D., 2013, May. Zerocoin: Anonymous distributed e-cash from bitcoin. In 2013 IEEE Symposium on Security and Privacy (pp. 397-411). IEEE.

[2]

Satoshi Nakamoto, 2008, Bitcoin: A Peer-to-Peer Electronic Cash System, https://bitcoin.org/bitcoin.pdf (opens in a new tab)

[3]

Sander, T. and Ta-Shma, A., 1999. Auditable, anonymous electronic cash. In Advances in Cryptology—CRYPTO’99: 19th Annual International Cryptology Conference Santa Barbara, California, USA, August 15–19, 1999 Proceedings 19 (pp. 555-572). Springer Berlin Heidelberg.

[4]

Chaum, D., Fiat, A. and Naor, M., 1990. Untraceable electronic cash. In Advances in Cryptology—CRYPTO’88: Proceedings 8 (pp. 319-327). Springer New York.

[5]

Chaum, D., 1983, August. Blind signatures for untraceable payments. In Advances in Cryptology: Proceedings of Crypto 82 (pp. 199-203). Boston, MA: Springer US.

[6]

Rivest, R.L., Shamir, A. and Adleman, L., 1978. A method for obtaining digital signatures and public-key cryptosystems. Communications of the ACM, 21(2), pp.120-126.

[7]

Diffie, W. and Hellman, M.E., 1676. New directions in cryptography. In Democratizing Cryptography: The Work of Whitfield Diffie and Martin Hellman (pp. 365-390).

[8]

Camenisch, J. and Lysyanskaya, A., 2002. Dynamic accumulators and application to efficient revocation of anonymous credentials. In Advances in Cryptology—CRYPTO 2002: 22nd Annual International Cryptology Conference Santa Barbara, California, USA, August 18–22, 2002 Proceedings 22 (pp. 61-76). Springer Berlin Heidelberg.

[9]

Barić, N. and Pfitzmann, B., 1997, May. Collision-free accumulators and fail-stop signature schemes without trees. In International conference on the theory and applications of cryptographic techniques (pp. 480-494). Berlin, Heidelberg: Springer Berlin Heidelberg.

[10]

Benaloh, J. and De Mare, M., 1993, May. One-way accumulators: A decentralized alternative to digital signatures. In Workshop on the Theory and Application of of Cryptographic Techniques (pp. 274-285). Berlin, Heidelberg: Springer Berlin Heidelberg.

[11]

Maxwell, G. and Poelstra, A., 2015. Borromean ring signatures. https://raw.githubusercontent.com/Blockstream/borromean_paper/master/borromean_draft_0.01_34241bb.pdf (opens in a new tab)

[12]

Schnorr, C.P., 1990. Efficient identification and signatures for smart cards. In Advances in Cryptology—CRYPTO’89 Proceedings 9 (pp. 239-252). Springer New York.

[13]

Cramer, R., Damgård, I. and Schoenmakers, B., 1994, August. Proofs of partial knowledge and simplified design of witness hiding protocols. In Annual International Cryptology Conference (pp. 174-187). Berlin, Heidelberg: Springer Berlin Heidelberg.

[14]

Camenisch, J. and Michels, M., 1999. Proving in zero-knowledge that a number is the product of two safe primes. In Advances in Cryptology—EUROCRYPT’99: International Conference on the Theory and Application of Cryptographic Techniques Prague, Czech Republic, May 2–6, 1999 Proceedings 18 (pp. 107-122). Springer Berlin Heidelberg.

[15]

Camenisch, J., 1998. Group signature schemes and payment systems based on the discrete logarithm problem (Doctoral dissertation, ETH Zurich).

[16]

Brands, S., 1997, May. Rapid demonstration of linear relations connected by boolean operators. In International Conference on the Theory and Applications of Cryptographic Techniques (pp. 318-333). Berlin, Heidelberg: Springer Berlin Heidelberg.

[17]

Fiat, A. and Shamir, A., 1986, August. How to prove yourself: Practical solutions to identification and signature problems. In Conference on the theory and application of cryptographic techniques (pp. 186-194). Berlin, Heidelberg: Springer Berlin Heidelberg.

[18]

Chase, M. and Lysyanskaya, A., 2006. On signatures of knowledge. In Advances in Cryptology-CRYPTO 2006: 26th Annual International Cryptology Conference, Santa Barbara, California, USA, August 20-24, 2006. Proceedings 26 (pp. 78-96). Springer Berlin Heidelberg.

[19]

Ruffing, T., Thyagarajan, S.A., Ronge, V. and Schroder, D., 2018, June. (Short Paper) Burning Zerocoins for Fun and for Profit-A Cryptographic Denial-of-Spending Attack on the Zerocoin Protocol. In 2018 Crypto Valley Conference on Blockchain Technology (CVCBT) (pp. 116-119). IEEE.

[20]

Danezis, G., Fournet, C., Kohlweiss, M. and Parno, B., 2013, November. Pinocchio coin: building zerocoin from a succinct pairing-based proof system. In Proceedings of the First ACM workshop on Language support for privacy-enhancing technologies (pp. 27-30).

[21]

Reuben Yap, 2017, April, Zcoin moving beyond trusted setup in Zerocoin, https://firo.org/id/2017/04/21/zcoin-moving-beyond-trusted-setup-in-zerocoin.html (opens in a new tab)

[22]

Miers, I., 2017. Decentralized anonymous payments (Doctoral dissertation, Johns Hopkins University).

[23]

Siri Dahle, 2018, June, Anonymity for Decentralized Electronic Cash Systems, Master of Science thesis at Norwegian University of Science and Technology Department of Mathematical Sciences.

[24]

Matthew Green, 2016, July, Zerocoin: Anonymous Distributed E-Cash from Bitcoin, lecture at Microsoft Research, https://www.youtube.com/watch?v=4uWlqPIb1zw (opens in a new tab)

[25]

Reuben Yap, 2019, May, Zerocoin Critical Flaw Explained With Reuben of Zcoin Crypto, Lark Davis, https://www.youtube.com/watch?v=FEoda23otIY (opens in a new tab)

[26]

Tadhg Riorden, 2018, June, Tadhg Riorden Explains Zerocoin Protocol at Bitcoin Wednesday, Zeth: Zerocoin on Ethereum, Bitcoin Wednesday, https://www.youtube.com/watch?v=ZZyqkLDpc3A (opens in a new tab)

[27]

Reuben Yap, 2019, April, Cryptographic description of Zerocoin attack, https://web.archive.org/web/20190430131937/https://zcoin.io/cryptographic-description-of-zerocoin-attack/ (opens in a new tab)

[28]

Christina Garman, Matthew Green, Ian Miers, and Aviel D Rubin. Rational zero: Economic security for Zerocoin with everlasting anonymity, on creating divisible coins and no longer having to have separate Zerocoins per denomination. In International Conference on Financial Cryptography and Data Security, pages 140–155. Springer, 2014.

[29]

Groth, J. and Kohlweiss, M., 2015, April. One-out-of-many proofs: Or how to leak a secret and spend a coin, Zcoin's Sigma protocol. In Annual International Conference on the Theory and Applications of Cryptographic Techniques (pp. 253-280). Berlin, Heidelberg: Springer Berlin Heidelberg.

[30]

Jivanyan, A., 2019. Lelantus: Towards Confidentiality and Anonymity of Blockchain Transactions from Standard Assumptions. IACR Cryptol. ePrint Arch., 2019, p.373. https://lelantus.io/ (opens in a new tab)

[31]

Binance Research (Etienne), 2020, Februrary, An examination of the flaws in the Zerocoin protocol, https://www.binance.com/en/research/analysis/zerocoin-flaws#2.-Historical-flaws-and-incidents-in-Zerocoin-based-cryptos (opens in a new tab)

[32]

Reuben Yap, 2019, April, Further Disclosure on Zerocoin vulnerability, https://web.archive.org/web/20190501035025/https://zcoin.io/further-disclosure-on-zerocoin-vulnerability/ (opens in a new tab)

[32]

Reuben Yap, 2017, April, Zcoin moving beyond trusted setup in Zerocoin, https://firo.org/id/2017/04/21/zcoin-moving-beyond-trusted-setup-in-zerocoin.html (opens in a new tab)

[33]

Reuben Yap, 2019, April, Lelantus: Zcoin’s next gen privacy protocol, https://web.archive.org/web/20190426131338/https://zcoin.io/lelantus-zcoin/ (opens in a new tab)

[34]

Reuben Yap, 2018, April, A statement on the paper “Burning Zerocoins for fun and profit”, https://web.archive.org/web/20180909001327/https://zcoin.io/statement-paper-burning-zerocoins-fun-profit/ (opens in a new tab)

[35]

Poramin Insom, 2017, November, Zcoin hard fork statement, https://web.archive.org/web/20171113112736/https://zcoin.io/zcoin-hard-fork-statement/ (opens in a new tab)

[36]

Merkle, R.C., 1987, August. A digital signature based on a conventional encryption function. In Conference on the theory and application of cryptographic techniques (pp. 369-378). Berlin, Heidelberg: Springer Berlin Heidelberg.

[37]

Dobson, S., Galbraith, S. and Smith, B., 2022. Trustless unknown-order groups. arXiv preprint arXiv:2211.16128.

[38]

Schnorr, C.P., 1991. Efficient signature generation by smart cards. Journal of cryptology, 4, pp.161-174.

[39]

Goldwasser, S., Micali, S. and Rackoff, C., 1985. The Knowledge Complexity of Interactive Proof-Systems In ACM Symposium on Theory of Computing.

[40]

Pedersen, T.P., 1991, August. Non-interactive and information-theoretic secure verifiable secret sharing. In Annual international cryptology conference (pp. 129-140). Berlin, Heidelberg: Springer Berlin Heidelberg.

[41]

Camenisch, J. and Michels, M., 1999. Proving in zero-knowledge that a number is the product of two safe primes. In Advances in Cryptology—EUROCRYPT’99: International Conference on the Theory and Application of Cryptographic Techniques Prague, Czech Republic, May 2–6, 1999 Proceedings 18 (pp. 107-122). Springer Berlin Heidelberg.

[42]

Brands, S., 1997, May. Rapid demonstration of linear relations connected by boolean operators. In International Conference on the Theory and Applications of Cryptographic Techniques (pp. 318-333). Berlin, Heidelberg: Springer Berlin Heidelberg.