threefoldtech / js-sdk

extensions to js-ng for tfgrid
Apache License 2.0
14 stars 6 forks source link

should be able in the user side, the browser be able to generate his keys based on his password #1325

Open xmonader opened 3 years ago

xmonader commented 3 years ago

flow should be: password -> make it in a specific length (fill with zeros) -> convert to mnemonic -> menmonic to seed -> get the public key, should be done in the client-side

libs to check

abom commented 3 years ago

The following is an example using tweetnacl and bip39

brnacl.zip

Used browserify with tweetnacl and bip39 (assuming they're installed):

browserify -r tweetnacl -s nacl > tweetnacl.browser.js
browserify -r bip39 -s bip39 \                                
 --exclude=./wordlists/japanese.json \
 --exclude=./wordlists/spanish.json \
 --exclude=./wordlists/italian.json \
 --exclude=./wordlists/french.json \
 --exclude=./wordlists/korean.json \
 --exclude=./wordlists/chinese_traditional.json \
 --exclude=./wordlists/chinese_simplified.json \
  > bip39.browser.js