refactor(zcash): rename redacted PCZT signing helper
What changed, and why it matters
This commit is a simple rename of an internal function from `sign_pczt_to_pczt` to `sign_and_redact_pczt` in the Zcash Rust code. No behavior, logic, or security properties changed; it only makes the function name more descriptive. There is no security issue here.
No action required; this is a non-functional refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is a pure refactor: all call sites and doc comments are updated to use the new name sign_and_redact_pczt. The function body, signatures, feature gates (#[cfg(feature = "cypherpunk")]), and surrounding logic are identical. No cryptographic, memory-safety, or input-validation changes are present.
Changed components
rust/apps/zcash/src/lib.rsrust/apps/zcash/src/pczt/sign.rsInspect captured patch +4 / −4
diff --git a/rust/apps/zcash/src/lib.rs b/rust/apps/zcash/src/lib.rs
index 5858263..4475028 100644
--- a/rust/apps/zcash/src/lib.rs
+++ b/rust/apps/zcash/src/lib.rs
@@ -722,7 +722,7 @@ fn sign_checked_pczt_with_policy<P: consensus::Parameters>(
if policy == ShieldedActionPolicy::Batch && signable_actions.is_empty() {
return Err(ZcashError::PcztNoMyInputs);
}
- let signed = pczt::sign::sign_pczt_to_pczt(pczt, seed)?;
+ let signed = pczt::sign::sign_and_redact_pczt(pczt, seed)?;
let signed = if signable_actions.is_empty() {
signed
} else {
diff --git a/rust/apps/zcash/src/pczt/sign.rs b/rust/apps/zcash/src/pczt/sign.rs
index 3913733..e9b4ad0 100644
--- a/rust/apps/zcash/src/pczt/sign.rs
+++ b/rust/apps/zcash/src/pczt/sign.rs
@@ -242,10 +242,10 @@ impl PcztSigner for SeedSigner<'_> {
/// Signs `pczt` and serializes the stamped, redacted response.
///
-/// Thin wrapper over `sign_pczt_to_pczt`; see it for the full contract.
+/// Thin wrapper over `sign_and_redact_pczt`; see it for the full contract.
#[cfg(feature = "cypherpunk")]
pub fn sign_pczt(pczt: Pczt, seed: &[u8]) -> crate::Result<Vec<u8>> {
- sign_pczt_to_pczt(pczt, seed)?
+ sign_and_redact_pczt(pczt, seed)?
.serialize()
.map_err(|e| ZcashError::SigningError(format!("serialize signed PCZT: {e:?}")))
}
@@ -254,7 +254,7 @@ pub fn sign_pczt(pczt: Pczt, seed: &[u8]) -> crate::Result<Vec<u8>> {
/// so callers that still need the parsed value (in-memory post-sign
/// verification) avoid a byte round trip.
#[cfg(feature = "cypherpunk")]
-pub fn sign_pczt_to_pczt(pczt: Pczt, seed: &[u8]) -> crate::Result<Pczt> {
+pub fn sign_and_redact_pczt(pczt: Pczt, seed: &[u8]) -> crate::Result<Pczt> {
super::validate_supported_pczt(&pczt)?;
let seed_fingerprint =
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.