<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
  <!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
  <!ENTITY RFC8174 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
  <!ENTITY RFC6979 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6979.xml">
  <!ENTITY I-D.ounsworth-pq-composite-sigs PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ounsworth-pq-composite-sigs.xml">
]>
<?rfc toc="yes"?>
<!-- generate a table of contents -->
<?rfc symrefs="yes"?>
<!-- use anchors instead of numbers for references -->
<?rfc sortrefs="yes" ?>
<!-- alphabetize the references -->
<?rfc compact="yes" ?>
<!-- conserve vertical whitespace -->
<?rfc subcompact="no" ?>
<!-- but keep a blank line between list items -->

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-nir-lamps-altcompsigs-00" ipr="trust200902" consensus="true" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.17.1 -->
  <front>
    <title abbrev="AltCompSig">A Hybrid Signature Method with Strong Non-Separability</title>
    <seriesInfo name="Internet-Draft" value="draft-nir-lamps-altcompsigs-00"/>
    <author initials="Y." surname="Nir" fullname="Yoav Nir">
      <organization>Dell Technologies</organization>
      <address>
        <postal>
          <street>9 Andrei Sakharov St</street>
          <city>Haifa</city>
          <code>3190500</code>
          <country>Israel</country>
        </postal>
        <email>ynir.ietf@gmail.com</email>
      </address>
    </author>
    <date/>
    <area>Security</area>
    <workgroup>LAMPS</workgroup>
    <abstract>
      <t> This document presents an alternative scheme of composing classic and post-quantum signature algorithms with
        different security properties. This scheme produces signatures with strong non-separability (SNS) at the cost 
        of breaking backward compatibility with legacy cryptographic hardware.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t> In the past few years, there has been great progress in the development of quantum-computing. Today, most of 
        the cryptographic algorithms are based on the difficulty of integer factorization and discrete logarithm over 
        finite fields or elliptic curves. Yet in the upcoming years, with the potential of building a strong enough 
        quantum-computer capable of computing Shor's algorithm - a so-called cryptographically relevant quantum
        computer (CRQC) - these algorithms may no longer be secure enough to rely upon.</t>
      <t> With the looming threat of CRQCs breaking existing public key constructs such as digital signatures, the 
        world in general and the IETF in particular are looking to transition to so-called post-quantum algorithms, 
        algorithms that are thought to be secure against a cryptanalytic attack by a quantum computer.</t>
      <t> The National Institute of Standards and Technology (NIST) has been running a project for selecting such
        post-quantum algorithms since 2016 (<xref target="NIST-PQC"/>). This project is not complete at the time of 
        this writing. It has produced several finalists including Crystals-Dilithium (<xref target="Dilithium"/>), 
        Falcon, and more.</t>
      <t> There is, however, concern about deploying these new algorithms as full replacements for the existing (or 
        "classic") algorithms. On the one hand, there is the fear that researchers or nation-state adversaries will 
        produce a CRQC that will allow them to break the classic algorithms such as RSA, ECDSA, and EdDSA. On the other
        hand, there is still doubt about the security of the new algorithms. This doubt is well-founded: One of the 
        candidate algorithms, SIKE, was broken in late stages of the competition (<xref target="SIKE-BREAK" />).</t>
      <t> To minimize the risks or relying on a single algorithm, there are some proposals for combining two or more 
        algorithms, typically a classic algorithm and a post-quantum algorithm, such that all of the algorithms are 
        used to create the signature, and some or all of them are used to verify the signature. This has the advantage 
        that unless the adversary is able to break all of the algorithms, a verifier who uses all of the algorithms 
        will not be fooled.  One such proposal is <xref target="I-D.ounsworth-pq-composite-sigs"/>.</t>
      <t> Most such proposals, including the above-mentioned draft,  involve independently signing with the several 
        algorithms, each having their own private/public key pair. With these schemes the private key is a 
        concatenation or a vector of the private keys of the several algorithms, and similarly the public key is a 
        vector of the public keys, and the signature is a vector of independent signatures.  A signature like that 
        is said to be parallel and separable, as there is no dependency between the signatures involved.</t>
      <t> This draft proposes alternate schemes where specific algorithms are combined to create signatures that are 
        non-separable, meaning that it is not possible to verify the signature using just one algorithm.  This is based 
        on an article by Bindel and Hale (<xref target="Bindel23"/>).</t>
      <section anchor="intro_controversy" numbered="true" toc="default">
        <name>Controversy in the LAMPS Working Group</name>
        <t> On May 30th, 2023, the LAMPS working group had an adoption call for <xref target="I-D.ounsworth-pq-composite-sigs"/>
          that ultimately did not achieve consensus. There were various objections, some about the timeliness of 
          adopting the drafts before NIST concluding the competition, some about the formatting within the drafts, and
          some questioning the very utility of hybrid signatures.</t>
        <t> This draft takes no position on this question. What it does claim, is that if we would like to get the
          benefit from hybrid signatures, then verifiers should be required to verify both the classic and 
          post-quantum components of the signature. The catalyst for the hybrid signature effort was the idea that 
          both the classic and the post-quantum algorithms have a non-trivial chance of compromise in the next few
          years. Fielding a verifier that checks only one algorithm or the other carries the risk that this verifier
          is checking only the first algorithm to be compromised.</t>
        <t> The algorithms in this draft force an implementation to check both signatures to get any security. If 
          hybrid signatures are worth doing at all, they are worth doing in such a way.</t>
        <t> NOTE: This draft is (for now) an individual draft with an unclear destination. Its file name includes the
          LAMPS label not as a signal that I would like the LAMPS working group to adopt it at this time, but only 
          because the LAMPS working group is the one where hybrid signature discussions are taking place.</t>
      </section>
    </section>    
    <section anchor="terminology" numbered="true" toc="default">
        <name>Terminology</name>
        <section anchor="reqs" numbered="true" toc="default">
          <name>Requirement Keywords</name>
          <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 BCP 14 <xref target="RFC2119"/> 
            <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
        </section>
        <section anchor="sep" numbered="true" toc="default">
          <name>Non-Separability</name>
          <t> A hybrid signature is a signature that is created using more than one algorithm, typically at least one 
            classic algorithm and at least one post-quantum algorithm.</t>
          <t> Non-separability (NS) is a property of hybrid signatures. With non-separable signatures, an adversary 
            cannot remove one of the signatures (typically, the one that is not broken) forcing the verifier to rely 
            only on the broken algorithm. Such an attempt would be detected.</t>
          <t> Strong Non-Separability (SNS) is a stronger property, where an adversary cannot convert an input hybrid 
            signature into a single algorithm signature that will verify correctly.</t>
          <t> Simultaneous Verification (SV) is an even stronger property, that makes it impossible for the verifier to
            quit the verification after using just one algorithm. The hybrid signatures presented in this draft all 
            require SV.</t>
        </section>
        <section anchor="def-bc" numbered="true" toc="default">
          <name>Backward Compatibility</name>
          <t> Backward Compatibility for hybrid signatures means that old verifying hardware or software that verifies 
            the signature of one algorithm or the other can be used to verify the single-algorithm component of the 
            hybrid signature. So the EdDSA component of a Dilithium-EdDSA hybrid signature can be verified using an 
            EdDSA verifier.</t>
          <t> SNS and backward compatibility are mutually exclusive, meaning that to gain SNS, we have to give up on 
            having backward compatibility.</t>
      </section>
    </section>
    <section anchor="schemes" numbered="true" toc="default">
      <name>Hybrid Schemes</name>
      <t> EDNOTE: As PQC standardization is still in process, both Dilithium and Falcon signature schemes can change in 
        some aspects from their final form. To handle this situation both signatures will be described in more of a 
        general form, Dilithium as a Fiat-Shamir based scheme with black box functions that will be replaced with the 
        actual Dilithium implementation after the publication of parameters and implementations. Also, hybrid schemes 
        with Falcon will be added.</t>
      <section anchor="fsfs" numbered="true" toc="default">
        <name>Fiat-Shamir and Fiat-Shamir</name>
        <t> TODO: Add a 1-paragraph explanation of Fiat-Shamir signatures.</t>
        <t> A generic combination of Fiat-Shamir signatures is useful for hybrid signatures because both some classic 
          and some post-quantum algorithms follow the Fiat-Shamir pattern. Specifically, Crystals-Dilithium is a 
          Fiat-Shamir algorithm, as are the classic algorithms ECDSA and EdDSA.</t>
        <t> The following sections will use Dilithium and ECDSA as examples.</t>
        <section anchor="fsfs-kg" numbered="true" toc="default">
          <name>Key Generation</name>
          <t> Private keys for the two algorithms are generated separately. ECDSA signatures are generated as in 
            <xref target="RFC6979"/>.</t>          
        </section>
        <section anchor="fsfs-sign" numbered="true" toc="default">
          <name>Signing</name>
          <artwork name="alg-dil-ecdsa"><![CDATA[
Input:
sk1    signer's Dilithium private key (A_Dil, t, s1, s2)
sk2    signer's ECDSA private key (x, q)
pk1    verifier's Dilithium public key (A_Dil, t)
pk2    verifier's ECDSA public key (xG, q)
M      message to be signed of arbitrary size

Output:
S      signature, contains (z, h, r, s)
       z the Dilithium signature proof
       h challenge combining both of the signatures
       r the X coordinate of a randomly
         generated point on the curve
       s the ECDSA signature proof
-]]></artwork>
          <t> Steps:</t><ol>
            <li> Generate a random vector in the lattice based on the Dilithium final scheme. Let y denote this 
              vector.</li>
            <li> Compute w = HighBits(A_Dil, y). The HighBits function is described in detail in the round 3 submission
              of Dilithium <xref target="Dilithium"/>.</li>
            <li> Let k denote a random value generated modulo q. k shall not be zero.</li>
            <li> The point kG is computed; its X coordinate (a member of the field over which E is defined) is 
              converted to an integer, which is reduced modulo q, yielding r. If r turns out to be zero, a new k should 
              be selected and r computed again.</li>
            <li> s = k^(-1)(H(w, H(M))+ x*r) mod q. EDNOTE: decide which hash functions H to use</li>
            <li> h = P(w, D(r, s) XOR PH(M)). (EDNOTE: decide which hash functions P, PH, D to use)</li>
            <li> Compute c = cast(h,B), Let cast denote the SampleInBall function described in the Dilithium round 3 
              submission.</li>
            <li> z = y + c*s1</li>
            <li> S = (z, h, r, s)</li></ol>
          <t> The tuple (z, h, r, s) is the signature.</t>
       </section>
        <section anchor="fsfs-encoding" numbered="true" toc="default">
          <name>Encoding</name>
          <t> All fields will be encoded as OCTET STRING</t>
          <t> The private key is an OCTET STRING, a concatenation of the OCTET STRING representations of the ECDSA and 
            Dilithium private keys.</t>
          <t> Public keys are similarly concatenations.</t>
          <t> The signature is an OCTET STRING, a concatenation of the OCTET STRING representation of z, h, r, and s.</t>
       </section>
        <section anchor="fsfs-example" numbered="true" toc="default">
          <name>Example</name>
          <t> TO BE ADDED</t>
       </section>
      </section>
      <section anchor="fsrsa" numbered="true" toc="default">
        <name>Fiat-Shamir and RSA</name>
        <t> TODO: A paragraph explaining that RSA is popular, and that Dilithium-RSA is desirable</t>
        <t> TODO: Add the FS-RSA construction (but not in draft -00)</t>
      </section>
      <section anchor="falconfs" numbered="true" toc="default">
        <name>Fiat-Shamir and Falcon</name>
        <t> TODO: Add the FS-Falcon construction (but not in draft -00)</t>
      </section>
      <section anchor="falconrsa" numbered="true" toc="default">
        <name>RSA and Falcon</name>
        <t> TODO: Add the RSA-Falcon construction (but not in draft -00)</t>
      </section>
    </section>
    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t> To Be Added.  We need at least OIDs for the combinations above.</t>
    </section>
    <section anchor="compare" numbered="true" toc="default">
      <name>Comparison with Other Proposals</name>
      <t> TODO: Add here a discussion of the differences between this proposal and draft-ounsworth.  
		        Need to cover both advantages (SNS, SV) and disadvantages: backward compatibility.</t>
    </section>
    <section anchor="sec" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t> Security considerations appear in this document, specifically in <xref target="sep"/> and <xref 
        target="def-bc"/>, when discussing SNS and BC. Proofs of the security of the constructions described 
        in <xref target="schemes"/> are given in the Bindel-Hale article.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
            &RFC2119;
            &RFC8174;
            &RFC6979;
      </references>
      <references>
        <name>Informative References</name>
            &I-D.ounsworth-pq-composite-sigs;
            <reference anchor="Bindel23" target="https://eprint.iacr.org/2023/423.pdf">
              <front>
                <title>A Note on Hybrid Signature Schemes</title>
                <author initials="N." surname="Bindel" fullname="Nina Bindel">
                  <organization>SandboxAQ</organization>
                </author>
                <author initials="B." surname="Hale" fullname="Britta Hale">
                  <organization>Naval Postgraduate School</organization>
                </author>
                <date year="2023"/>
              </front>
            </reference>
            <reference anchor="NIST-PQC" target="https://csrc.nist.gov/Projects/post-quantum-cryptography">
              <front>
                <title>Post-Quantum Cryptography Project</title>
                <author initials="" surname="National Institute of Standards and Technology (NIST)" fullname="">
                  <organization/>
                </author>
                <date year="2016" month="12" day="20"/>
              </front>
            </reference>
            <reference anchor="Dilithium" target="https://pq-crystals.org/dilithium/data/dilithium-specification-round3-20210208.pdf">
              <front>
                <title>CRYSTALS-Dilithium Algorithm Specifications and Supporting Documentation</title>
				<author initials="S." surname="Bai" fullname="S. Bai">
				</author>
				<author initials="L." surname="Ducas" fullname="L. Ducas">
				</author>
				<author initials="T." surname="Lepoint" fullname="T. Lepoint">
				</author>
				<author initials="V." surname="Lyubashevsky" fullname="V. Lyubashevsky">
				</author>
				<author initials="P." surname="Schwabe" fullname="P. Schwabe">
				</author>
				<author initials="G." surname="Seiler" fullname="G. Seiler">
				</author>
				<author initials="D." surname="Stehle" fullname="D. Stehle">
				</author>
				<date year="2021"/>
			  </front>
            </reference>
            <reference anchor="SIKE-BREAK" target="https://eprint.iacr.org/2022/975.pdf">
              <front>
                <title>An efficient key recovery attack on SIDH</title>
                <author initials="W." surname="Castryck" fullname="Wouter Castryck"/>
                <author initials="T." surname="Decru" fullname="Thomas Decru"/>
                <date year="2022"/>
              </front>
            </reference>    
      </references>
    </references>
    <section anchor="changelog" numbered="true" toc="default">
      <name>Change Log</name>
      <t> RFC EDITOR: PLEASE REMOVE THIS SECTION AS IT IS ONLY MEANT TO AID THE WORKING GROUP IN TRACKING
                CHANGES TO THIS DOCUMENT.</t>
      <t> draft-nir-lamps-altcompsigs-00 - first version.</t>
    </section>
  </back>
</rfc>
