What changed, and why it matters
This commit lowers the maximum number of Zcash transactions that can be processed in one batch from 50 to 35. It appears to be a defensive hardening change to reduce memory pressure or processing load on the hardware wallet during batch signing, rather than a fix for a known exploitable bug. There is no direct evidence in the commit or supplied references that this resolves a specific security vulnerability.
Treat as a routine hardening change. If reviewing for security, verify whether the limit reduction was prompted by a memory exhaustion, denial-of-service, or side-channel concern by checking related issues, pull requests, or release notes. No immediate action is indicated by this commit alone.
Security signals we found
Resource limit reduction (batch size cap lowered)
No mention of CVE, bug, vulnerability, or exploit in commit message
Unit test updated to reflect new limit enforcement
Documentation updated to reflect new limit
Evidence from the diff
The change reduces the ZCASH_BATCH_MAX_PCZTS constant from 50 to 35 in the cypherpunk firmware feature, and updates the documentation and a unit test accordingly. The 512 KiB total batch size limit remains unchanged. The commit message gives no rationale beyond ‘Reduce Zcash batch limit to 35’. Without additional context, this is best classified as a resource-limit hardening or precautionary adjustment. It does not by itself indicate a patch for an identified vulnerability, though it may be part of a broader defensive measure.
Changed components
Zcash batch signing module (rust/rust_c/src/zcash/mod.rs)Zcash UR registry documentation (docs/protocols/ur_registrys/zcash.md)Inspect captured patch +3 / −3
diff --git a/docs/protocols/ur_registrys/zcash.md b/docs/protocols/ur_registrys/zcash.md
index 5b6e050..0812fea 100644
--- a/docs/protocols/ur_registrys/zcash.md
+++ b/docs/protocols/ur_registrys/zcash.md
@@ -63,7 +63,7 @@ carries the PCZT-owned response in its own opaque `data` field. It also reports
the signing firmware version once for the entire response.
Batch version 1 is supported by cypherpunk firmware and currently accepts up to
-50 PCZTs. The encoded batch data and request id together, and the canonical PCZT
+35 PCZTs. The encoded batch data and request id together, and the canonical PCZT
payloads after decoding, must each fit within 512 KiB. The operation is atomic.
If any PCZT is invalid or cannot be signed, Keystone returns an error instead of
a partial result. PCZT entries with identical canonical encodings are rejected.
diff --git a/rust/rust_c/src/zcash/mod.rs b/rust/rust_c/src/zcash/mod.rs
index c283a59..0e8ccc2 100644
--- a/rust/rust_c/src/zcash/mod.rs
+++ b/rust/rust_c/src/zcash/mod.rs
@@ -40,7 +40,7 @@ use zeroize::Zeroize;
// Cap both per-PCZT overhead and variable-size payload data to leave headroom
// in shared device memory while processing a batch.
#[cfg(feature = "cypherpunk")]
-const ZCASH_BATCH_MAX_PCZTS: usize = 50;
+const ZCASH_BATCH_MAX_PCZTS: usize = 35;
#[cfg(feature = "cypherpunk")]
const ZCASH_BATCH_MAX_TOTAL_BYTES: usize = 512 * 1024;
#[cfg(feature = "cypherpunk")]
@@ -1061,7 +1061,7 @@ mod tests {
overlong_small_count.push(0);
validate_zcash_batch_request_count(&overlong_small_count).unwrap();
- // The body declares 51 PCZTs but omits them. Reaching the count error
+ // The body declares 36 PCZTs but omits them. Reaching the count error
// proves the limit is enforced before the full request is parsed.
request[ZCASH_BATCH_REQUEST_HEADER_LEN] += 1;
let registry = ZcashSignBatch::new(vec![0xaa], request);
Why this scored 27/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.