Skip to content

Instantly share code, notes, and snippets.

@sleepdefic1t
Created February 4, 2020 23:46
Show Gist options
  • Save sleepdefic1t/86adc89de3df8868b2b45f72320219dd to your computer and use it in GitHub Desktop.
Save sleepdefic1t/86adc89de3df8868b2b45f72320219dd to your computer and use it in GitHub Desktop.
APDU Header description
CLA Instruction Class
INS Instruction
P1 More/Last Payload
P2 Signing Algorithm
INS byte
GetPublicKey 0x02
Sign Tx 0x04
Sign Message 0x08
Get Config. 0x06
P1 byte
More Payloads 0x00
Last Payload 0x80
P2 byte
Ecdsa 0x40
Schnorr 0x50

a Transaction Signing operation using Ecdsa:

"e0048040"

cla ins p1 p2
"e0" "04" "80" "40"

a Transaction Signing operation using Schnorr:

"e0048050"

cla ins p1 p2
"e0" "04" "80" "50"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment