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

<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!--	<!ENTITY rfc5234 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml'>
	<!ENTITY rfc3986 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml'>
	<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
	<!ENTITY rfc2560 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6960.xml'>
	<!ENTITY rfc5019 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5019.xml'>
	<!ENTITY rfc5280 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5280.xml'>
	<!ENTITY rfc4501 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4501.xml'>
-->
]>

<rfc category="exp" docName="draft-pala-composite-crypto-01" ipr="trust200902">
    
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc tocdepth="5"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

  <front>
  	<title abbrev="CKS">Composite Public Keys and Signatures</title>
  	<author initials="M.P." surname="Pala" fullname="Massimiliano Pala">
  	  <organization>CableLabs</organization>
    	<address>
      	<postal>
        	<street>858 Coal Creek Cir</street>
        	<city>Louisville</city>
        	<region>CO</region>
        	<code>80027</code>
        	<country>USA</country>
      	</postal>
      	<email>director@openca.org</email>
      	<uri>http://www.linkedin.com/in/mpala</uri>
    	</address>
  	</author>
 
  	<date month="March" year="2019" />
  	<area>Security</area>
  	<workgroup></workgroup>
  	<keyword>PKI</keyword>
  	<keyword>Crypto Agility</keyword>
  	<keyword>Quantum Resistance</keyword>
  	<abstract>
    	<t>
    		PKIs are used to provide scalability and ease key management. One type of PKIs that is
    		predominant for securing communications and data is based on the X.509 standard.
				Since the security of PKIs, ultimately, depends on the security of the cryptographic
				building blocks that are used for authentication and encryption, the standards
				community made algorithm agility a priority. Algorithm agility, in particular, enables
				upgrading to newly available algorithms when needed.
    
   			<vspace blankLines="1" />

   			The CompositeCrypto (i.e., CompositeKey and CompositeSignature structures) described
   			in this document provides an additional tool that enables the use of multiple algorithms
   			to authenticate data without the need to use multiple certificates and more complex data
   			structures.

   			<vspace blankLines="1" />

   			This document provide the description of the definition and encoding rules for CompositeKey
   			and CompositeSignature. A description of how to use these structures in main PKIX
   			objects (e.g., X.509 certificates, CRLs, OCSP responses, etc.) is also provided.
   		</t>
  	</abstract>
	</front>

	<middle>

		<section title="Requirements notation">
			<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"/>.
			</t>
		</section>

		<section anchor="intro" title="Introduction and Scope"> 
			<t>
				With the definition of new algorithms (e.g. more efficient factoring techniques) and
				technologies (e.g., quantum-based computing devices) that might be available in the
				near future, the need to provide an easy-to-deploy and efficient solution capable of
				providing multi-algorithms authentication is paramount.

				<vspace blankLines="1" />

				Today there are no complete or general solutions that allow the use of multiple public-key
				algorithms to authenticate PKIX data without using multiple X.509 certificates or complex
				data structures. For example, CRLs or OCSP responses can not be protected via multiple
				algorithms without wrapping the OCSP responses' data via CMS or other signed containers.

				<!--
				In particular, whichever the specific standard or technology is used in a PKI (e.g., X.509, PGP, etc.), no
				deployments currently cover the possibility to use multiple algorithms in a combined fashion
				to further secure the infrastructure in case one (or more) algorithms are deemed compromised.
				Moreover, existing proposals to add support for additional keys (and signatures) in certificates
				focus on the implementation of single algorithms mostly targeting quantum resistant ones.
				This solution differs in that it allows to combine one or more algorithms today (e.g., RSA
				and ECDSA) and provide a path for multi-algorithm agility that can address post-quantum and
				future crpto-algorithm agility needs.
				-->

				<vspace blankLines="1" />

				We define two new building blocks, i.e. compositeKey and compositeSignature, that can be
				used in many environments where Public Key authentication is used – i.e., from the generation
				of certificates that are authenticated with multiple signatures (i.e., using multiple keys
				that may or may not use different cryptographic schemes or different number of security bits),
				to the possibility of specifying a composite key that combines multiple public keys together
				(instead of one) in a single certificate.
			
				<vspace blankLines="1" />

				This document describes the encoding of the new building blocks and their application to
				different X.509 core data structures that are used in PKIs.

				In particular, this document focuses only on the definition of the composite keys
				and composite signatures definitions for X.509 based PKIs (PKIX) by providing the
				encoding rules and their usage in existing X.509 (PKIX) data structures.
			</t>
		</section>

		<section anchor="cc_oid" title="Composite Cryptography">
			<t>
				Composite Cryptography is defined as the possibility to combine different public keys
				and signatures in PKIX objects. The following OID is defined to identfy the algorithm
				class:
			</t>
			<figure><artwork>
id-pk-compositeCrypto OBJECT IDENTIFIER ::= { iso(1)
      identified-organization(3) dod(6) internet(1) private(4)
      enterprise(1) OpenCA(18227) Algorithms(2) 1 }
      </artwork></figure>

      <t>
      	Composite Cryptography provides three distinct building blocks: the compositePublicKey,
      	the compositePrivateKey and the compositeSignature. The compositePublicKey is meant to
      	carry all the public keys associated with an identity. The compositePrivateKey is meant
      	to carry all the private keys associated with an identity. The compositeSignature,
      	instead, carries a sequence of signatures that are generated by using the different
      	individual keys from a compositePrivateKey.
      </t>

			<section anchor="cc_keys_oid" title="Composite Public Keys">
    		<t>
    			This document defines a new Object Identifier for the compositeKey
    			algorithm (e.g., similar to to the 'rsaEncryption' OID when using RSA public keys).
    		</t>
    		<figure><artwork>
  id-pk-compositePublicKey OBJECT IDENTIFIER ::= { id-kp-compositeCrypto 1 }

  compositePrivateKey ::= SEQUENCE (1..MAX) OF BITSTRING
				</artwork></figure>
			</section>

			<section anchor="cc_key_priv" title="Composite Private Keys">

				<t>
					This section specifies a syntax and semantics for Composite Keys
					private key information.  Composite private key information includes
					a sequence of private keys and parameters. Additionally, it may
					include the corresponding public keys.

	   			The structure defined in this document allows for the distribution
	   			of the composite keys (public and private) and the associated domain
	   			parameters by using a sequence of OneAsymmetricKey as defined in
	   			[RFC5958].

	   			The Algorithm Identifier and data structure associated with composite
	   			private keys is defined as follows: 

				</t> 
				<figure><artwork>
  id-pk-compositePrivateKey OBJECT IDENTIFIER ::= { id-kp-compositeCrypto 2 }

  compositePrivateKey ::= SEQUENCE (1..MAX) OF OneAsymmetricKey
				</artwork></figure>

				<section anchor="cc_key_priv_enc" title="Encoding Rules">
					<t>
						When encoding Composite Private Keys, generators SHOULD use
   					Distinguished Encoding Rules (DER) [X.690] and receivers
   					SHOULD be prepared to handle Basic Encoding Rules (BER)
   					[X.690] and DER [X.690].
   				</t>
   			</section>

   			<section anchor="cc_key_priv_enc_unenc" title="Encrypted and Un-encrypted Local Storage">
   				<t>
   					The compositePrivateKeys format as defined in the previous subsection
   					can also be used for local storage of an unencrypted compositePrivateKeys
   					binary object.

   					The compositePrivateKeys can also be formatted in PEM format that uses the (".pem")
   					file extension and which is encoded as the the Base64 encoding (see Section 4 of [RFC4648]),
   					of the DER-encoded compositePrivateKeys object with the following armour:
 					</t>
 					<figure><artwork>
  -----BEGIN COMPOSITE PRIVATE KEY-----
  -----END COMPOSITE PRIVATE KEY-----
 					</artwork></figure>

 					<t>
 						Local storage of an encrypted CompositePrivateKeys object is out of scope of
   					this document.  However, CompositePrivateKeys should be the format for the
   					plaintext key being encrypted.

   					DER [X.690] encoding the CompositePrivateKeys will promote interoperability if
   					the key is encrypted for transport to another party.  PEM encoding the DER-encoded
   					CompositePrivateKeys is common; "Proc-Type:" and "DEK-INFO:" fields [RFC1421]
   					followed by the DER-encoded CompositePrivateKeys. The following armour used in
   					this case is as follows:
 					</t>
 					<figure><artwork>
  -----BEGIN COMPOSITE PRIVATE KEY-----
  -----END COMPOSITE PRIVATE KEY-----
 					</artwork></figure>

				</section>

				<section anchor="cc_cms_akp" title="Asymmetric Key Packages">
					<t>

						The Cryptographic Message Syntax (CMS), as defined in RFC 5652,
						can be used to digitally sign, digest, authenticate, or encrypt
						the asymmetric key format content type.

						When encoding Composite Private Keys, the privateKeyAlgorithm in
						the OneAsymmetricKey SHALL be set to id-kp-compositePrivateKey.
						
						The parameters of the privateKeyAlgorithm SHALL be a sequence of
						AlgorithmIdentifier objects, each of which are encoded according
						to the rules defined for each of the different keys in the
						Composite Private Key.

						The value of the privateKey field in the OneAsymmetricKey SHALL
						be set to the DER encoding of the SEQUENCE of private key values
						that make up the composite key. The number and order of elements
						in the sequence SHALL be the same as identified in the sequence
						of parameters in the privateKeyAlgorithm.

						The value of the the publicKey (if present) SHALL be set to the
						DER encoding of the SEQUENCE of publicKey values. If this field is
						present, the number and order of elements SHALL be the same as
						identified in the sequence of parameters in the privateKeyAlgorithm.

						The value of the attributes is encoded as usual.
					</t>
				</section>

			</section>

			<section anchor="cc_sig" title="Composite Signatures">
				<figure><artwork>
  id-pk-compositeSignature OBJECT IDENTIFIER ::= { compositeCrypto 3 }

  compositeSignature OBJECT IDENTIFIER ::= SEQUENCE (1..MAX) OF BITSTRING
				</artwork></figure>
			</section>

			<section anchor="signature_gen" title="Generating compositeSignatures">
				<t>
					The use of composite signatures allows for the use of multiple algorithms for authentication.
					When generating a compositeSignature, the signing entity MUST generate one signature per
					key that is in the corresponding compositePrivateKey set.
				</t>
				<t>
					The final value of the compositeSignature is the DER encoding of the SEQUENCE of
					BIT STRING where each BIT STRING is the DER representation of the signature
					generated with one of the private key in the compositePrivateKey set.
				</t>
				<t>
					The order of the signature MUST respect the order of keys in the compositePrivateKey and
					compositePublicKey sets.
				</t>
			</section>

			<section anchor="signature_verify" title="Verifying compositeSignatures">
				<t>
					When validating a compositeSignature, the relying party MUST verify at least one of
					the signatures in the compositeSignature structure and SHOULD verify all of them.
				</t>
				<t>
					The process of validating composite signatures starts with going through the
					sequence of the signatures
					<list>
						<t>For each</t>
					</list>
				</t>
				<t>
					The order of the signature MUST respect the order of keys in the compositePrivateKey and
					compositePublicKey sets.
				</t>
			</section>

		</section>

		<section anchor="cc_deployment" title="Use of Composite Crypto in PKIX structures">

			<section anchor="cc_cert" title="Use in X.509 Certificates">
			</section>

			<section anchor="cc_crl" title="Use in X.509 CRLs">
			</section>

			<section anchor="cc_ocsp" title="Use in X.509 OCSP Messages">
			</section>

			<section anchor="cc_pkcs7" title="Use in PKCS#7">
			</section>

			<section anchor="cc_pkcs8" title="Use in PKCS#8">
			</section>

			<section anchor="cc_pkcs12" title="Use in PKCS#12">
			</section>

			<section anchor="cc_cms" title="Use in CMS">
			</section>

		</section>

		<section anchor="security_considerations" title="Security Considerations">
			<t>
				This structures described in this document do not protect the private
				keys information in any way unless combined with a security protocol
				or encryption properties of the objects (if any) where the
				CompositePrivateKey is used (see next Section).

				Protection of the private key information is vital to public key
				cryptography.  The consequences of disclosure depend on the purpose
				of the private key.  If a private key is used for signature, then the
				disclosure allows unauthorized signing.  If a private key is used for
				key management, then disclosure allows unauthorized parties to access
				the managed keying material.  The encryption algorithm used in the
				encryption process must be as 'strong' as the key it is protecting.
			</t>
		</section>

		<section anchor="iana" title="IANA considerations">
			<t>
				The CMS content type OID is registered in a DoD arc.
				
				The ASN.1 module OID is TBD.

				The id-pk-compositeCrypto, id-pk-compositePrivateKey, id-pk-compositePublicKey,
				and id-pk-compositeSignature OIDs are to be assigned by IANA. 

				The authors suggest to use the id-pkix arc for this usage.
			</t>
		</section>

		<section anchor="acks" title="Acknowledgments">
			<t>
				The authors would like to thank everybody who provided insightful comments and helped
				in any form.

				This document uses a lot of text from similar documents ([RFC3279] and [RFC8410]) as well as
				[I-D.ietf-lamps-cms-hash-sig].  Thanks go to the authors of those documents.  "Copying always
				makes things easier and less error prone" - [RFC8411].
			</t>
		</section>

	</middle>

	<back>

		<references title="Normative References">

			<!--
			<reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
				<front>
					<title>Key words for use in RFCs to Indicate Requirement Levels</title>
					<author initials="S." surname="Bradner" fullname="S. Bradner">
						<organization/>
					</author>
					<date year="1997" month="March"/>
					<abstract>
						<t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
					</abstract>
				</front>
				<seriesInfo name="BCP" value="14"/>
				<seriesInfo name="RFC" value="2119"/>
				<seriesInfo name="DOI" value="10.17487/RFC2119"/>
			</reference>
		-->

		<!--
			&rfc5234;
			&rfc3986;
			&rfc2119;
			&rfc2560;
			&rfc5019;
			&rfc5280;
			&rfc4501;
		-->
			&rfc2119;

		</references>

		<section anchor="asn1" title="ASN.1 Module">
			<t><figure><artwork><![CDATA[

CompositeCrypto-2009 { iso(1) identified-organization(3) dod(6) internet(1)
  security(5) mechanisms(5) pkix(7) id-mod(0) TBD }

DEFINITIONS IMPLICIT TAGS ::= BEGIN

EXPORTS ALL;

IMPORTS
 PUBLIC-KEY, SIGNATURE-ALGORITHM, SMIME-CAPS
   FROM AlgorithmInformation-2009  -- RFC 5911 [CMSASN1]
     { iso(1) identified-organization(3) dod(6) internet(1)
       security(5) mechanisms(5) pkix(7) id-mod(0)
       id-mod-algorithmInformation-02(58) }
 mda-sha256, mda-sha384, mda-sha512
   FROM PKIX1-PSS-OAEP-Algorithms-2009  -- RFC 5912 [PKIXASN1]
     { iso(1) identified-organization(3) dod(6)
       internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
       id-mod-pkix1-rsa-pkalgs-02(54) } ;

--
-- Object Identifiers
--

id-pk-compositeCrypto OBJECT IDENTIFIER ::= { iso(1)
      identified-organization(3) dod(6) internet(1) private(4)
      enterprise(1) OpenCA(18227) 10 }

id-pk-compositePublicKey OBJECT IDENTIFIER ::= { 
      id-kp-compositeCrypto 1 }

id-pk-compositePrivateKey OBJECT IDENTIFIER ::= { 
      id-kp-compositeCrypto 2 }

id-pk-compositeSignature OBJECT IDENTIFIER ::= {
      id-kp-compositeCrypto 3 }

id-alg-hss-lms-hashsig OBJECT IDENTIFIER ::= { iso(1)
     member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
     smime(16) alg(3) 17 }

id-alg-hss-lms-hashsig-with-sha256 OBJECT IDENTIFIER ::= { iso(1)
     member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
     smime(16) alg(3) TBD }

id-alg-hss-lms-hashsig-with-sha384 OBJECT IDENTIFIER ::= { iso(1)
     member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
     smime(16) alg(3) TBD }

id-alg-hss-lms-hashsig-with-sha512 OBJECT IDENTIFIER ::= { iso(1)
     member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
     smime(16) alg(3) TBD }

--
-- Signature Algorithm and Public Key
--

sa-HSS-LMS-HashSig-with-SHA256 SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-hss-lms-hashsig-with-sha256
    PARAMS ARE absent
    HASHES { mda-sha256 }
    PUBLIC-KEYS { pk-HSS-LMS-HashSig }
    SMIME-CAPS { IDENTIFIED BY id-alg-hss-lms-hashsig-with-sha256 } }

sa-HSS-LMS-HashSig-with-SHA384 SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-hss-lms-hashsig-with-sha384
    PARAMS ARE absent
    HASHES { mda-sha384 }
    PUBLIC-KEYS { pk-HSS-LMS-HashSig }
    SMIME-CAPS { IDENTIFIED BY id-alg-hss-lms-hashsig-with-sha384 } }

sa-HSS-LMS-HashSig-with-SHA512 SIGNATURE-ALGORITHM ::= {
    IDENTIFIER id-alg-hss-lms-hashsig-with-sha512
    PARAMS ARE absent
    HASHES { mda-sha512 }
    PUBLIC-KEYS { pk-HSS-LMS-HashSig }
    SMIME-CAPS { IDENTIFIED BY id-alg-hss-lms-hashsig-with-sha512 } }

pk-HSS-LMS-HashSig PUBLIC-KEY ::= {
   IDENTIFIER id-alg-hss-lms-hashsig
   KEY HSS-LMS-HashSig-PublicKey
   PARAMS ARE absent
   CERT-KEY-USAGE
       { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }

HSS-LMS-HashSig-PublicKey ::= OCTET STRING

--
-- Expand the signature algorithm set used by CMS [CMSASN1U]
--

SignatureAlgorithmSet SIGNATURE-ALGORITHM ::=
   { sa-HSS-LMS-HashSig-with-SHA256 |
     sa-HSS-LMS-HashSig-with-SHA384 |
     sa-HSS-LMS-HashSig-with-SHA512, ... }

--
-- Expand the S/MIME capabilities set used by CMS [CMSASN1]
--

SMimeCaps SMIME-CAPS ::=
   { sa-HSS-LMS-HashSig-with-SHA256.&smimeCaps |
     sa-HSS-LMS-HashSig-with-SHA384.&smimeCaps |
     sa-HSS-LMS-HashSig-with-SHA512.&smimeCaps, ... }

END

				]]></artwork></figure>
			</t>
		</section>

	</back>
</rfc>
