Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Unwrap Key Error - sc-hsm-tool
C:\>sc-hsm-tool.exe --unwrap-key wrap-key.bin --key-reference 10 -vvv
P:5640; T:13384 2018-05-30 15:51:22.731 [sc-hsm-tool] sc.c:275:sc_detect_card_presence: called
P:5640; T:13384 2018-05-30 15:51:22.731 [sc-hsm-tool] reader-pcsc.c:411:pcsc_detect_card_presence: called
P:5640; T:13384 2018-05-30 15:51:22.731 Broadcom Corp Contacted SmartCard 0 check
P:5640; T:13384 2018-05-30 15:51:22.732 current state: 0x00010022
P:5640; T:13384 2018-05-30 15:51:22.732 previous state: 0x00010422
P:5640; T:13384 2018-05-30 15:51:22.732 card present
P:5640; T:13384 2018-05-30 15:51:22.732 [sc-hsm-tool] reader-pcsc.c:416:pcsc_detect_card_presence: returning with: 1
P:5640; T:13384 2018-05-30 15:51:22.732 [sc-hsm-tool] sc.c:280:sc_detect_card_presence: returning with: 1
Using reader with a card: Broadcom Corp Contacted SmartCard 0
P:5640; T:13384 2018-05-30 15:51:22.732 [sc-hsm-tool] sc.c:275:sc_detect_card_presence: called
P:5640; T:13384 2018-05-30 15:51:22.732 [sc-hsm-tool] reader-pcsc.c:411:pcsc_detect_card_presence: called
P:5640; T:13384 2018-05-30 15:51:22.732 Broadcom Corp Contacted SmartCard 0 check
P:5640; T:13384 2018-05-30 15:51:22.735 [sc-hsm-tool] reader-pcsc.c:339:refresh_attributes: returning with: 0 (Success)
P:5640; T:13384 2018-05-30 15:51:22.735 [sc-hsm-tool] reader-pcsc.c:416:pcsc_detect_card_presence: returning with: 1
P:5640; T:13384 2018-05-30 15:51:22.735 [sc-hsm-tool] sc.c:280:sc_detect_card_presence: returning with: 1
Connecting to card in reader Broadcom Corp Contacted SmartCard 0...
P:5640; T:13384 2018-05-30 15:51:22.736 [sc-hsm-tool] card.c:196:sc_connect_card: called
P:5640; T:13384 2018-05-30 15:51:22.736 [sc-hsm-tool] reader-pcsc.c:533:pcsc_connect: called
P:5640; T:13384 2018-05-30 15:51:22.736 Broadcom Corp Contacted SmartCard 0 check
P:5640; T:13384 2018-05-30 15:51:22.738 [sc-hsm-tool] reader-pcsc.c:339:refresh_attributes: returning with: 0 (Success)
P:5640; T:13384 2018-05-30 15:51:22.740 Initial protocol: T=1
P:5640; T:13384 2018-05-30 15:51:22.740 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:DD:18:00:81:31:FE:45:80:F9:A0:00:00:00:77:01:00:70:0A:90:00:8B
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:7F:96:00:00:00:31:B9:64:40:70:14:10:73:94:01:80:82:90:00
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:7F:96:00:00:00:31:B8:64:40:70:14:10:73:94:01:80:82:90:00
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:DF:18:FF:81:91:FE:1F:C3:00:31:B8:64:0C:01:EC:C1:73:94:01:80:82:90:00:B3
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:DC:18:FF:81:91:FE:1F:C3:80:73:C8:21:13:66:01:0B:03:52:00:05:38
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:FE:18:00:00:81:31:FE:45:80:31:81:54:48:53:4D:31:73:80:21:40:81:07:FA
P:5640; T:13384 2018-05-30 15:51:22.740 matching configured ATRs
P:5640; T:13384 2018-05-30 15:51:22.740 trying driver 'authentic'
P:5640; T:13384 2018-05-30 15:51:22.740 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:DD:18:00:81:31:FE:45:80:F9:A0:00:00:00:77:01:00:70:0A:90:00:8B
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 trying driver 'iasecc'
P:5640; T:13384 2018-05-30 15:51:22.740 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:7F:96:00:00:00:31:B9:64:40:70:14:10:73:94:01:80:82:90:00
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:7F:96:00:00:00:31:B8:64:40:70:14:10:73:94:01:80:82:90:00
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:DF:18:FF:81:91:FE:1F:C3:00:31:B8:64:0C:01:EC:C1:73:94:01:80:82:90:00:B3
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:DC:18:FF:81:91:FE:1F:C3:80:73:C8:21:13:66:01:0B:03:52:00:05:38
P:5640; T:13384 2018-05-30 15:51:22.740 ignored - wrong length
P:5640; T:13384 2018-05-30 15:51:22.740 trying driver 'sc-hsm'
P:5640; T:13384 2018-05-30 15:51:22.740 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.740 ATR try : 3B:FE:18:00:00:81:31:FE:45:80:31:81:54:48:53:4D:31:73:80:21:40:81:07:FA
P:5640; T:13384 2018-05-30 15:51:22.740 matched driver 'SmartCard-HSM'
P:5640; T:13384 2018-05-30 15:51:22.741 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.741 ATR try : 3B:FE:18:00:00:81:31:FE:45:80:31:81:54:48:53:4D:31:73:80:21:40:81:07:FA
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] card-sc-hsm.c:1576:sc_hsm_init: called
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] apdu.c:554:sc_transmit_apdu: called
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] card.c:401:sc_lock: called
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] reader-pcsc.c:612:pcsc_lock: called
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] card.c:441:sc_lock: returning with: 0 (Success)
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] apdu.c:521:sc_transmit: called
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] apdu.c:371:sc_single_transmit: called
P:5640; T:13384 2018-05-30 15:51:22.741 CLA:0, INS:A4, P1:4, P2:0, data(11) 0053F9C4
P:5640; T:13384 2018-05-30 15:51:22.741 reader 'Broadcom Corp Contacted SmartCard 0'
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] reader-pcsc.c:284:pcsc_transmit:
Outgoing APDU (17 bytes):
00 A4 04 00 0B E8 2B 06 01 04 01 81 C3 1F 02 01 ......+.........
00 .
P:5640; T:13384 2018-05-30 15:51:22.741 [sc-hsm-tool] reader-pcsc.c:212:pcsc_internal_transmit: called
P:5640; T:13384 2018-05-30 15:51:22.778 [sc-hsm-tool] reader-pcsc.c:293:pcsc_transmit:
Incoming APDU (14 bytes):
6F 0A 82 01 78 85 05 00 01 02 02 05 90 00 o...x.........
P:5640; T:13384 2018-05-30 15:51:22.778 [sc-hsm-tool] apdu.c:390:sc_single_transmit: returning with: 0 (Success)
P:5640; T:13384 2018-05-30 15:51:22.778 [sc-hsm-tool] apdu.c:543:sc_transmit: returning with: 0 (Success)
P:5640; T:13384 2018-05-30 15:51:22.778 [sc-hsm-tool] card.c:451:sc_unlock: called
P:5640; T:13384 2018-05-30 15:51:22.778 [sc-hsm-tool] reader-pcsc.c:662:pcsc_unlock: called
P:5640; T:13384 2018-05-30 15:51:22.778 shareable: yes
P:5640; T:13384 2018-05-30 15:51:22.778 type: DF
P:5640; T:13384 2018-05-30 15:51:22.778 EF structure: 0
P:5640; T:13384 2018-05-30 15:51:22.778 tag 0x82: 0x78
P:5640; T:13384 2018-05-30 15:51:22.779 card info name:'SmartCard-HSM version 2.5', type:26000, flags:0x0, max_send/recv_size:255/65536
P:5640; T:13384 2018-05-30 15:51:22.780 [sc-hsm-tool] card.c:1415:sc_card_sm_check: called
P:5640; T:13384 2018-05-30 15:51:22.780 card->sm_ctx.ops.open 00000000
P:5640; T:13384 2018-05-30 15:51:22.780 ATR : 3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
P:5640; T:13384 2018-05-30 15:51:22.780 ATR try : 3B:FE:18:00:00:81:31:FE:45:80:31:81:54:48:53:4D:31:73:80:21:40:81:07:FA
P:5640; T:13384 2018-05-30 15:51:22.780 [sc-hsm-tool] card.c:1424:sc_card_sm_check: returning with: 0 (Success)
P:5640; T:13384 2018-05-30 15:51:22.780 [sc-hsm-tool] card.c:325:sc_connect_card: returning with: 0 (Success)
Using card driver SmartCard-HSM.
P:5640; T:13384 2018-05-30 15:51:22.780 called; type=1, path=e82b0601040181c31f0201::
P:5640; T:13384 2018-05-30 15:51:22.780 [sc-hsm-tool] card.c:775:sc_select_file: returning with: 0 (Success)
Invalid wrapped key format (Key binary).
P:5640; T:13384 2018-05-30 15:51:22.781 [sc-hsm-tool] card.c:342:sc_disconnect_card: called
P:5640; T:13384 2018-05-30 15:51:22.783 Broadcom Corp Contacted SmartCard 0:SCardDisconnect returned: 0x00000000
P:5640; T:13384 2018-05-30 15:51:22.783 [sc-hsm-tool] card.c:364:sc_disconnect_card: returning with: 0 (Success)
P:5640; T:13384 2018-05-30 15:51:22.783 [sc-hsm-tool] ctx.c:903:sc_release_context: called
P:5640; T:13384 2018-05-30 15:51:22.783 [sc-hsm-tool] reader-pcsc.c:896:pcsc_finish: called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.