Skip to content

Conversation

@Toporin
Copy link
Contributor

@Toporin Toporin commented Jul 27, 2019

This is a pull request to add support for the Satochip hardware wallet.
(this pull request supersedes #5523 )

The Satochip hardware wallet is based on a jacavard smartcard and is fully open-source.
The wallet is composed of a javacard applet (https://github.com/Toporin/SatochipApplet) that is to be loaded on the smartcard, and an Electrum client plugin (https://github.com/Toporin/electrum-satochip) that acts as the interface between the card and the network.
The (optional) Satochip-2FA plugin allows to confirm transaction requests on a second android device.

More info:
https://github.com/Toporin/ (official repository)
https://prezi.com/p/mpq-xhh3mxjl/satochip-gent-meetup/ (Slides from previous meetups in Belgium)

Alcofribas4 and others added 27 commits December 18, 2018 12:17
Basic Satochip plugin functionnal
No SegWit support yet
- parse segwit tx
- sign tx

Electrum-Satochip integration:
- store authentikey in (encrypted) storage
- Device setup: prompt for PIN & Seed
Check Satochip version for support via card_get_status()
* Refactor card_bip32_import_seed() and card_bip32_get_authentikey(): return authentikey instead of (response, sw1, sw2)
* New class UninitializedSeedError(Exception) thrown when device has no seed
…e) directly

remove debug comments and clean code a bit
# Conflicts:
#	contrib/build-osx/make_osx
#	contrib/build-osx/osx.spec
#	contrib/build-osx/package.sh
#	contrib/build-wine/build-electrum-git.sh
#	contrib/build-wine/build-secp256k1.sh
#	contrib/build-wine/build.sh
#	contrib/build-wine/deterministic.spec
#	contrib/build-wine/prepare-wine.sh
#	contrib/build-wine/sign.sh
#	contrib/build-wine/unsign.sh
#	contrib/deterministic-build/check_submodules.sh
#	contrib/deterministic-build/find_restricted_dependencies.py
#	contrib/freeze_packages.sh
#	contrib/make_apk
#	contrib/make_download
#	contrib/make_locale
#	contrib/make_packages
#	contrib/make_tgz
#	contrib/sign_packages
#	contrib/upload
#	electrum
#	electrum-env
#	gui/kivy/data/fonts/tron/License.txt
#	gui/kivy/data/fonts/tron/Readme.txt
#	lib/base_wizard.py
#	lib/crypto.py
#	lib/plugins.py
#	lib/ripemd.py
#	lib/wordlist/portuguese.txt
#	plugins/trezor/trezor.py
#	scripts/bip70
#	scripts/block_headers
#	scripts/estimate_fee
#	scripts/get_history
#	scripts/peers
#	scripts/servers
#	scripts/txradar
#	scripts/watch_address
#	setup.py

Signed-off-by: Baudoin <bcollard@gmail.com>
various code cleaning,
set random PIN for unused pin/puk code
* card_get_status() returns number of pin/puk tries remaining
* PIN verification is refactored in card_verify_PIN()
Merge commit '87c596fa1d685b9365c26b9dfabe9c566f806ea0' into satochip

# Conflicts:
#	.gitignore
#	README.rst
#	contrib/build-linux/appimage/apprun.sh
#	contrib/build-linux/appimage/build.sh
#	contrib/build-osx/osx.spec
#	contrib/build-wine/build-electrum-git.sh
#	contrib/build-wine/deterministic.spec
#	contrib/build-wine/prepare-wine.sh
#	contrib/build_tools_util.sh
#	contrib/osx/make_osx
#	contrib/sign_version
#	electrum/base_wizard.py
#	electrum/plugin.py
#	icons.qrc
#	lib/crypto.py
In CardConnector.py:
- Encrypt/decrypt 2FA challenge/response for privacy
- erase PIN when card is removed

In Satochip.py:
- pairing with 2FA device using QR code
- if 2FA is enabled, tx signing requires response to challenge using hmac-sha1

New plugin in satochip_2FA folder: exchange challenge-response with 2FA device

Minor changes in TxParser.py, plugin.py
Merge remote-tracking branch 'upstream/master' into satochip

# Conflicts:
#	.gitignore
#	README.rst
#	contrib/build-wine/build-electrum-git.sh
#	contrib/build-wine/prepare-wine.sh
#	electrum/base_wizard.py
#	electrum/plugin.py
- contrib/build-wine/LICENCE
- contrib/build-wine/tmp/electrum/
- contrib/osx/package.sh~HEAD
- removed README-electrum.rst
- undo changes to README.rst
- removed debug traces in contrib/build-wine/deterministic.spec
- add pyscard in contrib/requirements/requirements-hw.txt
@SomberNight SomberNight added the hw-generic related to hardware wallets, irrespective of manufacturer label Aug 4, 2019
Merge branch 'Electrum-Satochip-v3.3.8-0.7' into satochip:
    - removed README-electrum.rst
    - undo changes to README.rst
    - removed debug traces in contrib/build-wine/deterministic.spec
    - add pyscard in contrib/requirements/requirements-hw.txt
Toporin and others added 11 commits October 4, 2019 16:45
Support for Satochip v0.8 (improved 2-Factor-Authentication support):
* A new setting menu is available when clicking on the satochip logo in the low right corner of the window.
* Add support for PIN change and seed reset
* In addition to transactions, 2FA is now required to sign messages, import eckey and reset seed/eckey/2FA.
* 2FA can be disabled, only when the seed and all private keys are cleared.

Added support for Satochip in AppImage.
To run the AppImage on Linux:
$ chmod a+x electrum*.AppImage
$ ./electrum*.AppImage
Support for Satochip v0.8 (improved 2-Factor-Authentication support):
  * A new setting menu is available when clicking on the satochip logo in the low right corner of the window.
  * Add support for PIN change and seed reset
  * In addition to transactions, 2FA is now required to sign messages, import eckey and reset seed/eckey/2FA.
  * 2FA can be disabled, only when the seed and all private keys are cleared.

Added support for Satochip in AppImage.
To run the AppImage on Linux:
  $ chmod a+x electrum*.AppImage
  $ ./electrum*.AppImage

Merge branch 'electrum-satochip-v3.3.8-0.8' into satochip
Support for the Satochip v0.9
Patch: message signing for Litecoin (and other alts)
No impact for Bitcoin
Support for the Satochip v0.9
Patch: message signing for Litecoin (and other alts)
No impact for Bitcoin

Merge branch 'electrum-satochip-v3.3.8-0.9' into satochip
see:
Electron-Cash#1712
Electron-Cash#1713
(cherry picked from commit faf585e)

# Conflicts:
#	electrum/plugins/satochip/qt.py
#	electrum/plugins/satochip/satochip.py
…tikey" error

When using passphrase with seed, I am sometimes getting an error: Recovered authentikey does not correspond to registered authentikey!
See simpleledger#101 (comment)

(cherry picked from commit c2d2828)

# Conflicts:
#	electrum/plugins/satochip/CardConnector.py
#	electrum/plugins/satochip/CardDataParser.py
#	electrum/plugins/satochip/satochip.py
Merge remote-tracking branch 'electrum/master' into electrum-satochip-v4.0.0a0-0.9-dev1

# Conflicts:
#	contrib/build-linux/appimage/Dockerfile
Merge branch 'electrum-satochip-v4.0.0a0-0.9' into satochip
All (incl indirect) dependencies are already listed in deterministic-build/requirements*.txt.
This option makes it easier to manually rm a dependency from that list for e.g. testing.
@Toporin
Copy link
Contributor Author

Toporin commented Aug 18, 2020

Closing PR, superseded by #6520

@Toporin Toporin closed this Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hw-generic related to hardware wallets, irrespective of manufacturer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants