ca333
492d6703ed
sync jl777:FSM
6 years ago
Sean Bowe
69c4391b0f
Check commitment validity within the decryption API for Sapling note plaintexts.
6 years ago
Jack Grigg
66a519f55d
Alter SaplingNote::nullifier() to take a SaplingFullViewingKey
This means the API will work if you only have a SaplingExtendedSpendingKey,
as will be the case with ZIP 32.
6 years ago
Simon
e739ca2ef2
Rename AttemptSaplingEncDecryptionUsingFullViewingKey and use function overloading.
6 years ago
Simon
7b913c3e5e
Implement Sapling note decryption using full viewing key.
6 years ago
Sean Bowe
f23e783600
Decryption and tests of note/outgoing encryption.
6 years ago
Simon
34bf166e5f
Add encryption of SaplingNotePlaintext and SaplingOutgoingPlaintext classes.
This is part of #3061 to add Sapling note functionality.
6 years ago
Simon
268e5dfa50
Return optional for Sapling commitments and nullifiers.
Unlike Sprout, they are not always computable in Sapling.
6 years ago
Simon
d17f8d1cc7
Refactor and replace factory method random() with constructor.
6 years ago
Simon
36e2e7cc32
Add SaplingNote class and test_sapling_note unit test.
6 years ago
Jack Grigg
a6bbb26e08
Replace boost::array with std::array
6 years ago
Simon
47db75426f
Closes #3301 . Non-void function should not have empty definition.
6 years ago
Jack Grigg
e5eab182b5
Use boost::variant to represent shielded addresses and keys
libzcash::PaymentAddress has been renamed to libzcash::SproutPaymentAddress,
and a new typedef boost::variant is now libzcash::PaymentAddress. Similarly
for ViewingKey and SpendingKey.
A new class InvalidEncoding is introduced as the default boost::variant
option for each address and key type; it is used during decoding instead
of boost::optional.
All address and key storage functions in the wallet have been modified to
refer specifically to the Sprout types, as they are used very precisely.
In most other cases, the more general type is leveraged as much as possible,
and we convert to the Sprout type when necessary. This will be subsequently
wrapped in, or replaced with, context-specific functions once Sapling
types are implemented.
6 years ago
Simon
67f3577239
Closes #3250 . Memo getter should return by reference, not by value.
6 years ago
Simon
debf6af9f8
Move memo member varible from SproutNotePlaintext to BaseNotePlaintext.
Add memo() accessor to BaseNotePlaintext.
6 years ago
Simon
d266f40393
Create class hierarchy for SproutNotePlaintext.
BaseNotePlaintext contains member variable for common attribute, value.
6 years ago
Simon
5020a93631
Refactoring: rename NotePlaintext --> SproutNotePlaintext
Also renames:
CNotePlaintextEntry --> CSproutNotePlaintextEntry
CUnspentNotePlaintextEntry --> CUnspentSproutNotePlaintextEntry
6 years ago
Simon
5f4fa1a954
Add virtual destructor to SproutNote and BaseNote
Also add test to make sure default copy constructors are okay.
6 years ago
Simon
5d99e3e92f
Refactoring: SproutNote member variable value moved to BaseNote.
All notes have a value, so the member variable has been moved to the
base class, and direct member access has been replaced with a getter.
6 years ago
Simon
b230fe6836
Refactoring: Rename class libzcash::Note to libzcash::SproutNote.
6 years ago
Simon
bef33bbc73
Refactoring: libzcash::Note is now a subclass of libzcash::BaseNote.
6 years ago
Jack Grigg
68a1a592ca
Remove nType and nVersion from Zcash-specific code
6 years ago
jl777
e73b2055c6
Merge branch 'beta' into mergemaster
# Conflicts:
# src/main.cpp
6 years ago
syd
4e4aa5b6ec
Get rid of underscore prefixes for include guards.
This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_
This closes #1272
7 years ago
Simon
b7727d8b3b
Fixes CID 1352687 uninitialized scalar field.
8 years ago
Sean Bowe
369df06583
Introduce new `libzcash` Zcash protocol API and crypto constructions surrounding the zkSNARK circuit.
8 years ago