Skip to content

Commit 4ce9365

Browse files
committed
Update to zcash/zcash_note_encryption@19003049cfd0f138bde086de09bd036c0ddc6322
This adapts the `zcash_note_encryption::ShieldedOutput` impl's provided by this crate to include implementations of the newly added `cmstar()` method.
1 parent fcb14de commit 4ce9365

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to Rust's notion of
77

88
## [Unreleased]
99

10+
### Changed
11+
- Migrated to `zcash_note_encryption 0.5`
12+
1013
## [0.11.0] - 2025-02-20
1114

1215
### Added

Cargo.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,6 @@ debug = true
106106

107107
[profile.bench]
108108
debug = true
109+
110+
[patch.crates-io]
111+
zcash_note_encryption = { git = "https://[email protected]/zcash/zcash_note_encryption", rev = "19003049cfd0f138bde086de09bd036c0ddc6322" }

src/note_encryption.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ impl<T> ShieldedOutput<OrchardDomain, ENC_CIPHERTEXT_SIZE> for Action<T> {
265265
EphemeralKeyBytes(self.encrypted_note().epk_bytes)
266266
}
267267

268-
fn cmstar_bytes(&self) -> [u8; 32] {
269-
self.cmx().to_bytes()
268+
fn cmstar(&self) -> &<OrchardDomain as Domain>::ExtractedCommitment {
269+
self.cmx()
270270
}
271271

272272
fn enc_ciphertext(&self) -> &[u8; ENC_CIPHERTEXT_SIZE] {
@@ -279,8 +279,8 @@ impl ShieldedOutput<OrchardDomain, ENC_CIPHERTEXT_SIZE> for crate::pczt::Action
279279
EphemeralKeyBytes(self.output().encrypted_note().epk_bytes)
280280
}
281281

282-
fn cmstar_bytes(&self) -> [u8; 32] {
283-
self.output().cmx().to_bytes()
282+
fn cmstar(&self) -> &<OrchardDomain as Domain>::ExtractedCommitment {
283+
self.output().cmx()
284284
}
285285

286286
fn enc_ciphertext(&self) -> &[u8; ENC_CIPHERTEXT_SIZE] {
@@ -321,8 +321,8 @@ impl ShieldedOutput<OrchardDomain, COMPACT_NOTE_SIZE> for CompactAction {
321321
EphemeralKeyBytes(self.ephemeral_key.0)
322322
}
323323

324-
fn cmstar_bytes(&self) -> [u8; 32] {
325-
self.cmx.to_bytes()
324+
fn cmstar(&self) -> &<OrchardDomain as Domain>::ExtractedCommitment {
325+
&self.cmx
326326
}
327327

328328
fn enc_ciphertext(&self) -> &[u8; COMPACT_NOTE_SIZE] {

0 commit comments

Comments
 (0)