Skip to content

Commit

Permalink
Merge pull request #270 from selfcustody/docs_update
Browse files Browse the repository at this point in the history
Docs update on encrypted mnemonics and development
  • Loading branch information
odudex committed Oct 17, 2023
2 parents a63dc4a + 70d00dd commit 43d0e67
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
15 changes: 15 additions & 0 deletions docs/development.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Navigation

Mind map representation of menus under development.

Click on the circle on the right side of each node to expand and explore the mind map.

Activate full screen for better visualization on top-right menu.

## Login Menu

<iframe width="1000" height="800" src="https://gitmind.com/app/docs/mdx0u434"; allowfullscreen></iframe>

## Home Menu (Loaded Wallet)

<iframe width="1000" height="800" src="https://gitmind.com/app/docs/maz68rnh"; allowfullscreen></iframe>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Introduction

There are many possible security layers one could add to protect a wallet’s private key, adding a passphrase to the mnemonic is the most common. To encrypt a mnemonic would have similar use case as the passphrase, but, depending on how it is done, the user experience could be different. The main difference from passphrases to Krux’s encrypted mnemonic implementation is that when users type the wrong key, instead of loading a different wallet, encrypted mnemonic QR codes will return an error. This is not considered an advantage, but a difference, that may be desired or not. The implementation also has the convenience of storing a mnemonic ID on the QR code. Mnemonic encryption, with its own key, can be used together with passphrases as an extra security layer.
There are many possible security layers one could add to protect a wallet’s private key, adding a passphrase to the mnemonic is the most common. To encrypt a mnemonic would have similar use case as the passphrase, but, depending on how it is done, the user experience could be different. The main difference from passphrases to Krux’s encrypted mnemonic implementation is that when users type the wrong key, instead of loading a different wallet, encrypted mnemonics will return an error. This is not considered an advantage, but a difference, that may be desired or not. The implementation also has the convenience of storing a mnemonic ID together with stored or QR code encrypted mnemonics. Mnemonic encryption, with its own key, can be used together with passphrases as an extra security layer.

## QR Data and Parsing
## Encrypted QR Codes Data and Parsing
In search of efficiency and smaller QR codes, all data is converted to bytes and organized like a Bitcoin transaction, with variable and fixed length fields. The following data is present on the QR code:

| ID length (1) | ID (2) | Version (3) | Key Derivations (4) | IV (5) | Encrypted Mnemonic (6) | Validation Block (7) |
Expand All @@ -21,4 +21,5 @@ In search of efficiency and smaller QR codes, all data is converted to bytes and
* **(6)** Encrypted Mnemonic (16 Bytes - 12 words, 32 Bytes - 24 words): Mnemonic ciphertext.
* **(7)** Validation block (16 Bytes): Currently using first 16 bytes of sha256 of the mnemonic bytes as checksum, could be used in future to store AES-AEX validation tag.


## Considerations
Storage of encrypted mnemonics on the device or SD cards are meant for convenience only and should not be considered a form of backup. Always make a physical backup of your keys that is independent from electronic devices and test recovering your wallet from this backup before you send funds to it.
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ nav:
- Navigating the Main Menu: getting-started/navigating-the-main-menu.en.md
- Using a Single-sig Wallet: getting-started/using-a-single-sig-wallet.en.md
- Using a Multisig Wallet: getting-started/using-a-multisig-wallet.en.md
- Encrypted Mnemonics: getting-started/encrypted-mnemonics.en.md
- Printing: getting-started/printing.en.md
- Transcribing QR codes: getting-started/QR-transcript-tools.en.md
- Settings: getting-started/settings.en.md
- Tools: getting-started/tools.en.md
- Devices and Part List: parts.en.md
- Encrypted QRCodes: encrypted-qr-codes.en.md
- FAQ: faq.en.md
- Development: development.md
- Support the Project: support.en.md

plugins:
Expand Down

0 comments on commit 43d0e67

Please sign in to comment.