Clarify password role, random die, updated wording
All checks were successful
check / check (push) Successful in 14s
All checks were successful
check / check (push) Successful in 14s
- Password help text now explains it encrypts the recovery phrase on disk and is not used for address derivation - Die button generates cryptographically random phrases using crypto.getRandomValues(), different each click - "roll the die for a new one" wording - README documents full encryption scheme (PBKDF2 + AES-256-GCM) and explicitly notes password is not part of BIP-39 derivation
This commit is contained in:
@@ -70,23 +70,153 @@ function makeStubAddress() {
|
||||
};
|
||||
}
|
||||
|
||||
// Stub wordlist for random phrase generation.
|
||||
// TODO: replace with real BIP-39 generation via background.
|
||||
const STUB_WORDLIST = [
|
||||
"abandon",
|
||||
"ability",
|
||||
"able",
|
||||
"about",
|
||||
"above",
|
||||
"absent",
|
||||
"absorb",
|
||||
"abstract",
|
||||
"absurd",
|
||||
"abuse",
|
||||
"access",
|
||||
"accident",
|
||||
"account",
|
||||
"accuse",
|
||||
"achieve",
|
||||
"acid",
|
||||
"acoustic",
|
||||
"acquire",
|
||||
"across",
|
||||
"act",
|
||||
"action",
|
||||
"actor",
|
||||
"actual",
|
||||
"adapt",
|
||||
"add",
|
||||
"addict",
|
||||
"address",
|
||||
"adjust",
|
||||
"admit",
|
||||
"adult",
|
||||
"advance",
|
||||
"advice",
|
||||
"aerobic",
|
||||
"affair",
|
||||
"afford",
|
||||
"afraid",
|
||||
"again",
|
||||
"age",
|
||||
"agent",
|
||||
"agree",
|
||||
"ahead",
|
||||
"aim",
|
||||
"air",
|
||||
"airport",
|
||||
"aisle",
|
||||
"alarm",
|
||||
"album",
|
||||
"alcohol",
|
||||
"alert",
|
||||
"alien",
|
||||
"all",
|
||||
"alley",
|
||||
"allow",
|
||||
"almost",
|
||||
"alone",
|
||||
"alpha",
|
||||
"already",
|
||||
"also",
|
||||
"alter",
|
||||
"always",
|
||||
"amateur",
|
||||
"amazing",
|
||||
"among",
|
||||
"amount",
|
||||
"amused",
|
||||
"analyst",
|
||||
"anchor",
|
||||
"ancient",
|
||||
"anger",
|
||||
"angle",
|
||||
"angry",
|
||||
"animal",
|
||||
"ankle",
|
||||
"announce",
|
||||
"annual",
|
||||
"another",
|
||||
"answer",
|
||||
"antenna",
|
||||
"antique",
|
||||
"anxiety",
|
||||
"any",
|
||||
"apart",
|
||||
"apology",
|
||||
"appear",
|
||||
"apple",
|
||||
"approve",
|
||||
"april",
|
||||
"arch",
|
||||
"arctic",
|
||||
"area",
|
||||
"arena",
|
||||
"argue",
|
||||
"arm",
|
||||
"armed",
|
||||
"armor",
|
||||
"army",
|
||||
"around",
|
||||
"arrange",
|
||||
"arrest",
|
||||
"arrive",
|
||||
"arrow",
|
||||
"art",
|
||||
"artefact",
|
||||
"artist",
|
||||
"artwork",
|
||||
"ask",
|
||||
"aspect",
|
||||
"assault",
|
||||
"asset",
|
||||
"assist",
|
||||
"assume",
|
||||
"asthma",
|
||||
"athlete",
|
||||
"atom",
|
||||
"attack",
|
||||
"attend",
|
||||
"attitude",
|
||||
"attract",
|
||||
"auction",
|
||||
"audit",
|
||||
"august",
|
||||
"aunt",
|
||||
"author",
|
||||
"auto",
|
||||
"autumn",
|
||||
"average",
|
||||
"avocado",
|
||||
"avoid",
|
||||
"awake",
|
||||
"aware",
|
||||
"awesome",
|
||||
"awful",
|
||||
"awkward",
|
||||
"axis",
|
||||
];
|
||||
|
||||
function generateStubMnemonic() {
|
||||
// TODO: replace with real BIP-39 generation via background
|
||||
const words = [
|
||||
"abandon",
|
||||
"ability",
|
||||
"able",
|
||||
"about",
|
||||
"above",
|
||||
"absent",
|
||||
"absorb",
|
||||
"abstract",
|
||||
"absurd",
|
||||
"abuse",
|
||||
"access",
|
||||
"accident",
|
||||
];
|
||||
return words.join(" ");
|
||||
const phrase = [];
|
||||
for (let i = 0; i < 12; i++) {
|
||||
const bytes = new Uint32Array(1);
|
||||
crypto.getRandomValues(bytes);
|
||||
phrase.push(STUB_WORDLIST[bytes[0] % STUB_WORDLIST.length]);
|
||||
}
|
||||
return phrase.join(" ");
|
||||
}
|
||||
|
||||
// -- render wallet list on main view --
|
||||
|
||||
Reference in New Issue
Block a user