Skip to content

Instantly share code, notes, and snippets.

@rbnpercy
Created June 8, 2020 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbnpercy/b41c9d90682f5c0fdc196600a7c4ac09 to your computer and use it in GitHub Desktop.
Save rbnpercy/b41c9d90682f5c0fdc196600a7c4ac09 to your computer and use it in GitHub Desktop.
./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