Skip to content

Instantly share code, notes, and snippets.

@rbnpercy
Created June 8, 2020 02:23
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/46efc0bac97718d2de02443bf022b576 to your computer and use it in GitHub Desktop.
Save rbnpercy/46efc0bac97718d2de02443bf022b576 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
# required for the key generation
keycard-verify-pin {{ session_pin }}
# generate the master key
keycard-generate-key
# 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