Skip to content

fix(key-card): carry VRF material through safe recovery - #9718

Draft
s84krish wants to merge 1 commit into
masterfrom
WCN-2325-keycard-vrf
Draft

fix(key-card): carry VRF material through safe recovery#9718
s84krish wants to merge 1 commit into
masterfrom
WCN-2325-keycard-vrf

Conversation

@s84krish

Copy link
Copy Markdown
Contributor

What

  • Parse version 1 safe MPC keyshare envelopes while retaining legacy reduced-share recovery.
  • Return user and backup serialized VRF keyshares with MPCv2 recovery material.
  • Keep the four-box safe keycard layout and cover VRF-bearing payloads plus realistic QR fragmentation.

Why

Safe MPC roots now carry VRF material in the versioned reduced envelope. Treating that ciphertext as a bare ReducedKeyShare drops the VRF share and makes safe child re-derivation impossible.

Recovery conclusion

A bare 32-byte VRF scalar is not sufficient for the current VRF wasm API: VrfKeyshare is restored from its complete serialized keyshare, which includes public metadata. This change therefore carries the serialized VRF keyshare in the envelope and exposes it to recovery. The recovery wizard currently supports traditional wallet recovery, not safe MPC child derivation. Full safe recovery still needs the interactive BitGo derive ceremony, safe child metadata/index handling, VRF/DKLS derive orchestration, and wizard UI/IPC integration before it can be offered.

Verification

  • Static diff review and whitespace checks passed.
  • Tests/type-checks not run because dependency installation was intentionally skipped per request.

Ticket: WCN-2325

Parse the versioned safe MPC envelope alongside legacy reduced shares,
and return both signing and VRF material to recovery callers. Keep safe
keycard boxes on the existing layout while documenting and testing the
VRF-bearing payload and its QR fragmentation.

This prevents safe recovery from treating the versioned envelope as a bare
ReducedKeyShare, which would discard the VRF material required for child
re-derivation.

Ticket: WCN-2325
Session-Id: b5978d12-c20a-4c72-b9d0-b66a56204cd0
Task-Id: 7f111b0b-938f-4512-9dab-397624fe5f74
@ralph-bitgo
ralph-bitgo Bot force-pushed the WCN-2325-keycard-vrf branch from 020accb to bb3d7d6 Compare September 10, 2026 21:16
@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

WCN-2325

Sign up for free to 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