draft-ietf-cose-webauthn-algorithms-00.txt | draft-ietf-cose-webauthn-algorithms-01.txt | |||
---|---|---|---|---|
COSE Working Group M. Jones | COSE Working Group M. Jones | |||
Internet-Draft Microsoft | Internet-Draft Microsoft | |||
Intended status: Standards Track March 26, 2019 | Intended status: Standards Track July 8, 2019 | |||
Expires: September 27, 2019 | Expires: January 9, 2020 | |||
COSE and JOSE Registrations for WebAuthn Algorithms | COSE and JOSE Registrations for WebAuthn Algorithms | |||
draft-ietf-cose-webauthn-algorithms-00 | draft-ietf-cose-webauthn-algorithms-01 | |||
Abstract | Abstract | |||
The W3C Web Authentication (WebAuthn) specification and the FIDO2 | The W3C Web Authentication (WebAuthn) specification and the FIDO2 | |||
Client to Authenticator Protocol (CTAP) specification use COSE | Client to Authenticator Protocol (CTAP) specification use COSE | |||
algorithm identifiers. This specification registers algorithms in | algorithm identifiers. This specification registers algorithms in | |||
the IANA "COSE Algorithms" registry that are used by WebAuthn and | the IANA "COSE Algorithms" registry that are used by WebAuthn and | |||
CTAP implementations that are not already registered. Also, they are | CTAP implementations that are not already registered. Also, they are | |||
registered in the IANA "JSON Web Signature and Encryption Algorithms" | registered in the IANA "JSON Web Signature and Encryption Algorithms" | |||
registry, when not already registered there. | registry, when not already registered there. | |||
skipping to change at page 1, line 36 ¶ | skipping to change at page 1, line 36 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on September 27, 2019. | This Internet-Draft will expire on January 9, 2020. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2019 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
skipping to change at page 2, line 15 ¶ | skipping to change at page 2, line 15 ¶ | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
1.1. Requirements Notation and Conventions . . . . . . . . . . 2 | 1.1. Requirements Notation and Conventions . . . . . . . . . . 2 | |||
2. RSASSA-PKCS1-v1_5 Signature Algorithm . . . . . . . . . . . . 3 | 2. RSASSA-PKCS1-v1_5 Signature Algorithm . . . . . . . . . . . . 3 | |||
3. Using secp256k1 with JOSE and COSE . . . . . . . . . . . . . 3 | 3. Using secp256k1 with JOSE and COSE . . . . . . . . . . . . . 3 | |||
3.1. JOSE and COSE secp256k1 Curve Key Representations . . . . 3 | 3.1. JOSE and COSE secp256k1 Curve Key Representations . . . . 3 | |||
3.2. ECDSA Signature with secp256k1 Curve . . . . . . . . . . 4 | 3.2. ECDSA Signature with secp256k1 Curve . . . . . . . . . . 4 | |||
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 | 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 | |||
4.1. COSE Algorithms Registrations . . . . . . . . . . . . . . 4 | 4.1. COSE Algorithms Registrations . . . . . . . . . . . . . . 5 | |||
4.2. COSE Elliptic Curves Registrations . . . . . . . . . . . 5 | 4.2. COSE Elliptic Curves Registrations . . . . . . . . . . . 6 | |||
4.3. JOSE Algorithms Registrations . . . . . . . . . . . . . . 5 | 4.3. JOSE Algorithms Registrations . . . . . . . . . . . . . . 6 | |||
4.4. JSON Web Key Elliptic Curves Registrations . . . . . . . 5 | 4.4. JSON Web Key Elliptic Curves Registrations . . . . . . . 6 | |||
5. Security Considerations . . . . . . . . . . . . . . . . . . . 6 | 5. Security Considerations . . . . . . . . . . . . . . . . . . . 6 | |||
5.1. RSA Key Size Security Considerations . . . . . . . . . . 6 | 5.1. RSA Key Size Security Considerations . . . . . . . . . . 6 | |||
5.2. RSASSA-PKCS1-v1_5 with SHA-2 Security Considerations . . 6 | 5.2. RSASSA-PKCS1-v1_5 with SHA-2 Security Considerations . . 7 | |||
5.3. RSASSA-PKCS1-v1_5 with SHA-1 Security Considerations . . 6 | 5.3. RSASSA-PKCS1-v1_5 with SHA-1 Security Considerations . . 7 | |||
5.4. secp256k1 Security Considerations . . . . . . . . . . . . 6 | 5.4. secp256k1 Security Considerations . . . . . . . . . . . . 7 | |||
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 | 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
6.1. Normative References . . . . . . . . . . . . . . . . . . 7 | 6.1. Normative References . . . . . . . . . . . . . . . . . . 7 | |||
6.2. Informative References . . . . . . . . . . . . . . . . . 8 | 6.2. Informative References . . . . . . . . . . . . . . . . . 8 | |||
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 9 | Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
Document History . . . . . . . . . . . . . . . . . . . . . . . . 9 | Document History . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 | Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
1. Introduction | 1. Introduction | |||
This specification defines how to use several algorithms with COSE | This specification defines how to use several algorithms with COSE | |||
[RFC8152] that are used by implementations of the W3C Web | [RFC8152] that are used by implementations of the W3C Web | |||
Authentication (WebAuthn) [WebAuthn] and FIDO2 Client to | Authentication (WebAuthn) [WebAuthn] and FIDO2 Client to | |||
Authenticator Protocol (CTAP) [CTAP] specifications. These | Authenticator Protocol (CTAP) [CTAP] specifications. These | |||
algorithms are registered in the IANA "COSE Algorithms" registry | algorithms are registered in the IANA "COSE Algorithms" registry | |||
[IANA.COSE.Algorithms] and also in the IANA "JSON Web Signature and | [IANA.COSE.Algorithms] and also in the IANA "JSON Web Signature and | |||
Encryption Algorithms" registry [IANA.JOSE.Algorithms], when not | Encryption Algorithms" registry [IANA.JOSE.Algorithms], when not | |||
skipping to change at page 3, line 22 ¶ | skipping to change at page 3, line 22 ¶ | |||
Implementations need to check that the key type is 'RSA' when | Implementations need to check that the key type is 'RSA' when | |||
creating or verifying a signature. | creating or verifying a signature. | |||
The RSASSA-PKCS1-v1_5 algorithms specified in this document are in | The RSASSA-PKCS1-v1_5 algorithms specified in this document are in | |||
the following table. | the following table. | |||
+-------+-----------------------------+---------+-------------------+ | +-------+-----------------------------+---------+-------------------+ | |||
| Name | Value | Hash | Description | | | Name | Value | Hash | Description | | |||
+-------+-----------------------------+---------+-------------------+ | +-------+-----------------------------+---------+-------------------+ | |||
| RS256 | TBD (temporary assignment | SHA-256 | RSASSA-PKCS1-v1_5 | | | RS256 | TBD (temporary assignment | SHA-256 | RSASSA-PKCS1-v1_5 | | |||
| | -257 already in place) | | w/ SHA-256 | | | | -257 already in place) | | using SHA-256 | | |||
| RS384 | TBD (temporary assignment | SHA-384 | RSASSA-PKCS1-v1_5 | | | RS384 | TBD (temporary assignment | SHA-384 | RSASSA-PKCS1-v1_5 | | |||
| | -258 already in place) | | w/ SHA-384 | | | | -258 already in place) | | using SHA-384 | | |||
| RS512 | TBD (temporary assignment | SHA-512 | RSASSA-PKCS1-v1_5 | | | RS512 | TBD (temporary assignment | SHA-512 | RSASSA-PKCS1-v1_5 | | |||
| | -259 already in place) | | w/ SHA-512 | | | | -259 already in place) | | using SHA-512 | | |||
| RS1 | TBD (temporary assignment | SHA-1 | RSASSA-PKCS1-v1_5 | | | RS1 | TBD (temporary assignment | SHA-1 | RSASSA-PKCS1-v1_5 | | |||
| | -65535 already in place) | | w/ SHA-1 | | | | -65535 already in place) | | using SHA-1 | | |||
+-------+-----------------------------+---------+-------------------+ | +-------+-----------------------------+---------+-------------------+ | |||
Table 1: RSASSA-PKCS1-v1_5 Algorithm Values | Table 1: RSASSA-PKCS1-v1_5 Algorithm Values | |||
3. Using secp256k1 with JOSE and COSE | 3. Using secp256k1 with JOSE and COSE | |||
This section defines algorithm encodings and representations enabling | This section defines algorithm encodings and representations enabling | |||
the Standards for Efficient Cryptography Group (SECG) elliptic curve | the Standards for Efficient Cryptography Group (SECG) elliptic curve | |||
"secp256k1" [SEC2] to be used for JSON Object Signing and Encryption | secp256k1 [SEC2] to be used for JSON Object Signing and Encryption | |||
(JOSE) [RFC7515] and CBOR Object Signing and Encryption (COSE) | (JOSE) [RFC7515] and CBOR Object Signing and Encryption (COSE) | |||
[RFC8152] messages. | [RFC8152] messages. | |||
3.1. JOSE and COSE secp256k1 Curve Key Representations | 3.1. JOSE and COSE secp256k1 Curve Key Representations | |||
The Standards for Efficient Cryptography Group (SECG) elliptic curve | The Standards for Efficient Cryptography Group (SECG) elliptic curve | |||
"secp256k1" [SEC2] is represented in a JSON Web Key (JWK) [RFC7517] | secp256k1 [SEC2] is represented in a JSON Web Key (JWK) [RFC7517] | |||
using these values: | using these values: | |||
o "kty": "EC" | o "kty": "EC" | |||
o "crv": "P-256K" | o "crv": "secp256k1" | |||
plus "x" and "y" values to represent the curve point for the key. | plus "x" and "y" values to represent the curve point for the key. | |||
Other optional values such as "alg" MAY also be present. | Other optional values such as "alg" MAY also be present. | |||
It is represented in a COSE_Key [RFC8152] using these values: | It is represented in a COSE_Key [RFC8152] using these values: | |||
o "kty" (1): "EC2" (2) | o "kty" (1): "EC2" (2) | |||
o "crv" (-1): "P-256K" (TBD - requested assignment 8) | o "crv" (-1): "secp256k1" (TBD - requested assignment 8) | |||
plus "x" (-2) and "y" (-3) values to represent the curve point for | 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 | the key. Other optional values such as "alg" (3) MAY also be | |||
present. | present. | |||
3.2. ECDSA Signature with secp256k1 Curve | 3.2. ECDSA Signature with secp256k1 Curve | |||
The ECDSA signature algorithm is defined in [DSS]. Implementations | The ECDSA signature algorithm is defined in [DSS]. This | |||
need to check that the key type is "EC" for JOSE or "EC2" (2) for | specification defines the use of ECDSA with the secp256k1 curve and | |||
COSE when creating or verifying a signature. | the SHA-256 [DSS] cryptographic hash function. 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: | The ECDSA secp256k1 SHA-256 digital signature is generated as | |||
follows: | ||||
+--------------+---------------------------+------------------------+ | 1. Generate a digital signature of the JWS Signing Input or the COSE | |||
| JOSE Alg | COSE Alg Value | Description | | payload using ECDSA secp256k1 SHA-256 with the desired private | |||
| Name | | | | key. The output will be the pair (R, S), where R and S are | |||
+--------------+---------------------------+------------------------+ | 256-bit unsigned integers. | |||
| ES256K | TBD (requested assignment | ECDSA w/ secp256k1 | | ||||
| | -43) | Curve | | 2. Turn R and S into octet sequences in big-endian order, with each | |||
+--------------+---------------------------+------------------------+ | array being be 32 octets long. The octet sequence | |||
representations MUST NOT be shortened to omit any leading zero | ||||
octets contained in the values. | ||||
3. Concatenate the two octet sequences in the order R and then S. | ||||
(Note that many ECDSA implementations will directly produce this | ||||
concatenation as their output.) | ||||
4. The resulting 64-octet sequence is the JWS Signature or COSE | ||||
signature value. | ||||
The ECDSA secp256k1 SHA-256 algorithm specified in this document uses | ||||
these identifiers: | ||||
+------------+------------------------+-----------------------------+ | ||||
| JOSE Alg | COSE Alg Value | Description | | ||||
| Name | | | | ||||
+------------+------------------------+-----------------------------+ | ||||
| ES256K | TBD (requested | ECDSA using secp256k1 curve | | ||||
| | assignment -43) | and SHA-256 | | ||||
+------------+------------------------+-----------------------------+ | ||||
Table 2: ECDSA Algorithm Values | Table 2: ECDSA Algorithm Values | |||
4. IANA Considerations | 4. IANA Considerations | |||
4.1. COSE Algorithms Registrations | 4.1. COSE Algorithms Registrations | |||
This section registers the following values in the IANA "COSE | This section registers the following values in the IANA "COSE | |||
Algorithms" registry [IANA.COSE.Algorithms]. | Algorithms" registry [IANA.COSE.Algorithms]. | |||
o Name: RS256 | o Name: RS256 | |||
o Value: TBD (temporary assignment -257 already in place) | o Value: TBD (temporary assignment -257 already in place) | |||
o Description: RSASSA-PKCS1-v1_5 w/ SHA-256 | o Description: RSASSA-PKCS1-v1_5 using SHA-256 | |||
o Reference: Section 2 of this document | o Reference: Section 2 of this document | |||
o Recommended: No | o Recommended: No | |||
o Name: RS384 | o Name: RS384 | |||
o Value: TBD (temporary assignment -258 already in place) | o Value: TBD (temporary assignment -258 already in place) | |||
o Description: RSASSA-PKCS1-v1_5 w/ SHA-384 | o Description: RSASSA-PKCS1-v1_5 using SHA-384 | |||
o Reference: Section 2 of this document | o Reference: Section 2 of this document | |||
o Recommended: No | o Recommended: No | |||
o Name: RS512 | o Name: RS512 | |||
o Value: TBD (temporary assignment -259 already in place) | o Value: TBD (temporary assignment -259 already in place) | |||
o Description: RSASSA-PKCS1-v1_5 w/ SHA-512 | o Description: RSASSA-PKCS1-v1_5 using SHA-512 | |||
o Reference: Section 2 of this document | o Reference: Section 2 of this document | |||
o Recommended: No | o Recommended: No | |||
o Name: RS1 | o Name: RS1 | |||
o Value: TBD (temporary assignment -65535 already in place) | o Value: TBD (temporary assignment -65535 already in place) | |||
o Description: RSASSA-PKCS1-v1_5 w/ SHA-1 | o Description: RSASSA-PKCS1-v1_5 using SHA-1 | |||
o Reference: Section 2 of this document | o Reference: Section 2 of this document | |||
o Recommended: Deprecated | o Recommended: Deprecated | |||
o Name: ES256K | o Name: ES256K | |||
o Value: TBD (requested assignment -43) | o Value: TBD (requested assignment -43) | |||
o Description: ECDSA w/ secp256k1 Curve | o Description: ECDSA using secp256k1 curve and SHA-256 | |||
o Reference: Section 3.2 of this document | o Reference: Section 3.2 of this document | |||
o Recommended: Yes | o Recommended: Yes | |||
4.2. COSE Elliptic Curves Registrations | 4.2. COSE Elliptic Curves Registrations | |||
This section registers the following value in the IANA "COSE Elliptic | This section registers the following value in the IANA "COSE Elliptic | |||
Curves" registry [IANA.COSE.Curves]. | Curves" registry [IANA.COSE.Curves]. | |||
o Name: P-256K | o Name: secp256k1 | |||
o Value: TBD (requested assignment 8) | o Value: TBD (requested assignment 8) | |||
o Key Type: EC2 | o Key Type: EC2 | |||
o Description: SECG secp256k1 Curve | o Description: SECG secp256k1 curve | |||
o Change Controller: IESG | o Change Controller: IESG | |||
o Reference: Section 3.1 of [[ this specification ]] | o Reference: Section 3.1 of [[ this specification ]] | |||
o Recommended: Yes | o Recommended: Yes | |||
4.3. JOSE Algorithms Registrations | 4.3. JOSE Algorithms Registrations | |||
This section registers the following value in the IANA "JSON Web | This section registers the following value in the IANA "JSON Web | |||
Signature and Encryption Algorithms" registry [IANA.JOSE.Algorithms]. | Signature and Encryption Algorithms" registry [IANA.JOSE.Algorithms]. | |||
o Algorithm Name: ES256K | o Algorithm Name: ES256K | |||
o Algorithm Description: ECDSA w/ secp256k1 Curve | o Algorithm Description: ECDSA using secp256k1 curve and SHA-256 | |||
o Algorithm Usage Locations: alg | o Algorithm Usage Locations: alg | |||
o JOSE Implementation Requirements: Optional | o JOSE Implementation Requirements: Optional | |||
o Change Controller: IESG | o Change Controller: IESG | |||
o Reference: Section 3.2 of [[ this specification ]] | o Reference: Section 3.2 of [[ this specification ]] | |||
o Algorithm Analysis Document(s): [SEC2] | o Algorithm Analysis Document(s): [SEC2] | |||
4.4. JSON Web Key Elliptic Curves Registrations | 4.4. JSON Web Key Elliptic Curves Registrations | |||
This section registers the following value in the IANA "JSON Web Key | This section registers the following value in the IANA "JSON Web Key | |||
Elliptic Curve" registry [IANA.JOSE.Curves]. | Elliptic Curve" registry [IANA.JOSE.Curves]. | |||
o Curve Name: P-256K | o Curve Name: secp256k1 | |||
o Curve Description: SECG secp256k1 Curve | o Curve Description: SECG secp256k1 curve | |||
o JOSE Implementation Requirements: Optional | o JOSE Implementation Requirements: Optional | |||
o Change Controller: IESG | o Change Controller: IESG | |||
o Specification Document(s): Section 3.1 of [[ this specification ]] | o Specification Document(s): Section 3.1 of [[ this specification ]] | |||
5. Security Considerations | 5. Security Considerations | |||
5.1. RSA Key Size Security Considerations | 5.1. RSA Key Size Security Considerations | |||
The security considerations on key sizes for RSA algorithms from | The security considerations on key sizes for RSA algorithms from | |||
Section 6.1 of [RFC8230] also apply to the RSA algorithms in this | Section 6.1 of [RFC8230] also apply to the RSA algorithms in this | |||
skipping to change at page 9, line 15 ¶ | skipping to change at page 9, line 42 ¶ | |||
[WebAuthn] | [WebAuthn] | |||
Balfanz, D., Czeskis, A., Hodges, J., Jones, J., Jones, | Balfanz, D., Czeskis, A., Hodges, J., Jones, J., Jones, | |||
M., Kumar, A., Liao, A., Lindemann, R., and E. Lundberg, | M., Kumar, A., Liao, A., Lindemann, R., and E. Lundberg, | |||
"Web Authentication: An API for accessing Public Key | "Web Authentication: An API for accessing Public Key | |||
Credentials - Level 1", World Wide Web Consortium | Credentials - Level 1", World Wide Web Consortium | |||
(W3C) Recommendation, March 2019, | (W3C) Recommendation, March 2019, | |||
<https://www.w3.org/TR/2019/REC-webauthn-1-20190304/>. | <https://www.w3.org/TR/2019/REC-webauthn-1-20190304/>. | |||
Acknowledgements | Acknowledgements | |||
Thanks to John Fontana, Jeff Hodges, Tony Nadalin, Jim Schaad, Goeran | Thanks to Stephen Farrell, John Fontana, Jeff Hodges, John Mattsson, | |||
Selander, Wendy Seltzer, Sean Turner, and Samuel Weiler for their | Tony Nadalin, Matt Palmer, Jim Schaad, Goeran Selander, Wendy | |||
roles in registering these algorithm identifiers. | Seltzer, Sean Turner, and Samuel Weiler for their roles in | |||
registering these algorithm identifiers. | ||||
Document History | Document History | |||
[[ to be removed by the RFC Editor before publication as an RFC ]] | [[ to be removed by the RFC Editor before publication as an RFC ]] | |||
-01 | ||||
o Changed the JOSE curve identifier from "P-256K" to "secp256k1". | ||||
o Specified that secp256k1 signing is done using the SHA-256 hash | ||||
function. | ||||
-00 | -00 | |||
o Created the initial working group draft from draft-jones-cose- | o Created the initial working group draft from draft-jones-cose- | |||
additional-algorithms-00, changing only the title, date, and | additional-algorithms-00, changing only the title, date, and | |||
history entry. | history entry. | |||
Author's Address | Author's Address | |||
Michael B. Jones | Michael B. Jones | |||
Microsoft | Microsoft | |||
End of changes. 28 change blocks. | ||||
46 lines changed or deleted | 76 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |