Skip to content

Commit

Permalink
filling docs 2
Browse files Browse the repository at this point in the history
  • Loading branch information
odudex committed Jul 30, 2023
1 parent 8861a43 commit 6f5e9b0
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 26 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started/generating-a-mnemonic.en.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Krux has support for creating 12 and 24-word mnemonic seed phrases. Since true entropy is difficult to produce, especially with an embedded device, we recommend to outsources entropy generation using dice rolls, but it is also possible to use camera as source of entropy to quickly create a mnemonic.
Krux has support for creating 12 and 24-word mnemonic seed phrases. Since true entropy is difficult to produce, especially with an embedded device, we recommend to outsource entropy generation using dice rolls, but it is also possible to use camera as a source of entropy to quickly create a mnemonic.
At the start screen, once you select `New Mnemonic`, you will be taken to a second menu where you can choose to create a mnemonic via camera, via rolls of a D6 (standard six-sided die) or D20 (20-sided die).

<img src="../../img/maixpy_m5stickv/new-mnemonic-options-125.png">
Expand Down Expand Up @@ -51,7 +51,7 @@ For dice rolls, Krux keeps track of every roll you enter and displays the cumula

When you have entered your final roll, Krux will hash this string using SHA256 and output the resulting hash to the screen so that you can verify it for yourself.

In the case a camera snapshot is used as source, the image bytes, which contain each pixel color information, will be hashed just like it is done with the dice rolls string.
In the case a camera snapshot is used as source, image bytes, which contain pixels data in RGB565 format, will be hashed just like it is done with the dice rolls string.

Krux then takes this hash, runs [`unhexlify`](https://docs.python.org/3/library/binascii.html#binascii.unhexlify) on it to encode it as bytes, and deterministically converts it into a mnemonic according to the [BIP-39 Reference Implementation](https://github.com/trezor/python-mnemonic/blob/6b7ebdb3624bbcae1a7b3c5485427a5587795120/src/mnemonic/mnemonic.py#L189-L207).

Expand Down
77 changes: 68 additions & 9 deletions docs/getting-started/settings.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,48 @@ On Krux's start menu, there is a *Settings* option.

Below is a breakdown of the settings you can change:

### Network
### Bitcoin - Network
<img src="../../img/maixpy_m5stickv/network-options-125.png" align="right">
<img src="../../img/maixpy_amigo_tft/network-options-150.png" align="right">

This option allows you to switch between `mainnet` (the default) and `testnet`. This is mostly useful for development.

<br><br><br><br><br>

### Printer
<img src="../../img/maixpy_m5stickv/printer-options-125.png" align="right">
<img src="../../img/maixpy_amigo_tft/printer-options-150.png" align="right">
### Encryption

Printers can come with different baudrates from the manufacturer. By default, Krux assumes the connected printer will have a baudrate of `9600`. If yours is different, you can change this here.
Modify the encryption method and parameters to fit your needs. The encryption settings will be used both to store mnemonics and create encrypted QR codes.

#### PBKDF2 Iterations

When you enter a encryption key it is not directly used to encrypt your data. As a feature to increase safety, specially against brute force attacks, the keys is derived multiple times using hashing functions. PBKDF2(Password-Based Key Derivation Function) iterations stands for the amount of derivations that will be performed over your key prior to encrypt/decrypt your mnemonic.

If increase this value to make your encryption harder at the cost of taking longer to encrypt and decrypt your mnemonics

#### Encryption Mode

Choose between well known and widely used AES(Advanced Encryption Standard) modes:

##### AES-ECB

ECB(Electronic Codebook), its a simpler method where encryption data blocks are encrypted individually. It will be faster and simpler to encrypt, QR codes will have a lower density of information and will be easier to transcribe.

##### AES-CBC

CBC(Cipher-block Chaining) is considered safer, because at the first data block an initial vector(IV) is used to add random data to the encryption and from subsequent blocks depends on data from the previous block, giving its chaining feature.
It will take longer to encrypt, because it will be required to take a snapshot to generate a random initial vector. This initial vector must be stored together with encrypted data, making encrypted QR codes denser and harder to transcript.

<br><br><br><br><br>

### Locale
### Language - Locale
<img src="../../img/maixpy_m5stickv/locale-options-125.png" align="right">
<img src="../../img/maixpy_amigo_tft/locale-options-150.png" align="right">

Here you can change the language that Krux uses. Note that in order to change the locale you must have a microSD card with a `translations` folder containing translation files inserted into the device.
Here you can change the language that Krux uses.

<br><br><br><br><br>

### Debug
### Logging
<img src="../../img/maixpy_m5stickv/debug-options-125.png" align="right">
<img src="../../img/maixpy_amigo_tft/debug-options-150.png" align="right">

Expand All @@ -39,4 +56,46 @@ Unless you are running into a bug and trying to get more information to diagnose

If you experience an error and want to see more information about it, including a stack trace, you can change the *Log Level* to *ERROR*. If you're developing and want to see _everything_, you can change *Log Level* to either *INFO* or *DEBUG*.

Note that *DEBUG* could inadvertently write your private keys to the log file if you have it enabled when entering your mnemonic, so set it with care. To help prevent an accident like this from happening, Krux will display **DEBUG** on the start screen as a reminder when this is set.
Note that *DEBUG* could inadvertently write your private keys to the log file if you have it enabled when entering your mnemonic, so set it with care. To help prevent an accident like this from happening, Krux will display a colored rectangle on the upper left corner of the screen, of which the color is relative to the logging level, being green the DEBUG color.

<br><br><br><br><br>

### Persist

Choose between flash(device's internal memory) or SD card for the place where your settings will be stored.

<br><br><br><br><br>

### Printer

<img src="../../img/maixpy_m5stickv/printer-options-125.png" align="right">
<img src="../../img/maixpy_amigo_tft/printer-options-150.png" align="right">

You can set up a thermal printer or tell Krux to store a GRBL CNC instructions file on a SD card to machine QR codes

#### CNC

Define several machining parameters according to the desired size, material you'll use, and your CNC characteristics and capabilities.

#### Thermal

Printers can come with different baudrates from the manufacturer. By default, Krux assumes the connected printer will have a baudrate of `9600`. If yours is different, you can change this here.
Also setup the IOs you'll use and tweak parameters according to your printer recommendations.

#### Driver

Here you choose between Thermal, CNC or none(default). Leave this setting to "none" if you won't use a printer and don't want to be bothered by print prompts.

<br><br><br><br><br>

### Theme

Choose your color theme according to your preference. Some themes may be more suitable for some devices, coordinator cameras and environments. Light theme, for example, may be easier to scan QR codes from in brighter environments.

<br><br><br><br><br>

### Touchscreen

If your device has a touchscreen you can change the touch detection threshold. If it is too sensitive or detecting false (ghost) touches, you should increase the threshold value, making it less sensitive. The other way also valid, reduce the threshold to make the screen more sensitive to touches.

<br><br><br><br><br>
17 changes: 17 additions & 0 deletions docs/getting-started/tools.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Here some handy tools are offered to complement your device's and wallets management.

### Check SD Card

You can check if your device is reading your SD card and explore its content

### Delete Mnemonic

Delete any stored encrypted mnemonic, on device's internal flash memory or SD card

### Print Test QR

Quickly print a test QR to check and optimize your printer setup

### Create QR Code

Enter a text input to create, print or transcript a QR code that can be later used as an encryption key or as a passphrase.
2 changes: 1 addition & 1 deletion i18n/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Encrypted mnemonic was not stored": "Verschlüsselte Mnemonic wurde nicht gespeichert",
"Encrypted mnemonic was stored with ID: ": "Speicherung der verschlüsselten Mnemonic mit ID: ",
"Encryption": "Verschlüsselung",
"Encryption mode": "Verschlüsselungsmodus",
"Encryption Mode": "Verschlüsselungsmodus",
"Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.": "Gib jedes Wort Deiner BIP-39 Mnemonic als Zahl von 1 bis 2048 ein.",
"Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.": "Gib jedes Wort Deiner BIP-39 Mnemonic als Hexadezimalzahl von 1 bis 800 ein.",
"Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.": "Gib jedes Wort Deiner BIP-39 Mnemonic als Oktalzahl von 1 bis 4000 ein.",
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Encrypted mnemonic was not stored": "Encrypted mnemonic was not stored",
"Encrypted mnemonic was stored with ID: ": "Encrypted mnemonic was stored with ID: ",
"Encryption": "Encryption",
"Encryption mode": "Encryption mode",
"Encryption Mode": "Encryption Mode",
"Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.": "Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.",
"Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.": "Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.",
"Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.": "Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.",
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/es-MX.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Encrypted mnemonic was not stored": "Mnemonic cifrado no se almacenó",
"Encrypted mnemonic was stored with ID: ": "Mnemónica cifrada fue almacenada con ID:",
"Encryption": "Encriptación",
"Encryption mode": "Modo de encriptación",
"Encryption Mode": "Modo de encriptación",
"Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.": "Ingrese cada palabra de su mnemónico BIP-39 como un número del 1 al 2048.",
"Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.": "Ingrese cada palabra de su mnemónico BIP-39 como un número en hexadecimal del 1 al 800.",
"Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.": "Ingrese cada palabra de su mnemónico BIP-39 como un número en octal del 1 al 4000.",
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Encrypted mnemonic was not stored": "Le mnémonique crypté n'a pas été stocké",
"Encrypted mnemonic was stored with ID: ": "Mnémonique cryptée a été stockée avec ID:",
"Encryption": "Chiffrement",
"Encryption mode": "Mode de chiffrement",
"Encryption Mode": "Mode de chiffrement",
"Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.": "Entrez chaque mot de votre BIP-39 mnémonique sous la forme d'un nombre 1 jusqu'à 2048.",
"Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.": "Entrez chaque mot de votre mnémonique BIP-39 sous la forme d'un nombre en hexadécimal de 1 à 800.",
"Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.": "Entrez chaque mot de votre mnémonique BIP-39 sous la forme d'un nombre en octal de 1 à 4000.",
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Encrypted mnemonic was not stored": "Versleutelde geheugensteun was niet opgeslagen",
"Encrypted mnemonic was stored with ID: ": "Versleutelde geheugensteun is opgeslagen met ID: ",
"Encryption": "Versleutelen",
"Encryption mode": "Versleutel modus",
"Encryption Mode": "Versleutel modus",
"Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.": "Voer elk woord van jouw BIP-39 geheugensteun in als een nummer van 1 tot 2048.",
"Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.": "Voer elk woord van jouw BIP-39 geheugensteun in als een hexadecimaal van 1 tot 800.",
"Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.": "Voer elk woord van jouw BIP-39 geheugensteun in als een octaal van 1 tot 4000.",
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Encrypted mnemonic was not stored": "Mnemonic criptografado não foi armazenado",
"Encrypted mnemonic was stored with ID: ": "Mnemônico criptografado foi armazenado com ID:",
"Encryption": "Criptografia",
"Encryption mode": "Modo de criptografia",
"Encryption Mode": "Modo de criptografia",
"Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.": "Digite o número de cada palavra do seu mnemônico BIP-39, de 1 a 2048.",
"Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.": "Digite o número de cada palavra do seu mnemônico BIP-39 como um número em hexadecimal, de 1 a 800.",
"Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.": "Digite o número de cada palavra do seu mnemônico BIP-39 como um número em octal, de 1 a 4000.",
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/vi-VN.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Encrypted mnemonic was not stored": "MNemon được mã hóa không được lưu trữ",
"Encrypted mnemonic was stored with ID: ": "Mnemonic được mã hóa được lưu trữ với ID:",
"Encryption": "Mã hóa",
"Encryption mode": "Chế độ mã hóa",
"Encryption Mode": "Chế độ mã hóa",
"Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.": "Nhập từng kí tự của mã mnemonic BIP-39 của bạn dưới dạng số từ 1 đến 2048.",
"Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.": "Nhập từng từ trong bản ghi nhớ BIP-39 của bạn dưới dạng số thập lục phân từ 1 đến 800.",
"Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.": "Nhập từng từ trong bản ghi nhớ BIP-39 của bạn dưới dạng số bát phân từ 1 đến 4000.",
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ nav:
- Using a Multisig Wallet: getting-started/using-a-multisig-wallet.en.md
- Printing: getting-started/printing.en.md
- Settings: getting-started/settings.en.md
- Tools: getting-started/tools.en.md
- Part List: parts.en.md
- FAQ: faq.en.md
- Support the Project: support.en.md
Expand Down
2 changes: 1 addition & 1 deletion src/krux/krux_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class EncryptionSettings(SettingsNamespace):
def label(self, attr):
"""Returns a label for UI when given a setting name or namespace"""
return {
"version": t("Encryption mode"),
"version": t("Encryption Mode"),
"pbkdf2_iterations": t("PBKDF2 Iterations"),
}[attr]

Expand Down
14 changes: 7 additions & 7 deletions src/krux/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
2968548114: "Versleutelde geheugensteun was niet opgeslagen",
3315319371: "Versleutelde geheugensteun is opgeslagen met ID: ",
350279787: "Versleutelen",
992186481: "Versleutel modus",
2601598799: "Versleutel modus",
3504179008: "Voer elk woord van jouw BIP-39 geheugensteun in als een nummer van 1 tot 2048.",
1100685007: "Voer elk woord van jouw BIP-39 geheugensteun in als een hexadecimaal van 1 tot 800.",
4090266642: "Voer elk woord van jouw BIP-39 geheugensteun in als een octaal van 1 tot 4000.",
Expand Down Expand Up @@ -330,7 +330,7 @@
2968548114: "MNemon được mã hóa không được lưu trữ",
3315319371: "Mnemonic được mã hóa được lưu trữ với ID:",
350279787: "Mã hóa",
992186481: "Chế độ mã hóa",
2601598799: "Chế độ mã hóa",
3504179008: "Nhập từng kí tự của mã mnemonic BIP-39 của bạn dưới dạng số từ 1 đến 2048.",
1100685007: "Nhập từng từ trong bản ghi nhớ BIP-39 của bạn dưới dạng số thập lục phân từ 1 đến 800.",
4090266642: "Nhập từng từ trong bản ghi nhớ BIP-39 của bạn dưới dạng số bát phân từ 1 đến 4000.",
Expand Down Expand Up @@ -576,7 +576,7 @@
2968548114: "Le mnémonique crypté n'a pas été stocké",
3315319371: "Mnémonique cryptée a été stockée avec ID:",
350279787: "Chiffrement",
992186481: "Mode de chiffrement",
2601598799: "Mode de chiffrement",
3504179008: "Entrez chaque mot de votre BIP-39 mnémonique sous la forme d'un nombre 1 jusqu'à 2048.",
1100685007: "Entrez chaque mot de votre mnémonique BIP-39 sous la forme d'un nombre en hexadécimal de 1 à 800.",
4090266642: "Entrez chaque mot de votre mnémonique BIP-39 sous la forme d'un nombre en octal de 1 à 4000.",
Expand Down Expand Up @@ -822,7 +822,7 @@
2968548114: "Encrypted mnemonic was not stored",
3315319371: "Encrypted mnemonic was stored with ID: ",
350279787: "Encryption",
992186481: "Encryption mode",
2601598799: "Encryption Mode",
3504179008: "Enter each word of your BIP-39 mnemonic as a number from 1 to 2048.",
1100685007: "Enter each word of your BIP-39 mnemonic as a number in hexadecimal from 1 to 800.",
4090266642: "Enter each word of your BIP-39 mnemonic as a number in octal from 1 to 4000.",
Expand Down Expand Up @@ -1068,7 +1068,7 @@
2968548114: "Mnemonic criptografado não foi armazenado",
3315319371: "Mnemônico criptografado foi armazenado com ID:",
350279787: "Criptografia",
992186481: "Modo de criptografia",
2601598799: "Modo de criptografia",
3504179008: "Digite o número de cada palavra do seu mnemônico BIP-39, de 1 a 2048.",
1100685007: "Digite o número de cada palavra do seu mnemônico BIP-39 como um número em hexadecimal, de 1 a 800.",
4090266642: "Digite o número de cada palavra do seu mnemônico BIP-39 como um número em octal, de 1 a 4000.",
Expand Down Expand Up @@ -1314,7 +1314,7 @@
2968548114: "Mnemonic cifrado no se almacenó",
3315319371: "Mnemónica cifrada fue almacenada con ID:",
350279787: "Encriptación",
992186481: "Modo de encriptación",
2601598799: "Modo de encriptación",
3504179008: "Ingrese cada palabra de su mnemónico BIP-39 como un número del 1 al 2048.",
1100685007: "Ingrese cada palabra de su mnemónico BIP-39 como un número en hexadecimal del 1 al 800.",
4090266642: "Ingrese cada palabra de su mnemónico BIP-39 como un número en octal del 1 al 4000.",
Expand Down Expand Up @@ -1560,7 +1560,7 @@
2968548114: "Verschlüsselte Mnemonic wurde nicht gespeichert",
3315319371: "Speicherung der verschlüsselten Mnemonic mit ID: ",
350279787: "Verschlüsselung",
992186481: "Verschlüsselungsmodus",
2601598799: "Verschlüsselungsmodus",
3504179008: "Gib jedes Wort Deiner BIP-39 Mnemonic als Zahl von 1 bis 2048 ein.",
1100685007: "Gib jedes Wort Deiner BIP-39 Mnemonic als Hexadezimalzahl von 1 bis 800 ein.",
4090266642: "Gib jedes Wort Deiner BIP-39 Mnemonic als Oktalzahl von 1 bis 4000 ein.",
Expand Down

0 comments on commit 6f5e9b0

Please sign in to comment.