forked from w3c/webauthn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-jones-webauthn-secp256k1.xml
387 lines (346 loc) · 11.3 KB
/
draft-jones-webauthn-secp256k1.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type='text/xsl' href='http://xml2rfc.tools.ietf.org/authoring/rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="info"
ipr="trust200902"
docName="draft-jones-webauthn-secp256k1-00">
<front>
<title>Using secp256k1 with JOSE and COSE</title>
<author fullname="Michael B. Jones" surname="Jones" initials="M.B.">
<organization>Microsoft</organization>
<address>
<email>mbj@microsoft.com</email>
<uri>http://self-issued.info/</uri>
</address>
</author>
<date day="30" month="May" year="2018" />
<area>Security</area>
<workgroup>WebAuthn Working Group</workgroup>
<keyword>Cryptography</keyword>
<keyword>Digital Signature</keyword>
<keyword>Encryption</keyword>
<keyword>Internet-Draft</keyword>
<abstract>
<t>
This specification defines algorithm encodings and representations enabling the
Standards for Efficient Cryptography Group (SECG) elliptic curve "secp256k1" to be used for
JSON Object Signing and Encryption (JOSE) and
CBOR Object Signing and Encryption (COSE) messages.
</t>
</abstract>
</front>
<middle>
<section anchor="Introduction" title="Introduction">
<t>
This specification defines algorithm encodings and representations enabling the
Standards for Efficient Cryptography Group (SECG) elliptic curve
"secp256k1" <xref target="SEC2"/> to be used for
JSON Object Signing and Encryption (JOSE) <xref target="RFC7515"/> and
CBOR Object Signing and Encryption (COSE) <xref target="RFC8152"/> messages.
The elliptic curve and associated algorithm are registered in
appropriate IANA JOSE and COSE registries.
</t>
<section anchor="rnc" title="Requirements Notation and Conventions">
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and
only when, they appear in all capitals, as shown here.
</t>
</section>
</section>
<section title="JOSE and COSE secp256k1 Curve Key Representations" anchor="curve">
<t>
The Standards for Efficient Cryptography Group (SECG) elliptic curve
"secp256k1" <xref target="SEC2"/> is represented in
a JSON Web Key (JWK) <xref target="RFC7517"/> using these values:
</t>
<t>
<?rfc subcompact="yes"?>
<list style="symbols">
<t><spanx style="verb">kty</spanx>: <spanx style="verb">EC</spanx></t>
<t><spanx style="verb">crv</spanx>: <spanx style="verb">P-256K</spanx></t>
</list>
<?rfc subcompact="no"?>
</t>
<t>
plus <spanx style="verb">x</spanx> and <spanx style="verb">y</spanx> values
to represent the curve point for the key.
Other optional values such as <spanx style="verb">alg</spanx> MAY also be present.
</t>
<t>
It is represented in a COSE_Key <xref target ="RFC8152"/> using these values:
</t>
<t>
<?rfc subcompact="yes"?>
<list style="symbols">
<t><spanx style="verb">kty</spanx> (1): <spanx style="verb">EC2</spanx> (2)</t>
<t><spanx style="verb">crv</spanx> (-1): <spanx style="verb">P-256K</spanx> (TBD - requested assignment 8)</t>
</list>
<?rfc subcompact="no"?>
</t>
<t>
plus <spanx style="verb">x</spanx> (-2) and <spanx style="verb">y</spanx> (-3) values
to represent the curve point for the key.
Other optional values such as <spanx style="verb">alg</spanx> (3) MAY also be present.
</t>
</section>
<section title="ECDSA Signature with secp256k1 Curve" anchor="ECDSA">
<t>
The ECDSA signature algorithm is defined in <xref target="DSS"/>.
Implementations need to check that the key type is <spanx style="verb">EC</spanx> for JOSE or
<spanx style="verb">EC2</spanx> (2) for COSE when creating or verifying a signature.
</t>
<t>
The ECDSA algorithm specified in this document is:
</t>
<texttable anchor="table-ec-algs" title="ECDSA Algorithm Values" suppress-title="false" align="center" style="full">
<ttcol align="left">JOSE Alg Name</ttcol>
<ttcol align="left">COSE Alg Value</ttcol>
<ttcol align="left">Description</ttcol>
<c>ES256K</c>
<c>TBD (requested assignment -43)</c>
<c>ECDSA w/ secp256k1 Curve</c>
</texttable>
</section>
<section anchor="IANA" title="IANA Considerations">
<section anchor="jose-curve-registration" title="JSON Web Key Elliptic Curve Registration">
<t>
This section registers the following value in the
IANA "JSON Web Key Elliptic Curve" registry <xref target="IANA.JOSE.Curves"/>.
</t>
<t>
<?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Curve Name: P-256K
</t>
<t>
Curve Description: SECG secp256k1 Curve
</t>
<t>
JOSE Implementation Requirements: Optional
</t>
<t>
Change Controller: IESG
</t>
<t>
Specification Document(s): <xref target="curve"/> of [[ this specification ]]
</t>
</list>
</t>
<?rfc subcompact="no"?>
</section>
<section anchor="jose-algorithm-registration" title="JOSE Algorithm Registration">
<t>
This section registers the following value in the
IANA "JSON Web Signature and Encryption Algorithms" registry <xref target="IANA.JOSE.Algorithms"/>.
</t>
<t>
<?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Algorithm Name: ES256K
</t>
<t>
Algorithm Description: ECDSA w/ secp256k1 Curve
</t>
<t>
Algorithm Usage Locations: alg
</t>
<t>
JOSE Implementation Requirements: Optional
</t>
<t>
Change Controller: IESG
</t>
<t>
Reference: <xref target="ECDSA"/> of [[ this specification ]]
</t>
<t>
Algorithm Analysis Document(s): <xref target="SEC2"/>
</t>
</list>
</t>
<?rfc subcompact="no"?>
</section>
<section anchor="cose-curve-registration" title="COSE Elliptic Curves Registration">
<t>
This section registers the following value in the
IANA "COSE Elliptic Curves" registry <xref target="IANA.COSE.Curves"/>.
</t>
<t>
<?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Name: P-256K
</t>
<t>
Value: TBD (requested assignment 8)
</t>
<t>
Key Type: EC2
</t>
<t>
Description: SECG secp256k1 Curve
</t>
<t>
Change Controller: IESG
</t>
<t>
Reference: <xref target="curve"/> of [[ this specification ]]
</t>
<t>
Recommended: Yes
</t>
</list>
</t>
<?rfc subcompact="no"?>
</section>
<section anchor="cose-algorithm-registration" title="COSE Algorithm Registration">
<t>
This section registers the following value in the
IANA "COSE Algorithms" registry <xref target="IANA.COSE.Algorithms"/>.
</t>
<t>
<?rfc subcompact="yes"?>
<list style='symbols'>
<t>
Name: ES256K
</t>
<t>
Value: TBD (requested assignment -43)
</t>
<t>
Description: ECDSA w/ secp256k1 Curve
</t>
<t>
Reference: <xref target="ECDSA"/> of this document
</t>
<t>
Recommended: Yes
</t>
</list>
</t>
<?rfc subcompact="no"?>
</section>
</section>
<section anchor="Security" title="Security Considerations">
<t>
Care should be taken that a secp256k1 key not be mistaken for a P-256 key,
given that their representations are the same
except for the <spanx style="verb">crv</spanx> value.
</t>
<t>
The procedures and security considerations described in the
<xref target="SEC1"/>, <xref target="SEC2"/>, and <xref target="DSS"/>
specifications apply to implementations of this specification.
</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include="reference.RFC.2119.xml"?>
<?rfc include="reference.RFC.7515.xml"?>
<?rfc include="reference.RFC.7517.xml"?>
<?rfc include="reference.RFC.8152.xml"?>
<?rfc include="reference.RFC.8174.xml"?>
<reference anchor="DSS" target="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf">
<front>
<title>Digital Signature Standard (DSS)</title>
<author>
<organization>National Institute of Standards and
Technology (NIST)</organization>
</author>
<date month="July" year="2013" />
</front>
<seriesInfo name="FIPS" value="PUB 186-4" />
</reference>
<reference anchor="SEC1" target="http://www.secg.org/sec1-v2.pdf">
<front>
<title>SEC 1: Elliptic Curve Cryptography</title>
<author>
<organization>Standards for Efficient Cryptography Group</organization>
</author>
<date day="21" month="May" year="2009" />
</front>
<seriesInfo name="Version" value="2.0" />
</reference>
<reference anchor="SEC2" target="http://www.secg.org/sec2-v2.pdf">
<front>
<title>SEC 2: Recommended Elliptic Curve Domain Parameters</title>
<author>
<organization>Standards for Efficient Cryptography Group</organization>
</author>
<date day="27" month="January" year="2010" />
</front>
<seriesInfo name="Version" value="2.0" />
</reference>
</references>
<references title="Informative References">
<reference anchor="IANA.JOSE.Algorithms" target="https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms">
<front>
<title>JSON Web Signature and Encryption Algorithms</title>
<author>
<organization>IANA</organization>
</author>
<date/>
</front>
</reference>
<reference anchor="IANA.JOSE.Curves" target="https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve">
<front>
<title>JSON Web Key Elliptic Curve</title>
<author>
<organization>IANA</organization>
</author>
<date/>
</front>
</reference>
<reference anchor="IANA.COSE.Algorithms" target="https://www.iana.org/assignments/cose/cose.xhtml#algorithms">
<front>
<title>COSE Algorithms</title>
<author>
<organization>IANA</organization>
</author>
<date/>
</front>
</reference>
<reference anchor="IANA.COSE.Curves" target="https://www.iana.org/assignments/cose/cose.xhtml#elliptic-curves">
<front>
<title>COSE Elliptic Curves</title>
<author>
<organization>IANA</organization>
</author>
<date/>
</front>
</reference>
</references>
<section title="Acknowledgements" anchor="Acknowledgements" numbered="no">
<t>
TBD
</t>
</section>
<section title="Document History" anchor="History">
<t>
[[ to be removed by the RFC Editor before publication as an RFC ]]
</t>
<t>
-00
<list style='symbols'>
<t>
Initial version.
</t>
</list>
</t>
</section>
</back>
</rfc>