Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

btchip_verifyPin requires 8 character hexadecimal PIN #1

Open
aussiehash opened this issue Nov 1, 2014 · 1 comment
Open

btchip_verifyPin requires 8 character hexadecimal PIN #1

aussiehash opened this issue Nov 1, 2014 · 1 comment

Comments

@aussiehash
Copy link

The minimum PIN length in decimal is 4 characters, however btchip_verifyPin rejects any PIN shorter than 4 hexadecimal characters

@aussiehash
Copy link
Author

Okay, I've figured it out, the documentation is pretty unclear for this

The minimum PIN length is 4 characters, you need a to convert that PIN into Hexadecimal Alt Codes
http://brebru.com/asciicodes.html

0 = 30 
1 = 31
2 = 32
3 = 33
4 = 34
5 = 35
6 = 36
7 = 37
8 = 38
9 = 39

The btchip_verifyPin command seems to break connectivity on OSX, requiring a powercycle (which then requires another btchip_verifyPin to prevent 6982 error

$ ./btchip_getFirmwareVersion
=> e0c4000000
<= 010001040b0146
Firmware version 1.4.11
Loader ID 1.4.6
Using compressed keys : yes
$ ./btchip_getWalletPublicKey "0'/0/0"
Computing public key, please wait ...
=> e04000000d03800000000000000000000000
Dongle application error : 6982
$ ./btchip_verifyPin "39383736"
=> e02200000439383736
<= 00
PIN verified
$ ./btchip_verifyPin "39383736"
=> e02200000439383736
I/O error
$ ./btchip_getWalletPublicKey "0'/0/0"
Computing public key, please wait ...
=> e04000000d03800000000000000000000000
I/O error

Edit : this sequence seems to work (c-api > python > c-api)

$ ./btchip_getFirmwareVersion
=> e0c4000000
<= 010001040b0146
Firmware version 1.4.11
Loader ID 1.4.6
Using compressed keys : yes

$ python getFirmwareVersion.py
Using libusb WINUSB implementation
=> e0c4000000
<= 010001040b01469000
1.4.11

$ ./btchip_getFirmwareVersion
=> e0c4000000
<= 010001040b0146
Firmware version 1.4.11
Loader ID 1.4.6
Using compressed keys : yes
$ ./btchip_verifyPin "39383736"
=> e02200000439383736
<= 00
PIN verified
$ ./btchip_getOperationMode
=> e024000001
<= 01
Current operation mode : Wallet
$ ./btchip_getWalletPublicKey "0'/0/0"
Computing public key, please wait ...
=> e04000000d03800000000000000000000000
<= 4104af85f9956940a7589bb0e5dea349d8100d3a4f4e3d7c8cb0d7b78ded90cf98b3854f772efe554fa196c3f17c4c5e8f274ec605c0db35e9729e41064474e132d822313572454476313358696b54504e524d723866666531537935516e454a71506f7a39f31d045a880b871da4d1dd15e66c2a6a6d8805c911635b5a8856571afdd6d045
Uncompressed public key : 04af85f9956940a7589bb0e5dea349d8100d3a4f4e3d7c8cb0d7b78ded90cf98b3854f772efe554fa196c3f17c4c5e8f274ec605c0db35e9729e41064474e132d8
Address : 15rEDv13XikTPNRMr8ffe1Sy5QnEJqPoz9
Chaincode : f31d045a880b871da4d1dd15e66c2a6a6d8805c911635b5a8856571afdd6d045

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant