-
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
zcash_note_encryption generalization #746
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to Domain implementation.
…ShieldedOutput trait
…textBytes, wrapping the AEADBytes in a struct
extended zcash_note_encryption to support variable size notes.
nuttycom
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Apr 15, 2023
We discussed this PR in ZIP Sync today. Current thoughts:
|
The |
moved to zcash/zcash_note_encryption#2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to support note encryption for zsa, we suggest extending the current
zcash_note_encryption
implementation. Currently, theCOMPACT_NOTE_SIZE
is a constant, however we need to support variable note sizes to include theAssetId
field for zsa notes.Currently, in
zcash_note_encryption
:and
We suggest moving the constants into the specific implementation (
impl Domain for OrchardDomain
and Sapling) of theDomain
trait by adding abstract types toNotePlaintextBytes
,NoteCiphertextBytes
,CompactNotePlaintextBytes
,CompactNoteCiphertextBytes
.We get
Also, the constant will be removed from functions' signatures since they are unknown at compilation time. For example:
Will be replaced with simply
We provided our initial implementation to be complemented by the appropriate changes in
Orchard::note_encryption.rs
. Currently can be seen here for v2 notes https://github.com/QED-it/orchard/pull/7/files#diff-73b5b84dde3fc78a9942d6c827ed46e4ab9e027ca508e6279b9262fe985c3bffL2 (seenote_encryption.rs
diff)The changes will allow us to implement an
Orchard::Domain
forV3
notes while keeping compatibility with the existing Orchard Domain ( forV2
notes ) and Sapling.