Created
June 8, 2020 02:24
-
-
Save rbnpercy/b41c9d90682f5c0fdc196600a7c4ac09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./keycard shell <<END | |
# select the keycard applet | |
keycard-select | |
# set the secrets we had from the initialisation | |
keycard-set-secrets 123456 123456789012 KeycardTest | |
# pairing is usually done once per device | |
keycard-pair | |
keycard-open-secure-channel | |
keycard-verify-pin {{ session_pin }} | |
# derive the key we want to use | |
keycard-derive-key m/44'/60'/0'/0/0 | |
# sign a message. a prefix is added like in web3.eth.sign | |
keycard-sign-message Hello World | |
# we unpair the current device so that we don't use one of the 5 available slots. | |
keycard-unpair {{ session_pairing_index }} | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment