<?xml version="1.0" encoding="UTF-8"?>

<!-- [CS] updated by Chris 10/18/22 -->

<!-- draft submitted in xml v3 -->

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 3.1.2) -->

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-lamps-documentsigning-eku-06" number="0000" submissionType="IETF" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" updates="" obsoletes="" xml:lang="en" version="3">

  <!-- xml2rfc v2v3 conversion 3.14.2 -->
  <front>
    <title abbrev="EKU for Document Signing">General Purpose Extended Key Usage (EKU) for Document Signing X.509 Certificates</title>
    <seriesInfo name="RFC" value="0000"/>
    <author initials="T." surname="Ito" fullname="Tadahiko Ito">
      <organization>SECOM CO., LTD.</organization>
      <address>
        <email>tadahiko.ito.public@gmail.com</email>
      </address>
    </author>
    <author initials="T." surname="Okubo" fullname="Tomofumi Okubo">
      <organization>DigiCert, Inc.</organization>
      <address>
        <email>tomofumi.okubo+ietf@gmail.com</email>
      </address>
    </author>
    <author initials="S." surname="Turner" fullname="Sean Turner">
      <organization>sn3rd</organization>
      <address>
        <email>sean@sn3rd.com</email>
      </address>
    </author>
    <date year="2022" month="October"/>
    <area>sec</area>
    <workgroup>lamps</workgroup>

<!-- [rfced] Please insert any keywords (beyond those that appear in the title) for use on https://www.rfc-editor.org/search. -->

<keyword>example</keyword>

    <abstract>
      <t>RFC 5280 specifies several extended key purpose identifiers
(KeyPurposeIds) for X.509 certificates. This document defines a general
purpose document signing KeyPurposeId for inclusion in the Extended Key
Usage (EKU) extension of X.509 public key certificates.
Document Signing applications may require that the EKU extension
be present and that a document signing KeyPurposeId be indicated
in order for the certificate to be acceptable
to that Document Signing application.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t><xref target="RFC5280"/> specifies several extended key purpose identifiers
(KeyPurposeIds) for X.509 certificates. In addition, several
KeyPurposeIds have been added under the IANA repository "SMI
Security for PKIX Extended Key Purpose" <xref target="RFC7299"/>. While usage of the
"anyExtendedKeyUsage" KeyPurposeId is bad practice for publicly trusted
certificates, there is no public and general KeyPurposeId explicitly
assigned for Document Signing. The current practice is to
use id-kp-emailProtection, id-kp-codeSigning or a vendor-defined
KeyPurposeId for general document signing purposes.</t>
      <t>In circumstances where code signing and S/MIME certificates are also
used for document signing, technical or policy changes made to the
code signing and S/MIME ecosystem may cause unexpected behaviors or
have an adverse impact such as decreased cryptographic
agility on the document signing ecosystem and vice versa.</t>
      <t>Vendor-defined KeyPurposeIds that are used in a PKI governed by the
vendor or a group of vendors poses no interoperability concern.
Appropriating, or misappropriating as the case may be, KeyPurposeIDs
for use outside of their originally intended vendor or group of vendors
controlled environment can introduce problems, the impact of which is
difficult to determine.</t>
      <t>Therefore, it is not favorable to use a vendor-defined KeyPurposeId for
signing a document that is not governed by the vendor.</t>
      <t>This document defines an extended key purpose identifier for Document
Signing.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </section>
    <section anchor="extended-key-purpose-for-document-signing">
      <name>Extended Key Purpose for Document Signing</name>
      <t>This specification defines the KeyPurposeId id-kp-documentSigning.</t>
      <t>As described in <xref target="RFC5280"/>, "[i]f the [Extended Key Usage] extension is present,
then the certificate <bcp14>MUST</bcp14> only be used for one of the purposes indicated."
<xref target="RFC5280"/> also describes that "[i]f multiple [key] purposes are indicated
the application need not recognize all purposes indicated,
as long as the intended purpose is present."</t>
      <t>Document Signing applications <bcp14>MAY</bcp14> require that the Extended Key Usage extension be present
and that the id-kp-documentSigning be indicated in order for the certificate to be acceptable
to that Document Signing application.</t>
      <t>The term "Document Signing" in this document refers to digitally signing
contents that are consumed by people. To be more precise, contents are
intended to be shown to a person with printable or displayable form by
means of services or software, rather than primarily processed by
machines.</t>
      <section anchor="ext">
        <name>Including the Extended Key Purpose for Document Signing in Certificates</name>
        <t><xref target="RFC5280"/> specifies the EKU X.509 certificate extension for use on the
Internet. The extension indicates one or more purposes for which the
certified public key is valid. The EKU extension can be used in
conjunction with the key usage extension, which indicates the set of
basic cryptographic operations for which the certified key may be used.</t>
        <t>The EKU extension syntax is repeated here for convenience:</t>
        <sourcecode type=""><![CDATA[
  ExtKeyUsageSyntax  ::=  SEQUENCE SIZE (1..MAX) OF KeyPurposeId
  KeyPurposeId  ::=  OBJECT IDENTIFIER
]]></sourcecode>
        <t>As described in <xref target="RFC5280"/>, EKU extension may,
at the option of the certificate issuer, be either critical or non-critical.</t>
        <t>This specification defines the KeyPurposeId id-kp-documentSigning.
Inclusion of this KeyPurposeId in a certificate indicates that the
public key encoded in the certificate has been certified to be used for
cryptographic operations on contents that are consumed by people.</t>
        <sourcecode><![CDATA[
  id-kp  OBJECT IDENTIFIER  ::=
      { iso(1) identified-organization(3) dod(6) internet(1)
        security(5) mechanisms(5) pkix(7) 3 }
  id-kp-documentSigning  OBJECT IDENTIFIER  ::=  { id-kp 36 }
]]></sourcecode>
      </section>
    </section>
    <section anchor="using-the-extended-key-purpose-for-document-signing-in-a-certificate">
      <name>Using the Extended Key Purpose for Document Signing in a Certificate</name>
      <t>Our intended use case is people consuming the contents of signed
documents. To be more precise, contents are intended to be
shown to a person in a printable or displayable form by means of services
or software, rather than processed by machines. The digital signature on
the contents is to indicate to the recipient of the contents that the
content has not changed since it was signed by the identity indicated as
the subject of the certificate. To validate the digital signature which
is signed on contents intended to be consumed by people, implementations
<bcp14>MAY</bcp14> perform the steps below during certificate validation:</t>
      <t>The following procedure is used to examine the KeyPurposeId(s) included in the
Extended Key Usage extension.
Restrictions on Extended Key Usage is derived and implemented from
(or configured with) the policy to which the implementation conforms.</t>
      <ul spacing="normal">
        <li>If there are no restrictions set for the relying party and the
relying party software, the certificate is acceptable.</li>
        <li>
          <t>If there are restrictions set for the relying party and relying
party software, then process the KeyPurposeId(s) as described below.  </t>
          <t>
This procedure is intended to permit or prohibit presence of a
certain KeyPurposeId or complete absence of KeyPurposeIds. It is
outside the scope of this document, but the relying party can permit
or prohibit combinations of KeyPurposeIds, instead of a single
KeyPurposeId.
A consideration on
prohibiting combinations of KeyPurposeIds is described in the
Security Considerations section of this document.
If both "Excluded KeyPurposeId" and "Permitted KeyPurposeId" exists,
the relying party or the relying party software processes each restriction
on "Excluded KeyPurposeId" first, and then processes each restriction on
"Permitted KeyPurposeId".  </t>
          <dl>
            <dt>Excluded KeyPurposeId procedure:</dt>
            <dd>
              <t>"Excluded KeyPurposeId" is a
KeyPurposeId which the relying party or the relying party software
prohibits. Examples of "Excluded KeyPurposeId" are, presence of the
anyExtendedKeyUsage KeyPurposeId or complete absence of the EKU
extension in a certificate. If a KeyPurposeId of the certificate
meets the conditions set by the "Excluded KeyPurposeId" restriction,
the relying party or the relying party software rejects the
certificate.</t>
            </dd>
            <dt>Permitted KeyPurposeId procedure:</dt>
            <dd>
              <t>"Permitted KeyPurposeId" is a KeyPurposeId which the relying party or
the relying party software accepts. Examples of "Permitted
KeyPurposeId" are, presence of this general document signing
KeyPurposeId and/or protocol specific document signing-type
KeyPurposeIds. If a KeyPurposeId of the certificate meets the
condition set by a "Permitted KeyPurposeId" restriction, the
certificate is acceptable. Otherwise, relying party or the relying
party software rejects the certificate.</t>
            </dd>
          </dl>
        </li>
      </ul>
      <t>When a single application has the capability to process various data
formats, the software may choose to make the excluded and permitted
decisions separately in accordance with the format it is handling (e.g.,
TEXT, PDF).</t>
    </section>
    <section anchor="implications-for-a-certification-authority">
      <name>Implications for a Certification Authority</name>
      <t>The procedures and practices employed by a certification authority <bcp14>MUST</bcp14>
ensure that the correct values for the EKU extension are inserted in
each certificate that is issued. Unless certificates are governed by a
vendor(s) specific PKI, certificates that indicate usage
for document signing <bcp14>MAY</bcp14> include the id-kp-documentSigning KeyPurposeId.
The inclusion of the id-kp-documentSigning KeyPurposeId does not
preclude the inclusion of other KeyPurposeIds.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The usage of id-kp-documentSigning KeyPurposeId is to provide an
alternative to id-kp-emailProtection being used for non-email purposes
and id-kp-codeSigning being used to sign objects other than binary code.
This extended key purpose does not introduce new security risks but
instead reduces existing security risks by providing means to separate
other extended key purposes used for communication protocols namely,
TLS (id-kp-clientAuth) or S/MIME (id-kp-emailProtection) etc.
in order to minimize the risk of cross-protocol attacks.</t>
      <t>To reduce the risk of specific cross-protocol attacks, the relying party
or relying party software may additionally prohibit use of specific
combinations of KeyPurposeIds.</t>
      <t>While a specific protocol or signing scheme may choose to come up with
their own KeyPurposeIds, some may not have significant motive or
resources to set up and manage their own KeyPurposeIds. This general
document signing KeyPurposeId may be used as a stop-gap for those that
intend to define their own document signing KeyPurposeId or those who do not intend to
set up a KeyPurposeId but still would like to distinguish document
signing from other usages.</t>
      <t>Introduction of this id-kp-documentSigning KeyPurposeId does not
introduce any new security or privacy concerns.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>IANA made one assignment for the id-kp-
documentSigning object identifier (OID), as defined in <xref target="ext"/>, in the "SMI
Security for PKIX Extended Key Purpose" (1.3.6.1.5.5.7.3) registry. The other
assignment was made for the id-mod-docsign-eku ASN.1
module <xref target="X.680"/> object identifier (OID), as defined in <xref target="asn1-module"/>, in the "SMI
Security for PKIX Module Identifier" (1.3.6.1.5.5.7.0) registry.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

<!-- [X.680] URL https://www.iso.org/standard/68350.html -->

        <reference anchor="X.680">
          <front>
            <title>Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2015" month="November"/>
          </front>
          <seriesInfo name="ISO/IEC" value="8824-1:2015"/>
        </reference>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>

      </references>
      <references>
        <name>Informative References</name>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7299.xml"/>

      </references>
    </references>
    <section numbered="true" anchor="asn1-module">
      <name>ASN.1 Module</name>
      <t>The following ASN.1 module provides the complete definition of the
Document Signing KeyPurposeId.</t>
      <sourcecode type="asn.1"><![CDATA[
  DocSignEKU { iso(1) identified-organization(3) dod(6) internet(1)
    security(5) mechanisms(5) pkix(7) id-mod(0)
    id-mod-docsign-eku(104) }

  DEFINITIONS EXPLICIT TAGS ::=

  BEGIN

  -- EXPORTS ALL --

  -- IMPORTS NOTHING --

  -- OID Arc --

  id-kp  OBJECT IDENTIFIER  ::= {
    iso(1) identified-organization(3) dod(6) internet(1)
    security(5) mechanisms(5) pkix(7) kp(3) }

  -- Document Signing Extended Key Usage --

  id-kp-documentSigning OBJECT IDENTIFIER ::= { id-kp 36 }

  END
]]></sourcecode>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>We would like to thank <contact fullname="Russ Housley"/> for verifying the ASN.1 module.
Additionally, we would like to thank <contact fullname="Corey Bonnell"/>, <contact fullname="Wendy Brown"/>, <contact fullname="Russ
Housley"/>, <contact fullname="Prachi Jain"/>, and <contact fullname="Stefan Santesson"/> for their comments.</t>
    </section>
  </back>

</rfc>
