Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double mnemonic #432

Merged
merged 44 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5e5b54f
Check if mnemonic is a double mnemonic (12+12+24)
tadeubas Jul 31, 2024
1ff7d1d
display_mnemonic fingerprint paramenter
tadeubas Aug 2, 2024
40301fe
Merge branch 'develop' of github.com:selfcustody/krux into double-mne…
tadeubas Aug 8, 2024
b55dba2
Create double mnemonic from camera
tadeubas Aug 9, 2024
2dafac9
Using only 2 dots instead of 3 for t(Processing..)
tadeubas Aug 9, 2024
ea39873
translations
tadeubas Aug 9, 2024
2949cb5
optimize import is_double_mnemonic
tadeubas Aug 9, 2024
b5ca15c
experimentally uses bip39_via_accumulator; +3x faster
Aug 9, 2024
3758760
use of THIN_SPACE for fingerprint and derivation symbol
tadeubas Aug 9, 2024
c97adb3
removed post_t variable
tadeubas Aug 9, 2024
9c2de16
black
tadeubas Aug 9, 2024
9c9351e
Merge branch 'develop' of github.com:selfcustody/krux into double-mne…
tadeubas Aug 12, 2024
0467c40
Processing ... to Processing..
tadeubas Aug 12, 2024
f63a13b
Merge branch 'develop' of github.com:selfcustody/krux into double-mne…
tadeubas Aug 12, 2024
e2bea36
translations
tadeubas Aug 12, 2024
3dc3e5a
Merge branch 'develop' into pr_432_bip39accumulator
Aug 12, 2024
310a288
Merge branch 'pr_432' into pr_432_bip39accumulator
Aug 12, 2024
445ce8c
replaces embit.bip39 -- only difference is mnemonic_to_bytes()
Aug 12, 2024
ec6c4b8
reduces krux's bip39 to mnemonic_is_valid() and mnemonic_to_bytes()
Aug 12, 2024
a16f6ea
uses krux.bip39 to fail fast, else verifies against embit.bip39
Aug 12, 2024
82471be
uses embit.bip39 except where needing optimized krux.bip39 for speed
Aug 12, 2024
1a10381
Merge pull request #27 from jdlcdl/pr_432_bip39accumulator
tadeubas Aug 12, 2024
05b3bab
Merge branch 'double-mnemonic-318' of github.com:tadeubas/krux into d…
tadeubas Aug 12, 2024
cbb69fd
pylint for bip39
tadeubas Aug 12, 2024
ef58d03
optimizing mnemonic_to_bytes
tadeubas Aug 12, 2024
e4f7b76
fix pylint
tadeubas Aug 13, 2024
2da5ae4
kruxbip39 tests
tadeubas Aug 13, 2024
15db210
input change validate_position default to False
tadeubas Aug 13, 2024
9e8186d
optimized imports
tadeubas Aug 13, 2024
20dca8a
double mnemonic tests
tadeubas Aug 13, 2024
065bdd1
fix test_touch
tadeubas Aug 13, 2024
96afca0
poetry / docs - added macros plugin
tadeubas Aug 13, 2024
603eb44
limit mnemonic <= 24w; more tests against embit.bip39
Aug 13, 2024
add60f8
docs added double mnemonic + overhaul
tadeubas Aug 13, 2024
9e5c5b4
simpler test_edge_cases; added test to cover custom wordlist
Aug 14, 2024
1e8de5b
Merge branch 'pr_432' into pr_432_tests
Aug 14, 2024
638965b
black
Aug 14, 2024
0284380
Merge pull request #29 from jdlcdl/pr_432_tests
tadeubas Aug 14, 2024
98c5e24
docs typos thx @jdlcdl !
tadeubas Aug 14, 2024
93c3e7e
Merge branch 'double-mnemonic-318' of github.com:tadeubas/krux into d…
tadeubas Aug 14, 2024
5ba478a
krux build will replace the latest version in docs too
tadeubas Aug 14, 2024
01c06b0
little optimization
tadeubas Aug 14, 2024
be2a39a
Merge branch 'develop' of github.com:selfcustody/krux into double-mne…
tadeubas Aug 18, 2024
478730c
Revert "input change validate_position default to False"
tadeubas Aug 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@

.md-typeset img.twemoji {
margin: 0 !important;
}

.md-typeset h5 {
color: black;
text-transform: none;
}
1 change: 1 addition & 0 deletions docs/getting-started/features/tinyseed.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The examples below have been crated so that you can test the workflow for scanni

## Size, Offset and Padding Reference
The general logic for how these are processed is:

1. Krux first looks for a square (Which works best if with a well lit square, with clean edges, on a dark background)
2. This square is checked and if the ratio of length to height is within a defined range for the given seed type, the square is further processed. (Uses the aspect_high and aspect_low variables)
3. An X and Y offset are applied to work out the corner of the seed grid within the seed plate. Some devices like the Maix Amigo use a mirrored coordinate system and some seed types will have a slightly different layout on the front and back of the plate. (Uses the x_offset and y_offset variables, p0 for the front face and p1 for the reverse face)
Expand Down
48 changes: 24 additions & 24 deletions docs/getting-started/installing/from-gui.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ available for Linux and Windows.
Download the installer by choosing the right asset for your operating system from our
[Github releases page](https://github.com/selfcustody/krux-installer/releases):

| **Operational System** | **File** |
|------------------------------------------------------------|:----------------------------------:|
| Windows | `krux-installer_0.0.13.exe*` |
| Debian-based: Ubuntu, PopOS, etc... | `krux-installer_0.0.13_amd64.deb*` |
| RedHat-based: Fedora, etc... | `krux-installer-0.0.13.x86_64.rpm*`|
| Any linux distribution | `krux-installer-0.0.13.AppImage*` |
| Package for Archlinux on [AUR](https://aur.archlinux.org/).| `krux-installer-bin` |
| **Operational System** | **File** |
|------------------------------------------------------------|:------------------------------------------:|
| Windows | `{{latest_installer_underline}}.exe` |
| Debian-based: Ubuntu, PopOS, etc... | `{{latest_installer_underline}}_amd64.deb` |
| RedHat-based: Fedora, etc... | `{{latest_installer}}.x86_64.rpm` |
| Any linux distribution | `{{latest_installer}}.AppImage` |
| Package for Archlinux on [AUR](https://aur.archlinux.org/).| `krux-installer-bin` |

### Verify files
If you trust the project developers, you can skip to [install](#install):
Expand All @@ -33,34 +33,34 @@ If you trust the project developers, you can skip to [install](#install):
<td>
```pwsh
# Compare this output:
(Get-FileHash 'krux-installer_0.0.13.exe').Hash
(Get-FileHash '{{latest_installer_underline}}.exe').Hash

# With this:
Get-Content 'krux-installer_0.0.13.exe.sha256.txt'
Get-Content '{{latest_installer_underline}}.exe.sha256.txt'
```
</td>
</tr>
<tr>
<td>Debian-based</td>
<td>
```bash
sha256sum --check ./krux-installer_0.0.13_amd64.deb.sha256.txt
sha256sum --check ./{{latest_installer_underline}}_amd64.deb.sha256.txt
```
</td>
</tr>
<tr>
<td>RedHat-based</td>
<td>
```bash
sha256txt --check ./krux-installer-0.0.13.x86_64.rpm.sha256.txt
sha256txt --check ./{{latest_installer}}.x86_64.rpm.sha256.txt
```
</td>
</tr>
<tr>
<td>Any Linux distribution</td>
<td>
```bash
sha256sum --check ./krux-installer-0.0.13.AppImage.sha256.txt
sha256sum --check ./{{latest_installer}}.AppImage.sha256.txt
```
</td>
</tr>
Expand All @@ -80,10 +80,10 @@ Then you can verify:

| System | Command |
|------------------------|-------------------------------------------------------|
| Windows (powershell) | `gpg --verify krux-installer_0.0.13.exe.sig` |
| Debian-based | `gpg --verify ./krux-installer_0.0.13_amd64.deb.sig` |
| RedHat-based | `gpg --verify ./krux-installer-0.0.13.x86_64.rpm.sig` |
| Any Linux distribution | `gpg --verify ./krux-installer-0.0.13.AppImage.sig` |
| Windows (powershell) | `gpg --verify {{latest_installer_underline}}.exe.sig` |
| Debian-based | `gpg --verify ./{{latest_installer_underline}}_amd64.deb.sig` |
| RedHat-based | `gpg --verify ./{{latest_installer}}.x86_64.rpm.sig` |
| Any Linux distribution | `gpg --verify ./{{latest_installer}}.AppImage.sig` |

> ⚠️ TIP: If the verification was successful, you may get a message similar to: `Good signature from "qlrddev <[email protected]>"`

Expand All @@ -102,7 +102,7 @@ Each system require different steps to install:
<td>Windows</td>
<td>
<ul>
<li>The <code>krux-installer_0.0.13.exe</code> is a <a href="https://nsis.sourceforge.io/Main_Page">NSIS</a> installer;</li>
<li>The <code>{{latest_installer_underline}}.exe</code> is a <a href="https://nsis.sourceforge.io/Main_Page">NSIS</a> installer;</li>
<li>The first time you run the <code>.exe</code> file the system will ask you to trust the application;</li>
<li>See <a href="/krux/getting-started/installing/from-gui/#windows">windows section below</a> for more information</li>
</td>
Expand All @@ -111,27 +111,27 @@ Each system require different steps to install:
<td>Debian-based</td>
<td>
<ul>
<li>Install with dpkg: <code>sudo dpkg -i krux-installer_0.0.13_amd64.deb</code>;</li>
<li>Update it with apt-get: <code>sudo apt-get install -f krux-installer_0.0.13_amd64.deb</code>.</li>
<li>Install with dpkg: <code>sudo dpkg -i {{latest_installer_underline}}_amd64.deb</code>;</li>
<li>Update it with apt-get: <code>sudo apt-get install -f {{latest_installer_underline}}_amd64.deb</code>.</li>
</ul>
</td>
</tr>
<tr>
<td>RedHat-based</td>
<td>
<ul>
<li>Fedora: <code>sudo dnf install krux-installer-0.0.13.x86_64.rpm</code>;</li>
<li>Other RedHat based distros: <code>sudo yum localinstall krux-installer-0.0.13.x86_64.rpm</code>.</li>
<li>Fedora: <code>sudo dnf install {{latest_installer}}.x86_64.rpm</code>;</li>
<li>Other RedHat based distros: <code>sudo yum localinstall {{latest_installer}}.x86_64.rpm</code>.</li>
</ul>
</td>
</tr>
<tr>
<td>Any Linux distribution</td>
<td>
<ul>
<li>Place the <code>krux-installer-0.0.13.AppImage</code> where you want;</li>
<li>Modify permision to execute: <code>chmod +x krux-installer-0.0.13.AppImage</code>;</li>
<li>Run it: <code>./krux-installer-0.0.13.AppImage</code>.</li>
<li>Place the <code>{{latest_installer}}.AppImage</code> where you want;</li>
<li>Modify permision to execute: <code>chmod +x {{latest_installer}}.AppImage</code>;</li>
<li>Run it: <code>./{{latest_installer}}.AppImage</code>.</li>
</ul>
</td>
</tr>
Expand Down
10 changes: 5 additions & 5 deletions docs/getting-started/installing/from-pre-built-release.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Head over to the [releases](https://github.com/selfcustody/krux/releases) page a
### Verify the files
Before installing the release, it's a good idea to check that:

1. The *SHA256 hash* of `krux-vX.Y.Z.zip` matches the hash in `krux-vX.Y.Z.zip.sha256.txt`
2. The *signature file* `krux-vX.Y.Z.zip.sig` can be verified with the [`selfcustody.pem` public key](https://github.com/selfcustody/krux/blob/main/selfcustody.pem) found in the root of the krux repository.
1. The *SHA256 hash* of `{{latest_krux}}.zip` matches the hash in `{{latest_krux}}.zip.sha256.txt`
2. The *signature file* `{{latest_krux}}.zip.sig` can be verified with the [`selfcustody.pem` public key](https://github.com/selfcustody/krux/blob/main/selfcustody.pem) found in the root of the krux repository.

You can either do this manually or with the `krux` shell script, which contains helper commands for this:
```bash
./krux sha256 krux-vX.Y.Z.zip
./krux verify krux-vX.Y.Z.zip selfcustody.pem
./krux sha256 {{latest_krux}}.zip
./krux verify {{latest_krux}}.zip selfcustody.pem
```

On Mac you may need to install `coreutils` to be able to use `sha256sum`
Expand All @@ -25,7 +25,7 @@ Fun fact: Each Krux release is signed with Krux!
### Flash the firmware onto the device
Extract the latest version of Krux you downloaded and enter the folder:
```bash
unzip krux-vX.Y.Z.zip && cd krux-vX.Y.Z
unzip {{latest_krux}}.zip && cd {{latest_krux}}
```

Connect the device to your computer via USB (for Maix Amigo, make sure you’re using bottom port), power it on, and run the following, replacing `DEVICE` with either `m5stickv`, `amigo`, `bit`, `cube`, `dock` or `yahboom` (to yahboom you may need to manually specify the port, for example `/dev/ttyUSB0` on Linux or `COM6` on Windows):
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/installing/from-source.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The first command will create `privkey.pem` and `pubkey.pem` files you can use w
Once you've updated the `SIGNER_PUBKEY` with this value, you can proceed with the regular build process.

### Build the firmware (Linux or WSL)
The [krux](https://github.com/selfcustody/krux/blob/main/krux) bash script contains commands for common development tasks. It assumes a Linux host, you will need to have [Docker Desktop or Docker Engine](https://docs.docker.com/desktop/), `openssl`, and `wget` installed at a minimum for the commands to work as expected. It works on Windows using WSL. The channel Crypto Guide from Youtube made a step-by-step video - [Krux DIY Bitcoin Signer: Build From Source & Verify (With Windows + WSL2 + Docker)](https://www.youtube.com/watch?v=Vmr_TFy2TfQ)
The [krux bash script](https://github.com/selfcustody/krux/blob/main/krux) contains commands for common development tasks. It assumes a Linux host, you will need to have [Docker Desktop or Docker Engine](https://docs.docker.com/desktop/), `openssl`, and `wget` installed at a minimum for the commands to work as expected. It works on Windows using WSL. The channel Crypto Guide from Youtube made a step-by-step video - [Krux DIY Bitcoin Signer: Build From Source & Verify (With Windows + WSL2 + Docker)](https://www.youtube.com/watch?v=Vmr_TFy2TfQ)

To build and flash the firmware:
```bash
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/installing/from-test-release.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Keep in mind that these are unsigned binaries.
Download experimental compiled firmware or the Android app `apk` from our [test (beta) repository](https://github.com/odudex/krux_binaries).

#### Android
The Krux Android app is designed for learning about Krux and Bitcoin air-gapped transactions. Due to the numerous potential vulnerabilities inherent in smartphones, such as the lack of control over the operating system, libraries, and hardware peripherals, the Krux app should NOT be used to manage wallets containing savings or important keys and mnemonics. For secure management of your keys, a dedicated device is recommended. [More](../../faq.md#what-is-krux-android-app)
The [Krux Android app](../../faq.md#what-is-krux-android-app) is designed for learning about Krux and Bitcoin air-gapped transactions. Due to the numerous potential vulnerabilities inherent in smartphones, such as the lack of control over the operating system, libraries, and hardware peripherals, the Krux app should NOT be used to manage wallets containing savings or important keys and mnemonics. For secure management of your keys, a dedicated device is recommended.

#### Compiled firmware for Kendryte K210 devices
#### M5StickV
Expand Down Expand Up @@ -110,17 +110,17 @@ To Flash Yahboom k210 module you'll have to manually specify the port.
##### Linux
See the correct port using `ls /dev/ttyUSB*`, in the example below we use `/dev/ttyUSB0`:
```bash
./ktool-linux -B goE -b 1500000 -p /dev/ttyUSB0 yahboom/kboot.kfpkg
./ktool-linux -B goE -b 1500000 -p /dev/ttyUSB0 maixpy_yahboom/kboot.kfpkg
```

##### Mac
See the correct port using the command line: `ls /dev/cu.usbserial*`, in the example below we use `/dev/cu.usbserial-10`:
```bash
./ktool-mac -B goE -b 1500000 -p /dev/cu.usbserial-10 yahboom/kboot.kfpkg
./ktool-mac -B goE -b 1500000 -p /dev/cu.usbserial-10 maixpy_yahboom/kboot.kfpkg
```

##### Windows
See the correct port at Device Manager > Ports (COM & LPT), in the example below we use `COM6`:
```pwsh
.\ktool-win.exe -B goE -b 1500000 -p COM6 yahboom\kboot.kfpkg
.\ktool-win.exe -B goE -b 1500000 -p COM6 maixpy_yahboom\kboot.kfpkg
```
Loading