Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash checks of parameter files during initialization #28

Merged
merged 3 commits into from
Aug 2, 2018

Conversation

ebfull
Copy link
Collaborator

@ebfull ebfull commented Aug 2, 2018

No description provided.

Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (this was not a highly thorough review though).

Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, modulo having the right hashes.

src/rustzcash.rs Outdated
@@ -6,6 +6,12 @@ extern crate pairing;
extern crate rand;
extern crate sapling_crypto;

const SPROUT_GROTH16_PARAMS_HASH: &'static str = "7a6723311162cb0c664c742d2fa42278195ade98ba3f21ef4fa02b82c83aed696e107e389ac7b3b0f33f417aeefe5be775d117910a473a422b4a1b97489fbdd6";
const SAPLING_SPEND_PARAMS_HASH: &'static str = "35f6afd7d7514531aaa9fa529bdcddf116865f02abdd42164322bb1949227d82bdae295cad9c7b98d4bbbb00e045fa17aca79c90f53433a66bce4e82b6a1936d";
const SAPLING_OUTPUT_PARAMS_HASH: &'static str = "f9d0b98ea51830c4974878f1b32bb68b2bf530e2e0ae09cd2a9b609d6fda37f1a1928e2d1ca91c31835c75dcc16057db53a807cc5cb37ebcfb753aa843a8ac21";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not the hashes I have, after just doing zcutil/fetch-params.sh --testnet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are BLAKE2b hashes (as opposed to the SHA256 hashes used in fetch-params.) I didn't want to bring in another Rust dependency this late in the game.

@ebfull ebfull merged commit f5d2afb into zcash:master Aug 2, 2018
zkbot added a commit to zcash/zcash that referenced this pull request Aug 3, 2018
Check the hash of the zk-SNARK parameters during initialization

**Please also review zcash/librustzcash#28
@str4d
Copy link
Contributor

str4d commented Aug 3, 2018

Post-hoc re-utACK (now that I'm awake 😂)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants