Using secp256k1 with JOSE and COSE
Microsoft
mbj@microsoft.com
http://self-issued.info/
Security
WebAuthn Working Group
Cryptography
Digital Signature
Encryption
Internet-Draft
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.
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.
The elliptic curve and associated algorithm are registered in
appropriate IANA JOSE and COSE registries.
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 when, and
only when, they appear in all capitals, as shown here.
The Standards for Efficient Cryptography Group (SECG) elliptic curve
"secp256k1" is represented in
a JSON Web Key (JWK) using these values:
kty: EC
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.
It is represented in a COSE_Key using these values:
kty (1): EC2 (2)
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.
The ECDSA signature algorithm is defined in .
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 Name
COSE Alg Value
Description
ES256K
TBD (requested assignment -43)
ECDSA w/ secp256k1 Curve
This section registers the following value in the
IANA "JSON Web Key Elliptic Curve" registry .
Curve Name: P-256K
Curve Description: SECG secp256k1 Curve
JOSE Implementation Requirements: Optional
Change Controller: IESG
Specification Document(s): of [[ this specification ]]

This section registers the following value in the
IANA "JSON Web Signature and Encryption Algorithms" registry .
Algorithm Name: ES256K
Algorithm Description: ECDSA w/ secp256k1 Curve
Algorithm Usage Locations: alg
JOSE Implementation Requirements: Optional
Change Controller: IESG
Reference: of [[ this specification ]]
Algorithm Analysis Document(s):

This section registers the following value in the
IANA "COSE Elliptic Curves" registry .
Name: P-256K
Value: TBD (requested assignment 8)
Key Type: EC2
Description: SECG secp256k1 Curve
Change Controller: IESG
Reference: of [[ this specification ]]
Recommended: Yes

This section registers the following value in the
IANA "COSE Algorithms" registry .
Name: ES256K
Value: TBD (requested assignment -43)
Description: ECDSA w/ secp256k1 Curve
Reference: of this document
Recommended: Yes

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
, , and
specifications apply to implementations of this specification.
Digital Signature Standard (DSS)
National Institute of Standards and
Technology (NIST)
SEC 1: Elliptic Curve Cryptography
Standards for Efficient Cryptography Group
SEC 2: Recommended Elliptic Curve Domain Parameters
Standards for Efficient Cryptography Group
JSON Web Signature and Encryption Algorithms
IANA
JSON Web Key Elliptic Curve
IANA
COSE Algorithms
IANA
COSE Elliptic Curves
IANA
[[ to be removed by the RFC Editor before publication as an RFC ]]
-00
Initial version.