feat(frontend): add guardian secret sharing recovery for credentials - #464
Conversation
|
@dotmantissa Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
a9bc14e to
c7c2909
Compare
|
The guardian recovery via Shamir secret sharing (#431) is well-designed: K-of-N threshold, guardians receive only key shares (never credential data), client-side reconstruction. It just went conflicting though, #490 (perf telemetry) merged into holder/page.tsx right after this. Please rebase onto latest main. Note #441 also restructured the holder page into components/holder and lib/hooks, so fold the Guardian recovery entry point into that new structure rather than the old monolithic page. |
…oluLabs#431) Allow credential holders to split their 256-bit encryption key into Shamir secret shares across chosen guardians or backup devices. A configurable threshold of shares can later reconstruct the key client-side and restore local storage credentials without exposing plaintext data to guardians. Adds Shamir secret sharing over GF(256), guardian backup packaging and share export utilities, and an interactive recovery modal on the holder dashboard with full test coverage.
ee8606a to
81eb7ce
Compare
@Psalmuel01 |
What does this PR do?
This PR introduces client-side Guardian Secret Sharing Recovery for credentials stored in browser localStorage. A holder can now split their 256-bit AES encryption key into N Shamir secret shares across trusted guardians or backup devices, requiring a threshold of K shares (e.g. 2-of-3) to reconstruct the key and restore their credentials. Guardians only receive key shares with zero credential data, ensuring privacy while offering a robust recovery option if browser storage is wiped.
Closes #431
Type of change
Merge requirements
cargo test(contracts),pnpm tsc --noEmit(frontend),pnpm build(frontend), circuit tests — all greenfixtures/<type>/artifacts updatedNEXT_PUBLIC_prefix on server-only env varsprehash:falsepreserved on any issuer signing path touched✅ Merge requirements
Notes for reviewers
lib/shamir.ts.SC-SHARE:...armored string), key fingerprint verification, and decryption logic are encapsulated inlib/guardian.ts.GuardianRecoveryModal.tsxcontaining both the Key Splitting setup flow and the guided share-collection recovery flow.app/holder/page.tsxto preserve the 16 kB bundle limit for the holder route.lib/__tests__/shamir.test.tsandlib/__tests__/guardian.test.tscovering mathematical properties, threshold variations, edge cases, tamper resistance, and malformed inputs.