forked from w3c/webauthn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draft-jones-webauthn-secp256k1.txt
336 lines (206 loc) · 10.8 KB
/
draft-jones-webauthn-secp256k1.txt
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
WebAuthn Working Group M. Jones
Internet-Draft Microsoft
Intended status: Informational May 30, 2018
Expires: December 1, 2018
Using secp256k1 with JOSE and COSE
draft-jones-webauthn-secp256k1-00
Abstract
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.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 1, 2018.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Jones Expires December 1, 2018 [Page 1]
Internet-Draft Using secp256k1 with JOSE and COSE May 2018
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Notation and Conventions . . . . . . . . . . 2
2. JOSE and COSE secp256k1 Curve Key Representations . . . . . . 2
3. ECDSA Signature with secp256k1 Curve . . . . . . . . . . . . 3
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 3
4.1. JSON Web Key Elliptic Curve Registration . . . . . . . . 3
4.2. JOSE Algorithm Registration . . . . . . . . . . . . . . . 3
4.3. COSE Elliptic Curves Registration . . . . . . . . . . . . 4
4.4. COSE Algorithm Registration . . . . . . . . . . . . . . . 4
5. Security Considerations . . . . . . . . . . . . . . . . . . . 4
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 4
6.1. Normative References . . . . . . . . . . . . . . . . . . 4
6.2. Informative References . . . . . . . . . . . . . . . . . 5
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 6
Document History . . . . . . . . . . . . . . . . . . . . . . . . 6
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction
This specification defines algorithm encodings and representations
enabling the Standards for Efficient Cryptography Group (SECG)
elliptic curve "secp256k1" [SEC2] to be used for JSON Object Signing
and Encryption (JOSE) [RFC7515] and CBOR Object Signing and
Encryption (COSE) [RFC8152] messages. The elliptic curve and
associated algorithm are registered in appropriate IANA JOSE and COSE
registries.
1.1. Requirements Notation and Conventions
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
2. JOSE and COSE secp256k1 Curve Key Representations
The Standards for Efficient Cryptography Group (SECG) elliptic curve
"secp256k1" [SEC2] is represented in a JSON Web Key (JWK) [RFC7517]
using these values:
o "kty": "EC"
o "crv": "P-256K"
plus "x" and "y" values to represent the curve point for the key.
Other optional values such as "alg" MAY also be present.
Jones Expires December 1, 2018 [Page 2]
Internet-Draft Using secp256k1 with JOSE and COSE May 2018
It is represented in a COSE_Key [RFC8152] using these values:
o "kty" (1): "EC2" (2)
o "crv" (-1): "P-256K" (TBD - requested assignment 8)
plus "x" (-2) and "y" (-3) values to represent the curve point for
the key. Other optional values such as "alg" (3) MAY also be
present.
3. ECDSA Signature with secp256k1 Curve
The ECDSA signature algorithm is defined in [DSS]. Implementations
need to check that the key type is "EC" for JOSE or "EC2" (2) for
COSE when creating or verifying a signature.
The ECDSA algorithm specified in this document is:
+--------------+---------------------------+------------------------+
| JOSE Alg | COSE Alg Value | Description |
| Name | | |
+--------------+---------------------------+------------------------+
| ES256K | TBD (requested assignment | ECDSA w/ secp256k1 |
| | -43) | Curve |
+--------------+---------------------------+------------------------+
Table 1: ECDSA Algorithm Values
4. IANA Considerations
4.1. JSON Web Key Elliptic Curve Registration
This section registers the following value in the IANA "JSON Web Key
Elliptic Curve" registry [IANA.JOSE.Curves].
o Curve Name: P-256K
o Curve Description: SECG secp256k1 Curve
o JOSE Implementation Requirements: Optional
o Change Controller: IESG
o Specification Document(s): Section 2 of [[ this specification ]]
4.2. JOSE Algorithm Registration
This section registers the following value in the IANA "JSON Web
Signature and Encryption Algorithms" registry [IANA.JOSE.Algorithms].
o Algorithm Name: ES256K
o Algorithm Description: ECDSA w/ secp256k1 Curve
o Algorithm Usage Locations: alg
Jones Expires December 1, 2018 [Page 3]
Internet-Draft Using secp256k1 with JOSE and COSE May 2018
o JOSE Implementation Requirements: Optional
o Change Controller: IESG
o Reference: Section 3 of [[ this specification ]]
o Algorithm Analysis Document(s): [SEC2]
4.3. COSE Elliptic Curves Registration
This section registers the following value in the IANA "COSE Elliptic
Curves" registry [IANA.COSE.Curves].
o Name: P-256K
o Value: TBD (requested assignment 8)
o Key Type: EC2
o Description: SECG secp256k1 Curve
o Change Controller: IESG
o Reference: Section 2 of [[ this specification ]]
o Recommended: Yes
4.4. COSE Algorithm Registration
This section registers the following value in the IANA "COSE
Algorithms" registry [IANA.COSE.Algorithms].
o Name: ES256K
o Value: TBD (requested assignment -43)
o Description: ECDSA w/ secp256k1 Curve
o Reference: Section 3 of this document
o Recommended: Yes
5. Security Considerations
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
"crv" value.
The procedures and security considerations described in the [SEC1],
[SEC2], and [DSS] specifications apply to implementations of this
specification.
6. References
6.1. Normative References
[DSS] National Institute of Standards and Technology (NIST),
"Digital Signature Standard (DSS)", FIPS PUB 186-4, July
2013, <http://nvlpubs.nist.gov/nistpubs/FIPS/
NIST.FIPS.186-4.pdf>.
Jones Expires December 1, 2018 [Page 4]
Internet-Draft Using secp256k1 with JOSE and COSE May 2018
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web
Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May
2015, <https://www.rfc-editor.org/info/rfc7515>.
[RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517,
DOI 10.17487/RFC7517, May 2015,
<https://www.rfc-editor.org/info/rfc7517>.
[RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)",
RFC 8152, DOI 10.17487/RFC8152, July 2017,
<https://www.rfc-editor.org/info/rfc8152>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[SEC1] Standards for Efficient Cryptography Group, "SEC 1:
Elliptic Curve Cryptography", Version 2.0, May 2009,
<http://www.secg.org/sec1-v2.pdf>.
[SEC2] Standards for Efficient Cryptography Group, "SEC 2:
Recommended Elliptic Curve Domain Parameters",
Version 2.0, January 2010,
<http://www.secg.org/sec2-v2.pdf>.
6.2. Informative References
[IANA.COSE.Algorithms]
IANA, "COSE Algorithms",
<https://www.iana.org/assignments/cose/
cose.xhtml#algorithms>.
[IANA.COSE.Curves]
IANA, "COSE Elliptic Curves",
<https://www.iana.org/assignments/cose/
cose.xhtml#elliptic-curves>.
[IANA.JOSE.Algorithms]
IANA, "JSON Web Signature and Encryption Algorithms",
<https://www.iana.org/assignments/jose/
jose.xhtml#web-signature-encryption-algorithms>.
Jones Expires December 1, 2018 [Page 5]
Internet-Draft Using secp256k1 with JOSE and COSE May 2018
[IANA.JOSE.Curves]
IANA, "JSON Web Key Elliptic Curve",
<https://www.iana.org/assignments/jose/
jose.xhtml#web-key-elliptic-curve>.
Acknowledgements
TBD
Document History
[[ to be removed by the RFC Editor before publication as an RFC ]]
-00
o Initial version.
Author's Address
Michael B. Jones
Microsoft
Email: mbj@microsoft.com
URI: http://self-issued.info/
Jones Expires December 1, 2018 [Page 6]