Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gebogebogebo/9f1bb6b081ae373b4789b45454d42371 to your computer and use it in GitHub Desktop.
Save gebogebogebo/9f1bb6b081ae373b4789b45454d42371 to your computer and use it in GitHub Desktop.
CTAP2 お勉強メモ#2 - 接続(GetInfo) ref: https://qiita.com/gebo/items/e0bd197d607312dcf4fb
// payload len 86
00 a6 01 82 66 55 32 46 5f 56 32 68 46 49 44 4f
5f 32 5f 30 02 81 6b 68 6d 61 63 2d 73 65 63 72
65 74 03 50 f8 a0 11 f3 8c 0a 4d 15 80 06 17 11
1f 9e dc 7d 04 a4 62 72 6b f5 62 75 70 f5 64 70
6c 61 74 f4 69 63 6c 69 65 6e 74 50 69 6e f4 05
19 04 b0 06 81 01
A6 # map(6)
01 # unsigned(1)
82 # array(2)
66 # text(6)
5532465F5632 # "U2F_V2"
68 # text(8)
4649444F5F325F30 # "FIDO_2_0"
02 # unsigned(2)
81 # array(1)
6B # text(11)
686D61632D736563726574 # "hmac-secret"
03 # unsigned(3)
50 # bytes(16)
F8A011F38C0A4D15800617111F9EDC7D # "\xF8\xA0\x11\xF3\x8C\nM\x15\x80\x06\x17\x11\x1F\x9E\xDC}"
04 # unsigned(4)
A4 # map(4)
62 # text(2)
726B # "rk"
F5 # primitive(21)
62 # text(2)
7570 # "up"
F5 # primitive(21)
64 # text(4)
706C6174 # "plat"
F4 # primitive(20)
69 # text(9)
636C69656E7450696E # "clientPin"
F4 # primitive(20)
05 # unsigned(5)
19 04B0 # unsigned(1200)
06 # unsigned(6)
81 # array(1)
01 # unsigned(1)
{
1: ["U2F_V2", "FIDO_2_0"],
2: ["hmac-secret"],
3: h'F8A011F38C0A4D15800617111F9EDC7D',
4: {"rk": true, "up": true, "plat": false, "clientPin": false},
5: 1200,
6: [1]
}
// Platform → Authenticator 送信データ
// 1packet(64byte)
00 1d 00 08 90 00 01 04 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
// Platform ← Authenticator Response
// 2 packet(64byte×2)
// initialization packet
00 1d 00 08 90 00 56 00 a6 01 82 66 55 32 46 5f
56 32 68 46 49 44 4f 5f 32 5f 30 02 81 6b 68 6d
61 63 2d 73 65 63 72 65 74 03 50 f8 a0 11 f3 8c
0a 4d 15 80 06 17 11 1f 9e dc 7d 04 a4 62 72 6b
// continuation packet
00 1d 00 08 00 f5 62 75 70 f5 64 70 6c 61 74 f4
69 63 6c 69 65 6e 74 50 69 6e f4 05 19 04 b0 06
81 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
// Platform → Authenticator 送信データ
// 1packet(64byte)
ff ff ff ff 86 00 08 fc 8c c9 91 14 b5 3b 12 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
// Platform ← Authenticator Response
// 1packet(64byte)
ff ff ff ff 86 00 11 fc 8c c9 91 14 b5 3b 12 00
1d 00 08 02 05 00 02 05 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
C:\project\libfido2\build\examples\Debug>info.exe "\\?\HID#VID_1050&PID_0120#6&1b5e4874&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"
proto: 0x02
major: 0x05
minor: 0x00
build: 0x02
caps: 0x05 (wink, cbor, msg)
version strings: U2F_V2, FIDO_2_0
extension strings: hmac-secret
aaguid: f8a011f38c0a4d15800617111f9edc7d
options: rk, up, noplat, noclientPin
maxmsgsiz: 1200
pin protocols: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment