mirror of
https://github.com/kccleoc/seedpgp-web.git
synced 2026-03-07 09:57:50 +08:00
feat(blender): add Seed Blender feature
Implements a new 'Seed Blender' feature that allows users to securely combine multiple BIP39 mnemonics and enhance them with dice roll entropy. - Adds a new 'Seed Blender' tab to the main UI. - Implements a multi-step workflow for inputting mnemonics (manual/QR) and dice rolls. - Provides live validation and previews for blended seeds and dice-only entropy. - Includes statistical analysis of dice rolls (chi-square, distribution) and pattern detection for quality assessment. - The core logic is a 1-to-1 port of the reference Python implementation, using the Web Crypto API for browser compatibility and Node.js for testing. - A full suite of unit tests ported from the reference implementation ensures correctness and deterministic outputs.
This commit is contained in:
@@ -25,8 +25,8 @@ interface HeaderProps {
|
||||
sessionItems: StorageItem[];
|
||||
events: ClipboardEvent[];
|
||||
onOpenClipboardModal: () => void;
|
||||
activeTab: 'backup' | 'restore';
|
||||
setActiveTab: (tab: 'backup' | 'restore') => void;
|
||||
activeTab: 'backup' | 'restore' | 'seedblender';
|
||||
setActiveTab: (tab: 'backup' | 'restore' | 'seedblender') => void;
|
||||
encryptedMnemonicCache: any;
|
||||
handleLockAndClear: () => void;
|
||||
appVersion: string;
|
||||
@@ -101,6 +101,12 @@ const Header: React.FC<HeaderProps> = ({
|
||||
>
|
||||
Restore
|
||||
</button>
|
||||
<button
|
||||
className={`px-4 py-2 rounded-lg ${activeTab === 'seedblender' ? 'bg-teal-500 hover:bg-teal-600' : 'bg-slate-700 hover:bg-slate-600'}`}
|
||||
onClick={() => setActiveTab('seedblender')}
|
||||
>
|
||||
Seed Blender
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user