-
Notifications
You must be signed in to change notification settings - Fork 116
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
add(chain): Adds ViewingKey
type in zebra-chain
#8198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arya2 could you please describe how we are going to use the key hashes?
fd772f2
to
b1d9723
Compare
I added to its docs that it's for authorizing access via the gRPC interface, it's so that the client doesn't have to keep re-sending their viewing keys once they're registered in the scanner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still struggle to see the advantages of hashing the keys instead of using them directly. What would be worse if we didn't hash the keys?
It could be useful if the private key for the TLS encryption were compromised. |
ViewingKey
and KeyHash
types in zebra-chainViewingKey
type in zebra-chain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
We'll need tests that check the "to bytes" and "from bytes" round-trips, but we can do them later.
Motivation
This PR adds a
ViewingKey
type tozebra-chain
behind theshielded-scan
feature for parsing viewing keys into.PR Author Checklist
Check before marking the PR as ready for review:
For significant changes:
If a checkbox isn't relevant to the PR, mark it as done.
Complex Code or Requirements
Safely hashing viewing keys may need special attention.
Solution
Adds:
shielded-scan
feature to zebra-chain to depend onzcash_client_backend
ViewingKey
,SaplingViewingKey
, andOrchardViewingKey
typesparse()
method toViewingKey
for decoding keysTesting
Review
Anyone can review.
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.