Internet DRAFT - draft-amringer-jose-ecdh-ss

draft-amringer-jose-ecdh-ss







(No Working Group)                                           G. Amringer
Internet-Draft                                          January 12, 2020
Intended status: Informational
Expires: July 15, 2020


 Use of Static-Static ECDH in JSON Object Signing and Encryption (JOSE)
                     draft-amringer-jose-ecdh-ss-00

Abstract

   This document defines how to use the Static-Static mode of ECDH in
   JSON Object Signing and Encryption (JOSE).

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 July 15, 2020.

Copyright Notice

   Copyright (c) 2020 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.






Amringer                  Expires July 15, 2020                 [Page 1]

Internet-Draft                                              January 2020


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Notation and Conventions  . . . . . . . . . . . . . . . .   2
   2.  Key Agreement with Elliptic Curve Diffie-Hellman Static-
       Static  . . . . . . . . . . . . . . . . . . . . . . . . . . .   2
     2.1.  Header Parameters Used for ECDH Key Agreement . . . . . .   3
       2.1.1.  "spk" (Sender Public Key) Header Parameter  . . . . .   3
       2.1.2.  "apu" (Agreement PartyUInfo) Header Parameter . . . .   3
     2.2.  Header Parameters Used for Key Encryption . . . . . . . .   4
       2.2.1.  "iv" (Initialization Vector) Header Parameter . . . .   4
       2.2.2.  "tag" (Authentication Tag) Header Parameter . . . . .   4
   3.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
   4.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     4.1.  Normative References  . . . . . . . . . . . . . . . . . .   5
     4.2.  Informative References  . . . . . . . . . . . . . . . . .   6
     4.3.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .   6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1.  Introduction

   The Internet Research Task Force (IRTF) JOSE Working Group defined
   the ECDH-ES as a key agreement mechanism in the JOSE context.  This
   document defines how to use the ECDH key agreement mechanism in
   Static-Static mode in JOSE in an interoperable manner.

   This document defines the conventions to use in the context of
   [RFC7516]

1.1.  Notation and Conventions

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

   The JOSE key format ("JSON Web Key (JWK)") is defined by [RFC7517]
   and thumbprints for it ("JSON Web Key (JWK) Thumbprint") in
   [RFC7638].

2.  Key Agreement with Elliptic Curve Diffie-Hellman Static-Static

   This section defines the specifics of key agreement with Elliptic
   Curve Diffie-Hellman Static-Static, in combination with the Concat
   KDF, as defined in Section 5.8.2.1 of NIST.800-56A [1] for use as a
   symmetric key to wrap the CEK with the "C20PKW", "XC20PKW", "A128KW",
   "A192KW", "A256KW" algorithms, in the Key Agreement with Key Wrapping
   mode.




Amringer                  Expires July 15, 2020                 [Page 2]

Internet-Draft                                              January 2020


   This mode is used as defined as the atlernate way for ECDH-ES in
   Section 4.6.2 of RFC7518 [2] where the "apu" parameter MUST represent
   a random 512-bit value (analogous to PartyAInfo in Ephemeral-Static
   mode in [RFC2631]).

   The following "alg" (algorithm) Header Parameter values are used to
   indicate that the JWE Encrypted Key is the result of encrypting the
   CEK using the corresponding algorithm:

   +-----------------+-------------------------------------------------+
   |   "alg" value   |             Key Management Algorithm            |
   +-----------------+-------------------------------------------------+
   |     ECDH-SS     |  ECDH-SS using Concat KDF for use directly as a |
   |                 |                  symmetric key                  |
   |  ECDH-SS+C20PKW |  ECDH-SS using Concat KDF and CEK wrapped with  |
   |                 |                      C20PKW                     |
   | ECDH-SS+XC20PKW |  ECDH-SS using Concat KDF and CEK wrapped with  |
   |                 |                     XC20PKW                     |
   |  ECDH-SS+A128KW |  ECDH-SS using Concat KDF and CEK wrapped with  |
   |                 |                      A128KW                     |
   |  ECDH-SS+A192KW |  ECDH-SS using Concat KDF and CEK wrapped with  |
   |                 |                      A192KW                     |
   |  ECDH-SS+A256KW |  ECDH-SS using Concat KDF and CEK wrapped with  |
   |                 |                      A256KW                     |
   +-----------------+-------------------------------------------------+

2.1.  Header Parameters Used for ECDH Key Agreement

   The following Header Parameters are used.

2.1.1.  "spk" (Sender Public Key) Header Parameter

   The "spk" (sender public key) value created by the originator for the
   use in key agreement algorithms.  This key is represented either
   directly as a JSON Web Key [JWK] public key value, or encapsulated
   inside a JWE encoded using the compact serialization.  The JWK MUST
   contain only public key parameters and SHOULD contain only the
   minimum JWK parameters necessary to represent the key; other JWK
   parameters included can be checked for consistency and honored, or
   they can be ignored.  This Header Parameter MUST be present and MUST
   be understood and processed by implementations when an algorithm from
   this document is used.

2.1.2.  "apu" (Agreement PartyUInfo) Header Parameter

   The "apu" (agreement PartyUInfo) value for key agreement, represented
   as a base64url-encoded string.  Its value contains a random 512-bit
   value.  Use of this Header Parameter is REQUIRED.  This Header



Amringer                  Expires July 15, 2020                 [Page 3]

Internet-Draft                                              January 2020


   Parameter MUST be understood and processed by implementations when an
   algorithm from this document is used.

2.2.  Header Parameters Used for Key Encryption

   The following Header Parameters are used when the chosen "alg"
   algorithm includes a key encryption step.

2.2.1.  "iv" (Initialization Vector) Header Parameter

   The "iv" (initialization vector) Header Parameter value is the
   base64url-encoded representation of the 96-bit or 192-bit nonce value
   used for the key encryption operation.  This Header Parameter MUST be
   present and MUST be understood and processed by implementations when
   an algorithm from this document is used.

2.2.2.  "tag" (Authentication Tag) Header Parameter

   The "tag" (authentication tag) Header Parameter value is the
   base64url-encoded representation of the 128-bit Authentication Tag
   value resulting from the key encryption operation.  This Header
   Parameter MUST be present and MUST be understood and processed by
   implementations when these algorithms are used.

3.  IANA Considerations

   The following is added to the "JSON Web Signature and Encryption
   Algorithms" registry:

   o Algorithm Name: "ECDH-SS" o Algorithm Description: ECDH-SS using
   Concat KDF o Algorithm Usage Location(s): "alg" o JOSE Implementation
   Requirements: Optional o Change Controller: IESG o Specification
   Document(s): Section 2 of [RFC-THIS] o Algorithm Analysis
   Documents(s): [RFC8439]

   o Algorithm Name: "ECDH-SS+C20PKW" o Algorithm Description: ECDH-SS
   using Concat KDF and "C20PKW" o Algorithm Usage Location(s): "alg" o
   JOSE Implementation Requirements: Optional o Change Controller: IESG
   o Specification Document(s): Section 2 of [RFC-THIS] o Algorithm
   Analysis Documents(s): [I-D.irtf-cfrg-xchacha]

   o Algorithm Name: "ECDH-SS+XC20PKW" o Algorithm Description: ECDH-SS
   using Concat KDF and "XC20PKW" o Algorithm Usage Location(s): "alg" o
   JOSE Implementation Requirements: Optional o Change Controller: IESG
   o Specification Document(s): Section 2 of [RFC-THIS] o Algorithm
   Analysis Documents(s): [I-D.irtf-cfrg-xchacha]





Amringer                  Expires July 15, 2020                 [Page 4]

Internet-Draft                                              January 2020


   o Algorithm Name: "ECDH-SS+A128KW" o Algorithm Description: ECDH-SS
   using Concat KDF and "A128KW" o Algorithm Usage Location(s): "alg" o
   JOSE Implementation Requirements: Optional o Change Controller: IESG
   o Specification Document(s): Section 2 of [RFC-THIS] o Algorithm
   Analysis Documents(s): [I-D.irtf-cfrg-xchacha]

   o Algorithm Name: "ECDH-SS+A192KW" o Algorithm Description: ECDH-SS
   using Concat KDF and "A192KW" o Algorithm Usage Location(s): "alg" o
   JOSE Implementation Requirements: Optional o Change Controller: IESG
   o Specification Document(s): Section 2 of [RFC-THIS] o Algorithm
   Analysis Documents(s): [I-D.irtf-cfrg-xchacha]

   o Algorithm Name: "ECDH-SS+A256KW" o Algorithm Description: ECDH-SS
   using Concat KDF and "A256KW" o Algorithm Usage Location(s): "alg" o
   JOSE Implementation Requirements: Optional o Change Controller: IESG
   o Specification Document(s): Section 2 of [RFC-THIS] o Algorithm
   Analysis Documents(s): [I-D.irtf-cfrg-xchacha]

4.  References

4.1.  Normative References

   [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>.

   [RFC2631]  Rescorla, E., "Diffie-Hellman Key Agreement Method",
              RFC 2631, DOI 10.17487/RFC2631, June 1999,
              <https://www.rfc-editor.org/info/rfc2631>.

   [RFC7516]  Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)",
              RFC 7516, DOI 10.17487/RFC7516, May 2015,
              <https://www.rfc-editor.org/info/rfc7516>.

   [RFC7517]  Jones, M., "JSON Web Key (JWK)", RFC 7517,
              DOI 10.17487/RFC7517, May 2015,
              <https://www.rfc-editor.org/info/rfc7517>.

   [RFC7638]  Jones, M. and N. Sakimura, "JSON Web Key (JWK)
              Thumbprint", RFC 7638, DOI 10.17487/RFC7638, September
              2015, <https://www.rfc-editor.org/info/rfc7638>.

   [RFC8439]  Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF
              Protocols", RFC 8439, DOI 10.17487/RFC8439, June 2018,
              <https://www.rfc-editor.org/info/rfc8439>.





Amringer                  Expires July 15, 2020                 [Page 5]

Internet-Draft                                              January 2020


4.2.  Informative References

   [I-D.irtf-cfrg-xchacha]
              Arciszewski, S., "XChaCha: eXtended-nonce ChaCha and
              AEAD_XChaCha20_Poly1305", draft-irtf-cfrg-xchacha-01 (work
              in progress), July 2019.

4.3.  URIs

   [1] https://csrc.nist.gov/publications/detail/sp/800-56a/rev-3/final

   [2] https://tools.ietf.org/html/rfc7518#section-4.6.2

Author's Address

   Guillaume Amringer
   Canada

   Email: g.amringer@gmail.com
































Amringer                  Expires July 15, 2020                 [Page 6]