-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from gorazdko/allow_fixing_invalid_mnemonic
Allow invalid bip39 mnemonic, add cosigner
- Loading branch information
Showing
32 changed files
with
588 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
[submodule "deps/bc-crypto-base"] | ||
path = deps/bc-crypto-base | ||
url = git@github.com:BlockchainCommons/bc-crypto-base.git | ||
url = https://github.com/BlockchainCommons/bc-crypto-base.git | ||
[submodule "deps/bc-shamir"] | ||
path = deps/bc-shamir | ||
url = git@github.com:BlockchainCommons/bc-shamir.git | ||
url = https://github.com/BlockchainCommons/bc-shamir.git | ||
[submodule "deps/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-"] | ||
path = deps/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4- | ||
url = git@github.com:SapientHetero/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-.git | ||
url = https://github.com/SapientHetero/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-.git | ||
[submodule "deps/bc-bip39"] | ||
path = deps/bc-bip39 | ||
url = git@github.com:BlockchainCommons/bc-bip39.git | ||
url = https://github.com/BlockchainCommons/bc-bip39.git | ||
[submodule "deps/GxEPD2"] | ||
path = deps/GxEPD2 | ||
url = git@github.com:BlockchainCommons/GxEPD2.git | ||
url = https://github.com/BlockchainCommons/GxEPD2.git | ||
[submodule "deps/libwally-core"] | ||
path = deps/libwally-core | ||
url = git@github.com:ElementsProject/libwally-core.git | ||
url = https://github.com/ElementsProject/libwally-core.git | ||
[submodule "deps/secp256k1-embedded"] | ||
path = deps/secp256k1-embedded | ||
url = git@github.com:BlockchainCommons/secp256k1-embedded.git | ||
url = https://github.com/BlockchainCommons/secp256k1-embedded.git | ||
[submodule "deps/bc-bytewords"] | ||
path = deps/bc-bytewords | ||
url = git@github.com:BlockchainCommons/bc-bytewords.git | ||
url = https://github.com/BlockchainCommons/bc-bytewords.git | ||
[submodule "deps/bc-sskr"] | ||
path = deps/bc-sskr | ||
url = git@github.com:BlockchainCommons/bc-sskr.git | ||
url = https://github.com/BlockchainCommons/bc-sskr.git | ||
[submodule "deps/Library-Arduino-Cbor"] | ||
path = deps/Library-Arduino-Cbor | ||
url = git@github.com:jjtara/Library-Arduino-Cbor.git | ||
url = https://github.com/jjtara/Library-Arduino-Cbor.git | ||
[submodule "deps/ArduinoSTL"] | ||
path = deps/ArduinoSTL | ||
url = git@github.com:mike-matera/ArduinoSTL.git | ||
url = https://github.com/mike-matera/ArduinoSTL.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## BIP39 Sentence Completion | ||
|
||
Option `D` (`Complete BIP39`) allows you to | ||
complete a randomly constructed BIP39 sentence. This means that your seed, keys and wallet creation does not rely on hardware nor software but entirely on a randomized procedure conducted by yourself tossing coins. It is true however that the LetheKit completes the last word, i.e. `checksum word`, so that mnemonic sentence can be correctly parsed. | ||
|
||
![](images/no-seed.png) | ||
|
||
|
||
### Procedure | ||
|
||
First print out the following table and prepare a coin. | ||
|
||
![](images/bip39_complete_table.png) | ||
|
||
To randomly choose a BIP39 word you have to toss a coin 11 times and fill out a row in the table. For heads you can write 1 and for tails 0. | ||
|
||
For example if your first eleven throws are: | ||
|
||
`heads` `tails` `tails` `heads` `tails` `heads` `heads` `tails` `tails` `tails` `heads` | ||
|
||
then your first row should look like this: | ||
|
||
![](images/bip39_complete_tosses.png) | ||
|
||
Coin tosses in every row represent a binary number which can be converted to a BIP39 word with the help of a [lookup table](https://www.rudefox.io/custody/walkthrough/create-seed/lookup-tables.pdf) | ||
|
||
![](images/bip39_complete_row.png) | ||
|
||
You have to repeat the procedure 12 times to fill out the table and obtain a full mnemonic sentence of 12 words. Then input all the words into LetheKit | ||
|
||
![](images/bip39_complete_orig.png) | ||
|
||
When `done` LetheKit will ask you if your procedure was truly randomized. | ||
|
||
⚠️ : If the procedure is not randomized, i.e. the words are not obtained by flipping a coin, the mnemonic sentence is insecure and leads to a loss of funds. | ||
|
||
![](images/bip39_complete_warning.png) | ||
|
||
After confirmation, LetheKit will show you the completed BIP39 sentence, i.e. the last word (i.e. `checksum word`) will be transformed to make the sentence complete, while the first eleven words will stay the same. | ||
|
||
![](images/bip39_complete_fixed.png) | ||
|
||
At this point you have to update the last word on your sheet: | ||
|
||
![](images/bip39_complete_last_completed.png) | ||
|
||
When done, LetheKit will ask you whether you have updated the last word on your sheet? | ||
|
||
![](images/bip39_complete_warning2.png) | ||
|
||
By confirming with `yes`, LetheKit will generate a seed, keys and a wallet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.