https://github.com/ellipticsecure/python-ehsm-hd-wallet-example1
Example code to show you how to sign data with the hierarchical deterministic (HD) wallet on the MIRkey Hardware Security Module
https://github.com/ellipticsecure/python-ehsm-hd-wallet-example1
bip32 hsm python
Last synced: about 1 year ago
JSON representation
Example code to show you how to sign data with the hierarchical deterministic (HD) wallet on the MIRkey Hardware Security Module
- Host: GitHub
- URL: https://github.com/ellipticsecure/python-ehsm-hd-wallet-example1
- Owner: ellipticSecure
- License: mit
- Created: 2019-07-10T17:50:45.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-11T08:20:59.000Z (almost 7 years ago)
- Last Synced: 2025-05-07T22:07:36.478Z (about 1 year ago)
- Topics: bip32, hsm, python
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## This example shows you how to sign data with the hierarchical deterministic (HD) wallet on the MIRkey Hardware Security Module
Please see the accompanying [how to guide](https://ellipticsecure.com/ehsm/how-to/2019/07/11/python-hd-wallet-example.html).
The example code can easily be converted into a utility to sign transactions offline/air-gapped or used on
Bitcoin transaction servers.
## Preparation
1. If you have not done so already, download and install the native shared library for your platform here:
[https://ellipticsecure.com/downloads/](https://ellipticsecure.com/downloads/)
Important: Always verify the signature of the downloaded files
2. Initialize the device and set a user PIN with the eHSM Manager or pkcs11 tool
3. Install the ehsm Python wrapper
```bash
pip install ehsm
```
## Example
Signing a transaction hash with a BIP32 (Bitcoin etc.) derived key stored on
a MIRkey or eHSM device using the derivation path "m/0/0".
```bash
./hdwallet-example.py 0,0 30440220644ff4e8877ac01ba12e72b1c1dcfee67a4d932d28b721b1249eaf16
Enter the device user PIN:
...
3045022100a26765f2e1709d2028a2ad17245d28d69bf5c5499bb32de6cd9deaff066496130220690bb4326446a413e37ad95072cb4754b559282083be079111c408ca57e85c17
```