Commit Graph

24 Commits

Author SHA1 Message Date
Duke Leto
b0ea67d5be desprout 2020-06-07 16:10:49 -04:00
Duke Leto
0cc4772c25 desprout 2020-06-05 12:43:01 -04:00
Duke Leto
3cb215e39a more desprout, ugh 2020-06-05 12:17:41 -04:00
Jack Grigg
41baeb2bc2 Ignore exceptions when deserializing note plaintexts 2019-09-25 07:41:37 -07:00
Sean Bowe
69c4391b0f Check commitment validity within the decryption API for Sapling note plaintexts. 2018-08-08 12:03:09 -07:00
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.
2018-07-24 14:54:01 +02:00
Simon
e739ca2ef2 Rename AttemptSaplingEncDecryptionUsingFullViewingKey and use function overloading. 2018-07-23 10:48:26 -07:00
Simon
7b913c3e5e Implement Sapling note decryption using full viewing key. 2018-07-20 16:31:48 -07:00
Simon
687bd96cbd Minor update to address nits in review. 2018-07-17 14:26:38 -07:00
Sean Bowe
f23e783600 Decryption and tests of note/outgoing encryption. 2018-07-16 18:34:14 -06:00
Simon
34bf166e5f Add encryption of SaplingNotePlaintext and SaplingOutgoingPlaintext classes.
This is part of #3061 to add Sapling note functionality.
2018-07-11 22:03:04 -07:00
Simon
268e5dfa50 Return optional for Sapling commitments and nullifiers.
Unlike Sprout, they are not always computable in Sapling.
2018-06-12 14:40:17 -07:00
Simon
d17f8d1cc7 Refactor and replace factory method random() with constructor. 2018-06-12 14:37:15 -07:00
Simon
36e2e7cc32 Add SaplingNote class and test_sapling_note unit test. 2018-06-12 14:37:05 -07:00
Jack Grigg
a6bbb26e08 Replace boost::array with std::array 2018-05-26 00:12:57 +12:00
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.
2018-05-11 17:14:49 -04:00
Simon
debf6af9f8 Move memo member varible from SproutNotePlaintext to BaseNotePlaintext.
Add memo() accessor to BaseNotePlaintext.
2018-04-26 15:05:30 -07:00
Simon
d266f40393 Create class hierarchy for SproutNotePlaintext.
BaseNotePlaintext contains member variable for common attribute, value.
2018-04-26 15:05:30 -07:00
Simon
5020a93631 Refactoring: rename NotePlaintext --> SproutNotePlaintext
Also renames:
CNotePlaintextEntry --> CSproutNotePlaintextEntry
CUnspentNotePlaintextEntry --> CUnspentSproutNotePlaintextEntry
2018-04-26 15:05:30 -07:00
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.
2018-04-26 15:05:19 -07:00
Simon
b230fe6836 Refactoring: Rename class libzcash::Note to libzcash::SproutNote. 2018-04-25 11:33:24 -07:00
Sean Bowe
81469bbb83 Note values should be little-endian byte order. 2016-05-12 16:45:12 -06:00
Sean Bowe
a9640f67f1 Rename ZCASH_ constants to ZC_. 2016-05-12 16:45:07 -06:00
Sean Bowe
369df06583 Introduce new libzcash Zcash protocol API and crypto constructions surrounding the zkSNARK circuit. 2016-05-12 16:44:27 -06:00