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

Convert the repo into a Cargo workspace #32

Merged
merged 492 commits into from
Aug 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
492 commits
Select commit Hold shift + click to select a range
635bd81
Add grouphash
Dec 13, 2017
d143d32
Relocate grouphash implementation.
ebfull Dec 18, 2017
1e56289
Implementation of group hash in the circuit.
ebfull Dec 18, 2017
49cc4e0
Merge pull request #4 from ebfull/refactor-jubjub
ebfull Dec 19, 2017
031ae63
Tidy up the codebase (TODOs into github issues).
ebfull Dec 19, 2017
041060e
Merge pull request #13 from ebfull/tidy-up
ebfull Dec 19, 2017
87548f3
Implementation of Montgomery point addition in the circuit.
ebfull Dec 22, 2017
e1ab3be
Implementation of conditional negation for AllocatedNum.
ebfull Dec 22, 2017
8e3bef8
Bump version of bellman.
ebfull Dec 22, 2017
07f2e55
Implement twisted Edwards point conversion and addition in the circuit.
ebfull Dec 22, 2017
e9c9618
Implement pedersen hashes inside and outside of the circuit.
ebfull Dec 28, 2017
849f330
Add test to monitor the number of constraints consumed by the pederse…
ebfull Dec 28, 2017
6841763
Add TODO for improving lookup performance.
ebfull Dec 28, 2017
7211d98
Implement linear combination addition with coefficient.
ebfull Jan 7, 2018
42514e7
Remove TODO's in favor of github issues.
ebfull Jan 29, 2018
7d59049
Merge pull request #15 from ebfull/pedersen-hashes
ebfull Jan 29, 2018
bfda59f
Remove group hash implementation from inside the circuit, as it is no…
ebfull Jan 29, 2018
55598e4
Define get_for_y for twisted Edwards points.
ebfull Jan 29, 2018
f00e8a8
Change group_hash to output points in the twisted Edwards form.
ebfull Jan 29, 2018
9d49a60
Replace Montgomery point interpretation with twisted Edwards.
ebfull Jan 29, 2018
ba3ef9c
Implementation of 3-bit window table lookups.
ebfull Feb 2, 2018
67f2cea
Move window table lookup logic into its own module.
ebfull Feb 2, 2018
d49c0b0
Implement Edwards doubling in the circuit.
ebfull Feb 2, 2018
f2c74a4
Implement conditional reversal of two allocated numbers.
ebfull Feb 2, 2018
55b8f7a
Dynamic base twisted Edwards scalar multiplication in the circuit.
ebfull Feb 2, 2018
69833e5
Start initializing generators for various components in the protocol.
ebfull Feb 6, 2018
edc4adc
Implementation of fixed-base Edwards scalar multiplication in the cir…
ebfull Feb 7, 2018
73e73d7
Remove TODOs by creating tickets.
ebfull Feb 7, 2018
c8cc190
Merge pull request #21 from ebfull/gh-revisions
ebfull Feb 10, 2018
52829af
Fix test for pedersen hash chunks per generator.
ebfull Feb 11, 2018
821d222
Raise the number of chunks in Pedersen hashes to 63.
ebfull Feb 11, 2018
137b410
Update "rand" dependency to 0.4.
jasondavies Feb 13, 2018
2338174
Update "rand" dependency to 0.4.
jasondavies Feb 13, 2018
bce9f5d
Update clippy and fix code indentation.
jasondavies Feb 13, 2018
a0fcf71
add_nocarry and sub_noborrow should no longer return anything.
ebfull Feb 13, 2018
7b6e13b
Auto merge of #74 - plutomonkey:clippy, r=ebfull
bmerge Feb 14, 2018
b971bde
Rename divn/muln to shr/shl.
ebfull Feb 14, 2018
541fda7
Fix misleading comments on write_be and read_be.
ebfull Feb 14, 2018
cb53708
New implementation of library API.
ebfull Feb 14, 2018
749d6ce
Bump version
ebfull Feb 16, 2018
683aa93
Account for change in bellman's API for enforcement to use closures.
ebfull Feb 7, 2018
814cfef
Use more descriptive synthesis errors now available in bellman.
ebfull Feb 7, 2018
2f95a90
Refactor to handle changes to ConstraintSystem API (no more Variable …
ebfull Feb 13, 2018
c091e27
Merge pull request #32 from ebfull/bellman-update
ebfull Feb 16, 2018
8d633db
Merge pull request #29 from ebfull/pedersen-chunks
ebfull Feb 20, 2018
1df7fbe
Refactor "booleanization" of objects.
ebfull Feb 20, 2018
ec73231
Booleanize u64 objects.
ebfull Feb 20, 2018
5118fd5
Add new fixed generators for the output circuit
ebfull Feb 20, 2018
39175a0
Remove unneeded imports
ebfull Feb 20, 2018
d779f31
Force personalization of Pedersen hashes.
ebfull Feb 20, 2018
6e80c12
Add TODO
ebfull Feb 20, 2018
b37d9b1
More efficient implementation of Edwards doubling in the circuit.
ebfull Feb 20, 2018
6f66fd3
Express x and y coordinates from lookup as linear combinations.
ebfull Feb 20, 2018
1610bcf
Perform the y-coordinate conditional negation and lookup simultaneously.
ebfull Feb 20, 2018
c89d47b
Remove Montgomery point doubling implementation in the circuit.
ebfull Feb 20, 2018
4fa73ef
Remove conditional negation implementation from AllocatedNum.
ebfull Feb 20, 2018
88bdff6
Pedersen hashes with full optimization
ebfull Feb 21, 2018
a1c749e
Change fixed-base exponentiation API to handle scalars better.
ebfull Feb 21, 2018
c221bc9
Rename `mont` to `ecc` in circuit code.
ebfull Feb 21, 2018
e8480a2
Utility for witnessing points on the curve.
ebfull Feb 21, 2018
1a89b3a
Merge pull request #33 from ebfull/general-improvements
ebfull Feb 21, 2018
da717f4
Auto merge of #75 - ebfull:primerepr-fixes, r=ebfull
bmerge Feb 21, 2018
d51a5b0
Auto merge of #73 - plutomonkey:update-rand-dependency, r=ebfull
bmerge Feb 21, 2018
53083f4
Apply rustfmt to the codebase.
ebfull Feb 21, 2018
4b6623c
Add some personalization and a generator.
ebfull Feb 22, 2018
ba7298d
Crappy mock-up of the circuit.
ebfull Feb 22, 2018
c812805
Slight refactor of representations
ebfull Feb 23, 2018
97585a3
Remove from_bits_strict from AllocatedNum.
ebfull Feb 23, 2018
69abd03
Optimize into_bits_strict.
ebfull Feb 23, 2018
0d56c7a
Remove enforce_in_field.
ebfull Feb 23, 2018
a45986f
Remove enforce_nand.
ebfull Feb 23, 2018
8c37212
Remove kary_and from Boolean.
ebfull Feb 23, 2018
7a7774d
Remove unused imports in Boolean.
ebfull Feb 23, 2018
23d17b9
Minor adjustments.
ebfull Feb 24, 2018
4441a0d
Hash the constraint systems to check integrity.
ebfull Feb 24, 2018
3346fba
Implementation of Jubjub point representation.
ebfull Feb 24, 2018
27674bf
Derive Clone for EdwardsPoint.
ebfull Feb 25, 2018
4f4a2d6
Merge pull request #34 from ebfull/output-circuit
ebfull Feb 25, 2018
57687cf
Creation of the Note primitive.
ebfull Feb 25, 2018
ab14870
Serialization of parameters and proofs.
ebfull Mar 5, 2018
f7815f6
Remove unused tests and fix documentation.
ebfull Mar 5, 2018
86f652f
Some minor documentation/changes to domain.
ebfull Mar 5, 2018
5f8747a
Move MiMC example to tests.
ebfull Mar 5, 2018
f537005
Test deserialization of proofs in MiMC test example.
ebfull Mar 5, 2018
6fea7e3
Auto merge of #77 - ebfull:rustfmt-application-2, r=ebfull
bmerge Mar 5, 2018
c9cacc7
Bump version and integrate pairing 0.14.
ebfull Mar 5, 2018
92d2c13
Release of pairing 0.14.0.
ebfull Mar 5, 2018
ef7ade8
Auto merge of #78 - ebfull:release-0.14, r=ebfull
bmerge Mar 5, 2018
33feb37
Merge pull request #17 from plutomonkey/update-rand-dependency
ebfull Mar 5, 2018
51c35a9
Adopt new versions of pairing and bellman.
ebfull Mar 5, 2018
e52befb
Introduce inputize abstractions to simplify circuit code.
ebfull Mar 5, 2018
3e15751
Allocate the note value directly in little-endian bit order.
ebfull Mar 5, 2018
543f5cd
Change bit-endianness of into_bits/into_bits_strict.
ebfull Mar 5, 2018
3971ecd
Abstract away the boolean conversion of field witnessing.
ebfull Mar 5, 2018
8cbcd77
Rename into_bits and into_bits_strict to signify endianness.
ebfull Mar 5, 2018
69010d1
Relocate Pedersen hash personalization enum.
ebfull Mar 5, 2018
b45a37f
Add comments and reorder some generators.
ebfull Mar 5, 2018
c6cf0c7
Value placed in note contents should be in big endian bit order.
ebfull Mar 5, 2018
7bb630a
Use correct personalization for merkle tree.
ebfull Mar 6, 2018
2e84684
Perform ak group order check in Spend circuit.
ebfull Mar 6, 2018
058801b
Switch to using the blake2-rfc crate instead.
ebfull Mar 6, 2018
d21ff08
Group hash should use a first block containing random data as per spec.
ebfull Mar 6, 2018
b831942
Adopt BLAKE2s personalization throughout protocol.
ebfull Mar 6, 2018
f155c01
Personalize GH for each generator independently.
ebfull Mar 6, 2018
7a9879e
Make EdwardsPoint (x, y) not public.
ebfull Mar 6, 2018
63c6830
Cache fewer pedersen hash generators.
ebfull Mar 6, 2018
c253e51
Merge pull request #35 from ebfull/primitives
ebfull Mar 6, 2018
c31092c
Remove unnecessary mut binding.
ebfull Mar 6, 2018
1f2bb62
Rename proving key to proof generation key to disambiguate from the S…
ebfull Mar 6, 2018
1f65d4b
Change tree depth to 32 in test.
ebfull Mar 6, 2018
b0b3514
Add bench_50 example.
ebfull Mar 6, 2018
ef85173
Fix comments in jubjub code.
ebfull Mar 7, 2018
2d4be07
Fix group hash comment.
ebfull Mar 7, 2018
0242ed3
Add some circuit tests for inputs.
ebfull Mar 7, 2018
b998190
Disable this, for now.
ebfull Mar 8, 2018
25a8050
Remaining tests for input circuit
ebfull Mar 8, 2018
c7c8d3c
Move personalization constants to submodule.
ebfull Mar 8, 2018
896b144
Move first block of group hash to constants submodule.
ebfull Mar 8, 2018
b6ef12b
General code quality improvements.
ebfull Mar 8, 2018
f61cc88
More comment improvements.
ebfull Mar 8, 2018
d6d8673
Remove some code duplication for value commitment witnessing.
ebfull Mar 8, 2018
3fbbd93
Simplify value commitment abstraction.
ebfull Mar 8, 2018
512a394
Simplify witness for Spend statement.
ebfull Mar 8, 2018
9998400
Relocate structs for cleanliness.
ebfull Mar 8, 2018
db28ff7
Simplify the Output witness.
ebfull Mar 8, 2018
b6e1b52
Fix comment about Montgomery curve selection
ebfull Mar 8, 2018
390f2c1
Merge pull request #37 from ebfull/circuit-tests
ebfull Mar 9, 2018
c1784f0
Check g_d is not small order in Spend circuit.
ebfull Mar 9, 2018
2c69abe
Add Uncommitted^Sapling.
ebfull Mar 9, 2018
661f318
Optimise Boolean::enforce_equal.
jasondavies Feb 11, 2018
3c07a2d
Merge pull request #30 from plutomonkey/boolean_enforce_equal
ebfull Mar 14, 2018
827e855
Public input verification utility for the test framework
ebfull Mar 15, 2018
52eb597
Optimize UInt32::addmany/BLAKE2s to combine equality constraints. (Cl…
ebfull Mar 15, 2018
ca202ef
Introduce input multipacking abstraction for nullifiers.
ebfull Mar 15, 2018
21625d6
Place Sapling circuit into submodule.
ebfull Mar 15, 2018
39f1152
Merge pull request #53 from ebfull/circuit-improvements
ebfull Mar 15, 2018
a7d704c
Fix typos
rex4539 Mar 16, 2018
c092926
Merge pull request #56 from rex4539/fix-typos
ebfull Mar 16, 2018
7e05feb
Changes to names and circuit design to match spec.
ebfull Mar 16, 2018
8b2f231
Change personalization to match specification.
ebfull Mar 16, 2018
00ee962
Fix some names of variables.
ebfull Mar 16, 2018
13b03a0
Relocate circuit components for intuitive code paths.
ebfull Mar 17, 2018
6d01e78
Fix variable names in output circuit
ebfull Mar 17, 2018
d09c4d6
Simplify value commitment gadget.
ebfull Mar 17, 2018
8b6f113
Change personalization to more closely align with the spec.
ebfull Mar 17, 2018
219d03c
Perform multiple checks of circuit in test.
ebfull Mar 19, 2018
b14c9f8
Change personalizations to actually match spec this time.
ebfull Mar 19, 2018
f9e58c0
Swap bit-endianness of value in note commitment.
ebfull Mar 19, 2018
601e8e3
Little-endian byte order interpretation of the output of CRH^ivk.
ebfull Mar 20, 2018
e639750
Merge pull request #57 from ebfull/final-circuit-changes
ebfull Mar 22, 2018
51bb5f0
Implement UInt32::shr() for SHA256.
ebfull Mar 15, 2018
4f0a553
Implement UInt32 encoding/decoding with big-endian representation.
ebfull Mar 15, 2018
abca614
Implementation of SHA256 choice operation for Boolean.
ebfull Mar 15, 2018
36a6b5f
Implementation of SHA256 majority operation for Boolean.
ebfull Mar 15, 2018
75c5269
Implementation of SHA256 choice/majority for UInt32.
ebfull Mar 15, 2018
ac13cb0
Implementation of SHA256.
ebfull Mar 15, 2018
162a387
JoinSplit circuit implementation for Sprout.
ebfull Mar 15, 2018
4de908b
Fix bug in circuit uncovered by test vector.
ebfull Mar 20, 2018
d715e81
Un-disable benchmark
str4d Mar 23, 2018
def5de3
Allow the authentication path to be not enforced for zero-value notes…
ebfull Mar 26, 2018
cfd3786
Add more test vectors to Sprout circuit implementation.
ebfull Mar 27, 2018
97bead9
Update benchmark to use final Sapling circuit implementation
str4d Mar 27, 2018
7ee2950
Merge pull request #61 from str4d/bench-final
ebfull Mar 27, 2018
470c957
Merge pull request #60 from ebfull/optional-enforce
ebfull Mar 27, 2018
9418001
First block of GH invocation using random beacon output.
ebfull Mar 27, 2018
3704b24
Fix benchmark due to anchor change in witness.
ebfull Mar 28, 2018
9f24b68
Update constraint system hashes.
ebfull Mar 28, 2018
1026e92
Merge pull request #63 from ebfull/gh
ebfull Mar 28, 2018
4cf5a53
i128_type feature has been stabilized in Rust.
ebfull Mar 29, 2018
bcc8379
Version bump.
ebfull Mar 29, 2018
fcaddaa
Update Clippy to support latest nightly, and fix some lints.
ebfull Mar 29, 2018
2d12b9a
Apply newer rustfmt rules.
ebfull Mar 29, 2018
dbe897d
Auto merge of #79 - ebfull:nomorenightly, r=ebfull
bmerge Mar 30, 2018
c4fd885
Make multicore module public for now, because Worker is part of the E…
ebfull Apr 1, 2018
6ec7272
Serialize lengths as 32-bit integers, not 64-bit.
ebfull Apr 1, 2018
6e57ef0
Bump version
ebfull Apr 1, 2018
45c73db
Merge pull request #54 from ebfull/sprout-circuit-minimal
ebfull Apr 2, 2018
d14f2af
Make fields of Parameters/VerifyingKey/Proof public.
ebfull Apr 3, 2018
96b2d3e
Prevent trivial subversion attack against prover.
ebfull Apr 3, 2018
10c5010
Merge pull request #22 from ebfull/final-changes
ebfull Apr 4, 2018
e554b47
Update to bellman 0.1
ebfull Apr 6, 2018
0f230a7
Implement uniform sampling of Jubjub scalars
str4d Apr 15, 2018
916dbce
Implement RedJubjub
str4d Apr 15, 2018
45e4ca3
Match additive notation with variable name
str4d Apr 18, 2018
840c23b
Specify pre-conditions for signature validation
str4d Apr 18, 2018
e4175d8
Merge pull request #64 from str4d/redjubjub
ebfull Apr 19, 2018
f54feda
Fix comment
str4d Apr 26, 2018
4eab1fc
Implement RedJubjub serialization
str4d Apr 26, 2018
e94dbf2
Parameterize the generator in RedJubjub
str4d Apr 26, 2018
6e08a5a
Merge pull request #66 from str4d/fix-spend-nf-comment
ebfull Apr 29, 2018
b27dc29
Remove redundant signature check
str4d Apr 30, 2018
3476667
Merge pull request #67 from str4d/redjubjub-serialisation
ebfull Apr 30, 2018
5687acf
Make PublicKey inner Point public so that we can use it during zk-SNA…
ebfull May 1, 2018
3b8246f
Merge pull request #68 from ebfull/redjubjub-final-work
ebfull May 7, 2018
36cd38e
Make util module public.
ebfull May 7, 2018
7beeb52
Merge pull request #69 from ebfull/make-util-pub
ebfull May 7, 2018
98bab68
Add read_le and write_le to PrimeFieldRepr
str4d May 16, 2018
2a28b61
Bump version
str4d May 17, 2018
97bdd16
Update clippy
ebfull May 17, 2018
e4143a4
Apply rustfmt to benchmarks
ebfull May 17, 2018
da5f1d3
Update to latest rustfmt
ebfull May 17, 2018
09b6e6f
Auto merge of #82 - str4d:read-write-le, r=ebfull
bmerge May 17, 2018
87c62e2
Update to the latest pairing crate version.
ebfull May 17, 2018
f491e02
Correctly interpret BLAKE2s inputs and outputs as little endian.
ebfull May 17, 2018
2ff318e
Use little endian for everything in Sapling.
ebfull May 17, 2018
eb409fa
Merge pull request #72 from ebfull/little-endian
ebfull May 17, 2018
89f47ef
Make ivk pub
ebfull May 18, 2018
6abfcca
Merge pull request #74 from ebfull/ivk-pub
ebfull May 18, 2018
1e3f773
Empty crate
str4d Jul 10, 2018
df7bfce
redjubjub: make PrivateKey internal scalar public
gtank Jul 12, 2018
c2862a4
Merge pull request #78 from gtank/make-privatekey-public
ebfull Jul 12, 2018
3e43cae
Add test that torsion doesn't affect signature verification.
ebfull Jul 27, 2018
cae9715
Change signature verification equation to permit batch verification.
ebfull Jul 27, 2018
a57d277
Add demonstration implementation of batch verification.
ebfull Jul 27, 2018
9cb8acc
Fix nits
ebfull Jul 30, 2018
821810c
Change pedersen hash outside the circuit to use window table lookups.
ebfull Jul 25, 2018
95b498a
Implement specialized doubling formula for extended twisted edwards c…
ebfull Jul 25, 2018
99c03c5
Merge pull request #80 from ebfull/cofactor-signature-checking
ebfull Jul 30, 2018
b70d6e6
Merge pull request #79 from ebfull/pedersen-hash-performance
ebfull Jul 31, 2018
b4d41b6
Add must_use to operations over Edwards/Montgomery points.
ebfull Jul 27, 2018
21084bd
Merge pull request #81 from ebfull/must_use
ebfull Jul 31, 2018
1b8da6b
ZIP 32 structures
str4d Jul 10, 2018
8db8481
Basic conversions
str4d Jul 11, 2018
2fdfa4b
ExtendedSpendingKey::master()
str4d Jul 11, 2018
0e1d440
Serialization and fingerprint for ExpandedSpendingKey and FullViewingKey
str4d Jul 11, 2018
e87fb32
Child key derivation
str4d Jul 11, 2018
f5d6091
Path derivation
str4d Jul 11, 2018
fea07c5
Diversifier derivation
str4d Jul 19, 2018
3b31854
Payment address derivation
str4d Jul 19, 2018
e47cafd
ExtendedSpendingKey::write() and ExtendedFullViewingKey::write()
str4d Aug 1, 2018
342d97a
Test vectors from Python implementation
str4d Aug 1, 2018
9c9607e
Add missing wrapping_add() caught by test vectors
str4d Aug 1, 2018
39f978b
ExtendedSpendingKey::read() and ExtendedFullViewingKey::read()
str4d Aug 1, 2018
599079f
Rename xsk: ExpandedSpendingKey -> expsk to disambiguate
str4d Aug 1, 2018
80130f5
Expose underlying ExpandedSpendingKey and FullViewingKey for writing
str4d Aug 1, 2018
a4e86be
Check ivk in test vectors
str4d Aug 3, 2018
ac8b27a
Expose contents of DiversifierIndex
str4d Aug 3, 2018
e27fc67
Tidy up DiversifierIndex::increment()
str4d Aug 22, 2018
770c4be
Simplify creation of FVKFingerprint and FVKTag
str4d Aug 22, 2018
6671234
cargo fmt
str4d Aug 22, 2018
d7257ce
Move librustzcash crate into subdir
str4d Aug 23, 2018
0ec85d3
Set up a Cargo workspace
str4d Aug 23, 2018
176470e
Merge pull request #1 from str4d/zip32
str4d Aug 27, 2018
ad16ba6
Empty crates as a base for code refactoring
str4d Aug 23, 2018
e924247
Add 'pairing/' from commit '09b6e6f9212020f385218e5cf5287e381ccd312b'
str4d Aug 28, 2018
9f74855
Add 'bellman/' from commit '10c5010fd9c2ca69442dc9775ea271e286e776d8'
str4d Aug 28, 2018
051027c
Add 'sapling-crypto/' from commit '21084bde2019c04bd34208e63c3560fe2c…
str4d Aug 28, 2018
a9059c9
Update workspace after pulling in external crates
str4d Aug 28, 2018
6526b9f
Add 'zip32/' from commit '176470ef41583b5bd0bd749bd1b61d417aa8ec79'
str4d Aug 29, 2018
6e0364c
Update workspace after pulling in zip32 crate
str4d Aug 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
618 changes: 606 additions & 12 deletions Cargo.lock

Large diffs are not rendered by default.

41 changes: 11 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
[package]
name = "librustzcash"
version = "0.1.0"
authors = [
"Sean Bowe <[email protected]>",
"Jack Grigg <[email protected]>",
"Jay Graber <[email protected]>",
"Simon Liu <[email protected]>"
]

[lib]
name = "rustzcash"
path = "src/rustzcash.rs"
crate-type = ["staticlib"]

[dependencies]
libc = "0.2"
pairing = "0.14.2"
lazy_static = "1"
bellman = "0.1"
byteorder = "1"
rand = "0.4"

[dependencies.blake2-rfc]
git = "https://github.com/gtank/blake2-rfc"
rev = "7a5b5fc99ae483a0043db7547fb79a6fa44b88a9"

[dependencies.sapling-crypto]
git = "https://github.com/zcash-hackworks/sapling-crypto"
rev = "21084bde2019c04bd34208e63c3560fe2c02fb0e"
[workspace]
members = [
"bellman",
"librustzcash",
"pairing",
"sapling-crypto",
"zcash_primitives",
"zcash_proofs",
"zcash_wallet",
"zip32",
]

[profile.release]
lto = true
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# librustzcash
# Zcash Rust crates

This repository contains librustzcash, a static library for Zcash code assets written in Rust.
This repository contains a (work-in-progress) set of Rust crates for
working with Zcash.

## Security Warnings

These libraries are currently under development and have not been fully-reviewed.

## License

Licensed under either of
All code in this workspace is licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
Expand All @@ -17,4 +22,3 @@ Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.

2 changes: 2 additions & 0 deletions bellman/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
Cargo.lock
14 changes: 14 additions & 0 deletions bellman/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyrights in the "bellman" library are retained by their contributors. No
copyright assignment is required to contribute to the "bellman" library.

The "bellman" library is licensed under either of

* Apache License, Version 2.0, (see ./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license (see ./LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
22 changes: 22 additions & 0 deletions bellman/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
authors = ["Sean Bowe <[email protected]>"]
description = "zk-SNARK library"
documentation = "https://github.com/ebfull/bellman"
homepage = "https://github.com/ebfull/bellman"
license = "MIT/Apache-2.0"
name = "bellman"
repository = "https://github.com/ebfull/bellman"
version = "0.1.0"

[dependencies]
rand = "0.4"
bit-vec = "0.4.4"
futures = "0.1"
futures-cpupool = "0.1"
num_cpus = "1"
crossbeam = "0.3"
pairing = { path = "../pairing" }
byteorder = "1"

[features]
default = []
201 changes: 201 additions & 0 deletions bellman/LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
23 changes: 23 additions & 0 deletions bellman/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
19 changes: 19 additions & 0 deletions bellman/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# bellman [![Crates.io](https://img.shields.io/crates/v/bellman.svg)](https://crates.io/crates/bellman) #

This is a research project being built for [Zcash](https://z.cash/).

## License

Licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
Loading