# Application for Coinholder-Directed Retroactive Grants Program (Q2 2026): Open-Source Zcash Hardware-Wallet SDK

**URL:** <https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550>\
**Category:** Retroactive Grants\
**Created:** [April 30, 2026, 6:04am UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550 "2026-04-30T06:04:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![white\_rabbit](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/white_rabbit/32/28211_2.png) [@white\_rabbit](https://forum.zcashcommunity.com/u/white_rabbit)\
**Post date:** [April 30, 2026, 6:04am UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/1 "2026-04-30T06:04:36Z")

</div>

Hi everyone! I’ve submitted a retroactive grant proposal for the Open-Source Zcash Hardware-Wallet SDK and wanted to share the details with the community. This proposal builds on my initial exploration and focuses on bringing Zcash Orchard shielded transactions to resource-constrained embedded systems.

The project started as a personal challenge—bringing an Orchard wallet to the Flipper Zero—and has grown into a vendor-neutral SDK focused on making shielded Zcash accessible on low-cost, off-the-shelf hardware.

Original forum thread: [Building an open-source Zcash hardware wallet SDK for constrained embedded systems](https://forum.zcashcommunity.com/t/building-an-open-source-zcash-hardware-wallet-sdk-for-constrained-embedded-systems/55259)

Key aspects of our journey include:

- Developing alongside the community with immense support from members like @hanh and @zk_nd3r.

- Pioneering the first mainnet Orchard-shielded spend directly from a Flipper Zero.

- Proving that advanced zero-knowledge cryptography can run safely on microcontrollers with strict memory limitations.

I’ve consistently focused on:

- eliminating complex dependencies (using pure C11 for cryptography)

- ensuring cross-platform hardware agnosticism

- enforcing strict resource management (e.g., rigid 512-byte per-function stack budgets)

- secure PCZT (Partially Completed Zcash Transaction) orchestration

Over the past months, I achieved our goal of delivering a code-complete, MIT-licensed hardware wallet stack ready for integration.

- Delivered `libzcash-orchard-c` (zero-dependency C library)

- Delivered `zcash-hw-wallet-sdk` (Rust SDK for the PCZT signing pipeline)

- Launched reference implementations: `FlipZcash` (ARM Cortex-M4) and `zcash-hw-wallet-esp32` (Xtensa LX7)

I’m proud to see the rigorous validation of the SDK, with 49 known-answer test vectors and 17 end-to-end integration tests all passing smoothly.

[https://github.com/Financial-Privacy-Foundation/ZcashCoinholderGrantsProgram/issues/28](https://github.com/Financial-Privacy-Foundation/ZcashCoinholderGrantsProgram/issues/28)

Happy to answer questions or go deeper into any part 🙏

---

<div class="post-metadata">

**Author:** ![hanh](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/hanh/32/27853_2.png) [@hanh](https://forum.zcashcommunity.com/u/hanh)\
**Post date:** [April 30, 2026, 6:37am UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/2 "2026-04-30T06:37:47Z")

</div>

> [@white\_rabbit](#):
>
> Developing alongside the community with immense support from members like @hanh and @zk_nd3r.

Just to be clear… The support means that I helped by providing comments and feedback.

I did not help on the coding and **I do not support (or not support) this application**.

---

<div class="post-metadata">

**Author:** ![white\_rabbit](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/white_rabbit/32/28211_2.png) [@white\_rabbit](https://forum.zcashcommunity.com/u/white_rabbit)\
**Post date:** [April 30, 2026, 6:40am UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/3 "2026-04-30T06:40:31Z")

</div>

Correct, thank you for clarifying

---

<div class="post-metadata">

**Author:** ![hanh](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/hanh/32/27853_2.png) [@hanh](https://forum.zcashcommunity.com/u/hanh)\
**Post date:** [April 30, 2026, 10:33pm UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/4 "2026-04-30T22:33:25Z")

</div>

Btw, did you get the derivation of the sighash,100% done on device? Last time I checked there were parts coming from the companion app.

---

<div class="post-metadata">

**Author:** ![white\_rabbit](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/white_rabbit/32/28211_2.png) [@white\_rabbit](https://forum.zcashcommunity.com/u/white_rabbit)\
**Post date:** [May 6, 2026, 3:27pm UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/6 "2026-05-06T15:27:43Z")

</div>

@hahn You were right to push on this. Quick map of where each ZIP-244 sighash component sits today:

- header\_digest → on-device, recomputed from TxMeta (zip244\_header\_digest)
- orchard\_digest → on-device, incremental hashing of streamed actions (three parallel BLAKE2b ctx for compact / memos / noncompact, finalized at sentinel)
- transparent\_sig\_digest → on-device when transparent inputs/outputs are streamed, recomputed and constant-time matched against the companion-supplied value via orchard\_signer\_verify\_transparent. For tx with empty transparent bundle, verified against the empty-bundle constant.
- sapling\_digest → enforced equal to BLAKE2b-256(“ZTxIdSaplingHash”, ) at TxMeta receipt (commit 0107c79, landed today). Non-empty values abort the session with SIGNER\_ERR\_SAPLING\_NOT\_EMPTY before any action is hashed.

Final root sighash is recomputed and constant-time compared against the companion’s value; mismatch aborts before any RedPallas authorization.

So to your question directly: every component of the ZIP-244 sighash is now either recomputed on-device from streamed inputs or constrained to its ZIP-244 empty-bundle constant. None is taken on faith from the companion.

The Sapling enforcement is structurally consistent with the wallet being Orchard-only by design (no Sapling keys derived, no Sapling notes ever in the wallet, no Sapling-only recipients in scope). Defense-in-depth on the host side too — zcash-hw-wallet-sdk rejects Sapling-bearing PCZTs before transmission so users get a clean error instead of bouncing off the device.

Commits:

- libzcash-orchard-c 0107c79
- zcash-hw-wallet-sdk f10a80a
- zcash-hw-wallet-esp32 d21206c

The GitHub Lockbox submission has been updated to reflect the new HEADs (FPF confirmed edits are allowed during the submission window). Thanks for the follow-up — closing this gap before the coinholder vote was the right call.

---

<div class="post-metadata">

**Author:** ![hanh](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/hanh/32/27853_2.png) [@hanh](https://forum.zcashcommunity.com/u/hanh)\
**Post date:** [May 6, 2026, 5:07pm UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/7 "2026-05-06T17:07:20Z")

</div>

You are still hashing the orchard action encrypted by the companion app. **That app cannot be trusted**. Consider what would happen if it was hacked to show one destination address but uses the attacker’s address for the derivation of the note commitment…

---

<div class="post-metadata">

**Author:** ![white\_rabbit](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/white_rabbit/32/28211_2.png) [@white\_rabbit](https://forum.zcashcommunity.com/u/white_rabbit)\
**Post date:** [May 14, 2026, 7:31pm UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/8 "2026-05-14T19:31:49Z")

</div>

Right, my earlier reply addressed only the sighash components and missed the point you were actually making, which is that the per-action `cmx` itself was still being trusted from the companion. That was the real gap.

It has since been closed. The companion now transmits the output-note plaintext — `recipient = d ‖ pk_d`, `value`, and `rseed` — alongside each action, and the device recomputes the note commitment on-chip via Sinsemilla `NoteCommit` (with `rho = action.nullifier`, per Orchard’s split-action construction) and constant-time compares it against the `cmx` field at offset 96 of the action bytes. On mismatch the session is reset before any RedPallas authorization is issued (`SIGNER_ERR_NOTE_COMMITMENT_MISMATCH`).

In the scenario you described — companion displays one recipient but embeds an attacker `cmx` in the action — the device recomputes `NoteCommit` from the displayed recipient’s `(d, pk_d, value, rseed)`, finds it does not match the embedded `cmx`, and aborts. The recipient the user confirms on-screen is therefore the same `(d, pk_d)` that just had to satisfy the commitment check, not a value the companion can desynchronize from what it pretends to send to. The no-blind-signing invariant on top requires explicit per-action confirmation before `orchard_signer_verify()` will transition to `VERIFIED`, so a firmware build that skips the UI step cannot extract a signature either.

Commits: libzcash-orchard-c `1955ad1` (on-device cmx recomputation) and `ba9fce6` (per-action confirmation); zcash-hw-wallet-sdk `7ec754a` (companion sends note plaintext per action). Genuinely appreciate the review — this was the right thing to catch before the vote.

---

<div class="post-metadata">

**Author:** ![hanh](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/hanh/32/27853_2.png) [@hanh](https://forum.zcashcommunity.com/u/hanh)\
**Post date:** [May 15, 2026, 1:34am UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/9 "2026-05-15T01:34:45Z")

</div>

It checks the destination is valid but does it check the rest of the tx? I think a malicious attacker can still overspend and/or corrupt the memos… He won’t gain directly but the damage can be serious still.

Getting better though!

---

<div class="post-metadata">

**Author:** ![hanh](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/hanh/32/27853_2.png) [@hanh](https://forum.zcashcommunity.com/u/hanh)\
**Post date:** [May 15, 2026, 4:33am UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/10 "2026-05-15T04:33:32Z")

</div>

> [@white\_rabbit](#):
>
> Right, my earlier reply addressed only the sighash components and missed the point you were actually making, which is that the per-action `cmx` itself was still being trusted from the companion. That was the real gap.

No no no… The **real gap** is the companion app **cannot be trusted**. You really need to stop thinking piece by piece. Nothing it says can be trusted.

---

<div class="post-metadata">

**Author:** ![white\_rabbit](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/white_rabbit/32/28211_2.png) [@white\_rabbit](https://forum.zcashcommunity.com/u/white_rabbit)\
**Post date:** [May 28, 2026, 4:22pm UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/11 "2026-05-28T16:22:27Z")

</div>

Quick update on what landed last week:

- **`enc_ciphertext` recomputed on-device for every Orchard output.** The companion now ships `(d, pk_d, value, rseed, memo)` per action; the device runs Pallas ECDH → Orchard KDF → ChaCha20-Poly1305 on-chip and constant-time compares against the action bytes (`epk` included). `esk` isn’t on the wire — derived from `rseed + ρ` per ZIP-212. Closes the memo-substitution path.

- **Miner fee computed on-device + explicit user confirmation.** `fee = t_in − t_out + value_balance` with overflow/negative detection; `verify()` refuses to advance to `VERIFIED` until the user has OK’d the fee number rendered on the trusted screen. Closes `value_balance`-inflation.

- **Memo rendered on the Flipper screen.**

Net: every component of the sighash and every byte of every output (recipient, value, memo, fee) is either recomputed on-device or rendered on the trusted screen for explicit confirmation. The only thing the companion is still trusted for is the Halo2 proof itself, and a wrong proof produces a tx the network rejects, not one that pays an attacker.

Commits:

- `libzcash-orchard-c` `382419b`, `47921e6`, `13094d8`

- `zcash-hw-wallet-sdk` `a29e08f`, `465f6ed`

- `FlipZcash` paired update (memo scene + submodule bump)

Thanks again for the pushback

---

<div class="post-metadata">

**Author:** ![white\_rabbit](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/white_rabbit/32/28211_2.png) [@white\_rabbit](https://forum.zcashcommunity.com/u/white_rabbit)\
**Post date:** [November 13, 2026, 2:27pm UTC](https://forum.zcashcommunity.com/t/application-for-coinholder-directed-retroactive-grants-program-q2-2026-open-source-zcash-hardware-wallet-sdk/55550/12 "2026-11-13T14:27:31Z")

</div>

It has been a while since I posted here, so an update on where this ended up.

**Since April**

- **Ironwood and NU7.** The whole stack moved to the Ironwood pool in July (two testnet transactions signed on the Flipper before mainnet activation), and host and device now follow NU7. The library is now `libzcash-ironwood-c`.
- **@hanh’s point on the Q2 thread.** You wrote that the real gap is that the companion app cannot be trusted — “stop thinking piece by piece. Nothing it says can be trusted.” You were right, and my reply of 28 May, that only the proof was still trusted, was wrong. I ran an adversarial review of the whole stack with AI tooling, with a pass playing a fully malicious host, and it found things I had missed, including a way to hide an arbitrary fee (the overspend you warned about on 15 May) and change outputs the device could not tell from an attacker’s. The device now recomputes the note commitment and ciphertext of every output that carries value, decides from its own keys which outputs are change, computes fee and total itself from data bound by the signature, refuses anything in Sapling or from transparent inputs, and the library will not release a signature until every output carrying value or a memo, and the totals, have been confirmed. What it still trusts is listed field by field in `SECURITY.md`. If you still see a hole, I would much rather hear it here than after the vote.
- **@zk_nd3r’s three points.** Stack bounds are enforced in CI, the vector corpus is generated from `librustzcash` by tools in the repository, and the ESP32 README now opens with “this is not a hardware wallet”.
- **The Flipper no longer caches keys on the SD card.** Keys are derived in RAM after PIN unlock.
- **Speed.** Checking one output (commitment + ciphertext) took 375 ms on a desktop before the October rework; it is now about 1 ms, in constant time. Device timings are not measured yet.

**A request**

I have re-applied to the retroactive grants round ([thread URL](https://forum.zcashcommunity.com/t/q4-2026-retroactive-grant-application-open-source-zcash-hardware-wallet-sdk/59283)). The program asks that work be checked by the people it is for, and nobody outside me has yet said in public “I built it and it ran”. If you have ten minutes, no hardware needed:

```bash
git clone https://github.com/wh00hw/libzcash-ironwood-c && cd libzcash-ironwood-c
git checkout c2f09bf
cmake -B build -DSTACK_ANALYSIS=ON && cmake --build build -j
(cd build && ctest --output-on-failure) # expect 21/21
./scripts/check_stack.sh build # expect PASSED

```

@artkor, you said in April you would try it on your Flipper: the build steps (Unleashed firmware toolchain, then one `fbt` command) are in the FlipZcash README. Today’s testnet payment was signed with that build.

A one-line reply with what you ran and what happened is all I am asking for, whether it passed or not. I am not asking anyone to endorse the application.
