feat(discovery-core): add hash primitives and outgoing channel storage slots - #456
Conversation
Yoni-Starkware
left a comment
There was a problem hiding this comment.
@Yoni-Starkware reviewed 4 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @m-kus).
crates/discovery-core/src/privacy_pool/hashes.rs line 3 at r1 (raw file):
//! Hash functions and domain separation tags. //! //! TODO: rename primitives to match smart contract terminology
Still relevant?
Code quote:
//! TODO: rename primitives to match smart contract terminologycrates/discovery-core/src/privacy_pool/hashes.rs line 136 at r1 (raw file):
/// Computes the nullifier for a note. /// /// `nullifier = hash(NULLIFIER_TAG, channel_key, token, index, 0, decryption_key)`
Unnecessary, it just repeats the impl (in all these funcs)
b444378 to
cdf0400
Compare
1aba5e9 to
75115c6
Compare
m-kus
left a comment
There was a problem hiding this comment.
@m-kus made 1 comment and resolved 1 discussion.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @Yoni-Starkware).
crates/discovery-core/src/privacy_pool/hashes.rs line 3 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Still relevant?
Resolved
1dbb3ac to
ec15ebd
Compare
ec15ebd to
f2a60f2
Compare
75115c6 to
c61ac2d
Compare
Yoni-Starkware
left a comment
There was a problem hiding this comment.
@Yoni-Starkware reviewed 4 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @m-kus).
c61ac2d to
304b302
Compare
f2a60f2 to
014e336
Compare
014e336 to
1f898f6
Compare

Add Privacy Pool Cryptographic Primitives
This PR adds several cryptographic primitives needed for the privacy pool implementation:
Adds new domain separation tags for:
Implements hash functions for:
Adds storage slot computation for encrypted outgoing channel information
Adds a utility function
felt_hex()for formatting field elements as readable hex stringsThis change is