<?xml version="1.0" encoding="US-ASCII"?>
<!-- This ID was written based on the davies-template-bare-06.xml 
    available on https://tools.ietf.org/tools/templates/
    The template was designed for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org . -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2985 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2985.xml">
<!ENTITY RFC2986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2986.xml">
<!ENTITY RFC4210 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4210.xml">
<!ENTITY RFC4211 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4211.xml">
<!ENTITY RFC5280 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml">
<!ENTITY RFC5652 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5652.xml">
<!ENTITY RFC5958 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5958.xml">
<!ENTITY RFC6032 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6032.xml">
<!ENTITY RFC6402 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6402.xml">
<!ENTITY I-D.brockhaus-lamps-lightweight-cmp-profile PUBLIC '' 'https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.brockhaus-lamps-lightweight-cmp-profile.xml'>
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc iprnotified="no" ?>
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" 
     updates="4210" 
     docName="draft-ietf-lamps-cmp-updates-00" 
	 ipr="trust200902">

 <front>
    <title abbrev="CMP Updates">CMP Updates</title>

   <!-- add 'role="editor"' below for the editors if appropriate -->
   <!-- Another author who claims to be an editor -->
   <author fullname="Hendrik Brockhaus" initials="H."
           surname="Brockhaus">
      <organization abbrev="Siemens">Siemens AG</organization>
      <address>
       <postal>
         <street>Otto-Hahn-Ring 6</street>
         <code>81739</code>
         <city>Munich</city>
         <country>Germany</country>
       </postal>
       <phone></phone>
       <email>hendrik.brockhaus@siemens.com</email>
	   <uri>http://www.siemens.com/</uri>
      </address>
   </author>
 
	<date year="2020" />
   <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
        in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

   <area>Internet</area>

   <workgroup>LAMPS Working Group</workgroup>
   <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>CMP</keyword>

   <abstract>
     <t>This document contains a set of updates to the base syntax of Certificate Management Protocol (CMP) version 2. This document updates RFC 4210.</t>
	 <t>Specifically, the CMP services updated in this document comprise the enabling of using EnvelopedData instead of EncryptedValue and the definition of extended key usages to identify certificates of CMP endpoints on certification and registration authorities.</t>
   </abstract>
 </front>

 <middle>

 <section anchor="History" title="History of changes">
	<t>From draft-brockhaus-lamps-cmp-updates-03 -> draft-brockhaus-lamps-cmp-updates-03:<list style="symbols">
		<t>Changes required to reflect WG adoption</t>
		<t>Minor changes in wording</t>
		</list></t>
	<t>From version 02 -> 03:<list style="symbols">
		<t>Added some clarification in <xref target="CMP-1.1" /></t>
		</list></t>
	<t>From version 01 -> 02:<list style="symbols">
		<t>Added clarification to section on multiple protection</t>
		<t>Added clarification on new EKUs after some exchange with Tomas Gustavsson</t>
		<t>Reused OIDs from <xref target="RFC6402">RFC&nbsp;6402</xref> as suggested by Sean Turner at IETF 106</t>
		<t>Added clarification on the field containing the key identifier for a revocation passphrase</t>
		<t>Minor changes in wording</t>
		</list></t>
	<t>From version 00 -> 01:<list style="symbols">
		<t>Added a section describing the new extended key usages</t>
		<t>Completed the section on changes to the specification of encrypted values</t>
		<t>Added a section on clarification to Appendix D.4</t>
		<t>Minor generalization in <xref target="RFC4210">RFC&nbsp;4210</xref> Sections 5.1.3.4 and 5.3.22</t>
		<t>Minor changes in wording</t>
		</list></t>
	</section>
  
 <section anchor="Introduction" title="Introduction">
     <t>While using <xref target="RFC4210">CMP</xref> in industrial and IoT environments and developing the <xref target="I-D.brockhaus-lamps-lightweight-cmp-profile">Lightweight CMP Profile</xref> some limitations were identified in the original CMP specification. This document updates <xref target="RFC4210">RFC&nbsp;4210</xref> to overcome these limitations.</t>
	 <t>In general, this document aims to improve the crypto agility of CMP to be flexible to react on future advances in cryptography.</t>
	 <t>This document also introduces new extended key usages to identify CMP endpoints on registration and certification authorities.</t>
	<section anchor="Convention_Terminology" title="Convention and Terminology">
		<t>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 <xref target="RFC2119">RFC&nbsp;2119</xref>.</t>
		<t>In this document, these words will appear with that interpretation only when in ALL CAPS. Lower case uses of these words are not to be interpreted as carrying significance described in RFC&nbsp;2119.</t>
		<t>Technical terminology is used in conformance with <xref target="RFC4210">RFC&nbsp;4210</xref>, <xref target="RFC4211">RFC&nbsp;4211</xref>, and <xref target="RFC5280">RFC&nbsp;5280</xref>. The following key words are used:<list hangIndent="5" style="hanging">
			<t hangText="CA:">Certification authority, which issues certificates.</t>
			<t hangText="RA:">Registration authority, an optional system component to which a CA delegates certificate management functions such as authorization checks.</t>
			<t hangText="KGA:">Key generation authority, which generates key pairs on behalf of an EE. The KGA could be co-located with an RA or a CA.</t>
			<t hangText="EE:">End entity, a user, device, or service that holds a PKI certificate. An identifier for the EE is given as its subject of the certificate.</t>
			</list></t>
		</section>
	</section>

   <section anchor="CMP-Updates" title="Updates to RFC 4210 - Certificate Management Protocol (CMP)">
	<section anchor="CMP-1.1" title="New Section 1.1. - Changes since RFC 4210">
		<t>The following subsections describe feature updates to <xref target="RFC4210">RFC&nbsp;4210</xref>. They are always related to the base specification. Hence references to the original sections in <xref target="RFC4210">RFC&nbsp;4210</xref> are used whenever possible.</t>
		<t>Insert this section at the end of the current Section 1.</t>			
		<t>The following updates are made in draft-brockhaus-lamps-cmp-updates:<list style="symbols">
			<t>Add new extended key usages for different CMP server types, e.g. registration authority and certification authority, to express the authorization of the entity identified in the certificate containing the respective extended key usage extension to act as the indicated PKI management component.</t>	
			<t>Extend the description of multiple protection to cover additional use cases, e.g., batch processing of messages.</t>	
			<t>Offering EnvelopedData as another choice next to EncryptedValue to extend crypto agility in CMP. Note that according to <xref target="RFC4211">RFC&nbsp;4211</xref> section 2.1.9 the use of the EncryptedValue structure has been deprecated in favor of the EnvelopedData structure. <xref target="RFC4211">RFC&nbsp;4211</xref> offers the EncryptedKey structure, a choice of EncryptedValue and EnvelopedData for migration to EnvelopedData. For reasons of completeness and consistency the exchange of EncryptedValue is performed for all usages in <xref target="RFC4210">RFC&nbsp;4210</xref>.  This includes the protection of centrally generated private keys, encryption of certificates, and revocation passphrases.</t>
			<t>Extend the usage of polling also to p10cr messages.</t>	
			</list></t>
		</section>
	<section anchor="CMP-4.5" title="New Section 4.5 - Extended Key Usage">
		<t>Insert this section.</t>
		<t>The Extended Key Usage (EKU) extension indicates the purposes for which the certified public key may be used. It therefore restricts the use of a certificate to specific applications.</t>
		<t>A CA may want to delegate parts of their duties to other PKI management entities. The mechanism to prove this delegation explained in this section offers zero-touch means to check the authorization of such delegation. Such delegation could also be expressed by other means, e.g., explicit configuration.</t>
		<t>To offer automatic validation means for the delegation of a role by a CA, the certificates used by PKI management entities for CMP message protection or signed data for central key generation MUST be issued by the delegating CA and MUST contain the respective EKUs. This proves the authorization of this entity by the delegating CA to act as the PKI management entity as described below.</t>
		<figure>
			<preamble>The ASN.1 to define these EKUs is:</preamble>
			<artwork align="left"><![CDATA[                                                                
id-kp-cmpCA OBJECT IDENTIFIER ::= { id-kp 27 }
id-kp-cmpRA OBJECT IDENTIFIER ::= { id-kp 28 }
id-kp-cmpKGA OBJECT IDENTIFIER ::= { id-kp ... }
                ]]></artwork>
			</figure>
		<t>&lt; TBD: id-kp-cmpKGA to be defined. &gt;</t>
		<t>Note: <xref target="RFC6402">RFC&nbsp;6402 section 2.10</xref> specifies OIDs for a CMC CA and a CMC RA. As the functionality of a CA and RA is not specific to whether use CMC or CMP as certificate management protocol, the same OIDs SHALL be used for a cmpCA and a cmpRA.</t>
		<t>&lt; TBD: It needs to be clarified, if the Name and Description of the OIDs can be adapted or extended to avoid confusion as they currently only refer to CMC endpoints. &gt;</t>
		<t>The description of the PKI management entity for each of the EKUs is as follows:</t>
		<t>CMP Certification Authorities are CMP endpoints on CA equipment as described in section 3.1.1.2. The key used in the context of CMP management operations, especially CMP message protection, need not be the same key that signs the certificates. It is necessary, however, to ensure that the entity acting as cmpCA is authorized to do so. Therefore, the cmpCA MUST do one of the following,<list style="symbols">
			<t>use the CA private key on the CMP endpoint, or</t>
			<t>explicitly designate this authority to another entity.</t>	
			</list></t>
		<t>For automatic validation of such delegation it MUST be indicated by the id-kp-cmpCA extended key usage.  This extended key usage MUST be placed into the certificate used on the CA equipment and the CA that delegates this role MUST issue the cmpCA certificate.</t>
		<t>Note: Using a separate key pair for protecting CMP management operations at the CA decreases the number of operations of the private key used to sign certificates.</t>
		<t>CMP Registration Authorities are CMP endpoints on RA equipment as described in section 3.1.1.3. A cmpRA is identified by the id-kp-cmpRA extended key usage.  This extended key usage is placed into RA certificates. The CA that delegated this role is identified by the CA that issued the cmpRA certificate.</t>
		<t>CMP Key Generation Authorities are identified by the id-kp-cmpKGA extended key usage. Though the cmpKGA knows the private key it generated on behalf of the end entity, this is a very sensible service and needs specific authorization. This authorization is either with the CA certificate itself, or indicated by placing the id-kp-cmpKGA extended key usage into the cmpRA or cmpCA certificate used to authenticate the origin of the private key to express the authorization to offer this service.</t>
		<t>Note: In device PKIs, especially those issuing IDevID certificates, CA may have very long validity (including the GeneralizedTime value 99991231235959Z to indicate a not well-defined expiration date as specified in IEEE 802.1AR section 8.5 [IEEE802.1AR] and <xref target="RFC5280">RFC&nbsp;5280 Section 4.1.2.5</xref>). Such validity periods SHOULD NOT be used for protection of CMP messages. Certificates for delegated CMP message protection (cmpCA, cmpRA, cmpKGA) MUST NOT use indefinite expiration date.</t>
		</section>
	<section anchor="CMP-5.1.3.4" title="Replace Section 5.1.3.4 - Multiple Protection">
		<t>Section 5.1.3.4 of <xref target="RFC4210">RFC&nbsp;4210</xref> describes the nested message. This document opens the usage of nested messages also for batch transport of PKI messages between different PKI management entities.</t>
		<t>Replace the text of the section with the following text.</t>			
		<t>In cases where an end entity sends a protected PKI message to an RA, the RA MAY forward that message to a CA, adding its own protection (which MAY be a MAC or a signature, depending on the information and certificates shared between the RA and the CA). There are different use cases for such multi protected messages.</t>
		<t><list style="symbols">
			<t>The RA confirms the validation and authorization of a message and forwards the original message unchanged.</t>
			<t>The RA collects several messages and forwards them in a batch. This can for instance be used to bridge an off-line connection between two PKI management entities. In communication to the CA request messages and in communication from the CA response or announcement messages will be collected in the batch.</t>	
			<t>The RA modifies the message(s) in some way (e.g., add or modify particular field values or add new extensions) before forwarding them, then it MAY create its own desired PKIBody.  In case the changes made by the RA to PKIMessage breaks the POP, the RA MUST either set the POP RAVerified or include the original PKIMessage from the EE in the generalInfo field of PKIHeader of the nested message (to force the CA to check POP on the original message).  The infoType to be used in this situation is {id-it 15} (see Section 5.3.19 for the value of id-it) and the infoValue is PKIMessages (contents MUST be in the same order as the requests in PKIBody). For simplicity reasons, if batching is used in combination with inclusion of the original PKIMessage in the generalInfo field, all messages in the batch MUST be of the same type (e.g., ir).</t>	
			</list></t>
		<t>These use cases are accomplished by nesting the messages sent by the end entity within a new PKI message.  The structure used is as follows.</t>
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
NestedMessageContent ::= PKIMessages
                ]]></artwork>
			</figure>
		<t>(The use of PKIMessages, a SEQUENCE OF PKIMessage, lets the RA batch
   the requests of several EEs in a single new message.)</t>
		</section>
	<section anchor="CMP-5.2.2" title="Replace Section 5.2.2. - Encrypted Values">
		<t>Section 5.2.2 of <xref target="RFC4210">RFC&nbsp;4210</xref> describes the usage of EncryptedValue to transport encrypted data. This document extends the encryption of data to also use EnvelopedData.</t>	
		<t>Replace the text of the section with the following text.</t>	
		<t>Where encrypted data (restricted, in this specification, to be either private keys, certificates, or passwords) are sent in PKI messages, the EncryptedKey data structure is used.</t>	
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
EncryptedKey ::= CHOICE {
   encryptedValue        EncryptedValue, -- deprecated
   envelopedData     [0] EnvelopedData }
                ]]></artwork>
			</figure>
		<t>See <xref target="RFC4211">CRMF</xref> for EncryptedKey and EncryptedValue syntax and for EnvelopedData syntax see <xref target="RFC5652">CMS</xref>. Using the EncryptedKey data structure, the choice to either use EncryptedValue (for backward compatibility only) or EnvelopedData is offered.  The use of the EncryptedValue structure has been deprecated in favor of the EnvelopedData structure.  Therefore, it is recommended to use EnvelopedData.</t>	
		<t>The EncryptedKey data structure is used in CMP to either transport a private key, certificate or revocation passphrase in encrypted form.</t>			
		<t>EnvelopedData is used as follows:<list style="symbols">
			<t>Contains only one recepientInfo structure because the content is encrypted only for one recipient.</t>
			<t>Contains private key in a SignedData structure as specified in <xref target="RFC5652">CMS section 5</xref> signed by the Key Generation Authority.</t>	
			<t>Contains certificate or revocation passphrase directly in the encryptedContent field.</t>	
			</list></t>
		<t>Note: When transferring a centrally generated private key in a certificate response message to the EE, the algorithm identifier and the associated public key will anyhow be transported in this response message. Therefore, the private key will not be delivered in a key package structure as specified in <xref target="RFC5958"></xref> and <xref target="RFC6032"></xref>. But the wrapping of the private key in a SignedData structure that is wrapped in the EnvelopedData structure as specified in <xref target="RFC6032"></xref> is applied.</t>			
		<t>The content of the EnvelopedData structure, as specified in <xref target="RFC5652">CMS section 3</xref>, MUST be encrypted using a newly generated symmetric content-encryption key. This content-encryption key MUST be securely provided to the recipient using one of three key management techniques. </t>			
		<t>The choice of the key management technique to be used by the sender depends on the credential available for the recipient:<list style="symbols">
			<t>Jointly shared secret: The content-encryption key will be protected using the symmetric key-encryption key management technique, as specified in <xref target="RFC5652">CMS section 5.2.3</xref>.</t>
			<t>Recipient's certificate that contains a key usage extension asserting keyAgreement: The content-encryption key will be protected using the key agreement key management technique, as specified in <xref target="RFC5652">CMS section 5.2.2</xref>.</t>	
			<t>Recipient's certificate that contains a key usage extension asserting keyEncipherment: The content-encryption key will be protected using the key transport key management technique, as specified in <xref target="RFC5652">CMS section 5.2.1</xref>.</t>	
			</list></t>
		</section>
	<section anchor="CMP-5.3.4" title="Update Section 5.3.4. - Certification Response">
		<t>Section 5.3.4 of <xref target="RFC4210">RFC&nbsp;4210</xref> describes the Certification Response. This document updates the syntax by using the parent structure EncryptedKey instead of EncryptedValue as described in <xref target="CMP-1.1" />  above.</t>	
		<t>Replace the ASN.1 syntax of CertifiedKeyPair and CertOrEncCert with the following text.</t>	
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
CertifiedKeyPair ::= SEQUENCE {
    certOrEncCert       CertOrEncCert,
    privateKey      [0] EncryptedKey        OPTIONAL,
    -- see [CRMF] for comment on encoding
    publicationInfo [1] PKIPublicationInfo  OPTIONAL
}

CertOrEncCert ::= CHOICE {
    certificate     [0] Certificate,
    encryptedCert   [1] EncryptedKey
}
                ]]></artwork>
			</figure>
		<t>Add the following paragraphs to the end of the section.</t>	
		<t>The use of EncryptedKey is described in section 5.2.2.</t>	
		</section>
	<section anchor="CMP-5.3.19.9" title="Replace Section 5.3.19.9. - Revocation Passphrase">
		<t>Section 5.3.19.9 of <xref target="RFC4210">RFC&nbsp;4210</xref> describes the provisioning of a revocation passphrase for authenticating a later revocation request. This document updates the handling by using the parent structure EncryptedKey instead of EncryptedValue to transport this information as described in <xref target="CMP-1.1" /> above.</t>	
		<t>Replace the text of the section with the following text.</t>	
		<t>This MAY be used by the EE to send a passphrase to a CA/RA for the purpose of authenticating a later revocation request (in the case that the appropriate signing private key is no longer available to authenticate the request).  See Appendix B for further details on the use of this mechanism.</t>	
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
GenMsg:    {id-it 12}, EncryptedKey
GenRep:    {id-it 12}, < absent >
                ]]></artwork>
			</figure>
		<t>The use of EncryptedKey is described in section 5.2.2.</t>	
		</section>
	<section anchor="CMP-5.3.22" title="Update Section 5.3.22 - Polling Request and Response">
		<t>Section 5.3.22 of <xref target="RFC4210">RFC&nbsp;4210</xref> describes when and how polling messages are used. This document adds the polling mechanism also to outstanding p10cr transactions.</t>
		<t>Replace all paragraphs in front of the state machine diagram with the following text.</t>
		<t>This pair of messages is intended to handle scenarios in which the client needs to poll the server in order to determine the status of an outstanding ir, cr, p10cr, or kur transaction (i.e., when the "waiting" PKIStatus has been received).</t>
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
PollReqContent ::= SEQUENCE OF SEQUENCE {
    certReqId    INTEGER }

PollRepContent ::= SEQUENCE OF SEQUENCE {
    certReqId    INTEGER,
    checkAfter   INTEGER,  -- time in seconds
    reason       PKIFreeText OPTIONAL }
                ]]></artwork>
			</figure>
		<t>The following clauses describe when polling messages are used, and how they are used. It is assumed that multiple certConf messages can be sent during transactions. There will be one sent in response to each ip, cp, or kup that contains a CertStatus for an issued certificate.</t>
         <t><list counter="reqs" hangIndent="3" style="format %d">
           <t>In response to an ip, cp, or kup message, an EE will send a certConf for all issued certificates and, following the ack, a pollReq for all pending certificates.</t>
           <t>In response to a pollReq, a CA/RA will return an ip, cp, or kup if one or more of the pending certificates is ready; otherwise, it will return a pollRep.</t>
           <t>If the EE receives a pollRep, it will wait for at least as long as the checkAfter value before sending another pollReq.</t>
           <t>If an ip, cp, or kup is received in response to a pollReq, then it will be treated in the same way as the initial response.</t>
          </list></t>
		<t>Note: A p10cr message contains exactly one CertificationRequestInfo data structure as specified in <xref target="RFC2986">PKCS#10</xref> but not certificate request number. Therefore, the certReqId MUST be set to 0 in all following messages of this transaction.</t>
		</section>
	<section anchor="CMP-B" title="Update Appendix B - The Use of Revocation Passphrase">
		<t>Appendix B of <xref target="RFC4210">RFC&nbsp;4210</xref> describes the usage of the revocation passphrase. As this document updates <xref target="RFC4210">RFC&nbsp;4210</xref> to utilize the parent structure EncryptedKey instead of EncryptedValue as described in <xref target="CMP-1.1" /> above, the description is updated accordingly.</t>	
		<t>Replace the first bullet point of this section with the following text.<list style="symbols">
			<t>The OID and value specified in Section 5.3.19.9 of <xref target="RFC4210">RFC&nbsp;4210</xref> MAY be sent in a GenMsg message at any time, or MAY be sent in the generalInfo field of the PKIHeader of any PKIMessage at any time.  (In particular, the EncryptedKey as described in section 5.2.2 may be sent in the header of the certConf message that confirms acceptance of certificates requested in an initialization request or certificate request message.)  This conveys a revocation passphrase chosen by the entity (i.e., for use of EnvelopedData this is in the decrypted bytes of encryptedContent of the EnvelopedData structure and for use of EncryptedValue this is in the decrypted bytes of the encValue field) to the relevant CA/RA; furthermore, the transfer is accomplished with appropriate confidentiality characteristics.</t>
			</list></t>
		<t>Replace the third bullet point of this section with the following text.<list style="symbols">
			<t>When using EnvelopedData the unprotectedAttrs and when using EncryptedValue the valueHint field MAY contain a key identifier (chosen by the entity, along with the passphrase itself) to assist in later retrieval of the correct passphrase (e.g., when the revocation request is constructed by the entity and received by the CA/RA).</t>
			</list></t>
	<t>&lt; TBD: The attribute structure containing the key identifier in the unprotectedAttr field could either be pkcs-9-at-friendlyName or pkcs-9-at-localKeyId as specified in <xref target="RFC2985">RFC&nbsp;2985 section 5.5</xref>. Are there preferences for either one? &gt;</t>	
		</section>
	<section anchor="CMP-C" title="Update Appendix C - Request Message Behavioral Clarifications">
		<t>Appendix C of <xref target="RFC4210">RFC&nbsp;4210</xref> provides clarifications to the request message behavior. As this document updates <xref target="RFC4210">RFC&nbsp;4210</xref> to utilize the parent structure EncryptedKey instead of EncryptedValue as described in <xref target="CMP-1.1" /> above, the description is updated accordingly.</t>	
		<t>Replace the note coming after the ASN.1 syntax of POPOPrivKey of this section with the following text.</t>	
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
-- **********
-- *  the type of "thisMessage" is given as BIT STRING in RFC 4211
-- *  [RFC4211]; it should be "EncryptedKey" (in accordance with
-- *  Section 5.2.2, "Encrypted Values", of this specification).
-- *  Therefore, this document makes the behavioral clarification of
-- *  specifying that the contents of "thisMessage" MUST be encoded
-- *  either as EnvelopedData or EncryptedValue (only for backward
-- *  compatibility) and then wrapped in a BIT STRING.  This allows
-- *  the necessary conveyance and protection of the private key
-- *  while maintaining bits-on-the-wire compatibility with RFC 4211
-- *  [RFC4211].
-- **********
                ]]></artwork>
			</figure>	
		</section>
	<section anchor="CMP-D.4" title="Update Appendix D.4. - Initial Registration/Certification (Basic Authenticated Scheme)">
		<t>Appendix D.4 of <xref target="RFC4210">RFC&nbsp;4210</xref> provides the initial registration/certification scheme.  This scheme shall continue to use EncryptedValue for backward compatibility reasons.</t>	
		<t>Replace the comment after the privateKey field of crc[1].certifiedKeyPair in the syntax of the Initialization Response message with the following text.</t>	
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
-- see Appendix C, Request Message Behavioral Clarifications
-- for backward compatibility reasons, use EncryptedValue 
                ]]></artwork>
			</figure>	
		</section>
	</section>

  <section anchor="IANA" title="IANA Considerations">
	<t>&lt; TBD: Add any IANA considerations &gt;</t>
	</section>

   <section anchor="Security" title="Security Considerations">
    <t>No changes are made to the existing security considerations of <xref target="RFC4210">RFC&nbsp;4210</xref>.</t>
   </section>
   
  <section anchor="Acknowledgements" title="Acknowledgements">
    <t>Special thank goes to Jim Schaad for his guidance and the inspiration on structuring and writing this document I got from <xref target="RFC6402"></xref> that updates CMC.</t>
    <t>I also like to thank all reviewers of this document for their valuable feedback.</t>
	</section>
</middle>


 <back>
   <!-- References split into informative and normative -->

   <!-- There are 2 ways to insert reference entries from the citation libraries:
    1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
    2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
       (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

    Both are cited textually in the same manner: by using xref elements.
    If you use the PI option, xml2rfc will, by default, try to find included files in the same
    directory as the including file. You can also define the XML_LIBRARY environment variable
    with a value containing a set of directories to search.  These can be either in the local
    filing system or remote ones accessed by http (http://domain/dir/... ).-->

   <references title="Normative References">
     <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
	 &RFC2119;
	 &RFC2985;
	 &RFC2986;
	 &RFC4210;
	 &RFC4211;
	 &RFC5280;
	 &RFC5652;
	 &RFC6402;
	 
   </references>

   <references title="Informative References">
     <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
	 <?rfc include="reference.I-D.brockhaus-lamps-lightweight-cmp-profile" ?>
	
	 &RFC5958;
	 &RFC6032;
	 
     <!-- A reference written by an organization not a person. -->

   </references>

   <section anchor="ASN.1_Modules" title="ASN.1 Modules">
 	<t>Changes to the following parts are needed<list style="symbols">
        <t>Import from PKCS-9</t>
		</list></t>
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
friendlyName, localKeyId
    FROM PKCS-9 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
                 pkcs-9(9) modules(0) pkcs-9(1)}
                ]]></artwork>
			</figure>
		<t>&lt; TBD: Either friendlyName or localKeyId need to be imported here. &gt;</t>
	<t><list style="symbols">
		<t>Import from PKIKXCRMF-2005</t>
		</list></t>
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
CertTemplate, PKIPublicationInfo, EncryptedKey, CertId,
CertReqMessages
    FROM PKIXCRMF-2005 {iso(1) identified-organization(3)
    dod(6) internet(1) security(5) mechanisms(5) pkix(7)
    id-mod(0) id-mod-crmf2005(36)}
                ]]></artwork>
			</figure>
	<t><list style="symbols">
        <t>In CertifiedKeyPair, CertOrEncCert and id-it-revPassphrase</t>
		</list></t>
		<figure>
			<preamble></preamble>
			<artwork align="left"><![CDATA[                                                                
CertifiedKeyPair ::= SEQUENCE {
    certOrEncCert       CertOrEncCert,
    privateKey      [0] EncryptedKey        OPTIONAL,
    -- see [CRMF] for comment on encoding
    publicationInfo [1] PKIPublicationInfo  OPTIONAL
}

CertOrEncCert ::= CHOICE {
    certificate     [0] CMPCertificate,
    encryptedCert   [1] EncryptedKey
}

--   id-it-revPassphrase    OBJECT IDENTIFIER ::= {id-it 12}
--      RevPassphraseValue      ::= EncryptedKey

--
-- Extended Key Usage extension for PKI entities used in
-- CMP operations
--

id-kp-cmpCA OBJECT IDENTIFIER ::= { id-kp 27 }
id-kp-cmpRA OBJECT IDENTIFIER ::= { id-kp 28 }
id-kp-cmpKGA OBJECT IDENTIFIER ::= { id-kp ... }
                ]]></artwork>
			</figure>	
		<t>&lt; TBD: id-kp-cmpKGA to be defined. &gt;</t>
	<t>&lt; TBD: If needed the complete ASN.1 Module from RFC 4210 section needs to be copied here. &gt;</t>
	</section>

 </back>
</rfc>