{"id":43893160,"url":"https://github.com/skycoin/hardware-wallet","last_synced_at":"2026-02-06T17:11:08.935Z","repository":{"id":53551763,"uuid":"206941451","full_name":"skycoin/hardware-wallet","owner":"skycoin","description":"Firmware and Bootloader for the Skywallet. ","archived":false,"fork":false,"pushed_at":"2021-03-25T19:38:28.000Z","size":9134,"stargazers_count":11,"open_issues_count":27,"forks_count":9,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-09-14T23:43:24.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.skycoin.com/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skycoin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-07T08:50:10.000Z","updated_at":"2021-09-12T04:17:09.000Z","dependencies_parsed_at":"2022-08-29T10:10:34.185Z","dependency_job_id":null,"html_url":"https://github.com/skycoin/hardware-wallet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skycoin/hardware-wallet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoin%2Fhardware-wallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoin%2Fhardware-wallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoin%2Fhardware-wallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoin%2Fhardware-wallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skycoin","download_url":"https://codeload.github.com/skycoin/hardware-wallet/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoin%2Fhardware-wallet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29169389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-06T17:11:04.808Z","updated_at":"2026-02-06T17:11:08.926Z","avatar_url":"https://github.com/skycoin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![hardware-wallet-logo](https://user-images.githubusercontent.com/8619106/56054900-b1f9b680-5d75-11e9-8deb-cf657cfd0c55.png)\n\n# Skycoin hardware wallet\n\n## Table of contents\n\n\u003c!-- MarkdownTOC levels=\"1,2,3,4,5\" autolink=\"true\" bracket=\"round\" --\u003e\n\n- [Overview](#overview)\n- [FAQ](#faq)\n- [Install tools](#install-tools)\n- [Build instructions:](#build-instructions)\n  - [Build and run emulator](#build-and-run-emulator)\n  - [Build a bootloader](#build-a-bootloader)\n  - [Build a bootloader with memory protection enabled](#build-a-bootloader-with-memory-protection-enabled)\n  - [Build a firmware](#build-a-firmware)\n  - [Sign firmware](#sign-firmware)\n  - [Combine bootloader and firmware](#combine-bootloader-and-firmware)\n  - [Combine a memory protected bootloader and firmware](#combine-a-memory-protected-bootloader-and-firmware)\n- [Development guidelines](#development-guidelines)\n  - [Versioning policies](#versioning-policies)\n    - [Firmware version scheme](#firmware-version-scheme)\n    - [Bootloader version scheme](#bootloader-version-scheme)\n    - [Versioning libraries](#versioning-libraries)\n  - [Running tests](#running-tests)\n    - [Generating tests code coverage](#generating-tests-code-coverage)\n  - [Releases](#releases)\n    - [Update the version](#update-the-version)\n    - [Pre-release testing](#pre-release-testing)\n    - [Creating release builds](#creating-release-builds)\n\n\u003c!-- /MarkdownTOC --\u003e\n\n## Overview\n\nThis repo contains the firmware and bootloader for the Skywallet as well as tools to test and develop for the Skywallet.\nThe firmware can be found in [/tiny-firmware](https://github.com/skycoin/hardware-wallet/tree/master/tiny-firmware).\nThe firmware has been modified from [Trezor](https://github.com/trezor/trezor-mcu).\n\nThe [skycoin-api](https://github.com/skycoin/hardware-wallet/tree/master/skycoin-api) folder contains the definition of the functions implementing the Skycoin features.\nThe `skyhw` CLI tool (integrated into the [skycoin repository](https://github.com/skycoin/skycoin)) provides commands to communicate with the firmware/bootloader.\n\n## Firmware Variants\n\nThis repository contains two firmware implementations:\n\n- **[C Firmware](tiny-firmware/)** - The original firmware, forked from Trezor. Production-ready but has some limitations (max 8 transaction outputs, stack overflow at ~23 addresses).\n- **[TinyGo Firmware](tinygo-firmware/)** - A complete rewrite in Go using TinyGo. Aims to remove the C firmware limitations and provide a more maintainable codebase.\n\n## FAQ\n\n[Frequently Asked Question](FAQ.md)\n\n## Install tools\n\nGet the development dependencies and tools from the [tiny-firware/README.md](https://github.com/skycoin/hardware-wallet/blob/master/tiny-firmware/README.md) first, before continuing with the build instructions.\n\n### Build Requirements (Modern Toolchains)\n\nThis firmware has been updated to build with modern toolchains. The following versions are known to work:\n\n- **ARM GCC**: 14.2.0 (arm-none-eabi-gcc)\n- **Python**: 3.11+ (3.13 tested)\n- **Protobuf compiler**: System protoc (33.1 tested) - must be available at `/usr/bin/protoc`\n- **Make**: 4.4+\n\n**Important Notes:**\n\n1. The system protoc (`/usr/bin/protoc`) is used instead of the bundled old version (3.6.1) for compatibility with modern Python protobuf libraries.\n\n2. The `messages_map.h` file is now manually maintained because the Python generator (`messages_map.py`) produces empty output with modern protobuf versions due to extension compatibility issues. Do not regenerate this file.\n\n3. If you encounter build errors:\n   - Ensure `/usr/bin/protoc` exists and is version 19+ (check with `/usr/bin/protoc --version`)\n   - The build uses `PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python` for compatibility\n   - GCC 14+ requires `-Wno-array-parameter` flag (already configured)\n\n## Build instructions:\n\nAfter cloning this repository, make sure the submodules are up-to-date by executing the following command:\n\n```\ngit submodule update --init --recursive\n```\n\nShould you find any issues while running any of the commands that follow please consult [FAQ](FAQ.md) before [reporting a bug](ihttps://github.com/skycoin/hardware-wallet/issues/new?assignees=\u0026labels=bug\u0026template=bug_report.md\u0026title=).\n\n\n### Build a bootloader\n\n```\nmake bootloader # Your firmware is skybootloader-no-memory-protect.bin\n```\n\n### Build a bootloader with memory protection enabled\n\nCareful if you flash and run that bootloader on the device it will activate a memory protection that will close access to flash memory.\n\nYou won't be able to flash your device with an st-link again.\n\n```\nmake bootloader-mem-protect # Your firmware is bootloader-memory-protected.bin\n```\n\n### Build a firmware\n\n```\nmake firmware  # Your firmware is tiny-firmware/skyfirmware.bin\n```\n\n### Sign firmware\n\nSigns the firmware with the private key corresponding to the PubKeys that were registered in the bootloader during building. The PubKeys can be found in the project [Makefile](https://github.com/skycoin/hardware-wallet/blob/develop/Makefile)\n```\nmake sign # Your firmware is tiny-firmware/skyfirmware.bin\n```\n\n### Sign on MacOS with docker\n\nCurrently, the firmware cannot be signed on MacOS straight away. In order to sign the firmware on MacOS nonetheless, you can use the `sign.sh` script which requires a stable Docker release to be installed.\n\n```\n./sign.sh\n\n```\n\n### Combine bootloader and firmware\n\nThis creates a combined firmware without memory protection.\n\n```\nmake full-firmware # this will create a full-firmware-no-mem-protect.bin file\n```\n\n### Combine a memory protected bootloader and firmware\n\nCaution: This combined firmware has memory protection enabled and therefore cannot be re-flashed.\n\n```\nmake full-firmware-mem-protect # this will create a full-firmware-memory-protected.bin file\n```\n\n### Build and run emulator\n\n```\nmake clean \u0026\u0026 make run-emulator\n```\n\nIn case of needing special compiler flags for the SDL library it is possible to provide them in `SDL_CFLAGS` variable. For instance , if SDL was installed with brew on Mac OS X then the following command execution would force searching for header files at the right location.\n\n```\nmake clean \u0026\u0026 make run-emulator SDL_CFLAGS=-I$(brew --prefix sdl2)/include/SDL2\n```\n\nHowever for the default `brew` installation in practice this should not be needed since the value of `SDL_CFLAGS` defaults to `$(shell sdl2-config --cflags | sed 's/-D_THREAD_SAFE//g')`.\n\n\n## Development guidelines\n\nCode added in this repository should comply with the development guidelines documented in the [Skycoin wiki](https://github.com/skycoin/skycoin/wiki).\n\nThis project has two branches: `master` and `develop`.\n\n- `develop` is the default branch and will always have the latest code.\n- `master` will always be equal to the current stable release on the website, and should correspond with the latest release tag.\n\n### Versioning policies\n\n#### Firmware version scheme\n\nThe firmware follows [Semver](https://semver.org/).\n\nThe firmware binary filename is `skywallet-firmware-v$(VERSION_FIRMWARE).bin` e.g. `skywallet-firmware-v1.0.0.bin` .\n\n#### Bootloader version scheme\n\nThe bootloder versioning is independent of the firmware versioning, but follows Semver as well.\n\nThe bootloader binary filename is `skywallet-bootloader-mem-protect-v$(VERSION_BOOTLOADER).bin` if compiled with memory protection enabled it is `skywallet-bootloader-no-memory-protect-v$(VERSION_BOOTLOADER).bin`. For instance, `skywallet-bootloader-mem-protect-v1.0.2.bin` or  `skywallet-bootloader-no-memory-protect-v1.0.2.bin` could be bootloader file names.\n\n#### Versioning libraries\n\nIn order to identify at first sight the features supported by a particular release of a client library, its major and minor version numbers should match the corresponding values of the version of the firmware they were built (tested) for. It is expected that the aforementioned library will be able to communicate to any firmware, as long as both versions (client and firmware) have the same major version number and firmware minor number is greater than the one of the library.\n\n### Running tests\n\nThe project includes a test suite. In order to run it just execute the following command\n\n```\nmake clean \u0026\u0026 make test\n```\n\n#### Generating tests code coverage\n\nTo generate code coverage html report you need to have `lcov` available in your `PATH`, in a debian based system you can run `apt install lcov`, lcov can be available using `brew` on osx too, but in the most general case you can follow the the official [install instructions](https://github.com/linux-test-project/lcov/blob/4ff2ed639ec25c271eb9aa2fcdadd30bfab33e4b/README).\nAfter having this tool you can run `make check-coverage`, if not errors found you can find the result in `coverage/index.html`.\n\n\n### Releases\n\n#### Skycoin firmware releases\n\nThe Skywallet firmware is composed of two parts: the [bootloader](https://github.com/skycoin/hardware-wallet/tree/master/tiny-firmware/bootloader) and the [firmware](https://github.com/skycoin/hardware-wallet/tree/master/tiny-firmware/firmware).\n\nUpon startup, the bootloader checks the validity of the firmware installed on the device. It checks whether the signatures of the firmware correspon to the PubKeys registered in the bootlaoder. The firmware is expected to have a header with proper MAGIC number and three signature slots.\n\nIf the firmware does not have a valid signature in its header it is considered **\"not official\"**. A warning will be displayed but the user can still skip it and use it anyway.\n\n#### Update the version\n\n0. If the `master` branch has commits that are not in `develop` (e.g. due to a hotfix applied to `master`), merge `master` into `develop` (and fix any build or test failures)\n0. Switch to a new release branch named `release-X.Y.Z` for preparing the release.\n0. Update `tiny-firmware/VERSION` and `tiny-firmware/bootloader/VERSION` with corresponding version numbers\n0. Run `make build` to make sure that the code base is up to date\n0. Update `CHANGELOG.md`: move the \"unreleased\" changes to the version and add the date.\n0. Follow the steps in [pre-release testing](#pre-release-testing)\n0. Make a PR merging the release branch into `master`\n0. Ensure changes needed in protobuffer specs are merged into its `master` branch\n0. Ensure protobuf specs sub-module will track changes from its `master` branch after merge\n0. Review the PR and merge it\n0. Tag the `master` branch with the version number. Version tags start with `v`, e.g. `v0.20.0`. Sign the tag. If you have your GPG key in github, creating a release on the Github website will automatically tag the release. It can be tagged from the command line with `git tag -as v0.20.0 $COMMIT_ID`, but Github will not recognize it as a \"release\".\n0. Tag the changeset of the `protob` submodule checkout with the same version number as above.\n0. Release builds are created and uploaded by travis. To do it manually, checkout the master branch and follow the [create release builds instructions](#creating-release-builds).\n0. Checkout `develop` branch and bump `tiny-firmware/VERSION` and `tiny-firmware/bootloader/VERSION` to next [`dev` version number](https://www.python.org/dev/peps/pep-0440/#developmental-releases).\n\n#### Pre-release testing\n\nOnce the candidate release build artifacts have been downloaded it is necessary to check once again that they behave according to specifications. The followinfg steps are aimed at ensuring this is the case. Execute\n\n0. Flash the device with latest versions of bootloader and firmware\n0. Ensure you have a recent version of Skycoin desktop software in one of the following ways\n  - build desktop wallet from source either following instructions [from master branch](https://github.com/skycoin/skycoin/blob/master/electron/README.md) or [from develop branch](https://github.com/skycoin/skycoin/blob/master/electron/README.md)\n  - download Skycoin wallet from [official downloads page](https://www.skycoin.net/downloads/)\n0. Open desktop wallet\n0. Recover a test wallet with nonzero balance from seed to confirm wallet loading works\n0. Send coins to another wallet to confirm spending works\n0. Check that transferred amounts reported in transaction history are correct\n0. Add a PIN to the hardware wallet\n0. Use the same recovery seed of the wallet configured in the Skywallet device and to load a wallet directly in desktop wallet\n0. Send coins to another wallet again\n0. Check transaction history once again\n0. Wipe the wallet\n0. Set up the hardware wallet with a random seed and write down the first address\n0. Create a seed backup\n0. Wipe the wallet and restore the seed. Check if the first address is equal to the one previously written\n0. Repeat steps from the top but using combined bootloader + firmware image to flash the hardware wallet device.\n\n#### Creating release builds\n\nThe following instruction creates a full release:\n\n```bash\nmake release\n```\nFirmware version will be retrieved automatically from `git`, and bootloader version will be take from `tiny-firmware/VERSION`.\n\n## Responsible Disclosure\nSecurity flaws in Skywallet source code or infrastructure can be sent to security@skycoin.com.\nBounties are available for accepted critical bug reports.\n\nPGP Key for signing:\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmDMEXYCYPxYJKwYBBAHaRw8BAQdAeDPi3n9xLv5xGsxbcbwZjfV4h772W+GPZ3Mz\nRS17STm0L2lrZXRoZWFkb3JlIHNreWNvaW4gPGx1eGFpcmxha2VAcHJvdG9ubWFp\nbC5jb20+iJYEExYIAD4WIQSY+TTwT5M0uB36M5iRO71SBrGWIAUCXYCYPwIbAwUJ\nB4TOAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCRO71SBrGWID0NAP0VRiNA\n2Kq2uakPMqV29HY39DVhc9QgxJfMIwXWtFxKAwEAn0NqGRV/iKXNf+qxqAtMWa5X\nF2S36hkEfDHO5W44DwC4OARdgJg/EgorBgEEAZdVAQUBAQdAeiEz/tUmCgOA67Rq\nANmHmX2vrdZp/SfJ9KOI2ANCCm8DAQgHiH4EGBYIACYWIQSY+TTwT5M0uB36M5iR\nO71SBrGWIAUCXYCYPwIbDAUJB4TOAAAKCRCRO71SBrGWIJOJAQDTaqxpcLtAw5kH\nHp2jWvUnLudIONeqeUTCmkLJhcNv1wD+PFJZWMKD1btIG4pkXRW9YoA7M7t5by5O\nx5I+LywZNww=\n=p6Gq\n-----END PGP PUBLIC KEY BLOCK-----\n```\n\n\nKey ID: [0x913BBD5206B19620](https://pgp.mit.edu/pks/lookup?search=0x913BBD5206B19620\u0026op=index)\n\nThe fingerprint for this key is:\n\n```\npub   ed25519 2019-09-17 [SC] [expires: 2023-09-16]\n      98F934F04F9334B81DFA3398913BBD5206B19620\nuid           [ultimate] iketheadore skycoin \u003cluxairlake@protonmail.com\u003e\nsub   cv25519 2019-09-17 [E] [expires: 2023-09-16]\n```\n\nKeybase.io account: https://keybase.io/iketheadore\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskycoin%2Fhardware-wallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskycoin%2Fhardware-wallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskycoin%2Fhardware-wallet/lists"}