# Verifying Zcash Sapling Parameters

**URL:** <https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700>\
**Category:** General\
**Created:** [February 11, 2019, 6:31am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700 "2019-02-11T06:31:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![taoeffect](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/taoeffect/32/12187_2.png) [@taoeffect](https://forum.zcashcommunity.com/u/taoeffect)\
**Post date:** [February 11, 2019, 6:31am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/1 "2019-02-11T06:31:06Z")

</div>

_Note: the forum software is limiting my newly created account to a maximum of two links, so I’ve been forced to remove some useful links here, but you should be able to find them by visiting the GitHub issue._

Continuing from the discussion in [this GitHub issue](https://github.com/zcash/zcash/issues/2247), I will use this thread to document my odyssey in attempting to verify the Zcash Sapling parameters.

Previously I left off trying to follow @str4d’s instructions to get the `phase1radix2m13` `phase1radix2m17` `phase1radix2m21` files from BitTorrent (which were not easy to obtain due to a lack of seeders. You’re also supposed to generate these yourself, but that can take [100 hours](https://twitter.com/ebfull/status/1094820958601338882)). If you’d like to try this yourself, you can follow @ebfull’s updated instructions.

So I’m pleased to report that I was able to finally run the `sapling-mpc` code using the distributed `sapling-output.params sapling-spend.params sprout-groth16.params` params (by concatenating them) and the 3 `phase1` params mentioned previously (retrieved from Bittorrent).

The program spat out a bunch of hashes, and all of them matched the ones listed ~~here~~ (_max links reached_), with the exception that two extra hashes were listed that do not exist on the wiki:

```auto
be38cb76c0472b182afc24b55b844068645be98dfc47ce43d8714134c02259c7192d925e25d9ab8ebd4cd8a2d35ddd28a0957ae50e0cf97923685f81a48bdfd1
403af2d88508dccfc7c70aac5a3e58a9ab0509a476e0fba1a6b249c30953a97ae8cbe6fac3b324e0919c6015e8e0139f08682eb22ef48e0f4db4ce898e9bd18e

```

What the existence of these extra hashes means — I have no idea.

As I do not understand the math behind the MPC ceremony, I do not know whether these hash listings are useful, meaningful, or are at all able to prevent any sort of attack.

I’m also waiting for the machine to generate the phase1 parameters itself from the transcript log and will compare them with the Bittorrent ones once it does.

All-in-all, given the supposed importance of verifying these parameters, I am pretty disturbed by how difficult this whole process has been, and how few people seem to have done this.

And again I stress, that given all of the uncertainties involved, I’m not sure how much stock should be placed even into a verified ceremony, and I again urge Zcash to consider moving away from them.

---

<div class="post-metadata">

**Author:** ![naimed](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/naimed/32/9199_2.png) [@naimed](https://forum.zcashcommunity.com/u/naimed)\
**Post date:** [February 11, 2019, 4:51pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/2 "2019-02-11T16:51:50Z")

</div>

I was coordinating the Sapling MPC. So it is possible that I simply failed to update the Wiki with their contributions. However I do have logs of every thing so it will be simple for me to look up whom made those contributions and add them to the wiki.

I’m also re-running the powers of tau verification and I will report on performance and time to reproduce.

_Double Checking hashes now_.

---

<div class="post-metadata">

**Author:** ![Shawn](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/shawn/32/187_2.png) [@Shawn](https://forum.zcashcommunity.com/u/Shawn)\
**Post date:** [February 11, 2019, 5:05pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/3 "2019-02-11T17:05:26Z")

</div>

Hello @taoeffect , welcome to the Forum. Since you are obviously not a spammer I have bumped your forum trust level so you can post more links.

> [@taoeffect](#):
>
> And again I stress, that given all of the uncertainties involved, I’m not sure how much stock should be placed even into a verified ceremony, and I again urge Zcash to consider moving away from them.

The large MPC that you are verifying is the best process for generating zkSNARK parameters that has been designed yet. Having many more participants spread thorough out the world, and only a single one of the the nearly 200 has to destroy thier piece for it to be secure is much better than the original Sprout (only 6 participants) ceremony was.

But that’s not to say the protocol can’t be better, as you mentioned, having a trustless system like STARKs would certainly be the best way to go (and Zooko agrees) [x.com](https://twitter.com/StarkWareLtd/status/1092819152039903233?s=09)

Hopefully STARKs will be ready for use in a production Blockchain like Zcash soon.

---

<div class="post-metadata">

**Author:** ![str4d](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/str4d/32/64_2.png) [@str4d](https://forum.zcashcommunity.com/u/str4d)\
**Post date:** [February 11, 2019, 6:33pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/4 "2019-02-11T18:33:47Z")

</div>

> [@Shawn](#):
>
> only a single one of the the nearly 200 has to destroy thier piece for it to be secure

Clarification: a single piece of each of the rounds needs to be unrecoverable, which means it’s around 1 in 100. That’s still significantly better than the first MPC, and the two MPCs themselves also had better security properties (each piece only needed to be accessible for the duration of the contribution, instead of the entire ceremony, so the compromise window was significantly shortened).

---

<div class="post-metadata">

**Author:** ![ebfull](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/ebfull/32/34_2.png) [@ebfull](https://forum.zcashcommunity.com/u/ebfull)\
**Post date:** [February 11, 2019, 10:06pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/5 "2019-02-11T22:06:53Z")

</div>

The two hashes you encounter:

```auto
be38cb76c0472b182afc24b55b844068645be98dfc47ce43d8714134c02259c7192d925e25d9ab8ebd4cd8a2d35ddd28a0957ae50e0cf97923685f81a48bdfd1
403af2d88508dccfc7c70aac5a3e58a9ab0509a476e0fba1a6b249c30953a97ae8cbe6fac3b324e0919c6015e8e0139f08682eb22ef48e0f4db4ce898e9bd18e

```

The second one is the [random beacon](https://lists.zfnd.org/pipermail/zapps-wg/2018/000380.html). We can put this in the wiki in order to improve clarity. The first one was just accidentally omitted from the wiki we think (the same participant went twice). @naimed will update this ASAP.

---

<div class="post-metadata">

**Author:** ![taoeffect](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/taoeffect/32/12187_2.png) [@taoeffect](https://forum.zcashcommunity.com/u/taoeffect)\
**Post date:** [February 11, 2019, 10:27pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/6 "2019-02-11T22:27:49Z")

</div>

> [@str4d](#):
>
> Clarification: a single piece of each of the rounds needs to be unrecoverable, which means it’s around 1 in 100.

I am confused, here you’re replying to to @Shawn, who suggests there were 200 members, but [the link](https://lists.zfnd.org/pipermail/zapps-wg/2018/000380.html) you just posted is thanking “roughly 94 participants”, which coincides with the 95/96 (?) participants implied by the number of hashes output?

So what is this business about 200 participants?

---

<div class="post-metadata">

**Author:** ![Shawn](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/shawn/32/187_2.png) [@Shawn](https://forum.zcashcommunity.com/u/Shawn)\
**Post date:** [February 11, 2019, 10:38pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/7 "2019-02-11T22:38:55Z")

</div>

Powers of Tau (phase 1) had 88 participants [Conclusion of the Powers of Tau Ceremony - zcash foundation](https://www.zfnd.org/blog/conclusion-of-powers-of-tau/)

The Powers of Tau attestations and hashes can be found here: [GitHub - ZcashFoundation/powersoftau-attestations](https://github.com/ZcashFoundation/powersoftau-attestations)

Sapling MPC (phase 2) had another 90+

> **[Home · zcash-hackworks/sapling-mpc Wiki](https://github.com/zcash-hackworks/sapling-mpc/wiki)**
>
> Multi-party computation for Zcash's "Sapling" zk-SNARK public parameters - Home · zcash-hackworks/sapling-mpc Wiki

As @str4d points out, each part was separate so the number of people who would have all colluded together to somehow save all of the shards for each part was nearly 100, not the total 200. Only one person from _each phase_ had to destroy their part for it to be unrecoverable.

---

<div class="post-metadata">

**Author:** ![naimed](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/naimed/32/9199_2.png) [@naimed](https://forum.zcashcommunity.com/u/naimed)\
**Post date:** [February 11, 2019, 11:14pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/8 "2019-02-11T23:14:48Z")

</div>

I have verified with the individual contributor, kostas, the hash that was missing from the attestation page and I have updated it: [Home · zcash-hackworks/sapling-mpc Wiki · GitHub](https://github.com/zcash-hackworks/sapling-mpc/wiki)  
as well as added the random beacon hash at the end.

I’m about 85% complete verifying powersoftau. Will post the output when it finishes.

---

<div class="post-metadata">

**Author:** ![taoeffect](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/taoeffect/32/12187_2.png) [@taoeffect](https://forum.zcashcommunity.com/u/taoeffect)\
**Post date:** [February 12, 2019, 12:51am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/9 "2019-02-12T00:51:33Z")

</div>

So, forgive me if someone’s asked this before, but can someone clarify how we know that the transcript itself wasn’t forged somehow? Is that because if it was it wouldn’t match the hashes spit out to the participants by the tools (and we’re assuming no issues in the math and no bugs in the code)?

---

<div class="post-metadata">

**Author:** ![str4d](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/str4d/32/64_2.png) [@str4d](https://forum.zcashcommunity.com/u/str4d)\
**Post date:** [February 12, 2019, 2:04am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/10 "2019-02-12T02:04:57Z")

</div>

Correct.

- The hashes are bound to each participant’s contribution, and each participant was instructed to record their hash (and post it publicly, as many did) at the time they made their contribution. Once the final transcript was published, they could check the hashes generated from the transcript to ensure their own hash was included (and anyone who saw them post their hash publicly could perform the same check).
- Forging the transcript to match a single one of these public hashes would require the ability for the forger to either break pre-image resistance of the hash function, or solve the discrete log problem for elliptic curves. Forging the transcript to match all of the published hashes is significantly more difficult than either of these two options.
- Anyone can audit the math that was used, because it was openly published in a paper.
- Anyone can audit the code that was used if they want to check for implementation bugs, because it’s all open source (and in fact some participants in Powers of Tau used an independent implementation).

---

<div class="post-metadata">

**Author:** ![naimed](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/naimed/32/9199_2.png) [@naimed](https://forum.zcashcommunity.com/u/naimed)\
**Post date:** [February 12, 2019, 1:22pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/11 "2019-02-12T13:22:22Z")

</div>

My verification of the Powers of Tau is complete. It took 867 minutes on a dual processor AMD 7301 machine (16 cores each, x2 threads per core, so 64 threads.)

It did not use a lot of ram but was caching a lot. (One could run this on a n1-highcpu-96 in google cloud and probably do about 50% faster.)

The software produced the expected files.

See output here:

> <https://gist.github.com/ianamunoz/da3c0e205b3e21eb55625490d230be6d>

---

<div class="post-metadata">

**Author:** ![taoeffect](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/taoeffect/32/12187_2.png) [@taoeffect](https://forum.zcashcommunity.com/u/taoeffect)\
**Post date:** [February 12, 2019, 5:24pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/12 "2019-02-12T17:24:39Z")

</div>

> [@naimed](#):
>
> It took 867 minutes on a dual processor AMD 7301 machine (16 cores each, x2 threads per core, so 64 threads.)

That’s an insanely fast machine, wow! Mine is going to take considerably longer (bare metal, but only 4 threads). However I can confirm that at least up to `b39c2f54485df51cd0434b0d3cbfcff7b7cc02c2e941097526cf5e605c9f8aaddd3cf9372d0e567cad8c49d7b507a47dac7510203a7f2f00b7d7810636064f06` the output matches, so I doubt it will deviate.

Also, the sha256sums for the 3 Bittorrent phase1 files matches the output in your gist:

```auto
$ sha256sum phase1*
a20e6c6a9934dc43f7d77121ee6214c7ee564789d1b9736174d881091da11387 phase1radix2m13
1bb2de121836af52ab572d16a4310f2d6ef7bf1015398266786dd123ef1ca1e2 phase1radix2m17
90bf83253252120d8162c3c68687ef4c7da94127e2d67683c94a61ac4b471182 phase1radix2m21

```

---

<div class="post-metadata">

**Author:** ![naimed](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/naimed/32/9199_2.png) [@naimed](https://forum.zcashcommunity.com/u/naimed)\
**Post date:** [February 12, 2019, 6:27pm UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/13 "2019-02-12T18:27:34Z")

</div>

> [@taoeffect](#):
>
> That’s an insanely fast machine, wow!

It’s pretty fast but there are faster 😉  
Pinging a buddy to see if I can race something else. Any of the bigger AWS or GCP machines should be able to finish in under a day though.

---

<div class="post-metadata">

**Author:** ![ebfull](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/ebfull/32/34_2.png) [@ebfull](https://forum.zcashcommunity.com/u/ebfull)\
**Post date:** [February 13, 2019, 4:32am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/14 "2019-02-13T04:32:13Z")

</div>

I mentioned over Twitter that there is a “trick” that can accelerate verification time of Powers of Tau. The current code checks that each contribution is consistent with the previous state. In actuality, it is only necessary to check that a portion of the update is consistent with the previous state, because it is mathematically impossible for the parameters to otherwise validate. This was not implemented at the time.

The Sapling MPC phase does not inherit this limitation and ensures that the transcript of that phase can be shipped alongside the parameters themselves, so that both can be authenticated at once. This is an important quality that I’ve ensured we can cryptographically inherit in new proving systems, such as Sonic.

---

<div class="post-metadata">

**Author:** ![amiller](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/amiller/32/10_2.png) [@amiller](https://forum.zcashcommunity.com/u/amiller)\
**Post date:** [February 13, 2019, 6:18am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/15 "2019-02-13T06:18:49Z")

</div>

Thanks for spurring this on. Better late than never and glad to see several people join in.

At one point I tried to get some folks to help me on a “refereed delegation” for sapling verification. Basically this is performing the verification in a way that there could be simple “fraud proofs” by committing to each intermediate step after verifying each hash. So if someone claimed they ran the verification and it didn’t work, they’d be able to prove it quickly. This is still a good idea for a project. Another related approach would be to build a STARK project for the verifier, though clearly that’s a bit confusing. Anyway, both of these could still be done now, compatible with the existing ceremony.

---

<div class="post-metadata">

**Author:** ![taoeffect](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/taoeffect/32/12187_2.png) [@taoeffect](https://forum.zcashcommunity.com/u/taoeffect)\
**Post date:** [February 17, 2019, 12:05am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/16 "2019-02-17T00:05:01Z")

</div>

FWIW, I too can now confirm the powersoftau output. It took about 4 days to finish with 4 threads on a relatively modern CPU. My output matches what @naimed shared, and the 3 critical phase1 files have the correct hashes 🙂

```auto
$ sha256sum phase1radix2m{13,17,21}
a20e6c6a9934dc43f7d77121ee6214c7ee564789d1b9736174d881091da11387 phase1radix2m13
1bb2de121836af52ab572d16a4310f2d6ef7bf1015398266786dd123ef1ca1e2 phase1radix2m17
90bf83253252120d8162c3c68687ef4c7da94127e2d67683c94a61ac4b471182 phase1radix2m21

```

---

<div class="post-metadata">

**Author:** ![rrtoledo](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@rrtoledo](https://forum.zcashcommunity.com/u/rrtoledo)\
**Post date:** [April 9, 2021, 9:16am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/17 "2021-04-09T09:16:34Z")

</div>

Hi everyone,

I have just downloaded the powers of tau from both BitTorrent and the zcash download website ( download.z.cash/downloads/powersoftau/ ), but the sha256sum differs, e.g. :

```
raph@Ub20:~/Downloads/powersoftau$ shasum phase1radix2m13
e0b268cb41b4e1b3750264e284bd01d650c23173 phase1radix2m13

```

Do you know why?

Is there an official place to find the radix file hashes by the way? I could only find them on these links: [Output from powersoftau verification · GitHub](https://gist.github.com/ianamunoz/da3c0e205b3e21eb55625490d230be6d) ; [https://zcash.dankdoggo.net/transcripts/SHA256SUMS.txt](https://zcash.dankdoggo.net/transcripts/SHA256SUMS.txt) . I think it would be great to have them on bittorent and in download.z.cash folder!

---

<div class="post-metadata">

**Author:** ![rrtoledo](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@rrtoledo](https://forum.zcashcommunity.com/u/rrtoledo)\
**Post date:** [April 9, 2021, 9:27am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/18 "2021-04-09T09:27:24Z")

</div>

Hi everyone,  
I just wanted to know if there was an “official” place where to find the radix files hashes?  
I can only find then in here: [Output from powersoftau verification · GitHub](https://gist.github.com/ianamunoz/da3c0e205b3e21eb55625490d230be6d)  
and there [https://zcash.dankdoggo.net/transcripts/SHA256SUMS.txt](https://zcash.dankdoggo.net/transcripts/SHA256SUMS.txt) . It would be great to have them on BitTorrent and download.z.cash.

---

<div class="post-metadata">

**Author:** ![daira](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/daira/32/43253_2.png) [@daira](https://forum.zcashcommunity.com/u/daira)\
**Post date:** [April 10, 2021, 4:53am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/19 "2021-04-10T04:53:30Z")

</div>

[https://download.z.cash/downloads/powersoftau/](https://download.z.cash/downloads/powersoftau/) is the official download location. I didn’t know they were on BitTorrent, and as far as I know we’re not responsible for that copy.

---

<div class="post-metadata">

**Author:** ![str4d](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/str4d/32/64_2.png) [@str4d](https://forum.zcashcommunity.com/u/str4d)\
**Post date:** [April 10, 2021, 4:58am UTC](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700/20 "2021-04-10T04:58:01Z")

</div>

> [@rrtoledo](#):
>
> I have just downloaded the powers of tau from both BitTorrent and the zcash download website ( download.z.cash/downloads/powersoftau/ ), but the sha256sum differs, e.g. :
> 
> ```auto
> raph@Ub20:~/Downloads/powersoftau$ shasum phase1radix2m13
> e0b268cb41b4e1b3750264e284bd01d650c23173 phase1radix2m13
> 
> ```
> 
> Do you know why?

`shasum` computes the SHA-1 sum by default. You need to use `shasum -a 256`.

[Next page](https://forum.zcashcommunity.com/t/verifying-zcash-sapling-parameters/32700.md?page=2)
