<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.22 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-tigress-signal-impl-00" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.16.0 -->
  <front>
    <title abbrev="tigress-signal-impl">Tigress-Signal-Sample Implementation</title>
    <seriesInfo name="Internet-Draft" value="draft-tigress-signal-impl-00"/>
    <author initials="C." surname="Astiz" fullname="Casey Astiz">
      <organization>Apple Inc</organization>
      <address>
        <email>castiz@apple.com</email>
      </address>
    </author>
    <author initials="D." surname="Vinokurov" fullname="Dmitry Vinokurov">
      <organization>Apple Inc</organization>
      <address>
        <email>dvinokurov@apple.com</email>
      </address>
    </author>
    <date year="2023" month="February" day="18"/>
    <area>ART</area>
    <workgroup>TIGRESS</workgroup>
    <keyword>tigress</keyword>
    <keyword>signal</keyword>
    <keyword>sample implementation</keyword>
    <abstract>
      <t>This document describes a sample implementation of transferring digital credentials securily (Tigress) using Signal protocol.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://datatracker.ietf.org/doc/draft-tigress-signal-impl/"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-tigress-signal-impl/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/dimmyvi/tigress-requirements"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Prevously Tigress reviewed an implementation of digital credentials transfer using Tigress protocol (https://datatracker.ietf.org/doc/draft-art-tigress/). In previous IETF meetings community asked to review other possible solutions using alternative standards to illustrate how Tigress problem can be solved differently.
In this document we are trying to describe how an alternative potential implementation of a solution to Tigress <xref target="Tigress-req-02"/> problem of transferring digital credentials securily can be done using Signal Protocol.</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 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
    </section>
    <section anchor="signal-protocol-sample-implementation">
      <name>Signal Protocol Sample Implementation</name>
      <t>The Signal Protocol <xref target="Signal-20"/> is a secure messaging protocol that provides end-to-end encryption for instant messaging and voice/video calls. The Signal Protocol is primarily used through the Signal app, which is available for both Android and iOS devices. Users are free to implement Signal Protocol on their own in a custom application or integrate with Signal application via set of documented APIs. For this document, we will focus on this implementation of the Signal Protocol.</t>
      <t>## Secure Credential Transfer with Signal Protocol:</t>
      <t>For Secure Credential Transfer <xref target="Tigress-req-02"/> with Signal Protocol, the message sequence and message contents between Sender and Receiver devices will be the same as the other approaches.
 Per Signal protocol specification <xref target="Signal-20"/>  there is a requirement to implement an intermediary server that is used to store  user and device records containing security keys (one-time prekeys and signed prekeys), identity keys, user and device identities and all encrypted messages stored in mailboxes. In real system these functions might be distributed across multiple servers.</t>
      <t>Once the common secret is established using X3DH agreement and secure session is created between sender and receiver devices using Double Ratchet session, the credential application on the sender’s device will encrypt the provisioning information using sender encryption key and send it to the intermediary server. Receiver device will receive the encrypted message from signal intermediary server, using X3DH and Double Ratchet algorithms will create the receiver encryption key  will decrypt the message and get the provisioning data. Credential management application (digital wallet)  on both sender and receiver devices will have to implement Signal Protocol or integrate with Signal application API in order to exchange encrypted messages. For stateless sharing, the receiver digital wallet will take that provisioning information and provision the credential.</t>
      <t>For the stateful sharing flow, the receiving credential application will encrypt modified data (e.g. CCC Key Signing Request) and send it to Signal intermediary server. Sender device will read the encrypted data, re-create receiving decryption key and decrypt the message.  Sender will then generate CCC Key Import Request, encrypt the data with sending encryption key and upload it to intermediary server. Receiver device will read the encrypted message from intermediary server, generate receiver decryption key and decrypt the data. Now receiver device can provision new credential in the digital wallet .</t>
      <t>While this is guaranteed to be a secure method of transferring data between users, there are a few considerations.</t>
      <ul spacing="normal">
        <li>Both sender and receiver devices have to implement support of Signal Protocol in credential management application (digital wallet) or have Signal application installed and Signal API supported in digital wallet.</li>
        <li>Intermediate Signal server has to be implemented to support Signal Protocol or user accounts have to be created within Signal Application servers.</li>
        <li>Intermediate server (servers) in Signal Protocol require user identities / authentication and device identities. Signal intermediate server, even though may not decrypt the content of the messages, may correlate the fact of information exchanges between certain users and certain devices by their identities.</li>
        <li>More security considerations are listed in "Security considerations" section of Signal specification: https://signal.org/docs/specifications/sesame/#security-considerations</li>
      </ul>
      <t>Signal application is currently available on iOS and Android, so most users are able to make accounts for free. However, it may limit sharing for sender and receiver pairs that only have one method of contact outside of Signal. It is worth noting that while the Signal Protocol is open source, the Signal Protocol libraries for iOS and Android are not. The libraries are licensed under the GPLv3 license, which allows for use and modification, but they also include some proprietary components that are not open source.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TODO Security</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner">
              <organization/>
            </author>
            <date month="March" year="1997"/>
            <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>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba">
              <organization/>
            </author>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="Signal-20" target="https://signal.org/docs/specifications/sesame/">
          <front>
            <title>Signal Protocol. The Sesame Algorithm: Session Management for Asynchronous Message Encryption. Revision 2, 2017-04-143</title>
            <author fullname="Moxie Marlinspike">
              <organization/>
            </author>
            <author fullname="Trevor Perrin">
              <organization/>
            </author>
            <date year="2017" month="April"/>
          </front>
        </reference>
        <reference anchor="Tigress-req-02" target="https://github.com/dimmyvi/tigress-requirements/">
          <front>
            <title>Tigress requirements</title>
            <author initials="D." surname="Vinokurov" fullname="Dmitry Vinokurov">
              <organization/>
            </author>
            <author initials="A." surname="Pelletier" fullname="Alex Pelletier">
              <organization/>
            </author>
            <author initials="C." surname="Astiz" fullname="Casey Astiz">
              <organization/>
            </author>
            <author initials="B." surname="Lassey" fullname="Brad Lassey">
              <organization/>
            </author>
            <date year="2023" month="February"/>
          </front>
        </reference>
      </references>
    </references>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknow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