Skip to content

feat(zcash): add seed_fingerprint binding to FVK / address / sign messages - #27

Merged
BitHighlander merged 1 commit into
masterfrom
feat/zcash-seed-fingerprint
Apr 29, 2026
Merged

feat(zcash): add seed_fingerprint binding to FVK / address / sign messages#27
BitHighlander merged 1 commit into
masterfrom
feat/zcash-seed-fingerprint

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

Summary

Adds optional ZIP-32 §6.1 seed fingerprint fields across the existing zcash messages to enable seed-identity binding for FVKs, addresses, and signing sessions.

SeedFingerprint := BLAKE2b-256(\"Zcash_HD_Seed_FP\", seed)

A 32-byte stable identifier of a device seed. Mirrors Keystone3's PCZT `zip32_derivation.seed_fingerprint` check, but at the session/response level rather than per-spend (one tx = one seed; per-spend duplication isn't needed for our flow).

Changes

Four optional fields, all additive, fully backward compatible:

MessageFieldDirectionPurpose
ZcashOrchardFVKseed_fingerprint (4)response → hostReturned alongside (ak, nk, rivk). Lets host pin an FVK to a device's seed.
ZcashAddressseed_fingerprint (2)response → hostReturned with the confirmed UA. "This address is bound to this device's seed."
ZcashSignPCZTexpected_seed_fingerprint (31)request → deviceIf present, device verifies match before signing; rejects with Failure on mismatch.
ZcashDisplayAddressexpected_seed_fingerprint (7)request → deviceSame rejection semantics before displaying.

Matching messages-zcash.options entries (max_size:32) for each.

Backward compatibility

All four fields are optional. Existing devices and hosts that don't populate them continue to work without change. Devices that don't yet implement the validation will simply ignore the expected_seed_fingerprint fields and skip the binding check.

Review path

This is the fork-master review PR. Once merged, a follow-up PR will land the same commit on `keepkey/device-protocol:master` upstream for long-term external review.

Test plan

  • Proto compiles for all language targets
  • Existing message round-trips still work (backward compat)
  • Firmware consumer (feature-zcash branch on keepkey-firmware) builds against new pin

…sages
ZIP-32 §6.1 seed fingerprint:
SeedFingerprint := BLAKE2b-256("Zcash_HD_Seed_FP", seed)
A 32-byte stable identity of the device's seed. Adds optional bytes
seed_fingerprint fields across the existing zcash messages so hosts
and devices can bind FVKs, addresses, and signing sessions to a
specific seed identity.
Four new fields, all optional, fully backward compatible:
ZcashOrchardFVK.seed_fingerprint (4)
Returned alongside (ak, nk, rivk). Lets a host pin an FVK to
this device's seed.
ZcashAddress.seed_fingerprint (2)
Returned alongside the confirmed UA after on-device verification.
Lets a host record "this address is on this device's seed."
ZcashSignPCZT.expected_seed_fingerprint (31)
Sent by host. If present, device checks against its own
fingerprint and rejects with Failure on mismatch before signing.
Mirrors Keystone3's PCZT zip32_derivation seed_fingerprint check
at the session level (one tx = one seed, no per-action duplication
needed for our flow).
ZcashDisplayAddress.expected_seed_fingerprint (7)
Sent by host. Same rejection semantics as above before displaying.
Matching nanopb max_size:32 entries added to messages-zcash.options.
No existing fields modified. Devices and hosts that don't populate
the new fields continue to work unchanged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@BitHighlander