You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/applets/5-fido.md
+20-8Lines changed: 20 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ The attestation certificate is used to sign certificates for transport when you
10
10
11
11
The FIDO2 applet is still in development, and not completely finished. For example, Windows Hello is not supported yet. Stay tuned. It is also not officially certified.
12
12
13
-
If you are feeling lucky, you can however already test the FIDO2 applet.
@@ -52,7 +56,7 @@ In the future, Vivokey plans offer signed certificates using their own certifica
52
56
53
57
Creating certificates used to be quite the involved task requiring advanced knowledge of `openssl` commands, but I have written a small tool to simplify the process. Install Python3, and the `cryptography`, `asn1`, and `pyscard` modules (e.g. using Pip). Then, clone or download https://github.com/StarGate01/fido-attestation-loader .
54
58
55
-
If you specify no flags, the script will use the default file names `attestation.der`, `attestation_key.p8`, `ca.der`, `ca_key.p8`, and `settings.ini`. If you want to, you can edit the metadata in `settings.ini`.
59
+
If you specify no flags, the script will use the default file names `attestation.der`, `attestation_key.p8`, `ca.der`, `ca_key.p8`, and `settings.ini`. If you want to, you can edit the metadata in `settings.ini`, also refer to the Readme file.
56
60
57
61
First, generate a certificate authority, the script will ask you for a passphrase to secure the private key.
58
62
@@ -72,20 +76,26 @@ Then, you can derive the applet installation parameter by running, for FIDO U2F:
72
76
./attestation.py cert show -m u2f
73
77
```
74
78
75
-
For FIDO2:
79
+
For FIDO2 (default):
76
80
77
81
```
78
82
./attestation.py cert show -m fido2
79
83
```
80
84
81
-
The attestation script has a lot more flags to control which files to use, and to provide passphrases via the arguments instead of interactively typing them. It also provides functionality to validate a certificate gainst an certificate authority. See the `-h` help command for more details.
85
+
The attestation script has a lot more flags to control which files to use, and to provide passphrases via the arguments instead of interactively typing them. It also provides functionality to validate a certificate gainst an certificate authority. See the `-h` help command for more details, or refer to the Readme file of https://github.com/StarGate01/fido-attestation-loader.
82
86
83
-
Use GlobalPlatformPro (GPP) from https://github.com/martinpaljak/GlobalPlatformPro/releases to install the applet:
87
+
Use GlobalPlatformPro (GPP) from https://github.com/martinpaljak/GlobalPlatformPro/releases to install the applet, for Fido U2F:
84
88
85
89
```
86
90
gp -install U2FApplet.cap --params INSTALLPARAM
87
91
```
88
92
93
+
For FIDO2:
94
+
95
+
```
96
+
gp -install CTAP2.cap --params INSTALLPARAM
97
+
```
98
+
89
99
The parameter data (`INSTALLPARAM`) is `00`, joined to the length in bytes of the public attestation certificate (16 bit integer = 2 bytes), and joined to the private key (32 bytes). See https://github.com/darconeous/u2f-javacard/blob/master/README.md for more info. You can copy it from the last line of the output of `./attestation.py cert show`.
90
100
91
101
Listing the applets using `gp --list` should print something like this:
Next, you have to load the public attestation certificate by sending a few chained APDUs. The DER encoded public certificate has to be chopped into `128` byte chunks, which are sent attached to a small header. The header is `80 01 HHLL KK`, with `HHLL` being a 16 bit integer offset of that chunk, and `KK` being the chunk length (hex `80`, usually smaller for the last chunk). Before sending the certificate, selecting the applet is required.
105
115
116
+
The FIDO2 applet requires a few more bytes to specify the AAGUID.
117
+
106
118
This task is covered by the attestation script as well, for FIDO U2F:
107
119
108
120
```
109
121
./attestation.py cert upload -m u2f
110
122
```
111
123
112
-
For FIDO2:
124
+
For FIDO2 (default):
113
125
114
126
```
115
127
./attestation.py cert upload -m fido2
116
128
```
117
129
118
130
You might have to specify your PCSC reader index using `-r`, use `-l` to list all readers.
119
131
120
-
See also https://gist.github.com/darconeous/adb1b2c4b15d3d8fbc72a5097270cdaf for more info on these APDUs.
132
+
See also https://gist.github.com/darconeous/adb1b2c4b15d3d8fbc72a5097270cdaf for more info on these APDUs for U2F.
0 commit comments