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

Add Stax layouts for generating SSS shares #5

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 7 additions & 4 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:
upload_app_binaries_artifact: compiled_app_binaries
run_for_devices: '["nanos", "nanox", "nanosp", "stax"]'
run_for_devices: '["nanos", "nanox", "nanosp", "stax", "flex"]'

ledger_app_test_function:
name: Run ragger tests using the reusable workflow
Expand All @@ -28,7 +28,7 @@ jobs:
with:
download_app_binaries_artifact: compiled_app_binaries
test_dir: tests/functional
run_for_devices: '["nanos"]'
run_for_devices: '["nanos", "stax", "flex"]'

ledger_app_test_unit:
name: Unit tests
Expand All @@ -53,10 +53,13 @@ jobs:
with:
name: code-coverage
path: tests/unit/coverage
- name: Install codecov dependencies
run: apk update && apk add curl gpg
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tests/unit/coverage.info
flags: unittests
name: codecov-app-seed-tool
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Analyse
strategy:
matrix:
sdk: [ "$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK" ]
sdk: [ "$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK" ]
# 'cpp' covers C and C++
language: [ 'cpp' ]
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ledger-rule-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
name: Run Ledger rule enforcer using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
with:
run_for_devices: '["nanos", "nanox", "nanosp", "stax"]'
run_for_devices: '["nanos", "nanox", "nanosp", "stax", "flex"]'
2 changes: 1 addition & 1 deletion .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo "VERSION_NAME=${HEAD_BRANCH//./_}" >> ${GITHUB_ENV}

- name: Download app binaries
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
name: compiled_app_binaries
path: ./bin/
Expand Down
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8.0] - 2024-10-28

### Added

- Add Stax layouts for generating SSKR shares
- Add Stax layouts for checking SSKR shares
- Add Stax layouts for recovering BIP39 phrase
- Add screenshots and animations
- Add demo videos for Stax and Nano S
- Add Stax function tests
- Port to Ledger Flex
- Add Flex function tests

### Fixed

- Some plausible yet wrong mnemonic were deemed valid on NBGL devices
- Merge Nano code
- Improve efficiency of `cx_bn_gf2_n_mul()` for Nano S

## [1.7.4] - 2024-06-20

### Fixed

- Ensure result does not overlap with operands in calls to `cx_bn_gf2_n_mul()`
- Give a warning if a user chooses 1-of-m shares when m > 1
- Use CBOR tag for version 2 `sskr`
Expand All @@ -16,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.7.3] - 2024-05-29

### Fixed

- Changed name of 'Generate BIP39' menus to 'Recover BIP39'
- Changed Second Montgomery constant used for `cx_bn_gf2_n_mul()` to a more suitable value
- Improve efficiency of `cx_bn_gf2_n_mul()` for Nano S
Expand All @@ -28,7 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Using Ledger SDK `cx_crc32()` function rather than buggy `cx_crc32_hw()`.
- Fix build with SDK master for Nano S

## [1.7.1] - 2024-03-06
## [1.7.1] - 2024-04-06

### Changed

Expand Down
127 changes: 21 additions & 106 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#*******************************************************************************
# Ledger Blue
# (c) 2016 Ledger
# Ledger App
# (c) 2024 Ledger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,134 +18,49 @@
ifeq ($(BOLOS_SDK),)
$(error Environment variable BOLOS_SDK is not set)
endif

include $(BOLOS_SDK)/Makefile.defines

all: default

# Main app configuration

APPNAME = "Seed Tool"
APPVERSION_M = 1
APPVERSION_N = 7
APPVERSION_P = 4
APPVERSION_N = 8
APPVERSION_P = 0
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

APPVERSION_RC = 0
ifneq ($(APPVERSION_RC), 0)
APPVERSION := $(APPVERSION)-rc.$(APPVERSION_RC)
endif

APP_LOAD_PARAMS = --appFlags 0x10 $(COMMON_LOAD_PARAMS) --curve secp256k1 --path ""

ifeq ($(TARGET_NAME), TARGET_NANOS)
ICONNAME=glyphs/seed_nanos.gif
else ifeq ($(TARGET_NAME), TARGET_STAX)
ICONNAME=glyphs/seed_stax_32px.gif
else
ICONNAME=glyphs/seed_nanox.gif
endif
VARIANT_PARAM = NONE
VARIANT_VALUES = seed_tool

# Build configuration
CURVE_APP_LOAD_PARAMS = secp256k1
PATH_APP_LOAD_PARAMS = ""
HAVE_APPLICATION_FLAG_DERIVE_MASTER = 1

#DEFINES += APPNAME=\"$(APPNAME)\"
DEFINES += APPVERSION=\"$(APPVERSION)\"
DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M)
DEFINES += LEDGER_MINOR_VERSION=$(APPVERSION_N)
DEFINES += LEDGER_PATCH_VERSION=$(APPVERSION_P)
DEFINES += OS_IO_SEPROXYHAL
ICON_NANOS = glyphs/seed_nanos.gif
ICON_NANOSP = glyphs/seed_nanox.gif
ICON_NANOX = glyphs/seed_nanox.gif
ICON_STAX = glyphs/seed_stax_32px.gif
ICON_FLEX = glyphs/seed_flex_40px.gif

DEFINES += BOLOS_APP_ICON_SIZE_B=\(9+32\)
#DEFINES += HAVE_ELECTRUM
DEFINES += IO_USB_MAX_ENDPOINTS=4 IO_HID_EP_LENGTH=64
DEFINES += HAVE_SPRINTF

ifneq ($(TARGET_NAME), TARGET_STAX)
ifneq ($(TARGET_NAME), $(filter $(TARGET_NAME), TARGET_STAX TARGET_FLEX))
$(info Using BAGL)
DEFINES += HAVE_BAGL HAVE_UX_FLOW
ifeq ($(TARGET_NAME),TARGET_NANOS)
DISABLE_STANDARD_USB = 1
endif
else
$(info Using NBGL)
DEFINES += NBGL_KEYBOARD
DEFINES += NBGL_KEYPAD
endif

ifeq ($(TARGET_NAME), TARGET_NANOS)
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128
else
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300
ifneq ($(TARGET_NAME), TARGET_STAX)
DEFINES += HAVE_GLO096
DEFINES += BAGL_WIDTH=128 BAGL_HEIGHT=64
DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX
DEFINES += HAVE_KEYBOARD_UX
endif
ENABLE_NBGL_KEYBOARD = 1
ENABLE_NBGL_KEYPAD = 1
endif

DEBUG = 0

ifneq ($(DEBUG), 0)
$(info DEBUG enabled)
DEFINES += HAVE_IO_USB HAVE_USB_APDU
SDK_SOURCE_PATH += lib_stusb lib_stusb_impl
DEFINES += HAVE_PRINTF
ifeq ($(TARGET_NAME), TARGET_NANOS)
DEFINES += PRINTF=screen_printf
else
DEFINES += PRINTF=mcu_usb_printf
endif
else
DEFINES += PRINTF\(...\)=
endif

##############
# Compiler #
##############
ifneq ($(BOLOS_ENV),)
$(info BOLOS_ENV=$(BOLOS_ENV))
CLANGPATH := $(BOLOS_ENV)/clang-arm-fropi/bin/
GCCPATH := $(BOLOS_ENV)/gcc-arm-none-eabi-5_3-2016q1/bin/
else
$(info BOLOS_ENV is not set: falling back to CLANGPATH and GCCPATH)
endif
ifeq ($(CLANGPATH),)
$(info CLANGPATH is not set: clang will be used from PATH)
endif
ifeq ($(GCCPATH),)
$(info GCCPATH is not set: arm-none-eabi-* will be used from PATH)
endif

CC := $(CLANGPATH)clang
CFLAGS += -Wshadow -Wformat -DAPPNAME=\"$(APPNAME)\"
AS := $(GCCPATH)arm-none-eabi-gcc
LD := $(GCCPATH)arm-none-eabi-gcc
LDLIBS += -lm -lgcc -lc


include $(BOLOS_SDK)/Makefile.glyphs

APP_SOURCE_PATH += src

ifneq ($(TARGET_NAME),TARGET_NANOS)
ifneq ($(TARGET_NAME), TARGET_STAX)
SDK_SOURCE_PATH += lib_ux
endif
endif

# Main rules

load: all
python -m ledgerblue.loadApp $(APP_LOAD_PARAMS)

delete:
python -m ledgerblue.deleteApp $(COMMON_DELETE_PARAMS)

# Import generic rules from the SDK

include $(BOLOS_SDK)/Makefile.rules


listvariants:
@echo VARIANTS APP seed_tool
include $(BOLOS_SDK)/Makefile.standard_app
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
[![License](https://img.shields.io/github/license/aido/app-seed-tool)](https://github.com/aido/app-seed-tool/blob/develop/LICENSE)

![nanos](https://img.shields.io/badge/nanos-working-green?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMTQ3IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NyAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgOTEuNjU0OFYxMjhINTUuMjkzVjExOS45NEg4LjA1NjMxVjkxLjY1NDhIMFpNMTM4Ljk0NCA5MS42NTQ4VjExOS45NEg5MS43MDdWMTI3Ljk5OEgxNDdWOTEuNjU0OEgxMzguOTQ0Wk01NS4zNzMzIDM2LjM0NTJWOTEuNjUyOUg5MS43MDdWODQuMzg0Mkg2My40Mjk2VjM2LjM0NTJINTUuMzczM1pNMCAwVjM2LjM0NTJIOC4wNTYzMVY4LjA1ODQ0SDU1LjI5M1YwSDBaTTkxLjcwNyAwVjguMDU4NDRIMTM4Ljk0NFYzNi4zNDUySDE0N1YwSDkxLjcwN1oiIGZpbGw9IndoaXRlIi8+PC9zdmc+)
![nanox](https://img.shields.io/badge/nanox-working-green?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMTQ3IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NyAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgOTEuNjU0OFYxMjhINTUuMjkzVjExOS45NEg4LjA1NjMxVjkxLjY1NDhIMFpNMTM4Ljk0NCA5MS42NTQ4VjExOS45NEg5MS43MDdWMTI3Ljk5OEgxNDdWOTEuNjU0OEgxMzguOTQ0Wk01NS4zNzMzIDM2LjM0NTJWOTEuNjUyOUg5MS43MDdWODQuMzg0Mkg2My40Mjk2VjM2LjM0NTJINTUuMzczM1pNMCAwVjM2LjM0NTJIOC4wNTYzMVY4LjA1ODQ0SDU1LjI5M1YwSDBaTTkxLjcwNyAwVjguMDU4NDRIMTM4Ljk0NFYzNi4zNDUySDE0N1YwSDkxLjcwN1oiIGZpbGw9IndoaXRlIi8+PC9zdmc+)
![nanosp](https://img.shields.io/badge/nanosp-working-green?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMTQ3IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NyAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgOTEuNjU0OFYxMjhINTUuMjkzVjExOS45NEg4LjA1NjMxVjkxLjY1NDhIMFpNMTM4Ljk0NCA5MS42NTQ4VjExOS45NEg5MS43MDdWMTI3Ljk5OEgxNDdWOTEuNjU0OEgxMzguOTQ0Wk01NS4zNzMzIDM2LjM0NTJWOTEuNjUyOUg5MS43MDdWODQuMzg0Mkg2My40Mjk2VjM2LjM0NTJINTUuMzczM1pNMCAwVjM2LjM0NTJIOC4wNTYzMVY4LjA1ODQ0SDU1LjI5M1YwSDBaTTkxLjcwNyAwVjguMDU4NDRIMTM4Ljk0NFYzNi4zNDUySDE0N1YwSDkxLjcwN1oiIGZpbGw9IndoaXRlIi8+PC9zdmc+)
![stax](https://img.shields.io/badge/stax-in_progress-orange?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMTQ3IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NyAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgOTEuNjU0OFYxMjhINTUuMjkzVjExOS45NEg4LjA1NjMxVjkxLjY1NDhIMFpNMTM4Ljk0NCA5MS42NTQ4VjExOS45NEg5MS43MDdWMTI3Ljk5OEgxNDdWOTEuNjU0OEgxMzguOTQ0Wk01NS4zNzMzIDM2LjM0NTJWOTEuNjUyOUg5MS43MDdWODQuMzg0Mkg2My40Mjk2VjM2LjM0NTJINTUuMzczM1pNMCAwVjM2LjM0NTJIOC4wNTYzMVY4LjA1ODQ0SDU1LjI5M1YwSDBaTTkxLjcwNyAwVjguMDU4NDRIMTM4Ljk0NFYzNi4zNDUySDE0N1YwSDkxLjcwN1oiIGZpbGw9IndoaXRlIi8+PC9zdmc+)
![nanox](https://img.shields.io/badge/nanox-working-green?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMTQ3IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NyAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgOTEuNjU0OFYxMjhINTUuMjkzVjExOS45NEg4LjA1NjMxVjkxLjY1NDhIMFpNMTM4Ljk0NCA5MS42NTQ4VjExOS45NEg5MS43MDdWMTI3Ljk5OEgxNDdWOTEuNjU0OEgxMzguOTQ0Wk01NS4zNzMzIDM2LjM0NTJWOTEuNjUyOUg5MS43MDdWODQuMzg0Mkg2My40Mjk2VjM2LjM0NTJINTUuMzczM1pNMCAwVjM2LjM0NTJIOC4wNTYzMVY4LjA1ODQ0SDU1LjI5M1YwSDBaTTkxLjcwNyAwVjguMDU4NDRIMTM4Ljk0NFYzNi4zNDUySDE0N1YwSDkxLjcwN1oiIGZpbGw9IndoaXRlIi8+PC9zdmc+)
![stax](https://img.shields.io/badge/stax-working-green?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMTQ3IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NyAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgOTEuNjU0OFYxMjhINTUuMjkzVjExOS45NEg4LjA1NjMxVjkxLjY1NDhIMFpNMTM4Ljk0NCA5MS42NTQ4VjExOS45NEg5MS43MDdWMTI3Ljk5OEgxNDdWOTEuNjU0OEgxMzguOTQ0Wk01NS4zNzMzIDM2LjM0NTJWOTEuNjUyOUg5MS43MDdWODQuMzg0Mkg2My40Mjk2VjM2LjM0NTJINTUuMzczM1pNMCAwVjM2LjM0NTJIOC4wNTYzMVY4LjA1ODQ0SDU1LjI5M1YwSDBaTTkxLjcwNyAwVjguMDU4NDRIMTM4Ljk0NFYzNi4zNDUySDE0N1YwSDkxLjcwN1oiIGZpbGw9IndoaXRlIi8+PC9zdmc+)
![flex](https://img.shields.io/badge/flex-working-green?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMTQ3IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDE0NyAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgOTEuNjU0OFYxMjhINTUuMjkzVjExOS45NEg4LjA1NjMxVjkxLjY1NDhIMFpNMTM4Ljk0NCA5MS42NTQ4VjExOS45NEg5MS43MDdWMTI3Ljk5OEgxNDdWOTEuNjU0OEgxMzguOTQ0Wk01NS4zNzMzIDM2LjM0NTJWOTEuNjUyOUg5MS43MDdWODQuMzg0Mkg2My40Mjk2VjM2LjM0NTJINTUuMzczM1pNMCAwVjM2LjM0NTJIOC4wNTYzMVY4LjA1ODQ0SDU1LjI5M1YwSDBaTTkxLjcwNyAwVjguMDU4NDRIMTM4Ljk0NFYzNi4zNDUySDE0N1YwSDkxLjcwN1oiIGZpbGw9IndoaXRlIi8+PC9zdmc+)

[![Build app-seed-tool](https://github.com/aido/app-seed-tool/actions/workflows/ci-workflow.yml/badge.svg)](https://github.com/aido/app-seed-tool/actions/workflows/ci-workflow.yml)
[![CodeQL](https://github.com/aido/app-seed-tool/actions/workflows/codeql-workflow.yml/badge.svg)](https://github.com/aido/app-seed-tool/actions/workflows/codeql-workflow.yml)
Expand All @@ -23,13 +24,13 @@ Use the utilities provided by this Ledger application to check a backed up BIP-3
Not all Ledger devices are equal. The older, less capable devices do not have the capacity to provide a full range of seed utilities. The following table lists the seed utilities provided by each devices type:
<div align="center">

||Nano S|Nano S+|Nano X|Stax|
| :--- | :---: | :---: | :---: | :---: |
|[Check BIP39](#check-bip39)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|
|[Check Shamir's secret shares](#check-shamirs-secret-shares)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{orange}✓}$$|
|[Generate Shamir's secret sharing](#generate-shamirs-secret-sharing)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{orange}✓}$$|
|[Recover BIP39](#recover-bip39)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{orange}✓}$$|
|[Generate BIP85](#generate-bip85)|$${\color{red}✗}$$|$${\color{orange}✓}$$|$${\color{orange}✓}$$|$${\color{orange}✓}$$|
||Nano S|Nano S+|Nano X|Stax|Flex|
| :--- | :---: | :---: | :---: | :---: | :---: |
|[Check BIP39](#check-bip39)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|
|[Check Shamir's secret shares](#check-shamirs-secret-shares)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|
|[Generate Shamir's secret sharing](#generate-shamirs-secret-sharing)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|
|[Recover BIP39](#recover-bip39)|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|$${\color{green}✓}$$|
|[Generate BIP85](#generate-bip85)|$${\color{red}✗}$$|$${\color{orange}✓}$$|$${\color{orange}✓}$$|$${\color{orange}✓}$$|$${\color{orange}✓}$$|
</div>

## Application menu flow
Expand Down Expand Up @@ -71,6 +72,10 @@ flowchart LR
4.1[Quit]
end
```
> [!TIP]
> Demo videos of some of the menu flows on different hardware devices are available [here](demos/README.md).
>
> Alternatively, animations of some of the menu flows on different hardware devices are available [here](tests/functional/screenshots/README.md).

## Check BIP39
The application invites the user to type a [BIP-39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) mnemonic on their Ledger device. The BIP-39 mnemonic is compared to the onboarded seed and the application notifies the user whether both seeds match or not.
Expand Down
18 changes: 11 additions & 7 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@
### Todo

- [ ] Improve the efficiency of the method used to perform an inverse operation in GF(256)
- [ ] Improve the efficiency of the custom cx_bn_gf2_n_mul() function used for Nano S devices
- [ ] Update automated function tests to test on nanox and nanosp
- [ ] There is just enough memory available on Nano S to hold the phrases for 10 shares. Maybe just store SSKR Bytewords as shorter two letter minimal Bytewords rather than a 4 letter Byteword plus space for each share. Convert minimal ByteWords back to four letter Bytewords just prior to display.

### In Progress

- [ ] Add Ledger Stax to list of devices app works on
- [x] Add SSKR Generate option to Stax
- [ ] Add SSKR Check option to Stax
- [ ] Write SSKR to BIP39 functionality
- [ ] Functional Test with 29-word SSKR shares
- [ ] Functional Test with 46-word SSKR shares
- [ ] Add BIP85 menus to Stax and Flex
- [ ] Merge Nano code
- [ ] Improve the efficiency of the custom cx_bn_gf2_n_mul() function used for Nano S devices

### Done ✓

- [x] Decouple BAGL / NBGL code
- [x] Add Ledger Flex to list of devices app works on
- [x] Add Ledger Stax to list of devices app works on
- [x] Add SSKR Generate option to Stax
- [x] Add SSKR Check option to Stax
- [x] Write SSKR to BIP39 functionality
- [x] Functional Test with 29-word SSKR shares
- [x] Functional Test with 46-word SSKR shares
- [x] Changed Shamir interpolate function to use `cx_bn_gf2_n_mul()` syscalls
- [x] Remove all Variable Length Arrays
- [x] Save memory by setting the SSKR word buffer (G_bolos_ux_context.sskr_words_buffer) to a sensible size
Expand Down
20 changes: 20 additions & 0 deletions demos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Application menus demos

Below are demos of some of the menu flows on different hardware devices

## Nano S
### Check BIP39 & Generate SSKR menus
https://github.com/user-attachments/assets/3f3ce02b-1b46-45b1-a86d-25fbff7bf216)](https://github.com/user-attachments/assets/b3ea239a-e9f8-40b4-b048-d85ec398ab59

### Check SSKR & Recover BIP39 menus
https://github.com/aido/app-seed-tool/raw/demos/demos/nanos/sskr/demo.png)](https://github.com/user-attachments/assets/467030c3-4476-42a9-b90f-d29f2f35d423

## Stax
### Check BIP39 & Generate SSKR menus
https://github.com/aido/app-seed-tool/raw/demos/demos/stax/bip39/demo.png)](https://github.com/user-attachments/assets/ff5728aa-3c2d-468e-9ad7-c9eb6b056e17

### Check SSKR & Recover BIP39 menus
https://github.com/aido/app-seed-tool/raw/demos/demos/stax/sskr/demo.png)](https://github.com/user-attachments/assets/3f3f44e5-ba4a-491d-897e-3b2842c0309f

> [!TIP]
> Enable subtitles when viewing the videos
Binary file added demos/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions demos/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<video id="demo_nanos_bip39" poster="nanos/bip39/demo.png" width="640" height="360" controls>
<source src="nanos/bip39/demo.mp4" type="video/mp4" />
<track label="English" kind="captions" srclang="en" src="nanos/bip39/demo-en.vtt" default />
Your browser does not support the video tag.
</video>
<video id="demo_nanos_sskr" poster="nanos/sskr/demo.png" width="640" height="360" controls>
<source src="nanos/sskr/demo.mp4" type="video/mp4" />
<track label="English" kind="captions" srclang="en" src="nanos/sskr/demo-en.vtt" default />
Your browser does not support the video tag.
</video>
<video id="demo_stax_bip39" poster="stax/bip39/demo.png" width="640" height="360" controls>
<source src="stax/bip39/demo.mp4" type="video/mp4" />
<track label="English" kind="captions" srclang="en" src="stax/bip39/demo-en.vtt" default />
Your browser does not support the video tag.
</video>
<video id="demo_stax_sskr" poster="stax/sskr/demo.png" width="640" height="360" controls>
<source src="stax/sskr/demo.mp4" type="video/mp4" />
<track label="English" kind="captions" srclang="en" src="stax/sskr/demo-en.vtt" default />
Your browser does not support the video tag.
</video>

</body>
</html>
Loading
Loading