-
Notifications
You must be signed in to change notification settings - Fork 251
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
Sapling Implementation Refactor #41
Labels
Comments
This was referenced Jan 15, 2019
Closed
This was referenced Apr 11, 2019
Any chance you can put those module diagrams up here? @ebfull |
This was referenced Nov 21, 2019
Closed
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Goals:
Strategy:
Different components will be built and cleaned up independently and then brought together as git subtrees in this librustzcash repository as code matures.
Primitive crates (not Zcash specific, generally useful):
zkcrypto/jubjub
implements the Jubjub elliptic curve, the scalar field Fr, and the base field Fq, as defined in the Zcash protocol specification.zkcrypto/ff
implements traits for finite fields. We will not be bringing inff_derive
or any other macros, to reduce dependency trees.jubjub
will bring this in as a dependency.zkcrypto/group
implements traits and generic group tools such as multi-exponentiation and FFTs. (TODO: multi-threaded variants of these algorithms; enabled by crate feature, or built outside this crate by exposing primitives?)zkcrypto/bellman
implements circuit traits and primitive structures, as well as basic gadget implementations such as booleans, number abstractions, etc. Unlike now, bellman will be generic usingff
and won't be pairing-specific.zkcrypto/pairing
implements basic traits for pairing-friendly elliptic curve constructions.zkcrypto/bls12_381
implements BLS12-381, which brings injubjub
as a dependency (to use its Fq implementation).zkcrypto/groth16
implements the Groth16 proving system as used in Zcash. This brings inpairing
andbellman
as dependencies.Zcash-specific crates:
zcash_primitives
contains implementations of crypto components in Zcash, such as keys and their derivations (ZIP32), addresses, notes, and any other structures or algorithms specific to Zcash, such as transactions.zcash_proofs
contains an implementation of the prover and verifier for Sapling proofs. This brings inbls12-381
,groth16
as dependencies and contains the implementation of the Spend/Output circuits.zcash_client_backend
contains tools for maintaining a Zcash wallet (something which can send and receive payments, maintain keys, etc.)librustzcash
is a C FFI for consensus-rule verification of Sapling transactions, interacting with the prover from C++, etc.Task list (as of 2019-08-14):
zip32
crate intozcash_primitives
.sapling-crypto
acrossbellman
,zcash_primitives
, andzcash_proofs
.jubjub
crate.jubjub
into workspace.ff
traits to matchjubjub
API.impl ff::* for jubjub
group
traits to matchjubjub
API.bellman
intogroup
.impl group::* for jubjub
bls12_381
crate.bls12_381
into workspace.impl ff::* for bls12_381
impl group::* for bls12_381
pairing
traits to matchbls12_381
API.impl pairing::* for bls12_381
zcash_primitives::jubjub
with the new crate.pairing::bls12_381
with the new crate.groth16
frombellman
.The text was updated successfully, but these errors were encountered: